radv/rt: fix a memory leak with the RT prolog NIR

radv_meta_nir_init_shader() allocates it and it must be freed.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41991>
This commit is contained in:
Samuel Pitoiset 2026-06-03 11:41:20 +02:00 committed by Marge Bot
parent e247bdae0f
commit 68273972d8

View file

@ -1062,6 +1062,7 @@ compile_rt_prolog(struct radv_device *device, struct radv_ray_tracing_pipeline *
NIR_PASS(_, prolog_stage.nir, nir_opt_remove_phis);
pipeline->prolog = radv_compile_rt_prolog(device, &prolog_stage, &debug);
ralloc_free(prolog_stage.nir);
bool has_traversal = !!pipeline->base.base.shaders[MESA_SHADER_INTERSECTION];