panvk: Fix shader destruction when vk_shader_module_to_nir fail

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29654>
This commit is contained in:
Mary Guillemard 2024-05-30 13:11:13 +02:00 committed by Marge Bot
parent 84e452b456
commit ad86990056

View file

@ -227,7 +227,7 @@ panvk_per_arch(shader_create)(struct panvk_device *dev,
&dev->vk, stage_info, &spirv_options,
GENX(pan_shader_get_compiler_options)(), NULL, &nir);
if (result != VK_SUCCESS) {
vk_free2(&dev->vk.alloc, alloc, shader);
panvk_per_arch(shader_destroy)(dev, shader, alloc);
return NULL;
}