diff options
author | Fredrik Höglund <[email protected]> | 2017-03-29 19:19:47 +0200 |
---|---|---|
committer | Fredrik Höglund <[email protected]> | 2017-04-07 00:54:46 +0200 |
commit | c1f8c83cb66b765f496b7f41259109d0d546bf5c (patch) | |
tree | 73877c23f42ba4890966bb85fbef9e1dfda4c599 /src/amd/vulkan/radv_private.h | |
parent | c6487bc48bb084ec3d4a3c331239d690dfc94436 (diff) |
radv: implement VK_KHR_descriptor_update_template
All offsets and strides are precomputed by
radv_CreateDescriptorUpdateTemplateKHR and stored in the template.
v2: Move the new struct declarations from radv_descriptor_set.h
to radv_private.h (Bas)
Signed-off-by: Fredrik Höglund <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_private.h')
-rw-r--r-- | src/amd/vulkan/radv_private.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index e39819fff3e..580c1197e64 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -565,6 +565,37 @@ struct radv_descriptor_pool { struct list_head vram_list; }; +struct radv_descriptor_update_template_entry { + VkDescriptorType descriptor_type; + + /* The number of descriptors to update */ + uint16_t descriptor_count; + + /* Into mapped_ptr or dynamic_descriptors, in units of the respective array */ + uint16_t dst_offset; + + /* In dwords. Not valid/used for dynamic descriptors */ + uint16_t dst_stride; + + uint16_t buffer_offset; + uint16_t buffer_count; + + /* Only valid for combined image samplers and samplers */ + uint16_t has_sampler; + + /* In bytes */ + size_t src_offset; + size_t src_stride; + + /* For push descriptors */ + uint32_t *immutable_samplers; +}; + +struct radv_descriptor_update_template { + uint32_t entry_count; + struct radv_descriptor_update_template_entry entry[0]; +}; + struct radv_buffer { struct radv_device * device; VkDeviceSize size; @@ -1363,6 +1394,13 @@ radv_update_descriptor_sets(struct radv_device *device, uint32_t descriptorCopyCount, const VkCopyDescriptorSet *pDescriptorCopies); +void +radv_update_descriptor_set_with_template(struct radv_device *device, + struct radv_cmd_buffer *cmd_buffer, + struct radv_descriptor_set *set, + VkDescriptorUpdateTemplateKHR descriptorUpdateTemplate, + const void *pData); + void radv_initialise_cmask(struct radv_cmd_buffer *cmd_buffer, struct radv_image *image, uint32_t value); void radv_initialize_dcc(struct radv_cmd_buffer *cmd_buffer, @@ -1419,6 +1457,7 @@ RADV_DEFINE_NONDISP_HANDLE_CASTS(radv_buffer_view, VkBufferView) RADV_DEFINE_NONDISP_HANDLE_CASTS(radv_descriptor_pool, VkDescriptorPool) RADV_DEFINE_NONDISP_HANDLE_CASTS(radv_descriptor_set, VkDescriptorSet) RADV_DEFINE_NONDISP_HANDLE_CASTS(radv_descriptor_set_layout, VkDescriptorSetLayout) +RADV_DEFINE_NONDISP_HANDLE_CASTS(radv_descriptor_update_template, VkDescriptorUpdateTemplateKHR) RADV_DEFINE_NONDISP_HANDLE_CASTS(radv_device_memory, VkDeviceMemory) RADV_DEFINE_NONDISP_HANDLE_CASTS(radv_fence, VkFence) RADV_DEFINE_NONDISP_HANDLE_CASTS(radv_event, VkEvent) |