Soon we'll have a NIR support to handle this the Right Way along with
pos and sat_signed support, but we'll always need the fallback anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4139>
switch (op) {
case nir_op_fadd: return BI_ADD;
case nir_op_fmul: return BI_FMA;
+ case nir_op_fsat:
case nir_op_mov: return BI_MOV;
default: unreachable("Unknown ALU op");
}
case nir_op_fmul:
alu.src[2] = BIR_INDEX_ZERO; /* FMA */
break;
+ case nir_op_fsat:
+ alu.outmod = BIFROST_SAT; /* MOV */
+ break;
default:
break;
}