summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-03-11 15:15:41 -0400
committerMarge Bot <[email protected]>2020-03-11 20:28:21 +0000
commitf6d96aa962d5497a3fb12b02a47ff9777e5cbfd8 (patch)
tree0ebe81d28f6bb4ac28deced59ce6e8626bbb9a19
parent58f91718944a0cabdd907ed87efe7a239e69a55d (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150>
-rw-r--r--src/panfrost/bifrost/bifrost_compile.c1
-rw-r--r--src/panfrost/bifrost/bifrost_compile.h2
2 files changed, 2 insertions, 1 deletions
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
};