From 0941d1a574f46c558b0037be81d9a57004f4290b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fredrik=20H=C3=B6glund?= Date: Tue, 7 Mar 2017 01:53:20 +0100 Subject: [PATCH] radv: fix the dynamic buffer index in vkCmdBindDescriptorSets MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/amd/vulkan/radv_cmd_buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2