mesa: Use typed foreach_in_list_safe instead of foreach_list_safe.
authorMatt Turner <mattst88@gmail.com>
Wed, 25 Jun 2014 04:58:50 +0000 (21:58 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 1 Jul 2014 15:55:51 +0000 (08:55 -0700)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 4df444f..1f89ca5 100644 (file)
@@ -3872,9 +3872,7 @@ glsl_to_tgsi_visitor::eliminate_dead_code(void)
    /* Now actually remove the instructions that are completely dead and update
     * the writemask of other instructions with dead channels.
     */
-   foreach_list_safe(node, &this->instructions) {
-      glsl_to_tgsi_instruction *inst = (glsl_to_tgsi_instruction *) node;
-      
+   foreach_in_list_safe(glsl_to_tgsi_instruction, inst, &this->instructions) {
       if (!inst->dead_mask || !inst->dst.writemask)
          continue;
       else if ((inst->dst.writemask & ~inst->dead_mask) == 0) {