mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 10:20:09 +01:00
etnaviv: compiler: Handle f2f16 and f2f32
They are needed by some pack/unpack lowerings. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34692>
This commit is contained in:
parent
f7bc22e0d7
commit
68a89bb085
1 changed files with 8 additions and 0 deletions
|
|
@ -76,6 +76,8 @@ static const struct etna_op_info etna_ops[] = {
|
|||
UOP(f2u32, F2I),
|
||||
OPCT(f2u16, F2I, TRUE, U16),
|
||||
OPCT(f2u8, F2I, TRUE, U8),
|
||||
OPCT(f2f16, CONV, TRUE, F16),
|
||||
OPCT(f2f32, CONV, TRUE, F32),
|
||||
UOP(b2f32, AND), /* AND with fui(1.0f) */
|
||||
UOP(b2i32, AND), /* AND with 1 */
|
||||
UOP(b2i8, AND), /* AND with 1 */
|
||||
|
|
@ -172,6 +174,12 @@ etna_emit_alu(struct etna_compile *c, nir_op op, struct etna_inst_dst dst,
|
|||
case nir_op_b2i32:
|
||||
inst.src[1] = etna_immediate_int(1);
|
||||
break;
|
||||
case nir_op_f2f16:
|
||||
inst.src[1] = etna_immediate_int(0);
|
||||
break;
|
||||
case nir_op_f2f32:
|
||||
inst.src[1] = etna_immediate_int(1);
|
||||
break;
|
||||
case nir_op_ineg:
|
||||
/* ADD 0, -x */
|
||||
inst.src[0] = etna_immediate_int(0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue