mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
agx: Add bitwise operations
This get translated to bitop with the corresponding truth table with some builder syntax sugar. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Acked-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10582>
This commit is contained in:
parent
c06dcaf0a0
commit
0c21513693
1 changed files with 8 additions and 0 deletions
|
|
@ -245,6 +245,14 @@ agx_emit_alu(agx_builder *b, nir_alu_instr *instr)
|
|||
UNOP(fddy_coarse, dfdy);
|
||||
UNOP(fddy_fine, dfdy);
|
||||
|
||||
UNOP(mov, mov);
|
||||
UNOP(u2u16, mov);
|
||||
UNOP(u2u32, mov);
|
||||
UNOP(inot, not);
|
||||
BINOP(iand, and);
|
||||
BINOP(ior, or);
|
||||
BINOP(ixor, xor);
|
||||
|
||||
case nir_op_fsqrt: return agx_fmul_to(b, dst, s0, agx_srsqrt(b, s0));
|
||||
case nir_op_fsub: return agx_fadd_to(b, dst, s0, agx_neg(s1));
|
||||
case nir_op_fabs: return agx_fmov_to(b, dst, agx_abs(s0));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue