From: Faith Ekstrand Date: Tue, 31 Jan 2023 02:11:56 +0000 (-0600) Subject: nvk: Fix dynamic buffer descriptor copies X-Git-Tag: upstream/23.3.3~4312 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1af0f983f4316427bc2853b75ac24cef8e2b9aa;p=platform%2Fupstream%2Fmesa.git nvk: Fix dynamic buffer descriptor copies Part-of: --- diff --git a/src/nouveau/vulkan/nvk_descriptor_set.c b/src/nouveau/vulkan/nvk_descriptor_set.c index 4e1a799..03783ac 100644 --- a/src/nouveau/vulkan/nvk_descriptor_set.c +++ b/src/nouveau/vulkan/nvk_descriptor_set.c @@ -214,8 +214,17 @@ nvk_UpdateDescriptorSets(VkDevice device, } switch (src_binding_layout->type) { - /* Insert any special copy stuff here */ - + case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: { + const uint32_t dst_dyn_start = + dst_binding_layout->dynamic_buffer_index + copy->dstArrayElement; + const uint32_t src_dyn_start = + src_binding_layout->dynamic_buffer_index + copy->srcArrayElement; + typed_memcpy(&dst->dynamic_buffers[dst_dyn_start], + &src->dynamic_buffers[src_dyn_start], + copy->descriptorCount); + break; + } default: break; }