summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2016-08-25 01:26:54 +0200
committerMarek Olšák <marek.olsak@amd.com>2016-08-25 21:19:17 +0200
commitfe91ae06d3ecc2080b61a6bc35867653de0da418 (patch)
tree75c65d7de7807da4a8826193477b1ee8c742cb7b /src/gallium/drivers/r600
parente6673e7ac285e013ba25ce0e8c5bba691b1cdf3e (diff)
downloadexternal_mesa3d-fe91ae06d3ecc2080b61a6bc35867653de0da418.zip
external_mesa3d-fe91ae06d3ecc2080b61a6bc35867653de0da418.tar.gz
external_mesa3d-fe91ae06d3ecc2080b61a6bc35867653de0da418.tar.bz2
gallium/radeon: unify and simplify checking for an empty gfx IB
We can take advantage of the fact that multi_fence does the obvious thing with NULL fences. This fixes unflushed fences that can get stuck due to empty IBs.
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_hw_context.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gallium/drivers/r600/r600_hw_context.c b/src/gallium/drivers/r600/r600_hw_context.c
index 4447393..58ba09d 100644
--- a/src/gallium/drivers/r600/r600_hw_context.c
+++ b/src/gallium/drivers/r600/r600_hw_context.c
@@ -255,14 +255,8 @@ void r600_context_gfx_flush(void *context, unsigned flags,
struct radeon_winsys_cs *cs = ctx->b.gfx.cs;
struct radeon_winsys *ws = ctx->b.ws;
- if (!radeon_emitted(cs, ctx->b.initial_gfx_cs_size) &&
- (!fence || ctx->b.last_gfx_fence)) {
- if (fence)
- ws->fence_reference(fence, ctx->b.last_gfx_fence);
- if (!(flags & RADEON_FLUSH_ASYNC))
- ws->cs_sync_flush(cs);
+ if (!radeon_emitted(cs, ctx->b.initial_gfx_cs_size))
return;
- }
r600_preflush_suspend_features(&ctx->b);