anv: Implement VK_KHX_external_semaphore

Reviewed-by: Chad Versace <chadversary@chromium.org>
This commit is contained in:
Jason Ekstrand 2017-02-15 16:06:42 -08:00
parent 298e054d0c
commit 975c0f339f
3 changed files with 13 additions and 0 deletions

View File

@ -374,6 +374,10 @@ static const VkExtensionProperties device_extensions[] = {
.extensionName = VK_KHX_EXTERNAL_MEMORY_FD_EXTENSION_NAME,
.specVersion = 1,
},
{
.extensionName = VK_KHX_EXTERNAL_SEMAPHORE_EXTENSION_NAME,
.specVersion = 1,
},
{
.extensionName = VK_KHX_MULTIVIEW_EXTENSION_NAME,
.specVersion = 1,

View File

@ -48,6 +48,7 @@ SUPPORTED_EXTENSIONS = [
'VK_KHX_external_memory',
'VK_KHX_external_memory_capabilities',
'VK_KHX_external_memory_fd',
'VK_KHX_external_semaphore',
'VK_KHX_external_semaphore_capabilities',
'VK_KHX_multiview',
]

View File

@ -508,6 +508,14 @@ VkResult anv_CreateSemaphore(
if (semaphore == NULL)
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
const VkExportSemaphoreCreateInfoKHX *export =
vk_find_struct_const(pCreateInfo->pNext, EXPORT_SEMAPHORE_CREATE_INFO_KHX);
VkExternalSemaphoreHandleTypeFlagsKHX handleTypes =
export ? export->handleTypes : 0;
/* External semaphores are not yet supported */
assert(handleTypes == 0);
/* The DRM execbuffer ioctl always execute in-oder, even between
* different rings. As such, a dummy no-op semaphore is a perfectly
* valid implementation.