diff options
author | Timothy Arceri <[email protected]> | 2018-02-27 19:19:21 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-02-28 09:23:49 +1100 |
commit | a050ea60eef9c457a3d5185aa551631df0c35bec (patch) | |
tree | d9be44885ef144928971cb52e7643d5987777e62 /src/compiler | |
parent | 08fa84bb9adf81aa13422501fef8f077b51ef682 (diff) |
nir: add lower_ldexp to nir compiler options
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir.h | 2 | ||||
-rw-r--r-- | src/compiler/nir/nir_opt_algebraic.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 2acd9511f57..c676331000f 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1859,6 +1859,8 @@ typedef struct nir_shader_compiler_options { /** lowers ffract to fsub+ffloor: */ bool lower_ffract; + bool lower_ldexp; + bool lower_pack_half_2x16; bool lower_pack_unorm_2x16; bool lower_pack_snorm_2x16; diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index d40d59b5cdb..296f0671386 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -560,8 +560,8 @@ def ldexp(f, exp, bits): return ('fmul', ('fmul', f, pow2_1), pow2_2) optimizations += [ - (('ldexp@32', 'x', 'exp'), ldexp('x', 'exp', 32)), - (('ldexp@64', 'x', 'exp'), ldexp('x', 'exp', 64)), + (('ldexp@32', 'x', 'exp'), ldexp('x', 'exp', 32), 'options->lower_ldexp'), + (('ldexp@64', 'x', 'exp'), ldexp('x', 'exp', 64), 'options->lower_ldexp'), ] # Unreal Engine 4 demo applications open-codes bitfieldReverse() |