[Mesa-dev] [PATCH] anv: Reject VkMemoryAllocateInfo::allocationSize == 0

Nanley Chery nanleychery at gmail.com
Fri Dec 2 22:45:36 UTC 2016


On Fri, Dec 02, 2016 at 02:37:32PM -0800, Chad Versace wrote:
> ---
>  src/intel/vulkan/anv_device.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)

This patch is,
Reviewed-by: Nanley Chery <nanley.g.chery at intel.com>

> 
> diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
> index d594df7d3b..e3d278df73 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 ||
> -- 
> 2.11.0.rc2
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list