radv: Fix off by one in MAX_VBS assert.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 25 Aug 2017 12:14:12 +0000 (14:14 +0200)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 25 Aug 2017 20:47:49 +0000 (22:47 +0200)
e.g. 0 + 32 <= 32 should be valid.

Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_cmd_buffer.c

index fe8f3f2..e124964 100644 (file)
@@ -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];