diff options
author | Chad Versace <[email protected]> | 2016-11-17 12:45:26 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2016-12-14 12:04:58 -0800 |
commit | 72ffe8318d13a1f5ed86af7999a5c5723f2ff774 (patch) | |
tree | bea1f19d5338c5bf29bdbb97496bef4709fafc01 | |
parent | 5e97b8f5ce975dfb66cc46e6b4cc1e89eb8c1dc0 (diff) |
anv: Reject VkMemoryAllocateInfo::allocationSize == 0
The Vulkan 1.0.33 spec says "allocationSize must be greater than 0".
Reviewed-by: Nanley Chery <[email protected]>
-rw-r--r-- | src/intel/vulkan/anv_device.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index d594df7d3be..e3d278df733 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -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 || |