diff options
author | Jason Ekstrand <jason.ekstrand@collabora.com> | 2022-04-01 16:10:12 -0500 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-04-13 17:22:14 +0000 |
commit | 25441b5e5c3a30b3df0c6bb231e47df0e15a9dec (patch) | |
tree | 051c6572ebe4c5d49502a14ea2d3c124dc2918bd | |
parent | 0208bb2d5820c3951dfffecbdd666493a1eddd08 (diff) | |
download | mesa-25441b5e5c3a30b3df0c6bb231e47df0e15a9dec.tar.gz |
v3dv: Put indirect compute CSD jobs in the job list
Instead of having the CPU job execute the CSD job, put both jobs on the
list with the CPU job first which modifies the GPU job which gets kicked
off next. This gives the queue code more visibility into what types of
jobs are actually in the list. In particular, if an indirect compute
job is the last job in a batch buffer, it currently appears as if the
batch ends with CPU work which isn't true because it kicks off GPU work.
In that case, the last job on the list is now a GPU job, which better
matches reality.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15704>
-rw-r--r-- | src/broadcom/vulkan/v3dv_cmd_buffer.c | 12 | ||||
-rw-r--r-- | src/broadcom/vulkan/v3dv_queue.c | 7 |
2 files changed, 1 insertions, 18 deletions
diff --git a/src/broadcom/vulkan/v3dv_cmd_buffer.c b/src/broadcom/vulkan/v3dv_cmd_buffer.c index ee0cfb7c3a4..e60adf1af3b 100644 --- a/src/broadcom/vulkan/v3dv_cmd_buffer.c +++ b/src/broadcom/vulkan/v3dv_cmd_buffer.c @@ -168,14 +168,6 @@ job_destroy_cpu_wait_events_resources(struct v3dv_job *job) vk_free(&job->cmd_buffer->device->vk.alloc, job->cpu.event_wait.events); } -static void -job_destroy_cpu_csd_indirect_resources(struct v3dv_job *job) -{ - assert(job->type == V3DV_JOB_TYPE_CPU_CSD_INDIRECT); - assert(job->cmd_buffer); - v3dv_job_destroy(job->cpu.csd_indirect.csd_job); -} - void v3dv_job_destroy(struct v3dv_job *job) { @@ -199,9 +191,6 @@ v3dv_job_destroy(struct v3dv_job *job) case V3DV_JOB_TYPE_CPU_WAIT_EVENTS: job_destroy_cpu_wait_events_resources(job); break; - case V3DV_JOB_TYPE_CPU_CSD_INDIRECT: - job_destroy_cpu_csd_indirect_resources(job); - break; default: break; } @@ -3571,6 +3560,7 @@ cmd_buffer_dispatch_indirect(struct v3dv_cmd_buffer *cmd_buffer, job->cpu.csd_indirect.wg_uniform_offsets[2]; list_addtail(&job->list_link, &cmd_buffer->jobs); + list_addtail(&csd_job->list_link, &cmd_buffer->jobs); cmd_buffer->state.job = NULL; } diff --git a/src/broadcom/vulkan/v3dv_queue.c b/src/broadcom/vulkan/v3dv_queue.c index 9ba5d797784..d95b4be2f38 100644 --- a/src/broadcom/vulkan/v3dv_queue.c +++ b/src/broadcom/vulkan/v3dv_queue.c @@ -576,11 +576,6 @@ handle_timestamp_query_cpu_job(struct v3dv_job *job) } static VkResult -handle_csd_job(struct v3dv_queue *queue, - struct v3dv_job *job, - struct v3dv_submit_info_semaphores *sems_info); - -static VkResult handle_csd_indirect_cpu_job(struct v3dv_queue *queue, struct v3dv_job *job, struct v3dv_submit_info_semaphores *sems_info) @@ -610,8 +605,6 @@ handle_csd_indirect_cpu_job(struct v3dv_queue *queue, v3dv_cmd_buffer_rewrite_indirect_csd_job(info, group_counts); } - handle_csd_job(queue, info->csd_job, sems_info); - return VK_SUCCESS; } |