From fba0e078695847bf1e4fdc9e6a44099bf901f4cf Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Fri, 25 Aug 2017 14:14:12 +0200 Subject: [PATCH] radv: Fix off by one in MAX_VBS assert. e.g. 0 + 32 <= 32 should be valid. Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Tested-by: Samuel Pitoiset Reviewed-by: Dave Airlie --- 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 fe8f3f2cb8f..e1249641917 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -2029,7 +2029,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]; -- 2.30.2