aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-12-13 13:50:50 -0500
committerRob Clark <[email protected]>2018-12-13 15:51:01 -0500
commitcca1e9606c1fa05dafb994d2d1d92a9b2a35c5c2 (patch)
tree335e861f249d77e5dd6a8aa88526b4a618111434 /src
parentc19c4bf48845be044605a97d0ea0c278bf2e1d6e (diff)
freedreno/ir3: don't remove unused input components
Fixes: 0d240c22141 freedreno/ir3: don't fetch unused tex components Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/freedreno/ir3/ir3_depth.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/freedreno/ir3/ir3_depth.c b/src/freedreno/ir3/ir3_depth.c
index 4e377fa4ee5..e0500b43161 100644
--- a/src/freedreno/ir3/ir3_depth.c
+++ b/src/freedreno/ir3/ir3_depth.c
@@ -176,7 +176,13 @@ remove_unused_by_block(struct ir3_block *block)
if (instr->flags & IR3_INSTR_UNUSED) {
if (instr->opc == OPC_META_FO) {
struct ir3_instruction *src = ssa(instr->regs[1]);
- if (src->regs[0]->wrmask > 1) {
+ /* leave inputs alone.. we can't optimize out components of
+ * an input, since the hw is still going to be writing all
+ * of the components, and we could end up in a situation
+ * where multiple inputs overlap.
+ */
+ if ((src->opc != OPC_META_INPUT) &&
+ (src->regs[0]->wrmask > 1)) {
src->regs[0]->wrmask &= ~(1 << instr->fo.off);
/* prune no-longer needed right-neighbors. We could