From: Boyan Ding Date: Fri, 16 Oct 2015 07:15:39 +0000 (+0800) Subject: vc4: Use nir_foreach_variable X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6bd9e0351205dc475f45b58979702b5cf414aa07;p=mesa.git vc4: Use nir_foreach_variable Signed-off-by: Boyan Ding Reviewed-by: Eric Anholt --- diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_blend.c b/src/gallium/drivers/vc4/vc4_nir_lower_blend.c index a842d604a51..17b524653bb 100644 --- a/src/gallium/drivers/vc4/vc4_nir_lower_blend.c +++ b/src/gallium/drivers/vc4/vc4_nir_lower_blend.c @@ -393,7 +393,7 @@ vc4_nir_lower_blend_block(nir_block *block, void *state) continue; nir_variable *output_var = NULL; - foreach_list_typed(nir_variable, var, node, &c->s->outputs) { + nir_foreach_variable(var, &c->s->outputs) { if (var->data.driver_location == intr->const_index[0]) { output_var = var; break; diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_io.c b/src/gallium/drivers/vc4/vc4_nir_lower_io.c index a98d70da7d8..761e2c819c5 100644 --- a/src/gallium/drivers/vc4/vc4_nir_lower_io.c +++ b/src/gallium/drivers/vc4/vc4_nir_lower_io.c @@ -63,7 +63,7 @@ vc4_nir_lower_input(struct vc4_compile *c, nir_builder *b, } nir_variable *input_var = NULL; - foreach_list_typed(nir_variable, var, node, &c->s->inputs) { + nir_foreach_variable(var, &c->s->inputs) { if (var->data.driver_location == intr->const_index[0]) { input_var = var; break; @@ -129,7 +129,7 @@ vc4_nir_lower_output(struct vc4_compile *c, nir_builder *b, nir_intrinsic_instr *intr) { nir_variable *output_var = NULL; - foreach_list_typed(nir_variable, var, node, &c->s->outputs) { + nir_foreach_variable(var, &c->s->outputs) { if (var->data.driver_location == intr->const_index[0]) { output_var = var; break; diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 31c7e28ff57..1b590a2d0c4 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -1383,13 +1383,13 @@ static void ntq_setup_inputs(struct vc4_compile *c) { unsigned num_entries = 0; - foreach_list_typed(nir_variable, var, node, &c->s->inputs) + nir_foreach_variable(var, &c->s->inputs) num_entries++; nir_variable *vars[num_entries]; unsigned i = 0; - foreach_list_typed(nir_variable, var, node, &c->s->inputs) + nir_foreach_variable(var, &c->s->inputs) vars[i++] = var; /* Sort the variables so that we emit the input setup in @@ -1432,7 +1432,7 @@ ntq_setup_inputs(struct vc4_compile *c) static void ntq_setup_outputs(struct vc4_compile *c) { - foreach_list_typed(nir_variable, var, node, &c->s->outputs) { + nir_foreach_variable(var, &c->s->outputs) { unsigned array_len = MAX2(glsl_get_length(var->type), 1); unsigned loc = var->data.driver_location * 4; @@ -1471,7 +1471,7 @@ ntq_setup_outputs(struct vc4_compile *c) static void ntq_setup_uniforms(struct vc4_compile *c) { - foreach_list_typed(nir_variable, var, node, &c->s->uniforms) { + nir_foreach_variable(var, &c->s->uniforms) { unsigned array_len = MAX2(glsl_get_length(var->type), 1); unsigned array_elem_size = 4 * sizeof(float);