From 8d2331fe4b482556ec3d4ff2746e92146a39d32d Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Wed, 18 Sep 2024 14:26:38 -0700 Subject: [PATCH] intel/brw/xe3: Extend regalloc sets to maximum Xe3 GRF size. Extend our regalloc sets to 256 registers to match the maximum capacity of the GRF file on Gfx30. Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/compiler/brw_reg_allocate.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/intel/compiler/brw_reg_allocate.cpp b/src/intel/compiler/brw_reg_allocate.cpp index 1057ba82a83..9ab894fa2b2 100644 --- a/src/intel/compiler/brw_reg_allocate.cpp +++ b/src/intel/compiler/brw_reg_allocate.cpp @@ -82,7 +82,8 @@ extern "C" void brw_fs_alloc_reg_sets(struct brw_compiler *compiler) { const struct intel_device_info *devinfo = compiler->devinfo; - int base_reg_count = BRW_MAX_GRF; + int base_reg_count = (devinfo->ver >= 30 ? XE3_MAX_GRF / reg_unit(devinfo) : + BRW_MAX_GRF); /* The registers used to make up almost all values handled in the compiler * are a scalar value occupying a single register (or 2 registers in the @@ -104,7 +105,7 @@ brw_fs_alloc_reg_sets(struct brw_compiler *compiler) for (unsigned i = 0; i < REG_CLASS_COUNT; i++) class_sizes[i] = i + 1; - struct ra_regs *regs = ra_alloc_reg_set(compiler, BRW_MAX_GRF, false); + struct ra_regs *regs = ra_alloc_reg_set(compiler, base_reg_count, false); ra_set_allocate_round_robin(regs); struct ra_class **classes = ralloc_array(compiler, struct ra_class *, REG_CLASS_COUNT);