summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2011-01-21 14:32:31 -0800
committerKenneth Graunke <[email protected]>2011-01-31 10:17:09 -0800
commitd3073f58c17d8675a2ecdd5dfa83e5520c78e1a8 (patch)
tree31cdec04f53e61fb4b44d05d9b82795e591c71c2 /src/glsl/ir.cpp
parentdc55254f5b23e5ad7a07c974ce772f93b4c11cb0 (diff)
Convert everything from the talloc API to the ralloc API.
Diffstat (limited to 'src/glsl/ir.cpp')
-rw-r--r--src/glsl/ir.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index b4ceb5bba14..cc508e2a424 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -578,7 +578,7 @@ ir_constant::ir_constant(const struct glsl_type *type, exec_list *value_list)
|| type->is_record() || type->is_array());
if (type->is_array()) {
- this->array_elements = talloc_array(this, ir_constant *, type->length);
+ this->array_elements = ralloc_array(this, ir_constant *, type->length);
unsigned i = 0;
foreach_list(node, value_list) {
ir_constant *value = (ir_constant *) node;
@@ -1036,7 +1036,7 @@ ir_dereference_array::ir_dereference_array(ir_rvalue *value,
ir_dereference_array::ir_dereference_array(ir_variable *var,
ir_rvalue *array_index)
{
- void *ctx = talloc_parent(var);
+ void *ctx = ralloc_parent(var);
this->ir_type = ir_type_dereference_array;
this->array_index = array_index;
@@ -1069,7 +1069,7 @@ ir_dereference_record::ir_dereference_record(ir_rvalue *value,
{
this->ir_type = ir_type_dereference_record;
this->record = value;
- this->field = talloc_strdup(this, field);
+ this->field = ralloc_strdup(this, field);
this->type = (this->record != NULL)
? this->record->type->field_type(field) : glsl_type::error_type;
}
@@ -1078,11 +1078,11 @@ ir_dereference_record::ir_dereference_record(ir_rvalue *value,
ir_dereference_record::ir_dereference_record(ir_variable *var,
const char *field)
{
- void *ctx = talloc_parent(var);
+ void *ctx = ralloc_parent(var);
this->ir_type = ir_type_dereference_record;
this->record = new(ctx) ir_dereference_variable(var);
- this->field = talloc_strdup(this, field);
+ this->field = ralloc_strdup(this, field);
this->type = (this->record != NULL)
? this->record->type->field_type(field) : glsl_type::error_type;
}
@@ -1245,7 +1245,7 @@ ir_swizzle::ir_swizzle(ir_rvalue *val, ir_swizzle_mask mask)
ir_swizzle *
ir_swizzle::create(ir_rvalue *val, const char *str, unsigned vector_length)
{
- void *ctx = talloc_parent(val);
+ void *ctx = ralloc_parent(val);
/* For each possible swizzle character, this table encodes the value in
* \c idx_map that represents the 0th element of the vector. For invalid
@@ -1334,7 +1334,7 @@ ir_variable::ir_variable(const struct glsl_type *type, const char *name,
{
this->ir_type = ir_type_variable;
this->type = type;
- this->name = talloc_strdup(this, name);
+ this->name = ralloc_strdup(this, name);
this->explicit_location = false;
this->location = -1;
this->warn_extension = NULL;
@@ -1426,7 +1426,7 @@ ir_function_signature::replace_parameters(exec_list *new_params)
ir_function::ir_function(const char *name)
{
this->ir_type = ir_type_function;
- this->name = talloc_strdup(this, name);
+ this->name = ralloc_strdup(this, name);
}
@@ -1492,7 +1492,7 @@ steal_memory(ir_instruction *ir, void *new_ctx)
}
}
- talloc_steal(new_ctx, ir);
+ ralloc_steal(new_ctx, ir);
}