mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
pvr: Fix dynamic desc offset storage
The index at which the dynamic descriptor offsets were being
stored was incorrect, leading to some offsets not being stored and
thus `0` being applied as the offset to the descriptors instead.
dEQP test fixed:
dEQP-VK.binding_model.shader_access.{primary,secondary}_cmd_buf
.uniform_buffer_dynamic
.{vertex,fragment,compute,vertex_fragment}
.multiple_discontiguous_descriptor_sets
.*_descriptor.offset_view_{,non}zero_dynamic_nonzero
Fixes: aa791961a8 ("pvr: Add support for dynamic buffers descriptors")
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25320>
(cherry picked from commit feafb8a256)
This commit is contained in:
parent
14783f1d4f
commit
52fbebd9d8
2 changed files with 6 additions and 6 deletions
|
|
@ -374,7 +374,7 @@
|
|||
"description": "pvr: Fix dynamic desc offset storage",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "aa791961a82e1f5a9dd841c3e0398c3e80d09652",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2587,12 +2587,12 @@ void pvr_CmdBindDescriptorSets(VkCommandBuffer commandBuffer,
|
|||
|
||||
if (dynamicOffsetCount > 0) {
|
||||
PVR_FROM_HANDLE(pvr_pipeline_layout, pipeline_layout, _layout);
|
||||
uint32_t starting_idx = 0;
|
||||
uint32_t set_offset = 0;
|
||||
|
||||
for (uint32_t set = 0; set < firstSet; set++)
|
||||
starting_idx += pipeline_layout->set_layout[set]->dynamic_buffer_count;
|
||||
set_offset += pipeline_layout->set_layout[set]->dynamic_buffer_count;
|
||||
|
||||
assert(starting_idx + dynamicOffsetCount <=
|
||||
assert(set_offset + dynamicOffsetCount <=
|
||||
ARRAY_SIZE(descriptor_state->dynamic_offsets));
|
||||
|
||||
/* From the Vulkan 1.3.238 spec. :
|
||||
|
|
@ -2602,8 +2602,8 @@ void pvr_CmdBindDescriptorSets(VkCommandBuffer commandBuffer,
|
|||
* element in each dynamic descriptor type binding in each set."
|
||||
*
|
||||
*/
|
||||
for (uint32_t i = starting_idx; i < dynamicOffsetCount; i++)
|
||||
descriptor_state->dynamic_offsets[i] = pDynamicOffsets[i];
|
||||
for (uint32_t i = 0; i < dynamicOffsetCount; i++)
|
||||
descriptor_state->dynamic_offsets[set_offset + i] = pDynamicOffsets[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue