When the shader instructions change, free the TGSI tokens. This signals the
state tracker to recompile the shader. Fixes a regression caused by recent
shader/state-tracker changes.
stfp->param_state = stfp->Base.Base.Parameters->StateFlags;
+ if (stfp->state.tokens) {
+ FREE((void *) stfp->state.tokens);
+ stfp->state.tokens = NULL;
+ }
+
if (st->fp == stfp)
st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM;
}
stvp->param_state = stvp->Base.Base.Parameters->StateFlags;
+ if (stvp->state.tokens) {
+ FREE((void *) stvp->state.tokens);
+ stvp->state.tokens = NULL;
+ }
+
if (st->vp == stvp)
st->dirty.st |= ST_NEW_VERTEX_PROGRAM;
}