From e2f13e7d41812eaf4a14bc46eeb978878eb478f4 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Thu, 13 Jun 2024 13:29:22 +0200 Subject: [PATCH] panvk: Don't bail out when allocationSize is zero in AllocateMemory() " VUID-VkMemoryAllocateInfo-allocationSize-07897 If the parameters do not define an import or export operation, allocationSize must be greater than 0 " That means allocationSize can be zero if we're importing, so we need to proceed with the import instead of bailing out. Signed-off-by: Boris Brezillon Reviewed-by: Mary Guillemard Acked-by: Erik Faye-Lund Part-of: --- src/panfrost/vulkan/panvk_device_memory.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/panfrost/vulkan/panvk_device_memory.c b/src/panfrost/vulkan/panvk_device_memory.c index a6428094464..00fb1cd54e9 100644 --- a/src/panfrost/vulkan/panvk_device_memory.c +++ b/src/panfrost/vulkan/panvk_device_memory.c @@ -26,12 +26,6 @@ panvk_AllocateMemory(VkDevice _device, assert(pAllocateInfo->sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO); - if (pAllocateInfo->allocationSize == 0) { - /* Apparently, this is allowed */ - *pMem = VK_NULL_HANDLE; - return VK_SUCCESS; - } - const VkExportMemoryAllocateInfo *export_info = vk_find_struct_const(pAllocateInfo->pNext, EXPORT_MEMORY_ALLOCATE_INFO);