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

Support MVK_ALLOW_METAL_EVENTS on NVIDIA and Rosetta2 #1695

Closed
billhollings opened this issue Aug 22, 2022 · 2 comments · Fixed by #1709
Closed

Support MVK_ALLOW_METAL_EVENTS on NVIDIA and Rosetta2 #1695

billhollings opened this issue Aug 22, 2022 · 2 comments · Fixed by #1709
Labels
Bug Completed Issue has been fixed, or enhancement implemented.

Comments

@billhollings
Copy link
Contributor

MoltenVK disables the use of MTLEvents for semaphores on NVIDIA and Rosetta2, since testing indicates that MTLEvents were problematic in this situation.

However, further testing indicates that this is not always the case, and we should create a runtime environment that permits MTLEvents to be used in these situations, if selected by the app.

Potentially override MVK_ALLOW_METAL_EVENTS and MVK_ALLOW_METAL_FENCES with an enum config that would allow options like "use MTLEvents always" and "prefer MTLEvents in most cases", as well as "prefer MTLFences", to allow taking into consideration the NVIDIA and Rosetta2 issues, but also allow them to be overridden by the app.

@billhollings billhollings changed the title Support MVK_ALLOW_METAL_EVENTS on NVIDIA Support MVK_ALLOW_METAL_EVENTS on NVIDIA and Rosetta2 Aug 22, 2022
@TellowKrinkle
Copy link
Contributor

BTW do we have a small, consistent reproduction of the MTLEvent lockup on Nvidia/Rosetta2? Or is it just whole games at the moment?

@billhollings
Copy link
Contributor Author

Merge PR #1709 permits this, providing the ability to use enumerated env var MVK_CONFIG_VK_SEMAPHORE_SUPPORT_STYLE to force MTLEvents to always be used, regardless of the GPU or platform, for apps that can safely run on those platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Completed Issue has been fixed, or enhancement implemented.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants