anv: Implement VK_KHX_external_semaphore_capabilities
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 16 Feb 2017 00:00:05 +0000 (16:00 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 3 May 2017 22:09:46 +0000 (15:09 -0700)
This just stubs things out.  Real external semaphore support will come
with VK_KHX_external_semaphore_fd.

Reviewed-by: Chad Versace <chadversary@chromium.org>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_entrypoints_gen.py
src/intel/vulkan/anv_queue.c

index 289e79b231c3db537c05682516c28e90c36770b7..639c7456c3fdb8896d8b82bb2d6b4418f211a3ed 100644 (file)
@@ -331,6 +331,10 @@ static const VkExtensionProperties global_extensions[] = {
       .extensionName = VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
       .specVersion = 1,
    },
+   {
+      .extensionName = VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME,
+      .specVersion = 1,
+   },
 };
 
 static const VkExtensionProperties device_extensions[] = {
index 61a20e2cd5a2a24d54a479e5664395d4cabb31bc..fe95397d65c3e5d3b3fbbc639a6c8ae22419b0af 100644 (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_capabilities',
     'VK_KHX_multiview',
 ]
 
index f6ff41f84b29dee0e0a003daca40d9461769c52f..906eb25af0dd0a6a179d1c63bb62d37f89cd644e 100644 (file)
@@ -533,3 +533,16 @@ void anv_DestroySemaphore(
 
    vk_free2(&device->alloc, pAllocator, semaphore);
 }
+
+void anv_GetPhysicalDeviceExternalSemaphorePropertiesKHX(
+    VkPhysicalDevice                            physicalDevice,
+    const VkPhysicalDeviceExternalSemaphoreInfoKHX* pExternalSemaphoreInfo,
+    VkExternalSemaphorePropertiesKHX*           pExternalSemaphoreProperties)
+{
+   switch (pExternalSemaphoreInfo->handleType) {
+   default:
+      pExternalSemaphoreProperties->exportFromImportedHandleTypes = 0;
+      pExternalSemaphoreProperties->compatibleHandleTypes = 0;
+      pExternalSemaphoreProperties->externalSemaphoreFeatures = 0;
+   }
+}