summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/freedreno/a6xx/fd6_texture.c')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_texture.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
index b9121523b7c..e516e94b0d9 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
@@ -281,12 +281,17 @@ fd6_sampler_view_create(struct pipe_context *pctx, struct pipe_resource *prsc,
so->offset = cso->u.buf.offset;
} else {
unsigned miplevels;
+ enum a6xx_tile_mode tile_mode = TILE6_LINEAR;
lvl = fd_sampler_first_level(cso);
miplevels = fd_sampler_last_level(cso) - lvl;
layers = cso->u.tex.last_layer - cso->u.tex.first_layer + 1;
- so->texconst0 |= A6XX_TEX_CONST_0_MIPLVLS(miplevels);
+ if (!fd_resource_level_linear(prsc, lvl))
+ tile_mode = fd_resource(prsc)->tile_mode;
+
+ so->texconst0 |= A6XX_TEX_CONST_0_MIPLVLS(miplevels) |
+ A6XX_TEX_CONST_0_TILE_MODE(tile_mode);
so->texconst1 =
A6XX_TEX_CONST_1_WIDTH(u_minify(prsc->width0, lvl)) |
A6XX_TEX_CONST_1_HEIGHT(u_minify(prsc->height0, lvl));