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

Work around Vindictus constant buffer breakage #4406

Merged
merged 3 commits into from
Oct 27, 2024
Merged

Conversation

doitsujin
Copy link
Owner

@doitsujin doitsujin commented Oct 26, 2024

I hate everything about this, The game has some 432-byte constant buffer that it constantly DISCARDs but doesn't really bother writing to, yet it accesses the uninitialized data in the shader.

Before the memory rework, this was sort-of fine because per-buffer allocations were more or less set in stone, we'd grab some memory, clear it and then just reuse those regions, so any data not written at all would remain zeroed. The new allocator however allocates fresh memory on every MAP_WRITE_DISCARD, which means the memory we return to the app might have been used for a different purpose before and can contain stale data.

This workaround essentially zeroes all mapped memory allocations when they are freed. While this mostly happens on a worker thread, it is very CPU-intensive and slow, but I don't see any better ways to fix this game.

Fixes #4405.

@doitsujin doitsujin merged commit 640758a into master Oct 27, 2024
8 checks passed
@doitsujin doitsujin deleted the vindictus-fix branch October 27, 2024 00:44
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.

[d3d11][regression] Vindictus - Rendering issues
1 participant