{
struct pipe_context *pipe = st->pipe;
struct st_fp_variant *variant = CALLOC_STRUCT(st_fp_variant);
+ GLboolean deleteFP = GL_FALSE;
if (!variant)
return NULL;
variant->parameters = _mesa_clone_parameter_list(fp->Base.Parameters);
stfp = st_fragment_program(fp);
+ deleteFP = GL_TRUE;
}
else if (key->drawpixels) {
/* glDrawPixels drawing */
/* RGBA */
st_make_drawpix_fragment_program(st, &stfp->Base, &fp);
variant->parameters = _mesa_clone_parameter_list(fp->Base.Parameters);
+ deleteFP = GL_TRUE;
}
stfp = st_fragment_program(fp);
}
debug_printf("\n");
}
-#if FEATURE_drawpix
- if (key->bitmap || key->drawpixels) {
+ if (deleteFP) {
/* Free the temporary program made above */
struct gl_fragment_program *fp = &stfp->Base;
_mesa_reference_fragprog(st->ctx, &fp, NULL);
}
-#endif
return variant;
}