The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

c/client: Wait on Vulkan clients to complete rendering

authored by

Jakob Bornecrantz and committed by
Jakob Bornecrantz
7f33a55c 2f9511e2

+13
+13
src/xrt/compositor/client/comp_vk_client.c
··· 379 379 //! @todo We should be creating the handle ourselves in the future. 380 380 assert(!xrt_graphics_sync_handle_is_valid(sync_handle)); 381 381 382 + 383 + /*! 384 + * @!todo This is a temporary solution, the first step in getting proper 385 + * synchronization on Vulkan. The second is to create a fence and share 386 + * it similarly to what the EGL client code does. Even with a fence it 387 + * won't help that much as the multi-compositor waits on the fence in 388 + * commit before proceeding. To fix that a thread will be added in the 389 + * multi-compositor to wait on the fence and allow commit to return. 390 + * Better still is using Semaphores for it all. 391 + */ 392 + struct vk_bundle *vk = &c->vk; 393 + vk->vkDeviceWaitIdle(vk->device); 394 + 382 395 return xrt_comp_layer_commit(&c->xcn->base, frame_id, XRT_GRAPHICS_SYNC_HANDLE_INVALID); 383 396 } 384 397