pvr: Add wait_on_previous_transfer flag to graphics subcommand

This inserts a barrier before the fragment job to wait on the previous
transfer job.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23313>
This commit is contained in:
Matt Coster
2022-12-13 10:12:45 +00:00
committed by Marge Bot
parent 40ce383554
commit 8dbf9932a9
2 changed files with 15 additions and 0 deletions
+2
View File
@@ -497,6 +497,8 @@ struct pvr_sub_cmd_gfx {
bool frag_uses_texture_rw;
bool has_occlusion_query;
bool wait_on_previous_transfer;
};
struct pvr_sub_cmd_compute {
+13
View File
@@ -712,6 +712,19 @@ static VkResult pvr_process_cmd_buffer(struct pvr_device *device,
break;
}
if (sub_cmd->gfx.wait_on_previous_transfer) {
struct pvr_sub_cmd_event_barrier transfer_to_frag_barrier = {
.wait_for_stage_mask = PVR_PIPELINE_STAGE_TRANSFER_BIT,
.wait_at_stage_mask = PVR_PIPELINE_STAGE_FRAG_BIT,
};
result = pvr_process_event_cmd_barrier(device,
queue,
&transfer_to_frag_barrier);
if (result != VK_SUCCESS)
break;
}
result =
pvr_process_graphics_cmd(device, queue, cmd_buffer, &sub_cmd->gfx);
break;