diff options
-rw-r--r-- | src/glsl/nir/nir_lower_vars_to_ssa.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/glsl/nir/nir_lower_vars_to_ssa.c b/src/glsl/nir/nir_lower_vars_to_ssa.c index 59715072c15..df24510b3a5 100644 --- a/src/glsl/nir/nir_lower_vars_to_ssa.c +++ b/src/glsl/nir/nir_lower_vars_to_ssa.c @@ -455,7 +455,8 @@ lower_copies_to_load_store(struct deref_node *node, struct deref_node *arg_node = get_deref_node(copy->variables[i], state); - if (arg_node == NULL) + /* Only bother removing copy entries for other nodes */ + if (arg_node == NULL || arg_node == node) continue; struct set_entry *arg_entry = _mesa_set_search(arg_node->copies, copy); @@ -466,6 +467,8 @@ lower_copies_to_load_store(struct deref_node *node, nir_instr_remove(©->instr); } + node->copies = NULL; + return true; } |