summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-02-19 13:22:31 -0800
committerEric Anholt <[email protected]>2015-02-19 23:35:17 -0800
commit85316d059c899ac096331251de6b233229aa0b4f (patch)
tree27431fdde4bf5bcc03c52b2c3f94c16bb19f04a8 /src/gallium/drivers/vc4/vc4_qir.h
parent877b48a531adc397493e508e509aba2918915349 (diff)
vc4: Keep an array of pointers to instructions defining the temps around.
The optimization passes are always regenerating it and throwing it away, but it's not hard to keep track of.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_qir.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir.h b/src/gallium/drivers/vc4/vc4_qir.h
index af92c8c66a9..4f910e3c3df 100644
--- a/src/gallium/drivers/vc4/vc4_qir.h
+++ b/src/gallium/drivers/vc4/vc4_qir.h
@@ -284,6 +284,9 @@ struct vc4_compile {
struct vc4_context *vc4;
struct tgsi_parse_context parser;
struct qreg *temps;
+ /* For each temp, the instruction generating its value. */
+ struct qinst **defs;
+ uint32_t defs_array_size;
/**
* Inputs to the shader, arranged by TGSI declaration order.
*
@@ -368,7 +371,7 @@ struct qinst *qir_inst4(enum qop op, struct qreg dst,
struct qreg b,
struct qreg c,
struct qreg d);
-void qir_remove_instruction(struct qinst *qinst);
+void qir_remove_instruction(struct vc4_compile *c, struct qinst *qinst);
struct qreg qir_uniform(struct vc4_compile *c,
enum quniform_contents contents,
uint32_t data);
@@ -385,7 +388,7 @@ bool qir_depends_on_flags(struct qinst *inst);
bool qir_writes_r4(struct qinst *inst);
bool qir_reads_r4(struct qinst *inst);
bool qir_src_needs_a_file(struct qinst *inst);
-struct qreg qir_follow_movs(struct qinst **defs, struct qreg reg);
+struct qreg qir_follow_movs(struct vc4_compile *c, struct qreg reg);
void qir_dump(struct vc4_compile *c);
void qir_dump_inst(struct vc4_compile *c, struct qinst *inst);