Mesa (staging/21.2): nir: fix ifind_msb_rev by using appropriate type
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Aug 27 17:23:31 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: 64720c0a3cb8c04864e33abdbbb26188d4f72bc0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=64720c0a3cb8c04864e33abdbbb26188d4f72bc0
Author: Filip Gawin <filip.gawin at zoho.com>
Date: Wed Aug 25 23:19:36 2021 +0200
nir: fix ifind_msb_rev by using appropriate type
As you can see comparion "x < 0" doesn't make
sense if x is unsigned.
Fixes: a5747f8a ("nir: add opcodes for *find_msb_rev and lowering ")
Reviewed-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12548>
(cherry picked from commit 46f3582c6fe607fa30d7ac24d3abd92128855c98)
---
.pick_status.json | 2 +-
src/compiler/nir/nir_opcodes.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 39020ea6294..d046eb75cf9 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -445,7 +445,7 @@
"description": "nir: fix ifind_msb_rev by using appropriate type",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "a5747f8ab357ff00c630b937b221e5fb59d90289"
},
diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py
index f9330c0af2c..6745c6c9f4e 100644
--- a/src/compiler/nir/nir_opcodes.py
+++ b/src/compiler/nir/nir_opcodes.py
@@ -487,7 +487,7 @@ for (int bit = 31; bit >= 0; bit--) {
}
""")
-unop_convert("ifind_msb_rev", tint32, tuint, """
+unop_convert("ifind_msb_rev", tint32, tint, """
dst = -1;
if (src0 != 0 && src0 != -1) {
for (int bit = 0; bit < 31; bit++) {
More information about the mesa-commit
mailing list