From 6926f56d5bd02de66d1e928d79ffb8082eeb0211 Mon Sep 17 00:00:00 2001 From: Khaled Emara Date: Sun, 25 Aug 2019 23:49:10 +0200 Subject: [PATCH] freedreno/a3xx: fix sysmem <-> gmem tiles transfer Tiling mode was missing from fd3_emit_gmem_restore_tex(). emit_gmem2mem_surf() used LINEAR exclusiveley. Reviewed-by: Rob Clark --- src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 3 ++- src/gallium/drivers/freedreno/a3xx/fd3_gmem.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c index a966934fe99..43de2273144 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c @@ -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)); diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c index 8bb8b681a28..33658f7dc8d 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_gmem.c @@ -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) | -- 2.30.2