vulkan/meta: plug a couple of memory leaks

We create NIR shaders here, and we need to free them when we're done with
them as well.

These shaders are created using nir_builder_init_simple_shader(), which
allocates using a NULL ralloc-parent, so ralloc_free should be the right
function to free them with.

Fixes: 514c10344e ("vulkan/meta: Add a concept of rect pipelines")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32486>
This commit is contained in:
Erik Faye-Lund 2024-12-04 16:10:56 +01:00 committed by Marge Bot
parent 3aad0afc30
commit 43738a9a94

View file

@ -369,6 +369,10 @@ create_rect_list_pipeline(struct vk_device *device,
1, &info_local, NULL, 1, &info_local, NULL,
pipeline_out); pipeline_out);
ralloc_free(vs_nir_info.nir);
if (use_gs)
ralloc_free(gs_nir_info.nir);
STACK_ARRAY_FINISH(dyn_state); STACK_ARRAY_FINISH(dyn_state);
STACK_ARRAY_FINISH(stages); STACK_ARRAY_FINISH(stages);