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

Author: Alyssa Rosenzweig <[email protected]>
Date:   Tue Nov  3 08:23:32 2020 -0500

pan/bi: Don't emit TEXS for array textures

No place for the extra coordinate.

Signed-off-by: Alyssa Rosenzweig <[email protected]>
Reviewed-by: Boris Brezillon <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7408>

---

 src/panfrost/bifrost/bifrost_compile.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/panfrost/bifrost/bifrost_compile.c 
b/src/panfrost/bifrost/bifrost_compile.c
index fc8b959d01e..d77aa78a825 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -1826,8 +1826,8 @@ emit_texc(bi_context *ctx, nir_tex_instr *instr)
         bi_emit(ctx, tex);
 }
 
-/* Simple textures ops correspond to NIR tex or txl with LOD = 0. Anything else
- * needs a complete texture op. */
+/* Simple textures ops correspond to NIR tex or txl with LOD = 0 on 2D (or cube
+ * map, TODO) textures. Anything else needs a complete texture op. */
 
 static bool
 bi_is_normal_tex(gl_shader_stage stage, nir_tex_instr *instr)
@@ -1858,7 +1858,7 @@ emit_tex(bi_context *ctx, nir_tex_instr *instr)
                 instr->sampler_dim == GLSL_SAMPLER_DIM_EXTERNAL;
         bool is_f = base == nir_type_float && (sz == 16 || sz == 32);
 
-        if (is_normal && is_2d && is_f && !instr->is_shadow)
+        if (is_normal && is_2d && is_f && !instr->is_shadow && 
!instr->is_array)
                 emit_texs(ctx, instr);
         else
                 emit_texc(ctx, instr);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to