projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
564ba25
)
i965: free shader's constant buffer in brwDeleteProgram()
author
Brian Paul
<brianp@vmware.com>
Thu, 9 Apr 2009 16:33:08 +0000
(10:33 -0600)
committer
Brian Paul
<brianp@vmware.com>
Thu, 9 Apr 2009 16:33:16 +0000
(10:33 -0600)
Fixes mem leak observed with texcombine test.
src/mesa/drivers/dri/i965/brw_program.c
patch
|
blob
|
history
diff --git
a/src/mesa/drivers/dri/i965/brw_program.c
b/src/mesa/drivers/dri/i965/brw_program.c
index 457bc2fc7f41bdba77da35187a61e1a4dfeec317..fbf1ddd1e3ecf617941bb48048223e2e7a187952 100644
(file)
--- a/
src/mesa/drivers/dri/i965/brw_program.c
+++ b/
src/mesa/drivers/dri/i965/brw_program.c
@@
-95,6
+95,12
@@
static struct gl_program *brwNewProgram( GLcontext *ctx,
static void brwDeleteProgram( GLcontext *ctx,
struct gl_program *prog )
{
+ if (prog->Target == GL_FRAGMENT_PROGRAM_ARB) {
+ struct gl_fragment_program *fprog = (struct gl_fragment_program *) prog;
+ struct brw_fragment_program *brw_fprog = brw_fragment_program(fprog);
+ dri_bo_unreference(brw_fprog->const_buffer);
+ }
+
_mesa_delete_program( ctx, prog );
}