[PATCH] etnaviv: make use of TEXTURE_TYPE_1D
Christian Gmeiner
christian.gmeiner at gmail.com
Thu Oct 26 01:17:46 UTC 2017
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
src/gallium/drivers/etnaviv/etnaviv_texture.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture.c b/src/gallium/drivers/etnaviv/etnaviv_texture.c
index b8ebab6082..f71169d227 100644
--- a/src/gallium/drivers/etnaviv/etnaviv_texture.c
+++ b/src/gallium/drivers/etnaviv/etnaviv_texture.c
@@ -212,11 +212,8 @@ etna_create_sampler_view(struct pipe_context *pctx, struct pipe_resource *prsc,
switch (sv->base.target) {
case PIPE_TEXTURE_1D:
- /* For 1D textures, we will have a height of 1, so we can use 2D
- * but set T wrap to repeat */
- sv->TE_SAMPLER_CONFIG0_MASK = ~VIVS_TE_SAMPLER_CONFIG0_VWRAP__MASK;
- sv->TE_SAMPLER_CONFIG0 |= VIVS_TE_SAMPLER_CONFIG0_VWRAP(TEXTURE_WRAPMODE_REPEAT);
- /* fallthrough */
+ sv->TE_SAMPLER_CONFIG0 |= VIVS_TE_SAMPLER_CONFIG0_TYPE(TEXTURE_TYPE_1D);
+ break;
case PIPE_TEXTURE_2D:
case PIPE_TEXTURE_RECT:
sv->TE_SAMPLER_CONFIG0 |= VIVS_TE_SAMPLER_CONFIG0_TYPE(TEXTURE_TYPE_2D);
--
2.13.6
More information about the etnaviv
mailing list