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: Switch from vkCreateMacOSSurfaceMVK() to vkCreateMetalSurfaceEXT() and Update MoltenVK #8728

Merged
merged 2 commits into from Apr 7, 2020

Conversation

stenzek
Copy link
Contributor

@stenzek stenzek commented Apr 7, 2020

Since we are creating the swap chain off the UI thread, we can't use anything which accesses the underlying NSView object. We create and set the Metal layer on the UI thread before the video backend is initialized. This extension is both compatible with MoltenVK and gfx-portability for accepting a layer at surface creation.

Also updates MoltenVK to the latest version since the older version probably doesn't support the new surface extension.

…EXT()

Since we are calling this off the UI thread, we can't use anything which
accesses the underlying NSView object. We create and set the Metal layer
on the UI thread before the video backend is initialized. This extension
is both compatible with MoltenVK and gfx-portability for accepting a
layer at surface creation.
@stenzek
Copy link
Contributor Author

stenzek commented Apr 7, 2020

Quickly tested with both MoltenVK and libportability and it appears to work fine.

@gilcel
Copy link

gilcel commented Apr 7, 2020

Works great and is faster too than previous versions with Vulkan! Well done!
Now we just need to fix the annoying crash with "GPU Texture Decoding" when enabled on macOS ;-)

@stenzek stenzek merged commit 960ba4f into dolphin-emu:master Apr 7, 2020
@stenzek stenzek deleted the update-mvk branch April 7, 2020 14:30
@gilcel
Copy link

gilcel commented Sep 29, 2020

A new big update for MoltenVK:
Release for Vulkan 1.1 Support and Vulkan SDK 1.2.154
https://github.com/KhronosGroup/MoltenVK/releases/tag/v1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants