mirror of
https://github.com/WiVRn/WiVRn.git
synced 2026-11-20 09:01:39 -08:00
copy_mutex duplicated the pthread_mutex_t of vk.queue.mutex into main_queue->mutex by value, which creates an independent mutex: monado submissions on IPC client threads (comp_swapchain image transitions, vkDeviceWaitIdle in image_cleanup) did not exclude wivrn's layer_commit and encoder submissions on the same VkQueue. This intermittently corrupts driver state when a client creates or destroys swapchains while streaming, observed as SIGSEGV inside vkQueueSubmit2 and as uncaught vk::SystemError from layer_commit on NVIDIA. Initialize monado's queue mutexes and redirect vk.queue.mutex to the main queue os_mutex so every submitter takes the same lock.