panfrost/midgard: Add f2f64 support
authorBoris Brezillon <boris.brezillon@collabora.com>
Mon, 20 Jan 2020 15:05:31 +0000 (16:05 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 22 Jan 2020 15:31:28 +0000 (15:31 +0000)
So we can convert floats into doubles.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3478>

src/panfrost/midgard/midgard_compile.c

index 49b8f12366190d400c27c05782473e93ee80f4d0..b03db8f61f8af4fd8f5b16d5dea590264e791830 100644 (file)
@@ -851,8 +851,10 @@ emit_alu(compiler_context *ctx, nir_alu_instr *instr)
         case nir_op_u2u32:
         case nir_op_u2u64:
         case nir_op_f2f16:
-        case nir_op_f2f32: {
-                if (instr->op == nir_op_f2f16 || instr->op == nir_op_f2f32)
+        case nir_op_f2f32:
+        case nir_op_f2f64: {
+                if (instr->op == nir_op_f2f16 || instr->op == nir_op_f2f32 ||
+                    instr->op == nir_op_f2f64)
                         op = midgard_alu_op_fmov;
                 else
                         op = midgard_alu_op_imov;