diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-09-24 09:06:37 -0400 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-09-30 08:40:13 -0400 |
commit | 7cf493241061d2d942a8555ec8cfa08be3254045 (patch) | |
tree | cb6abad155c1a94c116ff200b72e6626e2c68645 /src/panfrost/midgard/mir.c | |
parent | c9ce5a92a0d9e052ec4fc38e88d9aed81200489a (diff) |
pan/midgard: Extend csel_swizzle to branches
Conditions for branches don't have a swizzle explicitly in the emitted
binary, but they do implicitly get swizzled in whatever instruction
wrote r31, so we need to handle that.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost/midgard/mir.c')
-rw-r--r-- | src/panfrost/midgard/mir.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/panfrost/midgard/mir.c b/src/panfrost/midgard/mir.c index 9e5ba7abcb0..faeac16d18d 100644 --- a/src/panfrost/midgard/mir.c +++ b/src/panfrost/midgard/mir.c @@ -42,8 +42,8 @@ unsigned mir_get_swizzle(midgard_instruction *ins, unsigned idx) { if (ins->type == TAG_ALU_4) { - if (idx == 2) - return ins->csel_swizzle; + if (idx == 2 || ins->compact_branch) + return ins->cond_swizzle; unsigned b = (idx == 0) ? ins->alu.src1 : ins->alu.src2; @@ -105,6 +105,11 @@ void mir_set_swizzle(midgard_instruction *ins, unsigned idx, unsigned new) { if (ins->type == TAG_ALU_4) { + if (idx == 2 || ins->compact_branch) { + ins->cond_swizzle = new; + return; + } + unsigned b = (idx == 0) ? ins->alu.src1 : ins->alu.src2; midgard_vector_alu_src s = |