radv/rt: Plug some memory leaks during shader creation
authorFriedrich Vock <friedrich.vock@gmx.de>
Mon, 17 Apr 2023 14:14:50 +0000 (16:14 +0200)
committerMarge Bot <emma+marge@anholt.net>
Tue, 25 Apr 2023 19:32:42 +0000 (19:32 +0000)
commit23c2dbd6ba8d526e9c50ff1ae80f7f4c145f8931
tree16a6a184cddf44ecb78ac4ef7320402e46bd4239
parent32dddb90adfd57a5d29025c7d62911daad7cebaf
radv/rt: Plug some memory leaks during shader creation

nir_inline_function actually clones instructions instead of moving them.
Free the shaders explicitly after inserting them instead.

Fixes: 207ce6d658 ("radv: Add helper to inline shaders into the main shader.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22535>
src/amd/vulkan/radv_rt_shader.c