|| config.semaphoreHandleType == vk::VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR
|| config.semaphoreHandleType == vk::VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR)
{
- requireDeviceExtension("VK_KHR_external_semaphore_fd");
- requireDeviceExtension("VK_KHR_external_memory_fd");
+ m_context.requireDeviceFunctionality("VK_KHR_external_semaphore_fd");
+ m_context.requireDeviceFunctionality("VK_KHR_external_memory_fd");
}
- requireDeviceExtension("VK_EXT_external_memory_dma_buf");
+ if (config.memoryHandleType == vk::VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT)
+ {
++ m_context.requireDeviceFunctionality("VK_EXT_external_memory_dma_buf");
+ }
+
if (config.memoryHandleType == vk::VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR
|| config.memoryHandleType == vk::VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR
|| config.semaphoreHandleType == vk::VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR
vk::VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT,
"_win32"
},
+ {
+ vk::VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT,
+ vk::VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT,
+ "_dma_buf"
+ },
};
- const std::string semaphoreNames[vk::VK_SEMAPHORE_TYPE_KHR_LAST] =
+ const std::string semaphoreNames[vk::VK_SEMAPHORE_TYPE_LAST] =
{
"_binary_semaphore",
"_timeline_semaphore",