You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a Job system to split the initialization of my engine into different jobs. The problem is that calling vkCreateSwapchainKHR on a non-main thread mysteriously hangs with no validation errors(The same code works on Windows, see below).
However, when I move the initialization of Vulkan to main thread, it works.
So, Is there any thing I missed? or should we must call vkCreateSwapchainKHR on main thread on Macos?
AFAIK it's because macOS requires interacting with UI only on main thread, and swapchain creation in MoltenVK is UI surface interaction on the Metal/OS level.
AFAIK it's because macOS requires interacting with UI only on main thread, and swapchain creation in MoltenVK is UI surface interaction on the Metal/OS level.
Yes. In the Apple APIs, access to the main UI components, such as screens or views, which MoltenVK may need to do during swapchain creation, must be done on the main thread.
If swapchain creation is done from a secondary thread, MoltenVK dispatches any necessary UI calls to the main thread, and waits for them to complete. If the app is also waiting on the main thread for the swapchain to be created, this can cause a deadlock.
Hi everyone,
I'm using a Job system to split the initialization of my engine into different jobs. The problem is that calling vkCreateSwapchainKHR on a non-main thread mysteriously hangs with no validation errors(The same code works on Windows, see below).
However, when I move the initialization of Vulkan to main thread, it works.
So, Is there any thing I missed? or should we must call vkCreateSwapchainKHR on main thread on Macos?
The text was updated successfully, but these errors were encountered: