mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-23 01:50:24 +01:00
agx: Implement native float->int conversions
No 8-bit or 64-bit yet since those need lowerings. 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
8191adb0d9
commit
2126848771
1 changed files with 16 additions and 0 deletions
|
|
@ -264,6 +264,22 @@ agx_emit_alu(agx_builder *b, nir_alu_instr *instr)
|
|||
return agx_fmul_to(b, dst, sinc, fixup);
|
||||
}
|
||||
|
||||
case nir_op_f2i16:
|
||||
return agx_convert_to(b, dst,
|
||||
agx_immediate(AGX_CONVERT_F_TO_S16), s0, AGX_ROUND_RTZ);
|
||||
|
||||
case nir_op_f2i32:
|
||||
return agx_convert_to(b, dst,
|
||||
agx_immediate(AGX_CONVERT_F_TO_S32), s0, AGX_ROUND_RTZ);
|
||||
|
||||
case nir_op_f2u16:
|
||||
return agx_convert_to(b, dst,
|
||||
agx_immediate(AGX_CONVERT_F_TO_U16), s0, AGX_ROUND_RTZ);
|
||||
|
||||
case nir_op_f2u32:
|
||||
return agx_convert_to(b, dst,
|
||||
agx_immediate(AGX_CONVERT_F_TO_U32), s0, AGX_ROUND_RTZ);
|
||||
|
||||
case nir_op_vec2:
|
||||
case nir_op_vec3:
|
||||
case nir_op_vec4:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue