radv: fix the dynamic buffer index in vkCmdBindDescriptorSets

This fixes the wrong dynamic buffer descriptors being updated when
firstSet > 0.

Cc: 17.0 <mesa-stable@lists.freedesktop.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Fredrik Höglund 2017-03-07 01:53:20 +01:00 committed by Bas Nieuwenhuizen
parent 69063d0561
commit 0941d1a574
1 changed files with 1 additions and 1 deletions

View File

@ -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);