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

Author: Alyssa Rosenzweig <aly...@rosenzweig.io>
Date:   Sun Dec 10 17:14:39 2023 -0400

nir/validate: allow bias on nir_texop_lod

AGX seems to support it, and it's very convenient for implementing sampler LOD
bias together with a clamped LOD query.

Signed-off-by: Alyssa Rosenzweig <aly...@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26861>

---

 src/compiler/nir/nir_validate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c
index 8021fd3abbb..d3f4cc9dd3f 100644
--- a/src/compiler/nir/nir_validate.c
+++ b/src/compiler/nir/nir_validate.c
@@ -786,7 +786,8 @@ validate_tex_instr(nir_tex_instr *instr, validate_state 
*state)
 
       case nir_tex_src_bias:
          validate_assert(state, instr->op == nir_texop_txb ||
-                                   instr->op == nir_texop_tg4);
+                                   instr->op == nir_texop_tg4 ||
+                                   instr->op == nir_texop_lod);
          break;
 
       case nir_tex_src_lod:

Reply via email to