From 150b3e87c881a3ea8eb89f9d99290dbbdfdd3008 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Thu, 21 Jul 2022 11:38:03 -0700 Subject: [PATCH] intel/fs/xe2+: Round up fs_builder::vgrf() size calculation to HW register unit. Reviewed-by: Caio Oliveira Reviewed-by: Jordan Justen Part-of: --- src/intel/compiler/brw_fs_builder.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_fs_builder.h b/src/intel/compiler/brw_fs_builder.h index 53265e5e60f..793feb2f8c1 100644 --- a/src/intel/compiler/brw_fs_builder.h +++ b/src/intel/compiler/brw_fs_builder.h @@ -27,6 +27,7 @@ #include "brw_ir_fs.h" #include "brw_shader.h" +#include "brw_eu.h" namespace brw { /** @@ -198,12 +199,13 @@ namespace brw { dst_reg vgrf(enum brw_reg_type type, unsigned n = 1) const { + const unsigned unit = reg_unit(shader->devinfo); assert(dispatch_width() <= 32); if (n > 0) return dst_reg(VGRF, shader->alloc.allocate( DIV_ROUND_UP(n * type_sz(type) * dispatch_width(), - REG_SIZE)), + unit * REG_SIZE) * unit), type); else return retype(null_reg_ud(), type);