Merge remote-tracking branch 'mesa-public/master' into vulkan
[mesa.git] / src / glsl / nir / nir_opt_algebraic.py
index 30ede52b146713598b273a3b782a05e953b2eb67..3843f21c0eebf6e699e3e45b674c5f44b4045e77 100644 (file)
@@ -185,8 +185,10 @@ optimizations = [
    (('fsqrt', a), ('frcp', ('frsq', a)), 'options->lower_fsqrt'),
    (('frcp', ('frsq', a)), ('fsqrt', a), '!options->lower_fsqrt'),
    # Boolean simplifications
-   (('ine', 'a@bool', 0), 'a'),
-   (('ieq', 'a@bool', 0), ('inot', 'a')),
+   (('ieq', 'a@bool', True), a),
+   (('ine', 'a@bool', True), ('inot', a)),
+   (('ine', 'a@bool', False), a),
+   (('ieq', 'a@bool', False), ('inot', 'a')),
    (('bcsel', a, True, False), ('ine', a, 0)),
    (('bcsel', a, False, True), ('ieq', a, 0)),
    (('bcsel', True, b, c), b),