From 826e05eb2d8708601734fed41ea192f8f3996a1a Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Sat, 13 Aug 2022 00:39:32 +0200 Subject: [PATCH] etnaviv: texture-desc: drop superfluous condition After ad48411d721e ("etnaviv: fix linear_nearest / nearest_linear filters on GC7000Lite") the code in both branches of the condition is exactly the same, so there is no need for the condition at all. Signed-off-by: Lucas Stach Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/drivers/etnaviv/etnaviv_texture_desc.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_texture_desc.c b/src/gallium/drivers/etnaviv/etnaviv_texture_desc.c index c6dada89ac3..14340d8caa9 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_texture_desc.c +++ b/src/gallium/drivers/etnaviv/etnaviv_texture_desc.c @@ -100,15 +100,10 @@ etna_create_sampler_state_desc(struct pipe_context *pipe, uint32_t max_lod_fp8 = MIN2(etna_float_to_fixp88(ss->max_lod), 0xfff); uint32_t max_lod_min = ss->min_img_filter != ss->mag_img_filter ? 4 : 0; - if (ss->min_mip_filter != PIPE_TEX_MIPFILTER_NONE) { - cs->SAMP_LOD_MINMAX = - VIVS_NTE_DESCRIPTOR_SAMP_LOD_MINMAX_MAX(MAX2(max_lod_fp8, max_lod_min)) | - VIVS_NTE_DESCRIPTOR_SAMP_LOD_MINMAX_MIN(min_lod_fp8); - } else { - cs->SAMP_LOD_MINMAX = - VIVS_NTE_DESCRIPTOR_SAMP_LOD_MINMAX_MAX(MAX2(max_lod_fp8, max_lod_min)) | - VIVS_NTE_DESCRIPTOR_SAMP_LOD_MINMAX_MIN(min_lod_fp8); - } + cs->SAMP_LOD_MINMAX = + VIVS_NTE_DESCRIPTOR_SAMP_LOD_MINMAX_MAX(MAX2(max_lod_fp8, max_lod_min)) | + VIVS_NTE_DESCRIPTOR_SAMP_LOD_MINMAX_MIN(min_lod_fp8); + 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);