projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a6a431
)
ir_to_mesa: Free the ir_to_mesa temporary storage when we're done.
author
Eric Anholt
<eric@anholt.net>
Wed, 18 Aug 2010 18:37:18 +0000
(11:37 -0700)
committer
Eric Anholt
<eric@anholt.net>
Wed, 18 Aug 2010 21:16:07 +0000
(14:16 -0700)
src/mesa/program/ir_to_mesa.cpp
patch
|
blob
|
history
diff --git
a/src/mesa/program/ir_to_mesa.cpp
b/src/mesa/program/ir_to_mesa.cpp
index 8ed3834061a366d6ad567347452e48f6374fc9e2..4f4994392dd6afee6cd2a8af08d748fb027983ae 100644
(file)
--- a/
src/mesa/program/ir_to_mesa.cpp
+++ b/
src/mesa/program/ir_to_mesa.cpp
@@
-2212,10
+2212,12
@@
ir_to_mesa_visitor::ir_to_mesa_visitor()
next_signature_id = 1;
sampler_map = NULL;
current_function = NULL;
+ mem_ctx = talloc_new(NULL);
}
ir_to_mesa_visitor::~ir_to_mesa_visitor()
{
+ talloc_free(mem_ctx);
if (this->sampler_map)
hash_table_dtor(this->sampler_map);
}
@@
-2445,8
+2447,6
@@
get_mesa_program(GLcontext *ctx, struct gl_shader_program *shader_program,
v.ctx = ctx;
v.prog = prog;
- v.mem_ctx = talloc_new(NULL);
-
/* Emit Mesa IR for main(). */
visit_exec_list(shader->ir, &v);
v.ir_to_mesa_emit_op0(NULL, OPCODE_END);