summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/freedreno/a6xx/fd6_image.c
diff options
context:
space:
mode:
authorKristian H. Kristensen <hoegsberg@chromium.org>2018-12-21 09:14:28 -0800
committerKristian H. Kristensen <hoegsberg@chromium.org>2019-01-18 14:27:15 -0800
commit5486c9d526f393eff4b189e0e0a44eafeedf4407 (patch)
tree93ede21a3eef6bac7d6d9a3947b38743426dda6c /src/gallium/drivers/freedreno/a6xx/fd6_image.c
parent60c6778ddaed35d010b2d6c8f4d9dfd3415fff33 (diff)
freedreno/a6xx: Turn on texture tiling by default
The color swap isn't available for tiled formats and it's not needed either. We pick one channel order and use for all non-linear formats. Signed-off-by: Kristian H. Kristensen <hoegsberg@chromium.org> Reviewed-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'src/gallium/drivers/freedreno/a6xx/fd6_image.c')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_image.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_image.c b/src/gallium/drivers/freedreno/a6xx/fd6_image.c
index e79ee2f90ad..f7419d8d9ac 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_image.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_image.c
@@ -43,6 +43,7 @@ static enum a6xx_state_block imgsb[] = {
};
struct fd6_image {
+ struct pipe_resource *prsc;
enum pipe_format pfmt;
enum a6xx_tex_fmt fmt;
enum a6xx_tex_fetchsize fetchsize;
@@ -70,6 +71,7 @@ static void translate_image(struct fd6_image *img, struct pipe_image_view *pimg)
return;
}
+ img->prsc = prsc;
img->pfmt = format;
img->fmt = fd6_pipe2tex(format);
img->fetchsize = fd6_pipe2fetchsize(format);
@@ -112,7 +114,7 @@ static void emit_image_tex(struct fd_ringbuffer *ring, unsigned slot,
OUT_RING(ring, CP_LOAD_STATE6_2_EXT_SRC_ADDR_HI(0));
OUT_RING(ring, A6XX_TEX_CONST_0_FMT(img->fmt) |
- fd6_tex_swiz(img->pfmt, PIPE_SWIZZLE_X, PIPE_SWIZZLE_Y,
+ fd6_tex_swiz(img->prsc, PIPE_SWIZZLE_X, PIPE_SWIZZLE_Y,
PIPE_SWIZZLE_Z, PIPE_SWIZZLE_W) |
COND(img->srgb, A6XX_TEX_CONST_0_SRGB));
OUT_RING(ring, A6XX_TEX_CONST_1_WIDTH(img->width) |