[Mesa-dev] [PATCH 1/3] anv/cmd_buffer: fix off by one error in assertion

Lionel Landwerlin lionel.g.landwerlin at intel.com
Mon Jul 24 23:54:28 UTC 2017


The spec even put it out clearly : "The sum 
of|firstBinding|and|bindingCount|*must*be less than or equal 
to|VkPhysicalDeviceLimits|::|maxVertexInputBindings"|

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

On 21/07/17 09:26, Iago Toral Quiroga wrote:
> ---
>   src/intel/vulkan/anv_cmd_buffer.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c
> index 7317674843..3b59af8f6f 100644
> --- a/src/intel/vulkan/anv_cmd_buffer.c
> +++ b/src/intel/vulkan/anv_cmd_buffer.c
> @@ -566,7 +566,7 @@ void anv_CmdBindVertexBuffers(
>      /* We have to defer setting up vertex buffer since we need the buffer
>       * stride from the pipeline. */
>   
> -   assert(firstBinding + bindingCount < MAX_VBS);
> +   assert(firstBinding + bindingCount <= MAX_VBS);
>      for (uint32_t i = 0; i < bindingCount; i++) {
>         vb[firstBinding + i].buffer = anv_buffer_from_handle(pBuffers[i]);
>         vb[firstBinding + i].offset = pOffsets[i];


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170725/285636ea/attachment-0001.html>


More information about the mesa-dev mailing list