diff options
author | Eric Anholt <[email protected]> | 2010-08-18 11:37:18 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-08-18 14:16:07 -0700 |
commit | abc6d7e0b4b04c75129d24c3cb6f021b92cd46f6 (patch) | |
tree | 10818abca5a19046790cc81e6bacd61da286a434 | |
parent | 4a6a4316846ead3ec12759c96ecc4b61491aad65 (diff) |
ir_to_mesa: Free the ir_to_mesa temporary storage when we're done.
-rw-r--r-- | src/mesa/program/ir_to_mesa.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 8ed3834061a..4f4994392dd 100644 --- 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); |