From: Alyssa Rosenzweig Date: Wed, 11 Mar 2020 19:15:41 +0000 (-0400) Subject: pan/bi: Implement nir_op_ffma X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f6d96aa962d5497a3fb12b02a47ff9777e5cbfd8;p=mesa.git pan/bi: Implement nir_op_ffma We have native FMA which works for graphics usage (unlike Midgard where it's really reserved for compute for various reasons), let's use it. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 8e02437df52..8124970b6e8 100644 --- a/src/panfrost/bifrost/bifrost_compile.c +++ b/src/panfrost/bifrost/bifrost_compile.c @@ -322,6 +322,7 @@ bi_class_for_nir_alu(nir_op op) case nir_op_u2f64: return BI_CONVERT; + case nir_op_ffma: case nir_op_fmul: return BI_FMA; diff --git a/src/panfrost/bifrost/bifrost_compile.h b/src/panfrost/bifrost/bifrost_compile.h index ff0e7c38428..ddfde64d472 100644 --- a/src/panfrost/bifrost/bifrost_compile.h +++ b/src/panfrost/bifrost/bifrost_compile.h @@ -31,7 +31,6 @@ void bifrost_compile_shader_nir(nir_shader *nir, panfrost_program *program, unsigned product_id); static const nir_shader_compiler_options bifrost_nir_options = { - .lower_ffma = true, .lower_scmp = true, .lower_flrp32 = true, .lower_flrp64 = true, @@ -68,6 +67,7 @@ static const nir_shader_compiler_options bifrost_nir_options = { .lower_bitfield_extract_to_shifts = true, .vectorize_io = true, + .fuse_ffma = true, .use_interpolated_input_intrinsics = true };