intel/compiler: take reg_unit size into account with ubo ranges

Fixes: 1ab4fe2dd6 ("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 <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32925>
This commit is contained in:
Tapani Pälli
2025-01-07 13:00:27 +02:00
committed by Marge Bot
parent c3e7384bbb
commit 1cc17e9ce9

View File

@@ -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++) {