mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
gallium: in st_program_string_notify() free shader tokens.
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.
This commit is contained in:
parent
e4cdce43ce
commit
ee55eaa609
1 changed files with 10 additions and 0 deletions
|
|
@ -178,6 +178,11 @@ static void st_program_string_notify( GLcontext *ctx,
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
@ -201,6 +206,11 @@ static void st_program_string_notify( GLcontext *ctx,
|
|||
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue