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:
parent
a545344268
commit
fb947296b0
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue