i965: free shader's constant buffer in brwDeleteProgram()
Fixes mem leak observed with texcombine test.
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user