mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-12 01:20:17 +01:00
winsys/amdgpu: don't add fence dependency of other queues for userq
In case of userq, there will be only 1 userq per process. So all the jobs for that process goes into single queue. Hence there is no need to add fence of other queues even if info num_queues is > 1. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29010>
This commit is contained in:
parent
93703d2d19
commit
45fa34284f
1 changed files with 11 additions and 2 deletions
|
|
@ -1620,8 +1620,17 @@ static void amdgpu_cs_submit_ib(void *job, void *gdata, int thread_index)
|
|||
struct amdgpu_fence *prev_fence =
|
||||
(struct amdgpu_fence*)queue->fences[prev_seq_no % AMDGPU_FENCE_RING_SIZE];
|
||||
|
||||
if (prev_fence && (aws->info.ip[acs->ip_type].num_queues > 1 || queue->last_ctx != acs->ctx))
|
||||
add_seq_no_to_list(aws, &seq_no_dependencies, queue_index, prev_seq_no);
|
||||
/* Add a dependency on a previous fence, unless we can determine that
|
||||
* it's useless because the execution order is guaranteed.
|
||||
*/
|
||||
if (prev_fence) {
|
||||
bool same_ctx = queue->last_ctx == acs->ctx;
|
||||
/* userqueue submission mode uses a single queue per process. */
|
||||
bool same_queue = aws->info.ip[acs->ip_type].num_queues > 1 &&
|
||||
queue_type != USERQ;
|
||||
if (!same_ctx || !same_queue)
|
||||
add_seq_no_to_list(aws, &seq_no_dependencies, queue_index, prev_seq_no);
|
||||
}
|
||||
}
|
||||
|
||||
/* Since the kernel driver doesn't synchronize execution between different
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue