Mesa (master): softpipe: Don't use mag filter for gather op

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 9 08:05:10 UTC 2019


Module: Mesa
Branch: master
Commit: 11f219a5ee8a80376a892d5ef4c7d46a76232cb8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=11f219a5ee8a80376a892d5ef4c7d46a76232cb8

Author: Gert Wollny <gert.wollny at collabora.com>
Date:   Sun Apr  7 09:39:22 2019 +0200

softpipe: Don't use mag filter for gather op

For the gather op no magnifictaion filter is provided, so always use
the filter given for minification (which is the linear filter)

Fixes: 0dff1533f25951adda3c36be6d9efa944741befb
    softpipe: Use mag texture filter also for clamped lod == 0

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Reviewed-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/drivers/softpipe/sp_tex_sample.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index 1b40e3545bd..d20b7f9e518 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -1956,7 +1956,7 @@ mip_filter_linear(const struct sp_sampler_view *sp_sview,
       args.p = p[j];
       args.face_id = filt_args->faces[j];
 
-      if (lod[j] <= 0.0) {
+      if (lod[j] <= 0.0 && !args.gather_only) {
          args.level = psview->u.tex.first_level;
          mag_filter(sp_sview, sp_samp, &args, &rgba[0][j]);
       }
@@ -2040,7 +2040,7 @@ mip_filter_nearest(const struct sp_sampler_view *sp_sview,
       args.p = p[j];
       args.face_id = filt_args->faces[j];
 
-      if (lod[j] <= 0.0) {
+      if (lod[j] <= 0.0 && !args.gather_only) {
          args.level = psview->u.tex.first_level;
          mag_filter(sp_sview, sp_samp, &args, &rgba[0][j]);
       } else {
@@ -2100,7 +2100,7 @@ mip_filter_none(const struct sp_sampler_view *sp_sview,
       args.t = t[j];
       args.p = p[j];
       args.face_id = filt_args->faces[j];
-      if (lod[j] <= 0.0f) {
+      if (lod[j] <= 0.0f && !args.gather_only) {
          mag_filter(sp_sview, sp_samp, &args, &rgba[0][j]);
       }
       else {




More information about the mesa-commit mailing list