summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.c b/src/gallium/drivers/vc4/vc4_qir.c
index 49b79014c09..d7251abda1c 100644
--- a/src/gallium/drivers/vc4/vc4_qir.c
+++ b/src/gallium/drivers/vc4/vc4_qir.c
@@ -327,6 +327,15 @@ qir_remove_instruction(struct qinst *qinst)
free(qinst);
}
+struct qreg
+qir_follow_movs(struct qinst **defs, struct qreg reg)
+{
+ while (reg.file == QFILE_TEMP && defs[reg.index]->op == QOP_MOV)
+ reg = defs[reg.index]->src[0];
+
+ return reg;
+}
+
void
qir_compile_destroy(struct vc4_compile *c)
{