diff options
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir.h | 1 | ||||
-rw-r--r-- | src/compiler/nir/nir_opt_algebraic.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index c96eaf9c3fc..20927a26abf 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1624,6 +1624,7 @@ typedef struct nir_function { typedef struct nir_shader_compiler_options { bool lower_fdiv; bool lower_ffma; + bool fuse_ffma; bool lower_flrp32; /** Lowers flrp when it does not support doubles */ bool lower_flrp64; diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 0a95725f962..f8db2b690ac 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -108,7 +108,7 @@ optimizations = [ (('~fadd@32', a, ('fmul', c , ('fadd', b, ('fneg', a)))), ('flrp', a, b, c), '!options->lower_flrp32'), (('~fadd@64', a, ('fmul', c , ('fadd', b, ('fneg', a)))), ('flrp', a, b, c), '!options->lower_flrp64'), (('ffma', a, b, c), ('fadd', ('fmul', a, b), c), 'options->lower_ffma'), - (('~fadd', ('fmul', a, b), c), ('ffma', a, b, c), '!options->lower_ffma'), + (('~fadd', ('fmul', a, b), c), ('ffma', a, b, c), 'options->fuse_ffma'), # Comparison simplifications (('~inot', ('flt', a, b)), ('fge', a, b)), (('~inot', ('fge', a, b)), ('flt', a, b)), |