diff options
author | Kenneth Graunke <[email protected]> | 2016-05-01 19:09:14 -0700 |
---|---|---|
committer | Andres Gomez <[email protected]> | 2017-06-28 20:15:04 +0300 |
commit | 6227edd9782e004bf0f7a7a55702088ca2b01b97 (patch) | |
tree | f6e62b13ea1b19537ef355e98d2b062a67228aa7 /src/mesa | |
parent | fae8aeae44a599beb6bd1e955e483895f583cc79 (diff) |
i965: Ignore anisotropic filtering in nearest mode.
This fixes both Europa Universalis IV and Stellaris rendering on i965.
This was tested on SKL.
This fix was discovered by Jakub Szuppe at Stream HPC
(https://streamhpc.com/).
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96958
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95530
Signed-off-by: Kenneth Graunke <[email protected]>
Tested-by: Dylan Baker <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Cc: 17.1 <[email protected]>
(cherry picked from commit 6a7c5257cac23cd9767aa4bc8fdab68925b11157)
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_sampler_state.c | 6 |
1 files 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 5d57a35f20f..26bf0cb3e2d 100644 --- a/src/mesa/drivers/dri/i965/brw_sampler_state.c +++ b/src/mesa/drivers/dri/i965/brw_sampler_state.c @@ -450,8 +450,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 = |