aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-08-28 10:13:29 -0700
committerEric Anholt <[email protected]>2019-08-28 13:14:41 -0700
commit973b49386caff501b76089de7a20d4d0ff7a32ba (patch)
tree46ea4c606159255024807afdee897199bab13a3d /src/gallium/drivers
parentb418269d7dd576a7c9afd728bf8a883b4da98b30 (diff)
freedreno/a6xx: Fix non-mipmap filtering selection.
We were clamping the LOD to force non-mipmap filtering, but that means that the HW doesn't get to select between the min and mag filters. Setting MIPFILTER_LINEAR_FAR appears to force non-mipmap filtering. Fixes all failures in dEQP-GLES2.functional.texture.filtering.2d.* Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_texture.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
index 2cb69e01a2e..7508b6a44fb 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_texture.c
@@ -130,15 +130,15 @@ fd6_sampler_state_create(struct pipe_context *pctx,
A6XX_TEX_SAMP_0_WRAP_R(tex_clamp(cso->wrap_r, clamp_to_edge, &so->needs_border));
so->texsamp1 =
+ COND(cso->min_mip_filter == PIPE_TEX_MIPFILTER_NONE,
+ A6XX_TEX_SAMP_1_MIPFILTER_LINEAR_FAR) |
COND(!cso->seamless_cube_map, A6XX_TEX_SAMP_1_CUBEMAPSEAMLESSFILTOFF) |
COND(!cso->normalized_coords, A6XX_TEX_SAMP_1_UNNORM_COORDS);
- if (cso->min_mip_filter != PIPE_TEX_MIPFILTER_NONE) {
- so->texsamp0 |= A6XX_TEX_SAMP_0_LOD_BIAS(cso->lod_bias);
- so->texsamp1 |=
- A6XX_TEX_SAMP_1_MIN_LOD(cso->min_lod) |
- A6XX_TEX_SAMP_1_MAX_LOD(cso->max_lod);
- }
+ so->texsamp0 |= A6XX_TEX_SAMP_0_LOD_BIAS(cso->lod_bias);
+ so->texsamp1 |=
+ A6XX_TEX_SAMP_1_MIN_LOD(cso->min_lod) |
+ A6XX_TEX_SAMP_1_MAX_LOD(cso->max_lod);
if (cso->compare_mode)
so->texsamp1 |= A6XX_TEX_SAMP_1_COMPARE_FUNC(cso->compare_func); /* maps 1:1 */