Discussion:
[PATCH] i965: Ignore anisotropic filtering in nearest mode.
Add Reply
Dylan Baker
2017-06-16 20:39:47 UTC
Reply
Permalink
Raw Message
From: Kenneth Graunke <***@whitecape.org>

This fixes both Europa Universalis IV and Steallirs 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 <***@whitecape.org>
Tested-by: Dylan Baker <***@pnwbakers.com>
---
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 5d57a35f20..26bf0cb3e2 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 =
--
2.13.1
Dylan Baker
2017-06-16 20:51:48 UTC
Reply
Permalink
Raw Message
Quoting Dylan Baker (2017-06-16 13:39:47)
Post by Dylan Baker
This fixes both Europa Universalis IV and Steallirs rendering on i965.
^^^^^^^^^
I fixed this typo locally, I just forgot to commit it before I send this :/
Post by Dylan Baker
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
---
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 5d57a35f20..26bf0cb3e2 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 =
--
2.13.1
_______________________________________________
mesa-dev mailing list
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Kenneth Graunke
2017-06-16 21:16:57 UTC
Reply
Permalink
Raw Message
Post by Dylan Baker
This fixes both Europa Universalis IV and Steallirs 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
---
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 5d57a35f20..26bf0cb3e2 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 =
Reviewed-by: Jason Ekstrand <***@jlekstrand.net>

(Jason looked at the patch on my monitor and said we could have his R-b.)
Loading...