From: Christian Gmeiner Date: Sun, 3 May 2020 06:54:47 +0000 (+0200) Subject: etnaviv: fix SAMP_ANISOTROPY register value X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b38e51bd969e212cce90998bc283049e74f9b33c;p=mesa.git 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: --- 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; }