From 1cc17e9ce99e9175a2e815027e1c1b7cbe0af03f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Tue, 7 Jan 2025 13:00:27 +0200 Subject: [PATCH] intel/compiler: take reg_unit size into account with ubo ranges MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 1ab4fe2dd69 ("brw: Don't shrink UBO push ranges in the backend") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12423 Signed-off-by: Tapani Pälli Reviewed-by: Kenneth Graunke Part-of: --- src/intel/compiler/brw_nir_analyze_ubo_ranges.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_nir_analyze_ubo_ranges.c b/src/intel/compiler/brw_nir_analyze_ubo_ranges.c index ae61d085941..f666fd0c399 100644 --- a/src/intel/compiler/brw_nir_analyze_ubo_ranges.c +++ b/src/intel/compiler/brw_nir_analyze_ubo_ranges.c @@ -288,7 +288,7 @@ brw_nir_analyze_ubo_ranges(const struct brw_compiler *compiler, const int max_ubos = 4; nr_entries = MIN2(nr_entries, max_ubos); - const unsigned max_push_regs = 64; + const unsigned max_push_regs = 64 / reg_unit(compiler->devinfo); unsigned total_push_regs = 0; for (unsigned i = 0; i < nr_entries; i++) {