From 90939e93f6657e1334a9c5edd05e80344b17ff66 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Fri, 19 Jan 2024 20:26:02 +0000 Subject: [PATCH] radv: do nir_shader_gather_info after radv_nir_lower_rt_abi Fixes compilation of a Doom Eternal shader with PIPELINE_CREATE_DISABLE_OPTIMIZATION_BIT. ac_nir_lower_resinfo() was not happening because it is predicated on uses_resource_info_query and no later optimization updated it. Signed-off-by: Rhys Perry Reviewed-by: Friedrich Vock Reviewed-by: Samuel Pitoiset Cc: mesa-stable Part-of: --- src/amd/vulkan/radv_pipeline_rt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/amd/vulkan/radv_pipeline_rt.c b/src/amd/vulkan/radv_pipeline_rt.c index 1bb00b163bd..b368b97322a 100644 --- a/src/amd/vulkan/radv_pipeline_rt.c +++ b/src/amd/vulkan/radv_pipeline_rt.c @@ -417,6 +417,10 @@ radv_rt_nir_to_asm(struct radv_device *device, struct vk_pipeline_cache *cache, temp_stage.nir = shaders[i]; radv_nir_lower_rt_abi(temp_stage.nir, pCreateInfo, &temp_stage.args, &stage->info, stack_size, i > 0, device, pipeline, monolithic); + + /* Info might be out-of-date after inlining in radv_nir_lower_rt_abi(). */ + nir_shader_gather_info(temp_stage.nir, nir_shader_get_entrypoint(temp_stage.nir)); + radv_optimize_nir(temp_stage.nir, stage->key.optimisations_disabled); radv_postprocess_nir(device, NULL, &temp_stage);