Module: Mesa
Branch: master
Commit: 800efb0690e962750b9a072bcbab279fdaae24a1
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=800efb0690e962750b9a072bcbab279fdaae24a1

Author: Michel Dänzer <michel.daen...@amd.com>
Date:   Wed Jul 22 16:11:39 2015 +0900

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

Reviewed-by: Marek Olšák <marek.ol...@amd.com>

---

 src/gallium/drivers/radeonsi/si_hw_context.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c 
b/src/gallium/drivers/radeonsi/si_hw_context.c
index 08cc08e..dc8702e 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))

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to