summaryrefslogtreecommitdiff
path: root/src/glsl/ast_to_hir.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-06-28 11:54:57 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-29 11:15:39 -0700
commit49e3577b91f44013746f7a3db411e7041b7d899e (patch)
treed1a496d1e38b7a26e6bcac0c3eded20101510072 /src/glsl/ast_to_hir.cpp
parent31bcce04b1f9c8c5e33370e26a3a9d6e60049aa8 (diff)
glsl_type: Add get_record_instance method
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r--src/glsl/ast_to_hir.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 54a8e9e00a..664e4687c4 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -2383,7 +2383,6 @@ ir_rvalue *
ast_struct_specifier::hir(exec_list *instructions,
struct _mesa_glsl_parse_state *state)
{
- void *ctx = talloc_parent(state);
unsigned decl_count = 0;
/* Make an initial pass over the list of structure fields to determine how
@@ -2446,7 +2445,8 @@ ast_struct_specifier::hir(exec_list *instructions,
name = this->name;
}
- glsl_type *t = new(ctx) glsl_type(fields, decl_count, name);
+ const glsl_type *t =
+ glsl_type::get_record_instance(fields, decl_count, name);
YYLTYPE loc = this->get_location();
if (!state->symbols->add_type(name, t)) {