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

Vulkan: Partially workaround MoltenVK InvalidResource error #4880

Merged
merged 4 commits into from May 12, 2023

Conversation

riperiperi
Copy link
Member

There's a bug with MoltenVK where binding a storage buffer more than once with different stage flags causes resource usage to register incorrectly, which causes the command buffer to fail. There's more information here: KhronosGroup/MoltenVK#1870

This PR partially works around this issue by setting the storage buffer usage flags to all active stages when running under MVK. This means that it will always register the buffer with all possible stages it can be used on.

This can still break if there are non-rasterizing draws, which generally happens with TFB games. Working around that is a lot more involved, and it's probably not worth it when we don't have TFB emulation anyways.

This should be removed when the issue is fixed in MoltenVK.

@riperiperi riperiperi added gpu Related to Ryujinx.Graphics fix Fix something os:macOS An issue or feature request exclusively relating to macOS labels May 11, 2023
Copy link
Member

@gdkchan gdkchan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks.

@gdkchan gdkchan merged commit 5fda543 into Ryujinx:master May 12, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix something gpu Related to Ryujinx.Graphics os:macOS An issue or feature request exclusively relating to macOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants