[Mesa-dev] [PATCH] radv: Fix off by one in MAX_VBS assert.

Samuel Pitoiset samuel.pitoiset at gmail.com
Fri Aug 25 12:53:13 UTC 2017


Thanks Bas!

This fixes CTS 
dEQP-VK.pipeline.vertex_input.max_attributes.32_attributes.binding_one_to_one.interleaved

Tested-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

On 08/25/2017 02:15 PM, Bas Nieuwenhuizen wrote:
> e.g. 0 + 32 <= 32 should be valid.
> 
> Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
> ---
>   src/amd/vulkan/radv_cmd_buffer.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
> index cbe0de17db4..5cb994c3604 100644
> --- a/src/amd/vulkan/radv_cmd_buffer.c
> +++ b/src/amd/vulkan/radv_cmd_buffer.c
> @@ -2025,7 +2025,7 @@ void radv_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 = radv_buffer_from_handle(pBuffers[i]);
>   		vb[firstBinding + i].offset = pOffsets[i];
> 


More information about the mesa-dev mailing list