diff options
author | Eric Anholt <[email protected]> | 2015-12-10 22:23:10 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-12-11 12:21:22 -0800 |
commit | 2591beef890015538bed005a79414274a7497b2f (patch) | |
tree | b4733c301872fd9d8ff27a7d9644a21a0cf2196e /src | |
parent | b70a2f4d81940ef103c95ee51f2a84391a076ac0 (diff) |
vc4: Fix handling of src packs on in qir_follow_movs().
The caller isn't going to expect it from a return, so it would probably
get misinterpreted. If the caller had an unpack in its reg, that's fine,
but don't lose track of it.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_qir.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c index 4ec25310b67..c6916c48e7e 100644 --- a/src/gallium/drivers/vc4/vc4_qir.c +++ b/src/gallium/drivers/vc4/vc4_qir.c @@ -423,13 +423,19 @@ qir_remove_instruction(struct vc4_compile *c, struct qinst *qinst) struct qreg qir_follow_movs(struct vc4_compile *c, struct qreg reg) { + int pack = reg.pack; + while (reg.file == QFILE_TEMP && c->defs[reg.index] && - c->defs[reg.index]->op == QOP_MOV && - !c->defs[reg.index]->dst.pack) { + (c->defs[reg.index]->op == QOP_MOV || + c->defs[reg.index]->op == QOP_FMOV || + c->defs[reg.index]->op == QOP_MMOV)&& + !c->defs[reg.index]->dst.pack && + !c->defs[reg.index]->src[0].pack) { reg = c->defs[reg.index]->src[0]; } + reg.pack = pack; return reg; } |