summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2009-04-20 12:52:56 +0200
committerMichel Dänzer <[email protected]>2009-04-20 13:05:18 +0200
commitc76a2444a3db4fef4b7892cfd99aa41681b4eb0a (patch)
treea24b3b09106f876a40c24cba3c3ca83a14ee0b6e /src/mesa/state_tracker
parentf2d2b3d8e2d9059c162ae7215344b9171f68632b (diff)
gallium: Fix glDraw/CopyPixels fragment program leak.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index acc9240b5d0..703b465574d 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -146,6 +146,8 @@ combined_drawpix_fragment_program(GLcontext *ctx)
st->pixel_xfer.xfer_prog_sn = st->pixel_xfer.program->serialNo;
st->pixel_xfer.user_prog_sn = st->fp->serialNo;
st->pixel_xfer.combined_prog_sn = stfp->serialNo;
+ /* can't reference new program directly, already have a reference on it */
+ st_reference_fragprog(st, &st->pixel_xfer.combined_prog, NULL);
st->pixel_xfer.combined_prog = stfp;
}