[Mesa-dev] [PATCH v2 12/18] anv: Implement VK_KHX_external_semaphore_capabilities
Jason Ekstrand
jason at jlekstrand.net
Tue Mar 14 02:26:14 UTC 2017
This just stubs things out. Real external semaphore support will come
with VK_KHX_external_semaphore_fd.
---
src/intel/vulkan/anv_device.c | 4 ++++
src/intel/vulkan/anv_entrypoints_gen.py | 1 +
src/intel/vulkan/anv_queue.c | 13 +++++++++++++
3 files changed, 18 insertions(+)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 3b7ff7b..3674029 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -288,6 +288,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[] = {
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py
index 7d7ea5e..562ee49 100644
--- a/src/intel/vulkan/anv_entrypoints_gen.py
+++ b/src/intel/vulkan/anv_entrypoints_gen.py
@@ -42,6 +42,7 @@ supported_extensions = [
'VK_KHX_external_memory',
'VK_KHX_external_memory_capabilities',
'VK_KHX_external_memory_fd',
+ 'VK_KHX_external_semaphore_capabilities',
]
# We generate a static hash table for entry point lookup
diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c
index 0bd0ca8..dfb54bc 100644
--- a/src/intel/vulkan/anv_queue.c
+++ b/src/intel/vulkan/anv_queue.c
@@ -488,3 +488,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;
+ }
+}
--
2.5.0.400.gff86faf
More information about the mesa-dev
mailing list