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

[util] Disable direct buffer mapping for Dragon Age Origins #3023

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

K0bin
Copy link
Collaborator

@K0bin K0bin commented Nov 2, 2022

Fixes #3022

I would still like to just get rid of direct buffer mapping because it causes nothing but problems.

Also, curiously I've tried calling Lock(0) and then Lock(DISCARD) a bunch of times on a POOL_DEFAULT + USAGE_WRITEONLY | USAGE_DYNAMIC buffer on Windows and I got the same pointer every time.

So either it straight up ignores DISCARD or it does some tracking whether the buffer is currently in use on the GPU.
We could of course also do that but I would rather not synchronize with the CS thread for every Lock(DISCARD) call.
So this is the solution for now.

Disabling direct buffer mapping makes it ignore DISCARD and go through the staging buffer upload path.
We recently added a memory limit to that which saves the day for Dragon Age Origins.

@K0bin K0bin requested a review from misyltoad November 2, 2022 13:47
@doitsujin doitsujin merged commit 892f676 into doitsujin:master Nov 2, 2022
@K0bin K0bin deleted the dragon-age branch November 2, 2022 15:14
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.

Dragon Age Origins OOM crash when alt-tabbed
3 participants