Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vkd3d: reject creating a resource that is placed if the heap is too s… #702

Merged
merged 1 commit into from
Jun 17, 2021

Conversation

hakzsam
Copy link
Contributor

@hakzsam hakzsam commented Jun 17, 2021

Fixes a Cyberpunk 2077 game bug, again...

libs/vkd3d/resource.c Outdated Show resolved Hide resolved
…mall

The spec is pretty clear that it's invalid usage. Return E_INVALIDARG
like native drivers.

This is a workaround for the inventory GPU hang with Cyberpunk 2077
which is actually a game bug. Luckily the game handles this error
properly.

The problem is that the game always assume that an image with 2 mips
is smaller than the same image but with 6 mips. This is not always
true if the swizzle mode is different and a recent Mesa update changed
that. Then the game creates a D3D12 heap that is too small and this
triggered a memory violation and then a GPU hang with RADV.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
@HansKristian-Work HansKristian-Work merged commit 72d9b32 into HansKristian-Work:master Jun 17, 2021
@hakzsam hakzsam deleted the cp77_fix branch June 18, 2021 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants