From 90e12ed8435a552ab9f984c47d36105272046fb8 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 18 Apr 2024 14:18:28 -0700 Subject: [PATCH] intel/brw/xe2+: Only apply Wa 22016140776 to math instructions The check in has_invalid_src_region incorrectly omitted inst->is_math() from the condition. Fixes: 0e817ba548c ("intel/brw/xe2+: Implement Wa 22016140776") Reviewed-by: Jordan Justen Part-of: --- src/intel/compiler/brw_fs_lower_regioning.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_fs_lower_regioning.cpp b/src/intel/compiler/brw_fs_lower_regioning.cpp index 16a49450bd9..2c901434e5b 100644 --- a/src/intel/compiler/brw_fs_lower_regioning.cpp +++ b/src/intel/compiler/brw_fs_lower_regioning.cpp @@ -244,7 +244,7 @@ namespace { * Compiler must use a mov instruction to expand the scalar value to * a vector before using in a HF (packed or unpacked) math operation. */ - if (intel_needs_workaround(devinfo, 22016140776) && + if (inst->is_math() && intel_needs_workaround(devinfo, 22016140776) && is_uniform(inst->src[i]) && inst->src[i].type == BRW_REGISTER_TYPE_HF) { return true; }