summaryrefslogtreecommitdiffstats
path: root/src/freedreno/ir3
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2019-10-14 11:42:12 -0400
committerJonathan Marek <[email protected]>2019-10-14 17:48:22 -0400
commit278c9b5cc74ab23b4a76951f0ceb47a1c277b00e (patch)
treeb936cc82440cea490b469f16319bd0e88a35eb84 /src/freedreno/ir3
parent92d756f22de2f2653dc39bdd1af33cd89fce34af (diff)
freedreno/ir3: implement fquantize2f16
Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/freedreno/ir3')
-rw-r--r--src/freedreno/ir3/ir3_compiler_nir.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c
index 0ddf4d34130..6ed24e41e2f 100644
--- a/src/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/freedreno/ir3/ir3_compiler_nir.c
@@ -387,6 +387,11 @@ emit_alu(struct ir3_context *ctx, nir_alu_instr *alu)
case nir_op_u2u8:
dst[0] = create_cov(ctx, src[0], bs[0], alu->op);
break;
+ case nir_op_fquantize2f16:
+ dst[0] = create_cov(ctx,
+ create_cov(ctx, src[0], 32, nir_op_f2f16),
+ 16, nir_op_f2f32);
+ break;
case nir_op_f2b32:
dst[0] = ir3_CMPS_F(b, src[0], 0, create_immed(b, fui(0.0)), 0);
dst[0]->cat2.condition = IR3_COND_NE;