aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2016-07-08 15:24:34 -0700
committerEric Anholt <[email protected]>2016-07-12 15:47:25 -0700
commitd3cdbf6fd817ae5e7a8a72bcc3f43cc1b04a709b (patch)
treeab412a1f54b31304e5d0ed1df2d5e4e188916d52 /src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c
parent6858f059246b2cf6b969b050154dcb7307a03833 (diff)
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_qir_lower_uniforms.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c b/src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c
index 927268d71ef..9f782dfc7df 100644
--- a/src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c
+++ b/src/gallium/drivers/vc4/vc4_qir_lower_uniforms.c
@@ -118,7 +118,7 @@ qir_lower_uniforms(struct vc4_compile *c)
* than one uniform referenced, and add those uniform values to the
* ht.
*/
- list_for_each_entry(struct qinst, inst, &c->instructions, link) {
+ qir_for_each_inst_inorder(inst, c) {
uint32_t nsrc = qir_get_op_nsrc(inst->op);
if (qir_get_instruction_uniform_count(inst) <= 1)
@@ -154,7 +154,7 @@ qir_lower_uniforms(struct vc4_compile *c)
struct qinst *mov = qir_inst(QOP_MOV, temp, unif, c->undef);
list_add(&mov->link, &c->instructions);
c->defs[temp.index] = mov;
- list_for_each_entry(struct qinst, inst, &c->instructions, link) {
+ qir_for_each_inst_inorder(inst, c) {
uint32_t nsrc = qir_get_op_nsrc(inst->op);
uint32_t count = qir_get_instruction_uniform_count(inst);