diff options
author | Rob Clark <[email protected]> | 2020-01-23 16:45:29 -0800 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-02-01 02:40:22 +0000 |
commit | fb09020ef23cc87c1c3024add572cf0a571e8ddc (patch) | |
tree | 0d988f7b73dfafdb167c726f5602cfd746b5de8f /src/freedreno/ir3/ir3.c | |
parent | 2ffe44ec0a5dba18e4a88ca7dd1042e823f9685e (diff) |
freedreno/ir3: remove unused tex arg harder
Just killing the SSA link isn't enough. It confuses RA, legalize,
and postsched to see a bogus unused reg.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3569>
Diffstat (limited to 'src/freedreno/ir3/ir3.c')
-rw-r--r-- | src/freedreno/ir3/ir3.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/freedreno/ir3/ir3.c b/src/freedreno/ir3/ir3.c index b9bcf3b08bd..f8cfc6bb3c0 100644 --- a/src/freedreno/ir3/ir3.c +++ b/src/freedreno/ir3/ir3.c @@ -463,23 +463,15 @@ static int emit_cat5(struct ir3_instruction *instr, void *ptr, instr_cat5_t *cat5 = ptr; iassert((instr->regs_count == 2) || - (instr->regs_count == 3) || (instr->regs_count == 4)); + (instr->regs_count == 3) || + (instr->regs_count == 4)); - switch (instr->opc) { - case OPC_DSX: - case OPC_DSXPP_1: - case OPC_DSY: - case OPC_DSYPP_1: - case OPC_RGETPOS: - case OPC_RGETINFO: - iassert((instr->flags & IR3_INSTR_S2EN) == 0); - src1 = instr->regs[1]; - src2 = instr->regs_count > 2 ? instr->regs[2] : NULL; - break; - default: + if (instr->flags & IR3_INSTR_S2EN) { src1 = instr->regs[2]; src2 = instr->regs_count > 3 ? instr->regs[3] : NULL; - break; + } else { + src1 = instr->regs[1]; + src2 = instr->regs_count > 2 ? instr->regs[2] : NULL; } assume(src1 || !src2); |