mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 16:50:10 +01:00
v3dv: don't leak variant QPU when pipeline compile fails
Typically we free them when we upload the QPU code from the variant to the assembly BO in the pipeline, however, if there is an error during pipeline compilation that may not happen and we would leak the QPU code from the variants. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16370>
This commit is contained in:
parent
fd02ddc81b
commit
79f4e33f04
1 changed files with 2 additions and 0 deletions
|
|
@ -94,6 +94,8 @@ v3dv_shader_variant_destroy(struct v3dv_device *device,
|
|||
/* The assembly BO is shared by all variants in the pipeline, so it can't
|
||||
* be freed here and should be freed with the pipeline
|
||||
*/
|
||||
if (variant->qpu_insts)
|
||||
free(variant->qpu_insts);
|
||||
ralloc_free(variant->prog_data.base);
|
||||
vk_free(&device->vk.alloc, variant);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue