From 6fc278ae4f888b1b30410910c10d64e22e9224c3 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 12 Jan 2016 11:43:48 -0800 Subject: [PATCH] anv/UpdateDescriptorSets: Respect write.dstArrayElement --- src/vulkan/anv_descriptor_set.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vulkan/anv_descriptor_set.c b/src/vulkan/anv_descriptor_set.c index 6e53f3897c8..3e11047c673 100644 --- a/src/vulkan/anv_descriptor_set.c +++ b/src/vulkan/anv_descriptor_set.c @@ -472,6 +472,7 @@ void anv_UpdateDescriptorSets( &set->layout->binding[write->dstBinding]; struct anv_descriptor *desc = &set->descriptors[bind_layout->descriptor_index]; + desc += write->dstArrayElement; switch (write->descriptorType) { case VK_DESCRIPTOR_TYPE_SAMPLER: @@ -544,7 +545,8 @@ void anv_UpdateDescriptorSets( assert(buffer); struct anv_buffer_view *view = - &set->buffer_views[bind_layout->buffer_index + j]; + &set->buffer_views[bind_layout->buffer_index]; + view += write->dstArrayElement + j; const struct anv_format *format = anv_format_for_descriptor_type(write->descriptorType); -- 2.30.2