radv/rt: Fix memory leak when compiling libraries

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29579>
(cherry picked from commit f1742d36f3)
This commit is contained in:
Friedrich Vock 2024-06-03 16:04:27 +02:00 committed by Eric Engestrom
parent 4a5f2a1c15
commit 3e9b217347
2 changed files with 5 additions and 3 deletions

View file

@ -384,7 +384,7 @@
"description": "radv/rt: Fix memory leak when compiling libraries",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -678,8 +678,10 @@ radv_rt_compile_shaders(struct radv_device *device, struct vk_pipeline_cache *ca
* shaders.
*/
bool traversal_needed = !library && (!monolithic || raygen_imported);
if (!traversal_needed)
return VK_SUCCESS;
if (!traversal_needed) {
result = VK_SUCCESS;
goto cleanup;
}
struct radv_ray_tracing_stage_info traversal_info = {
.set_flags = 0xFFFFFFFF,