diff options
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/nir/nir_opt_algebraic.py | 4 |
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 3ea6320d36c..7bf6431345a 100644 --- a/src/glsl/nir/nir_opt_algebraic.py +++ b/src/glsl/nir/nir_opt_algebraic.py @@ -151,8 +151,8 @@ optimizations = [ (('fcsel', a, b, b), b), # Subtracts - (('fsub', 0.0, ('fsub', 0.0, a)), a), - (('isub', 0, ('isub', 0, a)), a), + (('fsub', a, ('fsub', 0.0, b)), ('fadd', a, b)), + (('isub', a, ('isub', 0, b)), ('iadd', a, b)), (('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)), |