[Mesa-dev] [PATCH] nir: fix check for wildcard pairs

Thomas Hindoe Paaboel Andersen phomes at gmail.com
Tue May 3 19:32:06 UTC 2016


It seems that the intention was to check both for null as they are
dereferenced immediately after.

Added in d3636da9
---
 src/compiler/nir/nir_lower_var_copies.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_lower_var_copies.c b/src/compiler/nir/nir_lower_var_copies.c
index 707d5af..20b78d8 100644
--- a/src/compiler/nir/nir_lower_var_copies.c
+++ b/src/compiler/nir/nir_lower_var_copies.c
@@ -83,7 +83,7 @@ emit_copy_load_store(nir_intrinsic_instr *copy_instr,
    nir_deref *src_arr_parent = deref_next_wildcard_parent(src_tail);
    nir_deref *dest_arr_parent = deref_next_wildcard_parent(dest_tail);
 
-   if (src_arr_parent || dest_arr_parent) {
+   if (src_arr_parent && dest_arr_parent) {
       /* Wildcards had better come in matched pairs */
       assert(dest_arr_parent && dest_arr_parent);
 
-- 
2.7.4



More information about the mesa-dev mailing list