mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +02:00
anv: Reject VkMemoryAllocateInfo::allocationSize == 0
The Vulkan 1.0.33 spec says "allocationSize must be greater than 0". Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
This commit is contained in:
parent
5e97b8f5ce
commit
72ffe8318d
1 changed files with 2 additions and 5 deletions
|
|
@ -1246,11 +1246,8 @@ VkResult anv_AllocateMemory(
|
|||
|
||||
assert(pAllocateInfo->sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO);
|
||||
|
||||
if (pAllocateInfo->allocationSize == 0) {
|
||||
/* Apparently, this is allowed */
|
||||
*pMem = VK_NULL_HANDLE;
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
/* The Vulkan 1.0.33 spec says "allocationSize must be greater than 0". */
|
||||
assert(pAllocateInfo->allocationSize > 0);
|
||||
|
||||
/* We support exactly one memory heap. */
|
||||
assert(pAllocateInfo->memoryTypeIndex == 0 ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue