From cfb34dc695f43354f00bf096eea1dd473ee95d25 Mon Sep 17 00:00:00 2001 From: Sviatoslav Peleshko Date: Wed, 11 Oct 2023 11:47:14 +0300 Subject: [PATCH] intel/eu/validate: Validate that the ExecSize is a factor of chosen ChanOff Signed-off-by: Sviatoslav Peleshko Reviewed-by: Sagar Ghuge Part-of: --- src/intel/compiler/brw_eu_validate.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/intel/compiler/brw_eu_validate.c b/src/intel/compiler/brw_eu_validate.c index 87e9f0cd1e3..988086febc4 100644 --- a/src/intel/compiler/brw_eu_validate.c +++ b/src/intel/compiler/brw_eu_validate.c @@ -242,6 +242,19 @@ invalid_values(const struct brw_isa_info *isa, const brw_inst *inst) break; } + if (error_msg.str) + return error_msg; + + if (devinfo->ver >= 12) { + unsigned group_size = 1 << brw_inst_exec_size(devinfo, inst); + unsigned qtr_ctrl = brw_inst_qtr_control(devinfo, inst); + unsigned nib_ctrl = brw_inst_nib_control(devinfo, inst); + + unsigned chan_off = (qtr_ctrl * 2 + nib_ctrl) << 2; + ERROR_IF(chan_off % group_size != 0, + "The execution size must be a factor of the chosen offset"); + } + if (inst_is_send(isa, inst)) return error_msg;