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 <boris.brezillon@collabora.com> Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29670>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user