mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 08:20:12 +01:00
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@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12548>
This commit is contained in:
parent
9083e9a483
commit
46f3582c6f
1 changed files with 1 additions and 1 deletions
|
|
@ -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++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue