nir_lower_to_source_mods: Don't sneek in an abs modifier from parent

If the abs source modifiers is not supported for the current
instruction because it is an instruction with three sources we
may still see a parent mov that has the `abs` modifier. In this
case we must not propagate that abs modifier from that parent
instructions.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7350

Fixes: cd73b6174b
    nir/lower_to_source_mods: Stop turning add, sat, and neg into mov

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18902>
This commit is contained in:
Gert Wollny
2022-09-30 15:27:13 +02:00
parent 8945375b80
commit 9ebe893a61

View File

@@ -106,7 +106,8 @@ nir_lower_to_source_mods_block(nir_block *block,
continue;
if (!lower_abs && (parent->op == nir_op_fabs ||
parent->op == nir_op_iabs))
parent->op == nir_op_iabs ||
parent->src[0].abs))
continue;
nir_instr_rewrite_src(instr, &alu->src[i].src, parent->src[0].src);