aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ast_to_hir.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-07-04 19:50:15 +0200
committermarha <marha@users.sourceforge.net>2014-07-04 19:50:15 +0200
commitfe03d6aef6338e43593f164b09ae993bcd0ecbdd (patch)
tree0fdb7e12fc82894e07b8b8141f2dbb00a93c60ad /mesalib/src/glsl/ast_to_hir.cpp
parentcfc5bafcb2db8c6e05d7be6bb7315960be08c0d8 (diff)
downloadvcxsrv-fe03d6aef6338e43593f164b09ae993bcd0ecbdd.tar.gz
vcxsrv-fe03d6aef6338e43593f164b09ae993bcd0ecbdd.tar.bz2
vcxsrv-fe03d6aef6338e43593f164b09ae993bcd0ecbdd.zip
fontconfig mesa pixman xserver git update 4 July 2014
xserver commit a61ca6f006d70343c88fe45206fae0669d1e8971 pixman commit 6d2cf40166d81bfc63108504c8022dc4fec37ff5 fontconfig commit 5b22776999b6052afe0e829b1a0c0935bbe1e9f7 mesa commit 9a37eb8adb6558a4abf47774b583cb582a0ae116
Diffstat (limited to 'mesalib/src/glsl/ast_to_hir.cpp')
-rw-r--r--mesalib/src/glsl/ast_to_hir.cpp28
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);