aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Stach <[email protected]>2019-03-28 10:14:23 +0100
committerLucas Stach <[email protected]>2019-10-18 19:06:35 +0200
commit54dd288317ddd2c5ef719043c1fd0942eb33d7dc (patch)
tree791efbdfcdb6c45baf6e9a4089bc7f611bef1236
parenteda73d71277a0dd9d7832da96c2aaca2dd513d4d (diff)
etnaviv: add linear texture support on GC7000
It's just a matter of writing the addressing mode into the texture descriptor. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]>
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_texture_desc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture_desc.c b/src/gallium/drivers/etnaviv/etnaviv_texture_desc.c
index 8e4aedbda0b..aef856b1798 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_texture_desc.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_texture_desc.c
@@ -142,7 +142,9 @@ etna_create_sampler_view_desc(struct pipe_context *pctx, struct pipe_resource *p
#define DESC_SET(x, y) buf[(TEXDESC_##x)>>2] = (y)
DESC_SET(CONFIG0, COND(!ext && !astc, VIVS_TE_SAMPLER_CONFIG0_FORMAT(format))
- | VIVS_TE_SAMPLER_CONFIG0_TYPE(target_hw));
+ | VIVS_TE_SAMPLER_CONFIG0_TYPE(target_hw) |
+ COND(res->layout == ETNA_LAYOUT_LINEAR && !util_format_is_compressed(so->format),
+ VIVS_TE_SAMPLER_CONFIG0_ADDRESSING_MODE(TEXTURE_ADDRESSING_MODE_LINEAR)));
DESC_SET(CONFIG1, COND(ext, VIVS_TE_SAMPLER_CONFIG1_FORMAT_EXT(format)) |
COND(astc, VIVS_TE_SAMPLER_CONFIG1_FORMAT_EXT(TEXTURE_FORMAT_EXT_ASTC)) |
VIVS_TE_SAMPLER_CONFIG1_HALIGN(res->halign) | swiz);