mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 17:10:11 +01:00
pvr: Fix dynamic offset patching
Previously the set of dynamic offsets were being reused per each
binding. That's now fixed, by using an offset to determine where
each binding's dynamic offsets reside.
Tests fixed:
dEQP-VK.binding_model.descriptor_copy.{compute,graphics}
.{uniform,storage}_buffer_dynamic_0
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Fixes: aa791961a8 ("pvr: Add support for dynamic buffers descriptors")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23587>
This commit is contained in:
parent
4071b8e7f3
commit
b902fb2e14
1 changed files with 4 additions and 1 deletions
|
|
@ -3727,6 +3727,7 @@ static VkResult pvr_cmd_buffer_upload_patched_desc_set(
|
|||
struct pvr_device *device = cmd_buffer->device;
|
||||
struct pvr_suballoc_bo *patched_desc_set_bo;
|
||||
uint32_t *src_mem_ptr, *dst_mem_ptr;
|
||||
uint32_t desc_idx_offset = 0;
|
||||
VkResult result;
|
||||
|
||||
assert(desc_set->layout->dynamic_buffer_count > 0);
|
||||
|
|
@ -3801,7 +3802,7 @@ static VkResult pvr_cmd_buffer_upload_patched_desc_set(
|
|||
/* clang-format on */
|
||||
const pvr_dev_addr_t addr =
|
||||
PVR_DEV_ADDR_OFFSET(descriptors[desc_idx].buffer_dev_addr,
|
||||
dynamic_offsets[desc_idx]);
|
||||
dynamic_offsets[desc_idx + desc_idx_offset]);
|
||||
const VkDeviceSize range =
|
||||
MIN2(descriptors[desc_idx].buffer_desc_range,
|
||||
descriptors[desc_idx].buffer_whole_range -
|
||||
|
|
@ -3844,6 +3845,8 @@ static VkResult pvr_cmd_buffer_upload_patched_desc_set(
|
|||
PVR_DW_TO_BYTES(size_info->secondary));
|
||||
}
|
||||
}
|
||||
|
||||
desc_idx_offset += binding->descriptor_count;
|
||||
}
|
||||
|
||||
*bo_out = patched_desc_set_bo;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue