diff options
author | marha <marha@users.sourceforge.net> | 2014-07-04 19:52:56 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-07-04 19:52:56 +0200 |
commit | 62ed212e1add98e39c0f7a6e5a8a5726d66f161e (patch) | |
tree | a80c4bf566c76665b3449f13fac7de72c66aa80a /mesalib/src/glsl/opt_dead_code_local.cpp | |
parent | 3095a03ec3cb1f05b49362327d10a767299d7635 (diff) | |
parent | fe03d6aef6338e43593f164b09ae993bcd0ecbdd (diff) | |
download | vcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.tar.gz vcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.tar.bz2 vcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/glsl/opt_dead_code_local.cpp')
-rw-r--r-- | mesalib/src/glsl/opt_dead_code_local.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/mesalib/src/glsl/opt_dead_code_local.cpp b/mesalib/src/glsl/opt_dead_code_local.cpp index 88895fb0e..4770fcff2 100644 --- a/mesalib/src/glsl/opt_dead_code_local.cpp +++ b/mesalib/src/glsl/opt_dead_code_local.cpp @@ -70,9 +70,7 @@ public: void use_channels(ir_variable *const var, int used) { - foreach_list_safe(n, this->assignments) { - assignment_entry *entry = (assignment_entry *) n; - + foreach_in_list_safe(assignment_entry, entry, this->assignments) { if (entry->lhs == var) { if (var->type->is_scalar() || var->type->is_vector()) { if (debug) @@ -119,8 +117,7 @@ public: /* For the purpose of dead code elimination, emitting a vertex counts as * "reading" all of the currently assigned output variables. */ - foreach_list_safe(n, this->assignments) { - assignment_entry *entry = (assignment_entry *) n; + foreach_in_list_safe(assignment_entry, entry, this->assignments) { if (entry->lhs->data.mode == ir_var_shader_out) { if (debug) printf("kill %s\n", entry->lhs->name); @@ -196,9 +193,7 @@ process_assignment(void *ctx, ir_assignment *ir, exec_list *assignments) printf("looking for %s.0x%01x to remove\n", var->name, ir->write_mask); - foreach_list_safe(n, assignments) { - assignment_entry *entry = (assignment_entry *) n; - + foreach_in_list_safe(assignment_entry, entry, assignments) { if (entry->lhs != var) continue; @@ -258,9 +253,7 @@ process_assignment(void *ctx, ir_assignment *ir, exec_list *assignments) */ if (debug) printf("looking for %s to remove\n", var->name); - foreach_list_safe(n, assignments) { - assignment_entry *entry = (assignment_entry *) n; - + foreach_in_list_safe(assignment_entry, entry, assignments) { if (entry->lhs == var) { if (debug) printf("removing %s\n", var->name); @@ -280,9 +273,7 @@ process_assignment(void *ctx, ir_assignment *ir, exec_list *assignments) printf("add %s\n", var->name); printf("current entries\n"); - foreach_list(n, assignments) { - assignment_entry *entry = (assignment_entry *) n; - + foreach_in_list(assignment_entry, entry, assignments) { printf(" %s (0x%01x)\n", entry->lhs->name, entry->unused); } } |