Mesa (master): radv: fix vkUpdateDescriptorSets with inline uniform blocks
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Oct 23 08:18:56 UTC 2019
Module: Mesa
Branch: master
Commit: 7562a2cbe3e963247f32d6bd9d434036ad1a93dc
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7562a2cbe3e963247f32d6bd9d434036ad1a93dc
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Mon Oct 21 13:32:05 2019 +0200
radv: fix vkUpdateDescriptorSets with inline uniform blocks
descriptorCount is the number of bytes into the descriptor, so
it shouldn't be used as an index. srcArrayElement/dstArrayElement
specify the starting byte offset within the binding to copy from/to.
This fixes new CTS tests:
dEQP-VK.binding_model.descriptor_copy.*.inline_uniform_block_*
dEQP-VK.binding_model.descriptor_copy.*.mix_3
dEQP-VK.binding_model.descriptor_copy.*.mix_array1
Fixes: 8d2654a4197 ("radv: Support VK_EXT_inline_uniform_block.")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
---
src/amd/vulkan/radv_descriptor_set.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/amd/vulkan/radv_descriptor_set.c b/src/amd/vulkan/radv_descriptor_set.c
index 6f999a4595b..57dfd2232b9 100644
--- a/src/amd/vulkan/radv_descriptor_set.c
+++ b/src/amd/vulkan/radv_descriptor_set.c
@@ -1076,6 +1076,14 @@ void radv_update_descriptor_sets(
src_ptr += src_binding_layout->offset / 4;
dst_ptr += dst_binding_layout->offset / 4;
+ if (src_binding_layout->type == VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT) {
+ src_ptr += copyset->srcArrayElement / 4;
+ dst_ptr += copyset->dstArrayElement / 4;
+
+ memcpy(dst_ptr, src_ptr, copyset->descriptorCount);
+ continue;
+ }
+
src_ptr += src_binding_layout->size * copyset->srcArrayElement / 4;
dst_ptr += dst_binding_layout->size * copyset->dstArrayElement / 4;
More information about the mesa-commit
mailing list