radeonsi: Flush when we're asked to return a fence but don't have one yet

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Michel Dänzer 2015-07-22 16:11:39 +09:00 committed by Michel Dänzer
parent fcc1949cc4
commit 800efb0690
1 changed files with 2 additions and 1 deletions

View File

@ -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))