mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-26 06:50:37 +02:00
i965: Fix up VP constbuf leak on program delete.
(cherry picked from commit 7f6d2754d5)
This commit is contained in:
parent
1254d3d315
commit
009392f50d
1 changed files with 11 additions and 3 deletions
|
|
@ -95,9 +95,17 @@ 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);
|
||||
struct gl_fragment_program *fp = (struct gl_fragment_program *) prog;
|
||||
struct brw_fragment_program *brw_fp = brw_fragment_program(fp);
|
||||
|
||||
dri_bo_unreference(brw_fp->const_buffer);
|
||||
}
|
||||
|
||||
if (prog->Target == GL_VERTEX_PROGRAM_ARB) {
|
||||
struct gl_vertex_program *vp = (struct gl_vertex_program *) prog;
|
||||
struct brw_vertex_program *brw_vp = brw_vertex_program(vp);
|
||||
|
||||
dri_bo_unreference(brw_vp->const_buffer);
|
||||
}
|
||||
|
||||
_mesa_delete_program( ctx, prog );
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue