radeonsi: remove r600_ring::flush callback
authorMarek Olšák <marek.olsak@amd.com>
Sun, 1 Apr 2018 19:03:23 +0000 (15:03 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Thu, 5 Apr 2018 19:34:58 +0000 (15:34 -0400)
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
src/gallium/drivers/radeon/r600_pipe_common.c
src/gallium/drivers/radeon/r600_pipe_common.h
src/gallium/drivers/radeonsi/si_fence.c
src/gallium/drivers/radeonsi/si_pipe.c

index bd35aa82d6779e742b9af5b19e52dbaeace5f9b0..f09770ddccabbb9fbf891495bc7ed64cbbeb9d4b 100644 (file)
@@ -177,7 +177,6 @@ bool si_common_context_init(struct r600_common_context *rctx,
                rctx->dma.cs = rctx->ws->cs_create(rctx->ctx, RING_DMA,
                                                   si_flush_dma_cs,
                                                   rctx);
-               rctx->dma.flush = si_flush_dma_cs;
        }
 
        return true;
index 813047fabbc3502ad997b304c6d2c1e7d4dc3cb1..ab9450b7b015de0fa94ad32dabeeb60edf9a4b66 100644 (file)
@@ -370,8 +370,6 @@ struct r600_atom {
 
 struct r600_ring {
        struct radeon_winsys_cs         *cs;
-       void (*flush)(void *ctx, unsigned flags,
-                     struct pipe_fence_handle **fence);
 };
 
 /* Saved CS data for debugging features. */
index 3b437091b1eb272578410d6c65b9db0eb82c948f..cd8a88bf3aaa93dc331fc224f268f978d5fc740d 100644 (file)
@@ -376,7 +376,7 @@ static boolean si_fence_finish(struct pipe_screen *screen,
                         * not going to wait.
                         */
                        threaded_context_unwrap_sync(ctx);
-                       sctx->b.gfx.flush(&sctx->b, timeout ? 0 : PIPE_FLUSH_ASYNC, NULL);
+                       si_flush_gfx_cs(&sctx->b, timeout ? 0 : PIPE_FLUSH_ASYNC, NULL);
                        rfence->gfx_unflushed.ctx = NULL;
 
                        if (!timeout)
@@ -516,7 +516,7 @@ static void si_flush_from_st(struct pipe_context *ctx,
 
        /* DMA IBs are preambles to gfx IBs, therefore must be flushed first. */
        if (rctx->dma.cs)
-               rctx->dma.flush(rctx, rflags, fence ? &sdma_fence : NULL);
+               si_flush_dma_cs(rctx, rflags, fence ? &sdma_fence : NULL);
 
        if (!radeon_emitted(rctx->gfx.cs, rctx->initial_gfx_cs_size)) {
                if (fence)
@@ -536,7 +536,7 @@ static void si_flush_from_st(struct pipe_context *ctx,
                        gfx_fence = rctx->ws->cs_get_next_fence(rctx->gfx.cs);
                        deferred_fence = true;
                } else {
-                       rctx->gfx.flush(rctx, rflags, fence ? &gfx_fence : NULL);
+                       si_flush_gfx_cs(rctx, rflags, fence ? &gfx_fence : NULL);
                }
        }
 
index 21b97437618a8b42c87ae0c1505172ee0be9b1ae..8411a822314552157dbaf97c66e7631a09c173b5 100644 (file)
@@ -287,7 +287,6 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen,
 
        sctx->b.gfx.cs = ws->cs_create(sctx->b.ctx, RING_GFX,
                                       si_flush_gfx_cs, sctx);
-       sctx->b.gfx.flush = si_flush_gfx_cs;
 
        /* Border colors. */
        sctx->border_color_table = malloc(SI_MAX_BORDER_COLORS *