gallium: Fix glDraw/CopyPixels fragment program leak.
authorMichel Dänzer <daenzer@vmware.com>
Mon, 20 Apr 2009 10:52:56 +0000 (12:52 +0200)
committerMichel Dänzer <daenzer@vmware.com>
Mon, 20 Apr 2009 11:05:18 +0000 (13:05 +0200)
src/mesa/state_tracker/st_cb_drawpixels.c

index acc9240b5d0390a35dcf3433b73e4f0693554e10..703b465574d94c2eb018a5744e2fed6db798ee38 100644 (file)
@@ -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;
    }