diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-11-10 10:58:10 +0100 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-11-20 18:16:11 +0100 |
commit | bc65dcab3bc48673ff6180afb036561a4b8b1119 (patch) | |
tree | 10cc2098d5acef729eacf0ecfa49d517d67d4f1e /src/gallium/drivers/radeonsi/si_hw_context.c | |
parent | 3db1ce01b1f33aaeceda4038487a4ce0ceb77267 (diff) |
radeonsi: avoid syncing the driver thread in si_fence_finish
It is really only required when we need to flush for deferred fences.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_hw_context.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_hw_context.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index 15234d72725..1903cf8c978 100644 --- a/src/gallium/drivers/radeonsi/si_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -129,6 +129,9 @@ void si_context_gfx_flush(void *context, unsigned flags, ws->cs_flush(cs, flags, &ctx->b.last_gfx_fence); if (fence) ws->fence_reference(fence, ctx->b.last_gfx_fence); + + /* This must be after cs_flush returns, since the context's API + * thread can concurrently read this value in si_fence_finish. */ ctx->b.num_gfx_cs_flushes++; /* Check VM faults if needed. */ |