Module: Mesa
Branch: main
Commit: 34cc76517286b88c8191a3e10dda0a3293c09127
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=34cc76517286b88c8191a3e10dda0a3293c09127

Author: Friedrich Vock <[email protected]>
Date:   Thu Jan  4 14:37:08 2024 +0100

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>

---

 src/amd/vulkan/radv_pipeline_rt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/amd/vulkan/radv_pipeline_rt.c 
b/src/amd/vulkan/radv_pipeline_rt.c
index e5ef87e8d02..e1b324f6d42 100644
--- a/src/amd/vulkan/radv_pipeline_rt.c
+++ b/src/amd/vulkan/radv_pipeline_rt.c
@@ -611,6 +611,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++)

Reply via email to