The open source OpenXR runtime
0
fork

Configure Feed

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

aux/vk: vk_create_semaphore_from_fd -> vk_create_semaphore_from_native

authored by

Ryan Pavlik and committed by
Jakob Bornecrantz
07f2e62e 7b24fca5

+13 -4
+1
doc/changes/auxiliary/mr.469.md
··· 1 + u/vk: Rename `vk_create_semaphore_from_fd` to `vk_create_semaphore_from_native`
+8 -3
src/xrt/auxiliary/vk/vk_helpers.c
··· 350 350 } 351 351 352 352 VkResult 353 - vk_create_semaphore_from_fd(struct vk_bundle *vk, int fd, VkSemaphore *out_sem) 353 + vk_create_semaphore_from_native(struct vk_bundle *vk, 354 + xrt_graphics_sync_handle_t native, 355 + VkSemaphore *out_sem) 354 356 { 355 357 VkResult ret; 356 358 ··· 364 366 // Nothing to cleanup 365 367 return ret; 366 368 } 367 - 369 + #if defined(XRT_GRAPHICS_SYNC_HANDLE_IS_FD) 368 370 VkImportSemaphoreFdInfoKHR import_semaphore_fd_info = { 369 371 .sType = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR, 370 372 .semaphore = *out_sem, 371 373 .handleType = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT, 372 - .fd = fd, 374 + .fd = native, 373 375 }; 374 376 ret = vk->vkImportSemaphoreFdKHR(vk->device, &import_semaphore_fd_info); 375 377 if (ret != VK_SUCCESS) { ··· 378 380 vk->vkDestroySemaphore(vk->device, *out_sem, NULL); 379 381 return ret; 380 382 } 383 + #else 384 + #error "Not implemented for this underlying handle type!" 385 + #endif 381 386 return ret; 382 387 } 383 388
+4 -1
src/xrt/auxiliary/vk/vk_helpers.h
··· 12 12 13 13 #include "xrt/xrt_compositor.h" 14 14 #include "xrt/xrt_vulkan_includes.h" 15 + #include "xrt/xrt_handles.h" 15 16 16 17 #ifdef __cplusplus 17 18 extern "C" { ··· 346 347 * @ingroup aux_vk 347 348 */ 348 349 VkResult 349 - vk_create_semaphore_from_fd(struct vk_bundle *vk, int fd, VkSemaphore *out_sem); 350 + vk_create_semaphore_from_native(struct vk_bundle *vk, 351 + xrt_graphics_sync_handle_t native, 352 + VkSemaphore *out_sem); 350 353 351 354 /*! 352 355 * @ingroup aux_vk