freedreno/a6xx: fix mem2gmem for zsbuf
authorRob Clark <robdclark@gmail.com>
Sun, 2 Sep 2018 17:24:12 +0000 (13:24 -0400)
committerRob Clark <robdclark@gmail.com>
Wed, 5 Sep 2018 17:38:43 +0000 (13:38 -0400)
Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/a6xx/fd6_gmem.c

index fdffc692b2a5e1744afa0beb927c6d813e564ed0..409b0ea6f330cfbb58de150b7b463c3a01484344 100644 (file)
@@ -180,6 +180,9 @@ emit_zs(struct fd_ringbuffer *ring, struct pipe_surface *zsbuf,
                        OUT_RING(ring, A6XX_RB_STENCIL_BUFFER_ARRAY_PITCH(size));
                        OUT_RELOCW(ring, rsc->stencil->bo, 0, 0, 0);  /* RB_STENCIL_BASE_LO/HI */
                        OUT_RING(ring, base);  /* RB_STENCIL_BASE_LO */
+               } else {
+                       OUT_PKT4(ring, REG_A6XX_RB_STENCIL_INFO, 1);
+                       OUT_RING(ring, 0x00000000);     /* RB_STENCIL_INFO */
                }
        } else {
                OUT_PKT4(ring, REG_A6XX_RB_DEPTH_BUFFER_INFO, 6);
@@ -610,7 +613,7 @@ emit_restore_blit(struct fd_batch *batch, uint32_t base,
                info |= A6XX_RB_BLIT_INFO_UNK0;
                break;
        case FD_BUFFER_DEPTH:
-               info |= A6XX_RB_BLIT_INFO_DEPTH;
+               info |= A6XX_RB_BLIT_INFO_DEPTH | A6XX_RB_BLIT_INFO_UNK0;
                break;
        }