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: 0e817ba548 ("intel/brw/xe2+: Implement Wa 22016140776")
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28821>
This commit is contained in:
Ian Romanick 2024-04-18 14:18:28 -07:00 committed by Marge Bot
parent 112063a060
commit 90e12ed843

View file

@ -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;
}