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/ast_to_hir.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/ast_to_hir.cpp')
-rw-r--r-- | mesalib/src/glsl/ast_to_hir.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/mesalib/src/glsl/ast_to_hir.cpp b/mesalib/src/glsl/ast_to_hir.cpp index 042ef243b..885bee547 100644 --- a/mesalib/src/glsl/ast_to_hir.cpp +++ b/mesalib/src/glsl/ast_to_hir.cpp @@ -112,8 +112,8 @@ _mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state) * applications depend on this behavior, and it matches what nearly all * other drivers do. */ - foreach_list_safe(node, instructions) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); + foreach_in_list_safe(ir_instruction, node, instructions) { + ir_variable *const var = node->as_variable(); if (var == NULL) continue; @@ -4210,10 +4210,8 @@ ast_function_definition::hir(exec_list *instructions, * Add these to the symbol table. */ state->symbols->push_scope(); - foreach_list(n, &signature->parameters) { - ir_variable *const var = ((ir_instruction *) n)->as_variable(); - - assert(var != NULL); + foreach_in_list(ir_variable, var, &signature->parameters) { + assert(var->as_variable() != NULL); /* The only way a parameter would "exist" is if two parameters have * the same name. @@ -5009,7 +5007,7 @@ ast_process_structure_or_interface_block(exec_list *instructions, * 'declarations' list in each of the elements. */ foreach_list_typed (ast_declarator_list, decl_list, link, declarations) { - foreach_list_const (decl_ptr, & decl_list->declarations) { + foreach_list_typed (ast_declaration, decl, link, &decl_list->declarations) { decl_count++; } } @@ -5621,8 +5619,8 @@ ast_interface_block::hir(exec_list *instructions, * thinking there are conflicting definitions of gl_PerVertex in the * shader. */ - foreach_list_safe(node, instructions) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); + foreach_in_list_safe(ir_instruction, node, instructions) { + ir_variable *const var = node->as_variable(); if (var != NULL && var->get_interface_type() == earlier_per_vertex && var->data.mode == var_mode) { @@ -5678,8 +5676,8 @@ ast_gs_input_layout::hir(exec_list *instructions, /* If any shader inputs occurred before this declaration and did not * specify an array size, their size is determined now. */ - foreach_list (node, instructions) { - ir_variable *var = ((ir_instruction *) node)->as_variable(); + foreach_in_list(ir_instruction, node, instructions) { + ir_variable *var = node->as_variable(); if (var == NULL || var->data.mode != ir_var_shader_in) continue; @@ -5796,8 +5794,8 @@ detect_conflicting_assignments(struct _mesa_glsl_parse_state *state, YYLTYPE loc; memset(&loc, 0, sizeof(loc)); - foreach_list(node, instructions) { - ir_variable *var = ((ir_instruction *)node)->as_variable(); + foreach_in_list(ir_instruction, node, instructions) { + ir_variable *var = node->as_variable(); if (!var || !var->data.assigned) continue; @@ -5886,8 +5884,8 @@ remove_per_vertex_blocks(exec_list *instructions, /* Remove any ir_variable declarations that refer to the interface block * we're removing. */ - foreach_list_safe(node, instructions) { - ir_variable *const var = ((ir_instruction *) node)->as_variable(); + foreach_in_list_safe(ir_instruction, node, instructions) { + ir_variable *const var = node->as_variable(); if (var != NULL && var->get_interface_type() == per_vertex && var->data.mode == mode) { state->symbols->disable_variable(var->name); |