diff options
author | Chad Versace <[email protected]> | 2017-01-25 12:12:20 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-01-25 19:18:47 -0800 |
commit | 022e5c7e5a5a1ff40d7f5e8d3d768345e7746678 (patch) | |
tree | a76849e7bff5dc20b2b168802e575a0c235ec4aa /src/intel/vulkan/anv_formats.c | |
parent | cd03021c83c8f0060cac7a7a98b94726a69fdffa (diff) |
anv: Implement VK_KHR_get_physical_device_properties2
Reviewed-by: Jason Ekstranad <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_formats.c')
-rw-r--r-- | src/intel/vulkan/anv_formats.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c index 47f939b47ee..0e84960085a 100644 --- a/src/intel/vulkan/anv_formats.c +++ b/src/intel/vulkan/anv_formats.c @@ -462,6 +462,24 @@ void anv_GetPhysicalDeviceFormatProperties( pFormatProperties); } +void anv_GetPhysicalDeviceFormatProperties2KHR( + VkPhysicalDevice physicalDevice, + VkFormat format, + VkFormatProperties2KHR* pFormatProperties) +{ + anv_GetPhysicalDeviceFormatProperties(physicalDevice, format, + &pFormatProperties->formatProperties); + + for (struct anv_common *c = pFormatProperties->pNext; + c != NULL; c = c->pNext) { + switch (c->sType) { + default: + anv_debug_ignored_stype(c->sType); + break; + } + } +} + static VkResult anv_get_image_format_properties( struct anv_physical_device *physical_device, @@ -637,6 +655,31 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties( pImageFormatProperties); } +VkResult anv_GetPhysicalDeviceImageFormatProperties2KHR( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceImageFormatInfo2KHR* pImageFormatInfo, + VkImageFormatProperties2KHR* pImageFormatProperties) +{ + ANV_FROM_HANDLE(anv_physical_device, physical_device, physicalDevice); + VkResult result; + + result = anv_get_image_format_properties(physical_device, pImageFormatInfo, + &pImageFormatProperties->imageFormatProperties); + if (result != VK_SUCCESS) + return result; + + for (struct anv_common *c = pImageFormatProperties->pNext; + c != NULL; c = c->pNext) { + switch (c->sType) { + default: + anv_debug_ignored_stype(c->sType); + break; + } + } + + return VK_SUCCESS; +} + void anv_GetPhysicalDeviceSparseImageFormatProperties( VkPhysicalDevice physicalDevice, VkFormat format, @@ -650,3 +693,13 @@ void anv_GetPhysicalDeviceSparseImageFormatProperties( /* Sparse images are not yet supported. */ *pNumProperties = 0; } + +void anv_GetPhysicalDeviceSparseImageFormatProperties2KHR( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceSparseImageFormatInfo2KHR* pFormatInfo, + uint32_t* pPropertyCount, + VkSparseImageFormatProperties2KHR* pProperties) +{ + /* Sparse images are not yet supported. */ + *pPropertyCount = 0; +} |