pvr: Fix draw indirect page faults due to missing index list buffer

Fixes:
  dEQP-VK.draw.renderpass.basic_draw.draw_indirect.*
  dEQP-VK.draw.renderpass.basic_draw.draw_indexed_indirect.*

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Matt Coster <matt.coster@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23491>
This commit is contained in:
Karmjit Mahil 2023-06-02 17:19:06 +01:00 committed by Marge Bot
parent 68735f4e86
commit d070e31020

View file

@ -6380,7 +6380,17 @@ pvr_write_draw_indirect_vdm_stream(struct pvr_cmd_buffer *cmd_buffer,
uint32_t pds_size;
VkResult result;
/* TODO: Move this outside the loop and allocate all of them in one go? */
result = pvr_cmd_buffer_alloc_mem(cmd_buffer,
cmd_buffer->device->heaps.general_heap,
DUMMY_VDM_CONTROL_STREAM_BLOCK_SIZE,
PVR_BO_ALLOC_FLAG_CPU_MAPPED,
&dummy_bo);
if (result != VK_SUCCESS)
return result;
pds_prog.increment_draw_id = (i != 0);
pds_prog.index_list_addr_buffer = dummy_bo->dev_addr.addr;
if (state->draw_state.draw_indexed) {
pvr_pds_generate_draw_elements_indirect(&pds_prog,
@ -6463,14 +6473,6 @@ pvr_write_draw_indirect_vdm_stream(struct pvr_cmd_buffer *cmd_buffer,
list0.primitive_topology = PVRX(VDMCTRL_PRIMITIVE_TOPOLOGY_TRI_LIST);
}
result = pvr_cmd_buffer_alloc_mem(cmd_buffer,
cmd_buffer->device->heaps.general_heap,
DUMMY_VDM_CONTROL_STREAM_BLOCK_SIZE,
PVR_BO_ALLOC_FLAG_CPU_MAPPED,
&dummy_bo);
if (result != VK_SUCCESS)
return result;
dummy_stream = pvr_bo_suballoc_get_map_addr(dummy_bo);
/* For indexed draw cmds fill in the dummy's header (as it won't change