mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 12:18:09 +02:00
panfrost: Fix memory leaks for compute state
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12376>
This commit is contained in:
parent
a9ab168e16
commit
98165aa9f2
1 changed files with 8 additions and 0 deletions
|
|
@ -73,6 +73,10 @@ panfrost_create_compute_state(
|
|||
so->cbase.ir_type, so->cbase.prog, MESA_SHADER_COMPUTE,
|
||||
v);
|
||||
|
||||
/* There are no variants so we won't need the NIR again */
|
||||
ralloc_free((void *)so->cbase.prog);
|
||||
so->cbase.prog = NULL;
|
||||
|
||||
return so;
|
||||
}
|
||||
|
||||
|
|
@ -86,6 +90,10 @@ panfrost_bind_compute_state(struct pipe_context *pipe, void *cso)
|
|||
static void
|
||||
panfrost_delete_compute_state(struct pipe_context *pipe, void *cso)
|
||||
{
|
||||
struct panfrost_shader_variants *so =
|
||||
(struct panfrost_shader_variants *)cso;
|
||||
|
||||
free(so->variants);
|
||||
free(cso);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue