diff options
author | Eric Anholt <[email protected]> | 2016-04-27 16:48:17 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2016-05-02 11:06:29 -0700 |
commit | 3bee7581e68fd1ce5833b9287ee2d03f79c3d3e3 (patch) | |
tree | e080bc882617d878ea24ac3b37962e1310f0b959 /src | |
parent | 155ce496031888e7d1388c755775233544644eec (diff) |
vc4: Drop the support for DCE of texture instructions.
Now that we're using NIR for our optimization, there's no need for this
tricky code.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_opt_dead_code.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/gallium/drivers/vc4/vc4_opt_dead_code.c b/src/gallium/drivers/vc4/vc4_opt_dead_code.c index 44d0779c611..d3562ee947e 100644 --- a/src/gallium/drivers/vc4/vc4_opt_dead_code.c +++ b/src/gallium/drivers/vc4/vc4_opt_dead_code.c @@ -83,22 +83,14 @@ qir_opt_dead_code(struct vc4_compile *c) bool progress = false; bool *used = calloc(c->num_temps, sizeof(bool)); bool sf_used = false; - /* Whether we're eliminating texture setup currently. */ - bool dce_tex = false; list_for_each_entry_safe_rev(struct qinst, inst, &c->instructions, link) { if (inst->dst.file == QFILE_TEMP && !used[inst->dst.index] && !inst->sf && - (!qir_has_side_effects(c, inst) || - inst->op == QOP_TEX_RESULT) && + !qir_has_side_effects(c, inst) && !has_nonremovable_reads(c, inst)) { - if (inst->op == QOP_TEX_RESULT) { - dce_tex = true; - c->num_texture_samples--; - } - for (int i = 0; i < qir_get_op_nsrc(inst->op); i++) { if (inst->src[i].file != QFILE_VPM) continue; @@ -132,19 +124,6 @@ qir_opt_dead_code(struct vc4_compile *c) sf_used = false; } - if (inst->op == QOP_TEX_RESULT) - dce_tex = false; - - if (dce_tex && (inst->op == QOP_TEX_S || - inst->op == QOP_TEX_T || - inst->op == QOP_TEX_R || - inst->op == QOP_TEX_B || - inst->op == QOP_TEX_DIRECT)) { - dce(c, inst); - progress = true; - continue; - } - for (int i = 0; i < qir_get_op_nsrc(inst->op); i++) { if (inst->src[i].file == QFILE_TEMP) used[inst->src[i].index] = true; |