radv/rt: Free traversal NIR after compilation

Could lead to OOM in games that compile RTPSOs often,
like Ghostwire Tokyo.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26892>
(cherry picked from commit 34cc765172)
This commit is contained in:
Friedrich Vock
2024-01-04 14:37:08 +01:00
committed by Eric Engestrom
parent 84d8ac768f
commit 2934ae2736
2 changed files with 2 additions and 1 deletions

View File

@@ -14,7 +14,7 @@
"description": "radv/rt: Free traversal NIR after compilation",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View File

@@ -609,6 +609,7 @@ radv_rt_compile_shaders(struct radv_device *device, struct vk_pipeline_cache *ca
radv_shader_layout_init(pipeline_layout, MESA_SHADER_INTERSECTION, &traversal_stage.layout);
result = radv_rt_nir_to_asm(device, cache, pCreateInfo, key, pipeline, false, &traversal_stage, NULL, NULL,
&pipeline->base.base.shaders[MESA_SHADER_INTERSECTION]);
ralloc_free(traversal_module.nir);
cleanup:
for (uint32_t i = 0; i < pCreateInfo->stageCount; i++)