gallium/draw: Free specialized versions of driver shaders

The pstipple, aaline and aapoint code would create specialized versions
of shaders and upload them to the driver -- but never free them.
This commit is contained in:
Keith Whitwell 2009-06-01 20:16:20 -07:00
parent 003cfd4dd2
commit 1aef032d43
3 changed files with 13 additions and 0 deletions

View file

@ -819,6 +819,10 @@ aaline_delete_fs_state(struct pipe_context *pipe, void *fs)
struct aaline_fragment_shader *aafs = (struct aaline_fragment_shader *) fs;
/* pass-through */
aaline->driver_delete_fs_state(aaline->pipe, aafs->driver_fs);
if (aafs->aaline_fs)
aaline->driver_delete_fs_state(aaline->pipe, aafs->aaline_fs);
FREE(aafs);
}

View file

@ -829,8 +829,13 @@ aapoint_delete_fs_state(struct pipe_context *pipe, void *fs)
{
struct aapoint_stage *aapoint = aapoint_stage_from_pipe(pipe);
struct aapoint_fragment_shader *aafs = (struct aapoint_fragment_shader *) fs;
/* pass-through */
aapoint->driver_delete_fs_state(aapoint->pipe, aafs->driver_fs);
if (aafs->aapoint_fs)
aapoint->driver_delete_fs_state(aapoint->pipe, aafs->aapoint_fs);
FREE(aafs);
}

View file

@ -650,6 +650,10 @@ pstip_delete_fs_state(struct pipe_context *pipe, void *fs)
struct pstip_fragment_shader *aafs = (struct pstip_fragment_shader *) fs;
/* pass-through */
pstip->driver_delete_fs_state(pstip->pipe, aafs->driver_fs);
if (aafs->pstip_fs)
pstip->driver_delete_fs_state(pstip->pipe, aafs->pstip_fs);
FREE(aafs);
}