From: Samuel Iglesias Gonsálvez Date: Tue, 17 Jul 2018 06:55:48 +0000 (+0200) Subject: anv: fix assert in anv_CmdBindDescriptorSets() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f29006256d32cd79e100d2dbde1188387a8dbed;p=mesa.git anv: fix assert in anv_CmdBindDescriptorSets() 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 Cc: Reviewed-by: Lionel Landwerlin --- diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index 201b73ad45a..8ef71b0ed9c 100644 --- a/src/intel/vulkan/anv_cmd_buffer.c +++ b/src/intel/vulkan/anv_cmd_buffer.c @@ -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]);