radeonsi: flush the dma ring in si_flush_from_st
authorNiels Ole Salscheider <niels_ole@salscheider-online.de>
Thu, 13 Mar 2014 19:07:14 +0000 (20:07 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 14 Mar 2014 14:01:14 +0000 (15:01 +0100)
Signed-off-by: Niels Ole Salscheider <niels_ole@salscheider-online.de>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_pipe.c

index 827e9fe5e0d224c0b1cb1d94bcb45519ea023f0f..401bf6a8689ab505d6881054928e0c31d94a0bcf 100644 (file)
@@ -65,6 +65,13 @@ static void si_flush_from_st(struct pipe_context *ctx,
                             struct pipe_fence_handle **fence,
                             unsigned flags)
 {
+       struct si_context *sctx = (struct si_context *)ctx;
+
+       if (sctx->b.rings.dma.cs) {
+               sctx->b.rings.dma.flush(sctx,
+                                       flags & PIPE_FLUSH_END_OF_FRAME ? RADEON_FLUSH_END_OF_FRAME : 0);
+       }
+
        si_flush(ctx, fence,
                 flags & PIPE_FLUSH_END_OF_FRAME ? RADEON_FLUSH_END_OF_FRAME : 0);
 }