From 9f0b4da875402d342b7ad0e1223c3872d06ce4df Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Thu, 15 Sep 2022 14:56:28 +0200 Subject: [PATCH] radv: run nir_opt_cse before lowering FS intrinsics Otherwise, there might be redundant barycentric_at_sample intrinsics that will be lowered and this will increase code size. No fossils-db changes. Signed-off-by: Samuel Pitoiset Reviewed-by: Rhys Perry Part-of: --- src/amd/vulkan/radv_pipeline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 0810ca126e3..d3836d4cbc4 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -3683,6 +3683,7 @@ radv_postprocess_nir(struct radv_pipeline *pipeline, assert(stage->info.wave_size && stage->info.workgroup_size); if (stage->stage == MESA_SHADER_FRAGMENT) { + NIR_PASS(_, stage->nir, nir_opt_cse); NIR_PASS(_, stage->nir, radv_lower_fs_intrinsics, stage, pipeline_key); }