diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-07-15 02:07:59 +0200 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-07-15 08:59:38 -0700 |
commit | 97931f02975b600cbcc6362ac2fcb6e3f426fe7e (patch) | |
tree | 2e62e26e72a1d2690894a62502d0b00365f7f3fc /src | |
parent | 0ee8d81718f059592ab484382c93073c43b71f54 (diff) |
radv: Add support for VK_KHR_get_memory_requirements2.
Fished the SparseImage call out of the headers as the spec missed
the definition.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Acked-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/vulkan/radv_device.c | 31 | ||||
-rw-r--r-- | src/amd/vulkan/radv_entrypoints_gen.py | 1 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 3b3a368d19b..c5d66b8bc6d 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -137,6 +137,10 @@ static const VkExtensionProperties common_device_extensions[] = { .extensionName = VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME, .specVersion = 1, }, + { + .extensionName = VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME, + .specVersion = 1, + }, }; static VkResult @@ -2206,6 +2210,15 @@ void radv_GetBufferMemoryRequirements( pMemoryRequirements->size = align64(buffer->size, pMemoryRequirements->alignment); } +void radv_GetBufferMemoryRequirements2KHR( + VkDevice device, + const VkBufferMemoryRequirementsInfo2KHR* pInfo, + VkMemoryRequirements2KHR* pMemoryRequirements) +{ + radv_GetBufferMemoryRequirements(device, pInfo->buffer, + &pMemoryRequirements->memoryRequirements); +} + void radv_GetImageMemoryRequirements( VkDevice device, VkImage _image, @@ -2219,6 +2232,15 @@ void radv_GetImageMemoryRequirements( pMemoryRequirements->alignment = image->alignment; } +void radv_GetImageMemoryRequirements2KHR( + VkDevice device, + const VkImageMemoryRequirementsInfo2KHR* pInfo, + VkMemoryRequirements2KHR* pMemoryRequirements) +{ + radv_GetImageMemoryRequirements(device, pInfo->image, + &pMemoryRequirements->memoryRequirements); +} + void radv_GetImageSparseMemoryRequirements( VkDevice device, VkImage image, @@ -2228,6 +2250,15 @@ void radv_GetImageSparseMemoryRequirements( stub(); } +void radv_GetImageSparseMemoryRequirements2KHR( + VkDevice device, + const VkImageSparseMemoryRequirementsInfo2KHR* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2KHR* pSparseMemoryRequirements) +{ + stub(); +} + void radv_GetDeviceMemoryCommitment( VkDevice device, VkDeviceMemory memory, diff --git a/src/amd/vulkan/radv_entrypoints_gen.py b/src/amd/vulkan/radv_entrypoints_gen.py index 3474c789ea8..d47a7011197 100644 --- a/src/amd/vulkan/radv_entrypoints_gen.py +++ b/src/amd/vulkan/radv_entrypoints_gen.py @@ -42,6 +42,7 @@ supported_extensions = [ 'VK_KHR_wayland_surface', 'VK_KHR_xcb_surface', 'VK_KHR_xlib_surface', + 'VK_KHR_get_memory_requirements2', ] # We generate a static hash table for entry point lookup |