pan/bi: Handle fsat_signed and fclamp_pos
Translates to Mali-specific clamps. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11327>
This commit is contained in:
parent
16bf1ae935
commit
ecd9a3fed5
|
@ -1784,6 +1784,18 @@ bi_emit_alu(bi_builder *b, nir_alu_instr *instr)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case nir_op_fsat_signed: {
|
||||||
|
bi_instr *I = bi_fadd_to(b, sz, dst, s0, bi_negzero(), BI_ROUND_NONE);
|
||||||
|
I->clamp = BI_CLAMP_CLAMP_M1_1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
case nir_op_fclamp_pos: {
|
||||||
|
bi_instr *I = bi_fadd_to(b, sz, dst, s0, bi_negzero(), BI_ROUND_NONE);
|
||||||
|
I->clamp = BI_CLAMP_CLAMP_0_INF;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case nir_op_fneg:
|
case nir_op_fneg:
|
||||||
bi_fadd_to(b, sz, dst, bi_neg(s0), bi_negzero(), BI_ROUND_NONE);
|
bi_fadd_to(b, sz, dst, bi_neg(s0), bi_negzero(), BI_ROUND_NONE);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue