freedreno/a6xx: Use fd6_emit_ib from a6xx
authorKristian H. Kristensen <hoegsberg@chromium.org>
Tue, 16 Oct 2018 21:28:57 +0000 (14:28 -0700)
committerRob Clark <robdclark@gmail.com>
Fri, 26 Oct 2018 22:10:00 +0000 (18:10 -0400)
Move it to a header and use it where possible to avoid vfunc call.

Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org>
src/gallium/drivers/freedreno/a6xx/fd6_emit.c
src/gallium/drivers/freedreno/a6xx/fd6_emit.h
src/gallium/drivers/freedreno/a6xx/fd6_gmem.c

index 001d69bf1c94d673200bc08dba33709bd90d20d9..e2781ce1862575c94dd09a253179c84c0b66f9be 100644 (file)
@@ -1195,14 +1195,6 @@ t7              opcode: CP_WAIT_FOR_IDLE (26) (1 dwords)
        OUT_RING(ring, 0x00000000);
 }
 
-static void
-fd6_emit_ib(struct fd_ringbuffer *ring, struct fd_ringbuffer *target)
-{
-       emit_marker6(ring, 6);
-       __OUT_IB5(ring, target);
-       emit_marker6(ring, 6);
-}
-
 static void
 fd6_mem_to_mem(struct fd_ringbuffer *ring, struct pipe_resource *dst,
                unsigned dst_off, struct pipe_resource *src, unsigned src_off,
index dce131d6b273e18173e6ac6a83c557064306a452..7fe6b55736f5c71621d668269a9a24f33b0d841b 100644 (file)
@@ -183,6 +183,14 @@ void fd6_emit_restore(struct fd_batch *batch, struct fd_ringbuffer *ring);
 
 void fd6_emit_init(struct pipe_context *pctx);
 
+static inline void
+fd6_emit_ib(struct fd_ringbuffer *ring, struct fd_ringbuffer *target)
+{
+       emit_marker6(ring, 6);
+       __OUT_IB5(ring, target);
+       emit_marker6(ring, 6);
+}
+
 #define WRITE(reg, val) do {                                   \
                OUT_PKT4(ring, reg, 1);                                 \
                OUT_RING(ring, val);                                    \
index c2f2a03d18aabf95ac1b0a6dc4ce53b242a10348..7eb23edae61fe177c24970f173c56943d0c14d74 100644 (file)
@@ -408,7 +408,7 @@ emit_binning_pass(struct fd_batch *batch)
                        A6XX_SP_TP_WINDOW_OFFSET_Y(0));
 
        /* emit IB to binning drawcmds: */
-       ctx->emit_ib(ring, batch->draw);
+       fd6_emit_ib(ring, batch->draw);
 
        fd_reset_wfi(batch);
 
@@ -464,7 +464,7 @@ fd6_emit_tile_init(struct fd_batch *batch)
        fd6_emit_lrz_flush(ring);
 
        if (batch->lrz_clear)
-               ctx->emit_ib(ring, batch->lrz_clear);
+               fd6_emit_ib(ring, batch->lrz_clear);
 
        fd6_cache_flush(batch, ring);