From 64eb317311adefe8a5cbfa813de18dd26fca596a Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sun, 1 May 2016 19:09:14 -0700 Subject: [PATCH] i965: Ignore anisotropic filtering in nearest mode. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_sampler_state.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_sampler_state.c b/src/mesa/drivers/dri/i965/brw_sampler_state.c index 9f56c81..8556dc0 100644 --- a/src/mesa/drivers/dri/i965/brw_sampler_state.c +++ b/src/mesa/drivers/dri/i965/brw_sampler_state.c @@ -427,8 +427,10 @@ brw_update_sampler_state(struct brw_context *brw, /* Enable anisotropic filtering if desired. */ unsigned max_anisotropy = BRW_ANISORATIO_2; if (sampler->MaxAnisotropy > 1.0f) { - min_filter = BRW_MAPFILTER_ANISOTROPIC; - mag_filter = BRW_MAPFILTER_ANISOTROPIC; + if (min_filter == BRW_MAPFILTER_LINEAR) + min_filter = BRW_MAPFILTER_ANISOTROPIC; + if (mag_filter == BRW_MAPFILTER_LINEAR) + mag_filter = BRW_MAPFILTER_ANISOTROPIC; if (sampler->MaxAnisotropy > 2.0f) { max_anisotropy = -- 2.8.2