OSDN Git Service
(root)
/
android-x86
/
external-mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0df61bd
)
mesa: Hang the compiled shader off the shader->ir, not the shader.
author
Eric Anholt
<eric@anholt.net>
Wed, 18 Aug 2010 18:36:09 +0000
(11:36 -0700)
committer
Eric Anholt
<eric@anholt.net>
Wed, 18 Aug 2010 21:16:07 +0000
(14:16 -0700)
Otherwise, with repeated program recompile, we never free the results
of the previous compile.
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
58d3b41
..
8ed3834
100644
(file)
--- a/
src/mesa/program/ir_to_mesa.cpp
+++ b/
src/mesa/program/ir_to_mesa.cpp
@@
-2662,6
+2662,7
@@
_mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)
_mesa_glsl_lexer_dtor(state);
}
+ talloc_free(shader->ir);
shader->ir = new(shader) exec_list;
if (!state->error && !state->translation_unit.is_empty())
_mesa_ast_to_hir(shader->ir, state);
@@
-2706,7
+2707,7
@@
_mesa_glsl_compile_shader(GLcontext *ctx, struct gl_shader *shader)
}
/* Retain any live IR, but trash the rest. */
- reparent_ir(shader->ir, shader);
+ reparent_ir(shader->ir, shader
->ir
);
talloc_free(state);