diff options
author | Friedrich Vock <friedrich.vock@gmx.de> | 2024-01-04 14:37:08 +0100 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2024-01-04 18:45:58 +0000 |
commit | 2934ae2736e99eaa7d53b862c46439b777b9e93e (patch) | |
tree | 7ef95eaf0fd3ada8d06c9c6472bde8aa7e85bce5 | |
parent | 84d8ac768f8a278a4bc0aaa1d5cbf1539fa031f8 (diff) | |
download | mesa-2934ae2736e99eaa7d53b862c46439b777b9e93e.tar.gz mesa-2934ae2736e99eaa7d53b862c46439b777b9e93e.tar.bz2 mesa-2934ae2736e99eaa7d53b862c46439b777b9e93e.zip |
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 34cc76517286b88c8191a3e10dda0a3293c09127)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/amd/vulkan/radv_pipeline_rt.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/.pick_status.json b/.pick_status.json index 307feeb4e34..8468534155e 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/amd/vulkan/radv_pipeline_rt.c b/src/amd/vulkan/radv_pipeline_rt.c index 810f6041b1d..c61d2becf47 100644 --- a/src/amd/vulkan/radv_pipeline_rt.c +++ b/src/amd/vulkan/radv_pipeline_rt.c @@ -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++) |