[PATCH] etnaviv: make use of TEXTURE_TYPE_1D
Lucas Stach
l.stach at pengutronix.de
Thu Oct 26 07:45:14 UTC 2017
Am Donnerstag, den 26.10.2017, 03:17 +0200 schrieb Christian Gmeiner:
> Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Has this been tested on older GPU cores like the GC600?
> ---
> 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);
More information about the etnaviv
mailing list