Module: Mesa Branch: staging/22.1 Commit: 3dd54edd121b29a2bfa05fe9afd42e14826ec40b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3dd54edd121b29a2bfa05fe9afd42e14826ec40b
Author: Jason Ekstrand <[email protected]> Date: Mon Apr 25 12:12:10 2022 -0500 nir: Lower all bit sizes of usub_borrow It's not clear why this is restricted to 32-bit besides that being the only bit size where GLSL has an intrinsic for this. All drivers that set this probably want it lowered for all bit sizes as far as I can tell. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6353 Fixes: 8a3e3441802c ("nir/opt_algebraic: Fix some expressions with ambiguous bit sizes") Reviewed-by: Emma Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16146> (cherry picked from commit 17557303625d95fc30b24d15b45e41d9b747aee6) --- .pick_status.json | 2 +- src/compiler/nir/nir_opt_algebraic.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index c21cdbf502f..8d5a16145b4 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -364,7 +364,7 @@ "description": "nir: Lower all bit sizes of usub_borrow", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "8a3e3441802c417ec944f02a9f38491b3b236d7c" }, diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 35f445afd5e..63c2427344f 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -1660,7 +1660,7 @@ optimizations.extend([ (('fmod', a, b), ('fsub', a, ('fmul', b, ('ffloor', ('fdiv', a, b)))), 'options->lower_fmod'), (('frem', a, b), ('fsub', a, ('fmul', b, ('ftrunc', ('fdiv', a, b)))), 'options->lower_fmod'), (('uadd_carry', a, b), ('b2i', ('ult', ('iadd', a, b), a)), 'options->lower_uadd_carry'), - (('usub_borrow@32', a, b), ('b2i', ('ult', a, b)), 'options->lower_usub_borrow'), + (('usub_borrow', a, b), ('b2i', ('ult', a, b)), 'options->lower_usub_borrow'), (('bitfield_insert', 'base', 'insert', 'offset', 'bits'), ('bcsel', ('ult', 31, 'bits'), 'insert',
