mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
radv: fix incorrect buffer_list advance for multi-planar descriptors
If we have an array of multi-planar descriptors, buffer_list was incorrectly incremented and this could have overwritten some BO entries. In practice, this situation should be very rare because most of the applications enable the global BO list. Cc: mesa-stable Closes: #10559 Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28816>
This commit is contained in:
parent
39fdd2aec0
commit
730ba8322f
1 changed files with 4 additions and 3 deletions
|
|
@ -1295,7 +1295,7 @@ radv_update_descriptor_sets_impl(struct radv_device *device, struct radv_cmd_buf
|
|||
|
||||
ptr += binding_layout->size * writeset->dstArrayElement / 4;
|
||||
buffer_list += binding_layout->buffer_offset;
|
||||
buffer_list += writeset->dstArrayElement;
|
||||
buffer_list += writeset->dstArrayElement * radv_descriptor_type_buffer_count(writeset->descriptorType);
|
||||
for (j = 0; j < writeset->descriptorCount; ++j) {
|
||||
switch (writeset->descriptorType) {
|
||||
case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC:
|
||||
|
|
@ -1354,7 +1354,7 @@ radv_update_descriptor_sets_impl(struct radv_device *device, struct radv_cmd_buf
|
|||
break;
|
||||
}
|
||||
ptr += binding_layout->size / 4;
|
||||
++buffer_list;
|
||||
buffer_list += radv_descriptor_type_buffer_count(writeset->descriptorType);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1632,7 +1632,8 @@ radv_update_descriptor_set_with_template_impl(struct radv_device *device, struct
|
|||
}
|
||||
pSrc += templ->entry[i].src_stride;
|
||||
pDst += templ->entry[i].dst_stride;
|
||||
++buffer_list;
|
||||
|
||||
buffer_list += radv_descriptor_type_buffer_count(templ->entry[i].descriptor_type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue