nir: add opcodes for *find_msb_rev and lowering
authorGert Wollny <gert.wollny@collabora.com>
Wed, 10 Mar 2021 08:38:18 +0000 (09:38 +0100)
committerGert Wollny <gert.wollny@collabora.com>
Mon, 22 Mar 2021 14:19:46 +0000 (15:19 +0100)
commita5747f8ab357ff00c630b937b221e5fb59d90289
tree5ae2f4ac6e1ca999afce40b65d8a56186b222a9c
parent28d116c889c2164cb7c034f22e7d68fedac2568d
nir: add opcodes for *find_msb_rev and lowering

Some hardware supports a version of find_msb where the bits are counted
starting at the high bit, and this needs some lowering to obtain the
value that is expected by *find_msb

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9452>
src/compiler/nir/nir.h
src/compiler/nir/nir_opcodes.py
src/compiler/nir/nir_opt_algebraic.py