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/mesa/program | |
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/mesa/program')
-rw-r--r-- | mesalib/src/mesa/program/ir_to_mesa.cpp | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp index 59cf1232a..1109051e9 100644 --- a/mesalib/src/mesa/program/ir_to_mesa.cpp +++ b/mesalib/src/mesa/program/ir_to_mesa.cpp @@ -663,11 +663,7 @@ ir_to_mesa_visitor::get_temp(const glsl_type *type) variable_storage * ir_to_mesa_visitor::find_variable_storage(const ir_variable *var) { - variable_storage *entry; - - foreach_list(node, &this->variables) { - entry = (variable_storage *) node; - + foreach_in_list(variable_storage, entry, &this->variables) { if (entry->var == var) return entry; } @@ -801,9 +797,7 @@ ir_to_mesa_visitor::visit(ir_function *ir) assert(sig); - foreach_list(node, &sig->body) { - ir_instruction *ir = (ir_instruction *) node; - + foreach_in_list(ir_instruction, ir, &sig->body) { ir->accept(this); } } @@ -1868,8 +1862,7 @@ ir_to_mesa_visitor::visit(ir_constant *ir) src_reg temp_base = get_temp(ir->type); dst_reg temp = dst_reg(temp_base); - foreach_list(node, &ir->components) { - ir_constant *field_value = (ir_constant *) node; + foreach_in_list(ir_constant, field_value, &ir->components) { int size = type_size(field_value->type); assert(size > 0); @@ -2338,9 +2331,7 @@ set_branchtargets(ir_to_mesa_visitor *v, mesa_instructions[loop_stack[loop_stack_pos]].BranchTarget = i; break; case OPCODE_CAL: - foreach_list(n, &v->function_signatures) { - function_entry *entry = (function_entry *) n; - + foreach_in_list(function_entry, entry, &v->function_signatures) { if (entry->sig_id == mesa_instructions[i].BranchTarget) { mesa_instructions[i].BranchTarget = entry->inst; break; @@ -2495,8 +2486,8 @@ _mesa_generate_parameters_list_for_uniforms(struct gl_shader_program { add_uniform_to_shader add(shader_program, params, sh->Stage); - foreach_list(node, sh->ir) { - ir_variable *var = ((ir_instruction *) node)->as_variable(); + foreach_in_list(ir_instruction, node, sh->ir) { + ir_variable *var = node->as_variable(); if ((var == NULL) || (var->data.mode != ir_var_uniform) || var->is_in_uniform_block() || (strncmp(var->name, "gl_", 3) == 0)) @@ -2621,9 +2612,7 @@ ir_to_mesa_visitor::copy_propagate(void) int *acp_level = rzalloc_array(mem_ctx, int, this->next_temp * 4); int level = 0; - foreach_list(node, &this->instructions) { - ir_to_mesa_instruction *inst = (ir_to_mesa_instruction *) node; - + foreach_in_list(ir_to_mesa_instruction, inst, &this->instructions) { assert(inst->dst.file != PROGRAM_TEMPORARY || inst->dst.index < this->next_temp); @@ -2826,7 +2815,7 @@ get_mesa_program(struct gl_context *ctx, prog->NumTemporaries = v.next_temp; int num_instructions = 0; - foreach_list(node, &v.instructions) { + foreach_in_list(ir_instruction, node, &v.instructions) { num_instructions++; } @@ -2842,9 +2831,7 @@ get_mesa_program(struct gl_context *ctx, */ mesa_inst = mesa_instructions; i = 0; - foreach_list(node, &v.instructions) { - const ir_to_mesa_instruction *inst = (ir_to_mesa_instruction *) node; - + foreach_in_list(const ir_to_mesa_instruction, inst, &v.instructions) { mesa_inst->Opcode = inst->op; mesa_inst->CondUpdate = inst->cond_update; if (inst->saturate) |