mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 20:08:06 +02: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>
(cherry picked from commit b902fb2e14)
This commit is contained in:
parent
753abf8b45
commit
b4cd2c34e5
2 changed files with 5 additions and 2 deletions
|
|
@ -1921,7 +1921,7 @@
|
|||
"description": "pvr: Fix dynamic offset patching",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "aa791961a82e1f5a9dd841c3e0398c3e80d09652"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -3391,6 +3391,7 @@ static VkResult pvr_cmd_buffer_upload_patched_desc_set(
|
|||
struct pvr_device *device = cmd_buffer->device;
|
||||
struct pvr_bo *patched_desc_set_bo;
|
||||
uint32_t *mem_ptr;
|
||||
uint32_t desc_idx_offset = 0;
|
||||
VkResult result;
|
||||
|
||||
assert(desc_set->layout->dynamic_buffer_count > 0);
|
||||
|
|
@ -3465,7 +3466,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 -
|
||||
|
|
@ -3507,6 +3508,8 @@ static VkResult pvr_cmd_buffer_upload_patched_desc_set(
|
|||
size_info->secondary * sizeof(uint32_t));
|
||||
}
|
||||
}
|
||||
|
||||
desc_idx_offset += binding->descriptor_count;
|
||||
}
|
||||
|
||||
pvr_bo_cpu_unmap(device, patched_desc_set_bo);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue