From 54dd288317ddd2c5ef719043c1fd0942eb33d7dc Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Thu, 28 Mar 2019 10:14:23 +0100 Subject: 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 Reviewed-by: Jonathan Marek --- src/gallium/drivers/etnaviv/etnaviv_texture_desc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3