freedreno: move clear path dirty state hack to a2xx backend
authorRob Clark <robdclark@gmail.com>
Sun, 16 Apr 2017 18:47:35 +0000 (14:47 -0400)
committerRob Clark <robdclark@gmail.com>
Tue, 18 Apr 2017 20:32:00 +0000 (16:32 -0400)
a3xx/a4xx use the generic u_blitter path, which will make state dirty
bits be set appropriately thanks to the automagic of generic code
setting generic state in the driver.  And a5xx has a blit/dma engine
(actually, two) so it doesn't need these extra dirty bits set.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/a2xx/fd2_draw.c
src/gallium/drivers/freedreno/freedreno_draw.c

index e47ae9b8afd7a934f29ae021ba7a2caac2050fad..feec59fa5de7aa7041ccb9514421c635ffea6b49 100644 (file)
@@ -278,6 +278,15 @@ fd2_clear(struct fd_context *ctx, unsigned buffers,
        OUT_PKT3(ring, CP_SET_CONSTANT, 2);
        OUT_RING(ring, CP_REG(REG_A2XX_RB_COPY_CONTROL));
        OUT_RING(ring, 0x00000000);
+
+       ctx->dirty |= FD_DIRTY_ZSA |
+                       FD_DIRTY_VIEWPORT |
+                       FD_DIRTY_RASTERIZER |
+                       FD_DIRTY_SAMPLE_MASK |
+                       FD_DIRTY_PROG |
+                       FD_DIRTY_CONSTBUF |
+                       FD_DIRTY_BLEND |
+                       FD_DIRTY_FRAMEBUFFER;
 }
 
 void
index f911d4a6095907fb993db16d2030cd41c171b684..16c9ea84af3e9eb00b85eda94a1e53a9e4edd3cf 100644 (file)
@@ -367,15 +367,6 @@ fd_clear(struct pipe_context *pctx, unsigned buffers,
 
        ctx->clear(ctx, buffers, color, depth, stencil);
 
-       ctx->dirty |= FD_DIRTY_ZSA |
-                       FD_DIRTY_VIEWPORT |
-                       FD_DIRTY_RASTERIZER |
-                       FD_DIRTY_SAMPLE_MASK |
-                       FD_DIRTY_PROG |
-                       FD_DIRTY_CONSTBUF |
-                       FD_DIRTY_BLEND |
-                       FD_DIRTY_FRAMEBUFFER;
-
        if (fd_mesa_debug & FD_DBG_DCLEAR)
                fd_context_all_dirty(ctx);
 }