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

Author: Daniel Schürmann <[email protected]>
Date:   Tue Nov  2 14:29:47 2021 +0100

nir/fold_16bit_sampler_conversions: skip sparse residency tex instructions

The residency return value mismatches between NIR and Radeon.

Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Rhys Perry <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13592>

---

 src/compiler/nir/nir_lower_mediump.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/compiler/nir/nir_lower_mediump.c 
b/src/compiler/nir/nir_lower_mediump.c
index 4df1cce2472..49319dd24b5 100644
--- a/src/compiler/nir/nir_lower_mediump.c
+++ b/src/compiler/nir/nir_lower_mediump.c
@@ -437,6 +437,10 @@ nir_fold_16bit_sampler_conversions(nir_shader *nir,
          nir_instr *src;
          nir_alu_instr *src_alu;
 
+         /* Skip sparse residency */
+         if (tex->is_sparse)
+            continue;
+
          /* Skip because AMD doesn't support 16-bit types with these. */
          if ((tex->op == nir_texop_txs ||
               tex->op == nir_texop_query_levels) ||

Reply via email to