From f6aa0719cfaf10299d2c5112ddfbee91b4b732a9 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 4 Jul 2020 15:26:42 -0700 Subject: [PATCH] bifrost: Set RTZ rounding mode for f2i conversion Fixes dEQP-GLES2.functional.shaders.conversions.scalar_to_scalar.float_to_int_fragment Signed-off-by: Chris Forbes Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bifrost_compile.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index adaf6fa..bee11a4 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -843,6 +843,9 @@ emit_alu(bi_context *ctx, nir_alu_instr *instr) case nir_op_ixor: alu.op.bitwise = BI_BITWISE_XOR; break; + case nir_op_f2i32: + alu.roundmode = BIFROST_RTZ; + break; case nir_op_f2f16: case nir_op_i2i16: -- 2.7.4