anv: fix assert in anv_CmdBindDescriptorSets()
authorSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 17 Jul 2018 06:55:48 +0000 (08:55 +0200)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Wed, 18 Jul 2018 06:54:23 +0000 (08:54 +0200)
The assert is checking that we are not binding more descriptor sets
than the supported by the driver. When binding the descriptor set
number MAX_SETS-1, it was breaking the assert because
descriptorSetCount = 1.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Cc: <mesa-stable@lists.freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/vulkan/anv_cmd_buffer.c

index 201b73ad45a7d10e184c4065ad7d6692e8b36a2c..8ef71b0ed9cfc387c33c0ffb87d76059f32df9f6 100644 (file)
@@ -613,7 +613,7 @@ void anv_CmdBindDescriptorSets(
    ANV_FROM_HANDLE(anv_cmd_buffer, cmd_buffer, commandBuffer);
    ANV_FROM_HANDLE(anv_pipeline_layout, layout, _layout);
 
-   assert(firstSet + descriptorSetCount < MAX_SETS);
+   assert(firstSet + descriptorSetCount <= MAX_SETS);
 
    for (uint32_t i = 0; i < descriptorSetCount; i++) {
       ANV_FROM_HANDLE(anv_descriptor_set, set, pDescriptorSets[i]);