aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir.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/ir.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/ir.cpp')
-rw-r--r--mesalib/src/glsl/ir.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/mesalib/src/glsl/ir.cpp b/mesalib/src/glsl/ir.cpp
index 10c00068e..1d8bb6e7b 100644
--- a/mesalib/src/glsl/ir.cpp
+++ b/mesalib/src/glsl/ir.cpp
@@ -699,8 +699,7 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
if (type->is_array()) {
this->array_elements = ralloc_array(this, ir_constant *, type->length);
unsigned i = 0;
- foreach_list(node, value_list) {
- ir_constant *value = (ir_constant *) node;
+ foreach_in_list(ir_constant, value, value_list) {
assert(value->as_constant() != NULL);
this->array_elements[i++] = value;
@@ -1001,9 +1000,7 @@ ir_constant::copy_offset(ir_constant *src, int offset)
case GLSL_TYPE_STRUCT: {
assert (src->type == this->type);
this->components.make_empty();
- foreach_list(node, &src->components) {
- ir_constant *const orig = (ir_constant *) node;
-
+ foreach_in_list(ir_constant, orig, &src->components) {
this->components.push_tail(orig->clone(this, NULL));
}
break;
@@ -1702,8 +1699,7 @@ ir_function::ir_function(const char *name)
bool
ir_function::has_user_signature()
{
- foreach_list(n, &this->signatures) {
- ir_function_signature *const sig = (ir_function_signature *) n;
+ foreach_in_list(ir_function_signature, sig, &this->signatures) {
if (!sig->is_builtin())
return true;
}
@@ -1724,8 +1720,8 @@ ir_rvalue::error_value(void *mem_ctx)
void
visit_exec_list(exec_list *list, ir_visitor *visitor)
{
- foreach_list_safe(n, list) {
- ((ir_instruction *) n)->accept(visitor);
+ foreach_in_list_safe(ir_instruction, node, list) {
+ node->accept(visitor);
}
}
@@ -1746,8 +1742,7 @@ steal_memory(ir_instruction *ir, void *new_ctx)
*/
if (constant != NULL) {
if (constant->type->is_record()) {
- foreach_list(n, &constant->components) {
- ir_constant *field = (ir_constant *) n;
+ foreach_in_list(ir_constant, field, &constant->components) {
steal_memory(field, ir);
}
} else if (constant->type->is_array()) {
@@ -1764,8 +1759,8 @@ steal_memory(ir_instruction *ir, void *new_ctx)
void
reparent_ir(exec_list *list, void *mem_ctx)
{
- foreach_list(node, list) {
- visit_tree((ir_instruction *) node, steal_memory, mem_ctx);
+ foreach_in_list(ir_instruction, node, list) {
+ visit_tree(node, steal_memory, mem_ctx);
}
}