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

Author: Jason Ekstrand <[email protected]>
Date:   Mon Feb 15 00:23:40 2021 -0600

nir/opt_large_constants: Handle generic pointers

We already throw out any variables which may have a complex use so we
just need to make sure that our mode checks don't assert if we have a
deref which may_be but not must_be nir_var_function_temp.

Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9068>

---

 src/compiler/nir/nir_opt_large_constants.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/compiler/nir/nir_opt_large_constants.c 
b/src/compiler/nir/nir_opt_large_constants.c
index 88e0e0b9485..60f2b5837d6 100644
--- a/src/compiler/nir/nir_opt_large_constants.c
+++ b/src/compiler/nir/nir_opt_large_constants.c
@@ -238,7 +238,7 @@ nir_opt_large_constants(nir_shader *shader,
             continue;
          }
 
-         if (dst_deref && nir_deref_mode_is(dst_deref, nir_var_function_temp)) 
{
+         if (dst_deref && nir_deref_mode_must_be(dst_deref, 
nir_var_function_temp)) {
             nir_variable *var = nir_deref_instr_get_variable(dst_deref);
             if (var == NULL)
                continue;
@@ -266,7 +266,7 @@ nir_opt_large_constants(nir_shader *shader,
             }
          }
 
-         if (src_deref && nir_deref_mode_is(src_deref, nir_var_function_temp)) 
{
+         if (src_deref && nir_deref_mode_must_be(src_deref, 
nir_var_function_temp)) {
             nir_variable *var = nir_deref_instr_get_variable(src_deref);
             if (var == NULL)
                continue;

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

Reply via email to