mesa/st/nir: fix instruction removal
authorRob Clark <robdclark@gmail.com>
Fri, 6 Apr 2018 20:03:07 +0000 (16:03 -0400)
committerRob Clark <robdclark@gmail.com>
Mon, 9 Apr 2018 19:36:21 +0000 (15:36 -0400)
At one point this kinda worked (or at least didn't cause problems).  But
with deref-instructions it results in dangling deref instructions not
being properly removed.

Signed-off-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/state_tracker/st_nir_lower_builtin.c

index fca0bef6653b2db5677668294d92eb44122244d5..660fdf3f910b2785413cc69f712bdf7ddf8b4143 100644 (file)
@@ -216,7 +216,7 @@ lower_builtin_block(lower_builtin_state *state, nir_block *block)
        * to remove'd var.  And we have to remove the original uniform
        * var since we don't want it to get uniform space allocated.
        */
-      exec_node_remove(&intrin->instr.node);
+      nir_instr_remove(&intrin->instr);
    }
 
    return true;