summaryrefslogtreecommitdiffstats
path: root/src/glsl/opt_structure_splitting.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/opt_structure_splitting.cpp
parentdc55254f5b23e5ad7a07c974ce772f93b4c11cb0 (diff)
Convert everything from the talloc API to the ralloc API.
Diffstat (limited to 'src/glsl/opt_structure_splitting.cpp')
-rw-r--r--src/glsl/opt_structure_splitting.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/glsl/opt_structure_splitting.cpp b/src/glsl/opt_structure_splitting.cpp
index d6191002c2f..014407c0be2 100644
--- a/src/glsl/opt_structure_splitting.cpp
+++ b/src/glsl/opt_structure_splitting.cpp
@@ -65,7 +65,7 @@ public:
ir_variable **components;
- /** talloc_parent(this->var) -- the shader's talloc context. */
+ /** ralloc_parent(this->var) -- the shader's ralloc context. */
void *mem_ctx;
};
@@ -74,13 +74,13 @@ class ir_structure_reference_visitor : public ir_hierarchical_visitor {
public:
ir_structure_reference_visitor(void)
{
- this->mem_ctx = talloc_new(NULL);
+ this->mem_ctx = ralloc_context(NULL);
this->variable_list.make_empty();
}
~ir_structure_reference_visitor(void)
{
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
}
virtual ir_visitor_status visit(ir_variable *);
@@ -322,7 +322,7 @@ do_structure_splitting(exec_list *instructions)
if (refs.variable_list.is_empty())
return false;
- void *mem_ctx = talloc_new(NULL);
+ void *mem_ctx = ralloc_context(NULL);
/* Replace the decls of the structures to be split with their split
* components.
@@ -331,14 +331,14 @@ do_structure_splitting(exec_list *instructions)
variable_entry2 *entry = (variable_entry2 *)iter.get();
const struct glsl_type *type = entry->var->type;
- entry->mem_ctx = talloc_parent(entry->var);
+ entry->mem_ctx = ralloc_parent(entry->var);
- entry->components = talloc_array(mem_ctx,
+ entry->components = ralloc_array(mem_ctx,
ir_variable *,
type->length);
for (unsigned int i = 0; i < entry->var->type->length; i++) {
- const char *name = talloc_asprintf(mem_ctx, "%s_%s",
+ const char *name = ralloc_asprintf(mem_ctx, "%s_%s",
entry->var->name,
type->fields.structure[i].name);
@@ -355,7 +355,7 @@ do_structure_splitting(exec_list *instructions)
ir_structure_splitting_visitor split(&refs.variable_list);
visit_list_elements(&split, instructions);
- talloc_free(mem_ctx);
+ ralloc_free(mem_ctx);
return true;
}