Mesa (master): v3d: Force sampling from base level for tg4.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Dec 30 16:11:59 UTC 2018


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

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Dec 26 23:15:30 2018 -0800

v3d: Force sampling from base level for tg4.

This is what the GLSL ES 310 spec tells us to do, but apparently the
"gather mode" flag doesn't imply it in the HW.  Fixes
dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.filter_mode.min_nearest_mipmap_linear_mag_linear

---

 src/broadcom/compiler/v3d40_tex.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/broadcom/compiler/v3d40_tex.c b/src/broadcom/compiler/v3d40_tex.c
index 3cb96e1204..c12d14c6fe 100644
--- a/src/broadcom/compiler/v3d40_tex.c
+++ b/src/broadcom/compiler/v3d40_tex.c
@@ -78,6 +78,8 @@ v3d40_vir_emit_tex(struct v3d_compile *c, nir_tex_instr *instr)
                 .gather_component = instr->component,
 
                 .coefficient_mode = instr->op == nir_texop_txd,
+
+                .disable_autolod = instr->op == nir_texop_tg4
         };
 
         int non_array_components = instr->coord_components - instr->is_array;
@@ -119,10 +121,8 @@ v3d40_vir_emit_tex(struct v3d_compile *c, nir_tex_instr *instr)
                                       ntq_get_src(c, instr->src[i].src, 0),
                                       &tmu_writes);
 
-                        if (instr->op != nir_texop_txf &&
-                            instr->op != nir_texop_tg4) {
+                        if (instr->op != nir_texop_txf)
                                 p2_unpacked.disable_autolod = true;
-                        }
                         break;
 
                 case nir_tex_src_comparator:




More information about the mesa-commit mailing list