mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 03:20:09 +01:00
i915g: If we have a program, that means the other fields are ours and we can free them.
Otherwise they probably belong to draw.
This commit is contained in:
parent
c66877c290
commit
4e6120576f
1 changed files with 5 additions and 3 deletions
|
|
@ -507,12 +507,14 @@ void i915_delete_fs_state(struct pipe_context *pipe, void *shader)
|
|||
{
|
||||
struct i915_fragment_shader *ifs = (struct i915_fragment_shader *) shader;
|
||||
|
||||
if (ifs->program)
|
||||
if (ifs->program) {
|
||||
FREE(ifs->program);
|
||||
ifs->program = NULL;
|
||||
FREE((struct tgsi_token *)ifs->state.tokens);
|
||||
ifs->state.tokens = NULL;
|
||||
}
|
||||
ifs->program_len = 0;
|
||||
|
||||
FREE((struct tgsi_token *)ifs->state.tokens);
|
||||
|
||||
FREE(ifs);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue