From 1835bf3520d236a42650fdbef8b4a56e8472c134 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 14 Jun 2024 14:56:11 +0300 Subject: [PATCH] brw: avoid calling lower_indirect_derefs multiple times Lowering the indirect derefs multiple times leads to very inefficient shaders because of all the control flow inserted. In particular on some DGC tests with mesh shaders, the tests can spin for 1hour on an i7 and still not complete compilation. Signed-off-by: Lionel Landwerlin Reviewed-by: Caio Oliveira Part-of: --- src/intel/compiler/brw_nir.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index 62db1c290c7..dd51e896d95 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -1432,17 +1432,6 @@ brw_nir_link_shaders(const struct brw_compiler *compiler, NIR_PASS(_, producer, nir_lower_global_vars_to_local); NIR_PASS(_, consumer, nir_lower_global_vars_to_local); - /* The backend might not be able to handle indirects on - * temporaries so we need to lower indirects on any of the - * varyings we have demoted here. - */ - NIR_PASS(_, producer, nir_lower_indirect_derefs, - brw_nir_no_indirect_mask(compiler, producer->info.stage), - UINT32_MAX); - NIR_PASS(_, consumer, nir_lower_indirect_derefs, - brw_nir_no_indirect_mask(compiler, consumer->info.stage), - UINT32_MAX); - brw_nir_optimize(producer, devinfo); brw_nir_optimize(consumer, devinfo);