From 8273bd46877e2ea2b8a02b87a11c68102d07e1f2 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 4 Aug 2010 12:34:56 -0700 Subject: glsl2: Make the clone() method take a talloc context. In most cases, we needed to be reparenting the cloned IR to a different context (for example, to the linked shader instead of the unlinked shader), or optimization before the reparent would cause memory usage of the original object to grow and grow. --- src/glsl/ir_import_prototypes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/glsl/ir_import_prototypes.cpp') diff --git a/src/glsl/ir_import_prototypes.cpp b/src/glsl/ir_import_prototypes.cpp index 5c5dc00ad7..e553e12a49 100644 --- a/src/glsl/ir_import_prototypes.cpp +++ b/src/glsl/ir_import_prototypes.cpp @@ -95,7 +95,7 @@ public: assert(const_cast(param)->as_variable() != NULL); - ir_variable *const param_copy = param->clone(NULL); + ir_variable *const param_copy = param->clone(mem_ctx, NULL); copy->parameters.push_tail(param_copy); } -- cgit v1.2.3