diff options
author | Jason Ekstrand <[email protected]> | 2017-04-28 05:13:08 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-07-15 08:59:38 -0700 |
commit | 8c82aa5f43aa6aa288cb128f3866ca13bf1c505e (patch) | |
tree | 6998456175a24f03b6bdfb37843dbf3a3bb17b0d /src/intel/vulkan | |
parent | 5b57bdc1cf65ea5228c0399818416015cbb4736d (diff) |
anv: Implement VK_KHR_get_memory_requirements2
Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 47 | ||||
-rw-r--r-- | src/intel/vulkan/anv_entrypoints_gen.py | 1 |
2 files changed, 48 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 7bcda33b1b5..c2b3eb4a4a1 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -445,6 +445,10 @@ static const VkExtensionProperties device_extensions[] = { .specVersion = 1, }, { + .extensionName = VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME, + .specVersion = 1, + }, + { .extensionName = VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME, .specVersion = 1, }, @@ -1734,6 +1738,23 @@ void anv_GetBufferMemoryRequirements( pMemoryRequirements->memoryTypeBits = memory_types; } +void anv_GetBufferMemoryRequirements2KHR( + VkDevice _device, + const VkBufferMemoryRequirementsInfo2KHR* pInfo, + VkMemoryRequirements2KHR* pMemoryRequirements) +{ + anv_GetBufferMemoryRequirements(_device, pInfo->buffer, + &pMemoryRequirements->memoryRequirements); + + vk_foreach_struct(ext, pMemoryRequirements->pNext) { + switch (ext->sType) { + default: + anv_debug_ignored_stype(ext->sType); + break; + } + } +} + void anv_GetImageMemoryRequirements( VkDevice _device, VkImage _image, @@ -1759,6 +1780,23 @@ void anv_GetImageMemoryRequirements( pMemoryRequirements->memoryTypeBits = memory_types; } +void anv_GetImageMemoryRequirements2KHR( + VkDevice _device, + const VkImageMemoryRequirementsInfo2KHR* pInfo, + VkMemoryRequirements2KHR* pMemoryRequirements) +{ + anv_GetImageMemoryRequirements(_device, pInfo->image, + &pMemoryRequirements->memoryRequirements); + + vk_foreach_struct(ext, pMemoryRequirements->pNext) { + switch (ext->sType) { + default: + anv_debug_ignored_stype(ext->sType); + break; + } + } +} + void anv_GetImageSparseMemoryRequirements( VkDevice device, VkImage image, @@ -1768,6 +1806,15 @@ void anv_GetImageSparseMemoryRequirements( *pSparseMemoryRequirementCount = 0; } +void anv_GetImageSparseMemoryRequirements2KHR( + VkDevice device, + const VkImageSparseMemoryRequirementsInfo2KHR* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements) +{ + *pSparseMemoryRequirementCount = 0; +} + void anv_GetDeviceMemoryCommitment( VkDevice device, VkDeviceMemory memory, diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py index c2d35b72330..4cc1f6a8be0 100644 --- a/src/intel/vulkan/anv_entrypoints_gen.py +++ b/src/intel/vulkan/anv_entrypoints_gen.py @@ -34,6 +34,7 @@ MAX_API_VERSION = 1.0 SUPPORTED_EXTENSIONS = [ 'VK_KHR_descriptor_update_template', + 'VK_KHR_get_memory_requirements2', 'VK_KHR_get_physical_device_properties2', 'VK_KHR_get_surface_capabilities2', 'VK_KHR_incremental_present', |