Re: [Mesa-dev] [PATCH 2/2] vc4: Use nir_foreach_variable

2015-10-20 Thread Eric Anholt
Boyan Ding  writes:

> Signed-off-by: Boyan Ding 
> ---
>  src/gallium/drivers/vc4/vc4_nir_lower_blend.c | 2 +-
>  src/gallium/drivers/vc4/vc4_nir_lower_io.c| 4 ++--
>  src/gallium/drivers/vc4/vc4_program.c | 8 
>  3 files changed, 7 insertions(+), 7 deletions(-)

Pushed the vc4 patch.  I'll leave freedreno to Rob.

Thanks!


signature.asc
Description: PGP signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 2/2] vc4: Use nir_foreach_variable

2015-10-16 Thread Boyan Ding
Signed-off-by: Boyan Ding 
---
 src/gallium/drivers/vc4/vc4_nir_lower_blend.c | 2 +-
 src/gallium/drivers/vc4/vc4_nir_lower_io.c| 4 ++--
 src/gallium/drivers/vc4/vc4_program.c | 8 
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/vc4/vc4_nir_lower_blend.c 
b/src/gallium/drivers/vc4/vc4_nir_lower_blend.c
index a842d60..17b5246 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, >s->outputs) {
+nir_foreach_variable(var, >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 a98d70d..761e2c8 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, >s->inputs) {
+nir_foreach_variable(var, >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, >s->outputs) {
+nir_foreach_variable(var, >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 31c7e28..1b590a2 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, >s->inputs)
+nir_foreach_variable(var, >s->inputs)
 num_entries++;
 
 nir_variable *vars[num_entries];
 
 unsigned i = 0;
-foreach_list_typed(nir_variable, var, node, >s->inputs)
+nir_foreach_variable(var, >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, >s->outputs) {
+nir_foreach_variable(var, >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, >s->uniforms) {
+nir_foreach_variable(var, >s->uniforms) {
 unsigned array_len = MAX2(glsl_get_length(var->type), 1);
 unsigned array_elem_size = 4 * sizeof(float);
 
-- 
2.6.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev