mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-17 01:40:36 +01:00
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:
parent
003cfd4dd2
commit
1aef032d43
3 changed files with 13 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue