summaryrefslogtreecommitdiff
path: root/src/glsl/hir_field_selection.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-06-25 13:14:37 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-30 13:52:24 -0700
commit953ff1283d3d52e6a6b4850c2b0b574111625010 (patch)
treececa1c6c108067efcc948822b94b4f78c45d7afa /src/glsl/hir_field_selection.cpp
parent116f1d4f95d8eb0a82b272016590549632c865b3 (diff)
glsl2: Use _mesa_glsl_parse_state as the talloc parent, not glsl_shader.
_mesa_glsl_parse_state should be the parent for all temporary allocation done while compiling a shader. glsl_shader should only be used as the parent for the shader's final IR---the _result_ of compilation. Since many IR instructions may be added or discarded during optimization passes, IR should not ever be allocated to glsl_shader directly. Done via sed -i s/talloc_parent(state)/state/g and s/talloc_parent(st)/st/g. This also removes a ton of talloc_parent calls, which may help performance.
Diffstat (limited to 'src/glsl/hir_field_selection.cpp')
-rw-r--r--src/glsl/hir_field_selection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/hir_field_selection.cpp b/src/glsl/hir_field_selection.cpp
index e2efff60d3..5500e09d7e 100644
--- a/src/glsl/hir_field_selection.cpp
+++ b/src/glsl/hir_field_selection.cpp
@@ -33,7 +33,7 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
exec_list *instructions,
struct _mesa_glsl_parse_state *state)
{
- void *ctx = talloc_parent(state);
+ void *ctx = state;
ir_rvalue *result = NULL;
ir_rvalue *op;