freedreno/a3xx: fix sysmem <-> gmem tiles transfer
authorKhaled Emara <ekhaled1836@gmail.com>
Sun, 25 Aug 2019 21:49:10 +0000 (23:49 +0200)
committerRob Clark <robdclark@chromium.org>
Fri, 30 Aug 2019 15:54:30 +0000 (08:54 -0700)
Tiling mode was missing from fd3_emit_gmem_restore_tex().
emit_gmem2mem_surf() used LINEAR exclusiveley.

Reviewed-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/a3xx/fd3_emit.c
src/gallium/drivers/freedreno/a3xx/fd3_gmem.c

index a966934fe9938d21d28f18664bc3c07057ab59c5..43de22731449d2e89c9569e69f5aa1f06bc051be 100644 (file)
@@ -315,7 +315,8 @@ fd3_emit_gmem_restore_tex(struct fd_ringbuffer *ring,
 
                debug_assert(psurf[i]->u.tex.first_layer == psurf[i]->u.tex.last_layer);
 
-               OUT_RING(ring, A3XX_TEX_CONST_0_FMT(fd3_pipe2tex(format)) |
+               OUT_RING(ring, A3XX_TEX_CONST_0_TILE_MODE(rsc->tile_mode) |
+                                A3XX_TEX_CONST_0_FMT(fd3_pipe2tex(format)) |
                                 A3XX_TEX_CONST_0_TYPE(A3XX_TEX_2D) |
                                 fd3_tex_swiz(format,  PIPE_SWIZZLE_X, PIPE_SWIZZLE_Y,
                                                          PIPE_SWIZZLE_Z, PIPE_SWIZZLE_W));
index 8bb8b681a280e925913b3744bb86f3855b93f280..33658f7dc8df06c28ec09543f5441cc4081c05bf 100644 (file)
@@ -346,7 +346,7 @@ emit_gmem2mem_surf(struct fd_batch *batch,
 
        OUT_RELOCW(ring, rsc->bo, offset, 0, -1);    /* RB_COPY_DEST_BASE */
        OUT_RING(ring, A3XX_RB_COPY_DEST_PITCH_PITCH(slice->pitch * rsc->cpp));
-       OUT_RING(ring, A3XX_RB_COPY_DEST_INFO_TILE(LINEAR) |
+       OUT_RING(ring, A3XX_RB_COPY_DEST_INFO_TILE(rsc->tile_mode) |
                        A3XX_RB_COPY_DEST_INFO_FORMAT(fd3_pipe2color(format)) |
                        A3XX_RB_COPY_DEST_INFO_COMPONENT_ENABLE(0xf) |
                        A3XX_RB_COPY_DEST_INFO_ENDIAN(ENDIAN_NONE) |