From d3cdbf6fd817ae5e7a8a72bcc3f43cc1b04a709b Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 8 Jul 2016 15:24:34 -0700 Subject: 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) --- src/gallium/drivers/vc4/vc4_program.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium/drivers/vc4/vc4_program.c') 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; -- cgit v1.1