nvk: support GetImageSparseMemoryRequirements2
authorYusuf Khan <yusisamerican@gmail.com>
Tue, 23 Aug 2022 21:28:05 +0000 (16:28 -0500)
committerMarge Bot <emma+marge@anholt.net>
Fri, 4 Aug 2023 21:31:58 +0000 (21:31 +0000)
KHR_get_memory_requirements2 was enabled but GetImageMemoryRequirem
ents2 was not. This stubs out GetImageMemoryRequirements2 to fix it.

Signed-off-by: Yusuf Khan <yusisamerican@gmail.com>
v2: remove the v1 version of the command as its provided by the
common runtime

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>

src/nouveau/vulkan/nvk_image.c

index 4bef90e..1fdcb27 100644 (file)
@@ -350,6 +350,16 @@ nvk_GetImageMemoryRequirements2(VkDevice _device,
 }
 
 VKAPI_ATTR void VKAPI_CALL
+nvk_GetImageSparseMemoryRequirements2(VkDevice device,
+                                      const VkImageSparseMemoryRequirementsInfo2* pInfo,
+                                      uint32_t* pSparseMemoryRequirementCount,
+                                      VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
+{
+   /* We dont support sparse images yet, this is a stub to get KHR_get_memory_requirements2 */
+   *pSparseMemoryRequirementCount = 0;
+}
+
+VKAPI_ATTR void VKAPI_CALL
 nvk_GetImageSubresourceLayout(VkDevice device,
                               VkImage _image,
                               const VkImageSubresource *pSubresource,