summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2015-07-22 16:11:39 +0900
committerMichel Dänzer <[email protected]>2015-07-22 16:11:39 +0900
commit800efb0690e962750b9a072bcbab279fdaae24a1 (patch)
tree3c28b5014b3ad3e8c3988594acaab99ea87ea3eb /src
parentfcc1949cc4d97d8ed714020d5b86b31b70eca774 (diff)
radeonsi: Flush when we're asked to return a fence but don't have one yet
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_hw_context.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c
index 08cc08e64fe..dc8702e95a6 100644
--- a/src/gallium/drivers/radeonsi/si_hw_context.c
+++ b/src/gallium/drivers/radeonsi/si_hw_context.c
@@ -84,7 +84,8 @@ void si_context_gfx_flush(void *context, unsigned flags,
struct radeon_winsys_cs *cs = ctx->b.rings.gfx.cs;
struct radeon_winsys *ws = ctx->b.ws;
- if (cs->cdw == ctx->b.initial_gfx_cs_size) {
+ if (cs->cdw == ctx->b.initial_gfx_cs_size &&
+ (!fence || ctx->last_gfx_fence)) {
if (fence)
ws->fence_reference(fence, ctx->last_gfx_fence);
if (!(flags & RADEON_FLUSH_ASYNC))