From b38e51bd969e212cce90998bc283049e74f9b33c Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Sun, 3 May 2020 08:54:47 +0200 Subject: [PATCH] etnaviv: fix SAMP_ANISOTROPY register value This caused some serious problems like shredded output, ~1fps and GPU hungs. Fixes: 7aaa0e59086 ("etnaviv: add anisotropic filter support") Reported-by: Lukas F. Hartmann Tested-by: Lukas F. Hartmann Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach Part-of: --- src/gallium/drivers/etnaviv/etnaviv_texture_desc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture_desc.c b/src/gallium/drivers/etnaviv/etnaviv_texture_desc.c index efa0cd67147..bca73d65c14 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_texture_desc.c +++ b/src/gallium/drivers/etnaviv/etnaviv_texture_desc.c @@ -109,8 +109,7 @@ etna_create_sampler_state_desc(struct pipe_context *pipe, cs->SAMP_LOD_BIAS = VIVS_NTE_DESCRIPTOR_SAMP_LOD_BIAS_BIAS(etna_float_to_fixp88(ss->lod_bias)) | COND(ss->lod_bias != 0.0, VIVS_NTE_DESCRIPTOR_SAMP_LOD_BIAS_ENABLE); - cs->SAMP_ANISOTROPY = - VIVS_NTE_DESCRIPTOR_SAMP_ANISOTROPY(COND(ansio, etna_log2_fixp88(ss->max_anisotropy))); + cs->SAMP_ANISOTROPY = COND(ansio, etna_log2_fixp88(ss->max_anisotropy)); return cs; } -- 2.30.2