summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_program.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2016-07-08 15:24:34 -0700
committerEric Anholt <eric@anholt.net>2016-07-12 15:47:25 -0700
commitd3cdbf6fd817ae5e7a8a72bcc3f43cc1b04a709b (patch)
treeab412a1f54b31304e5d0ed1df2d5e4e188916d52 /src/gallium/drivers/vc4/vc4_program.c
parent6858f059246b2cf6b969b050154dcb7307a03833 (diff)
downloadexternal_mesa3d-d3cdbf6fd817ae5e7a8a72bcc3f43cc1b04a709b.zip
external_mesa3d-d3cdbf6fd817ae5e7a8a72bcc3f43cc1b04a709b.tar.gz
external_mesa3d-d3cdbf6fd817ae5e7a8a72bcc3f43cc1b04a709b.tar.bz2
vc4: Add a "qir_for_each_inst_inorder" macro and use it in many places.
We have the prior list_foreach() all over the code, but I need to move where instructions live as part of adding support for control flow. Start by just converting to a helper iterator macro. (The simpler "qir_for_each_inst()" will be used for the for-each-inst-in-a-block iterator macro later)
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_program.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 20e2850..0a231b2 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -2003,7 +2003,7 @@ vc4_get_compiled_shader(struct vc4_context *vc4, enum qstage stage,
bool input_live[c->num_input_slots];
memset(input_live, 0, sizeof(input_live));
- list_for_each_entry(struct qinst, inst, &c->instructions, link) {
+ qir_for_each_inst_inorder(inst, c) {
for (int i = 0; i < qir_get_op_nsrc(inst->op); i++) {
if (inst->src[i].file == QFILE_VARY)
input_live[inst->src[i].index] = true;