Module: Mesa Branch: main Commit: cfb34dc695f43354f00bf096eea1dd473ee95d25 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cfb34dc695f43354f00bf096eea1dd473ee95d25
Author: Sviatoslav Peleshko <sviatoslav.peles...@globallogic.com> Date: Wed Oct 11 11:47:14 2023 +0300 intel/eu/validate: Validate that the ExecSize is a factor of chosen ChanOff Signed-off-by: Sviatoslav Peleshko <sviatoslav.peles...@globallogic.com> Reviewed-by: Sagar Ghuge <sagar.gh...@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25657> --- 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;