From 40f77b6936005b66af3df0f5b58be67fe01da1f1 Mon Sep 17 00:00:00 2001 From: Caio Oliveira Date: Thu, 8 Aug 2024 17:27:39 -0700 Subject: [PATCH] intel/brw: Avoid modifying the shader in assign_curb_setup if not needed If there are no uniforms to push, don't emit the AND or invalidate the shader analysis. This affects only compute shaders. Not a significant impact since lots of shaders end up pushing uniforms. Fossil-db numbers (restricted to compute pipelines only) for DG2 ``` Totals: Instrs: 3071016 -> 3070894 (-0.00%) Cycle count: 8320268863 -> 8320264519 (-0.00%) Totals from 122 (2.70% of 4520) affected shaders: Instrs: 10675 -> 10553 (-1.14%) Cycle count: 2060003 -> 2055659 (-0.21%) ``` Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/brw_fs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index 713d92d14e6..5a446152e5c 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -1117,7 +1117,7 @@ fs_visitor::assign_curb_setup() */ assert(devinfo->verx10 >= 125); assert(uniform_push_length <= reg_unit(devinfo)); - } else if (is_compute && devinfo->verx10 >= 125) { + } else if (is_compute && devinfo->verx10 >= 125 && uniform_push_length > 0) { assert(devinfo->has_lsc); fs_builder ubld = fs_builder(this, 1).exec_all().at( cfg->first_block(), cfg->first_block()->start());