summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir_opt_algebraic.py
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2015-04-04 08:13:44 -0400
committerRob Clark <[email protected]>2015-04-11 10:43:16 -0400
commit58add76791459e023f82eab973719c71779dae9d (patch)
tree660a4e01747fa67ff2bc3338bd9c55be04ff81b4 /src/glsl/nir/nir_opt_algebraic.py
parentfd65122a900a5779393faa0ede6737fafcb95a27 (diff)
nir: split out lower_sub from lower_negate
Originally you had to have one or the other. But actually I don't want either. (Or rather I want whatever is the minimum # of instructions.) TODO: not sure where the best place to insert a check that driver hasn't set *both* lower_negate and lower_sub? Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir_opt_algebraic.py')
-rw-r--r--src/glsl/nir/nir_opt_algebraic.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py
index a8c1745d09b..319732dfca7 100644
--- a/src/glsl/nir/nir_opt_algebraic.py
+++ b/src/glsl/nir/nir_opt_algebraic.py
@@ -192,8 +192,8 @@ optimizations = [
# Subtracts
(('fsub', a, ('fsub', 0.0, b)), ('fadd', a, b)),
(('isub', a, ('isub', 0, b)), ('iadd', a, b)),
- (('fsub', a, b), ('fadd', a, ('fneg', b)), '!options->lower_negate'),
- (('isub', a, b), ('iadd', a, ('ineg', b)), '!options->lower_negate'),
+ (('fsub', a, b), ('fadd', a, ('fneg', b)), 'options->lower_sub'),
+ (('isub', a, b), ('iadd', a, ('ineg', b)), 'options->lower_sub'),
(('fneg', a), ('fsub', 0.0, a), 'options->lower_negate'),
(('ineg', a), ('isub', 0, a), 'options->lower_negate'),
(('fadd', a, ('fsub', 0.0, b)), ('fsub', a, b)),