From 567ae3973864d17c01177a665ad9f1830a5d30e4 Mon Sep 17 00:00:00 2001 From: Karmjit Mahil Date: Wed, 9 Nov 2022 17:02:19 +0000 Subject: [PATCH] pvr: Explain why dynamic descriptors are allocated separately. Signed-off-by: Karmjit Mahil Reviewed-by: Frank Binns Part-of: --- src/imagination/vulkan/pvr_descriptor_set.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/imagination/vulkan/pvr_descriptor_set.c b/src/imagination/vulkan/pvr_descriptor_set.c index 69d3984b5ba..5d94874d77c 100644 --- a/src/imagination/vulkan/pvr_descriptor_set.c +++ b/src/imagination/vulkan/pvr_descriptor_set.c @@ -585,9 +585,10 @@ VkResult pvr_CreateDescriptorSetLayout( internal_binding->shader_stage_mask |= (1U << stage); - /* TODO: Do we have to allocate them at the end? We could speed it - * by allocating them here if not. */ - /* We allocate dynamics primary and secondaries at the end. */ + /* We allocate dynamics primary and secondaries separately so that we + * can do a partial update of USC shared registers by just DMAing the + * dynamic section and not having to re-DMA everything again. + */ if (descriptor_type != VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC && descriptor_type != VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) { struct pvr_descriptor_size_info size_info;