diff options
author | Eric Anholt <[email protected]> | 2015-01-10 14:57:16 +1300 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-01-10 15:24:46 +1300 |
commit | c772c92153fdcd4ba4920b7ef1745ce83b09603b (patch) | |
tree | c674f7ce50d3c071c116d38441952e08d8af2bce /src/gallium/drivers/vc4/vc4_opt_vpm_writes.c | |
parent | a58ae83882b3ad3ecb53271f42cf1fd8f9c2907c (diff) |
vc4: Split two notions of instructions having side effects.
Some ops can't be DCEd, while some of the ops that are just important due
to the args they have can be.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_opt_vpm_writes.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_opt_vpm_writes.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_opt_vpm_writes.c b/src/gallium/drivers/vc4/vc4_opt_vpm_writes.c index 477d32605a4..0269e32494a 100644 --- a/src/gallium/drivers/vc4/vc4_opt_vpm_writes.c +++ b/src/gallium/drivers/vc4/vc4_opt_vpm_writes.c @@ -82,8 +82,10 @@ qir_opt_vpm_writes(struct vc4_compile *c) if (qir_depends_on_flags(inst)) continue; - if (qir_has_side_effects(c, inst)) + if (qir_has_side_effects(c, inst) || + qir_has_side_effect_reads(c, inst)) { continue; + } /* A QOP_TEX_RESULT destination is r4, so we can't move * accesses to it past another QOP_TEX_RESULT which would |