mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
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:8d2654a419("radv: Support VK_EXT_inline_uniform_block.") Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> (cherry picked from commit7562a2cbe3)
This commit is contained in:
parent
a352e1d2f7
commit
e2b416e8ae
1 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue