mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Vulkan: Pass CAMetalLayer to MoltenVK instead of NSView
Gets rid of the warning for calling [NSView layer] off the main thread.
This commit is contained in:
@ -342,6 +342,10 @@ void VideoBackend::PrepareWindow(WindowSystemInfo& wsi)
|
|||||||
// layer.contentsScale = factor
|
// layer.contentsScale = factor
|
||||||
reinterpret_cast<void (*)(id, SEL, double)>(objc_msgSend)(layer, sel_getUid("setContentsScale:"),
|
reinterpret_cast<void (*)(id, SEL, double)>(objc_msgSend)(layer, sel_getUid("setContentsScale:"),
|
||||||
factor);
|
factor);
|
||||||
|
|
||||||
|
// Store the layer pointer, that way MoltenVK doesn't call [NSView layer] outside the main thread.
|
||||||
|
wsi.render_surface = layer;
|
||||||
|
|
||||||
// The Metal version included with MacOS 10.13 and below does not support several features we
|
// The Metal version included with MacOS 10.13 and below does not support several features we
|
||||||
// require. Furthermore, the drivers seem to choke on our shaders (mainly Intel). So, we warn
|
// require. Furthermore, the drivers seem to choke on our shaders (mainly Intel). So, we warn
|
||||||
// the user that this is an unsupported configuration, but permit them to continue.
|
// the user that this is an unsupported configuration, but permit them to continue.
|
||||||
|
Reference in New Issue
Block a user