diff options
Diffstat (limited to 'src/compiler/nir/nir_opt_dce.c')
-rw-r--r-- | src/compiler/nir/nir_opt_dce.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_opt_dce.c b/src/compiler/nir/nir_opt_dce.c index 570e43000c0..c9b338862e6 100644 --- a/src/compiler/nir/nir_opt_dce.c +++ b/src/compiler/nir/nir_opt_dce.c @@ -52,6 +52,7 @@ static void init_instr(nir_instr *instr, nir_instr_worklist *worklist) { nir_alu_instr *alu_instr; + nir_deref_instr *deref_instr; nir_intrinsic_instr *intrin_instr; nir_tex_instr *tex_instr; @@ -73,6 +74,12 @@ init_instr(nir_instr *instr, nir_instr_worklist *worklist) mark_and_push(worklist, instr); break; + case nir_instr_type_deref: + deref_instr = nir_instr_as_deref(instr); + if (!deref_instr->dest.is_ssa) + mark_and_push(worklist, instr); + break; + case nir_instr_type_intrinsic: intrin_instr = nir_instr_as_intrinsic(instr); if (nir_intrinsic_infos[intrin_instr->intrinsic].flags & |