From: Michel Dänzer Date: Mon, 20 Apr 2009 10:52:56 +0000 (+0200) Subject: gallium: Fix glDraw/CopyPixels fragment program leak. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c76a2444a3db4fef4b7892cfd99aa41681b4eb0a;p=mesa.git gallium: Fix glDraw/CopyPixels fragment program leak. --- 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; }