From: Fredrik Höglund Date: Tue, 7 Mar 2017 00:53:20 +0000 (+0100) Subject: radv: fix the dynamic buffer index in vkCmdBindDescriptorSets X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0941d1a574f46c558b0037be81d9a57004f4290b;p=mesa.git radv: fix the dynamic buffer index in vkCmdBindDescriptorSets This fixes the wrong dynamic buffer descriptors being updated when firstSet > 0. Cc: 17.0 Signed-off-by: Fredrik Höglund Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 821306556ec..5b44ce84529 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -1823,7 +1823,7 @@ void radv_CmdBindDescriptorSets( radv_bind_descriptor_set(cmd_buffer, set, idx); for(unsigned j = 0; j < set->layout->dynamic_offset_count; ++j, ++dyn_idx) { - unsigned idx = j + layout->set[i].dynamic_offset_start; + unsigned idx = j + layout->set[i + firstSet].dynamic_offset_start; uint32_t *dst = cmd_buffer->dynamic_buffers + idx * 4; assert(dyn_idx < dynamicOffsetCount);