radv: fix leak of nir from retained shaders

if shaders are found in the app cache above, execution will goto done:
and the nir must still be freed

Fixes: 03d2bd6042 ("radv: ensure to retain NIR shaders for GPL libs found in the cache")

fixes #8786

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22317>
This commit is contained in:
Mike Blumenkrantz
2023-04-05 10:07:40 -04:00
committed by Marge Bot
parent e6c84b8a00
commit a73c28fdce
+3 -2
View File
@@ -3421,12 +3421,13 @@ radv_graphics_pipeline_compile(struct radv_graphics_pipeline *pipeline,
if (radv_can_dump_shader_stats(device, stages[i].nir) && pipeline->base.shaders[i]) {
radv_dump_shader_stats(device, &pipeline->base, pipeline->base.shaders[i], i, stderr);
}
ralloc_free(stages[i].nir);
}
}
done:
for (int i = 0; i < MESA_VULKAN_SHADER_STAGES; ++i) {
ralloc_free(stages[i].nir);
}
pipeline_feedback.duration = os_time_get_nano() - pipeline_start;
if (creation_feedback) {