From 0f29006256d32cd79e100d2dbde1188387a8dbed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Samuel=20Iglesias=20Gons=C3=A1lvez?= Date: Tue, 17 Jul 2018 08:55:48 +0200 Subject: [PATCH] anv: fix assert in anv_CmdBindDescriptorSets() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/intel/vulkan/anv_cmd_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]); -- 2.30.2