etnaviv: implement nir_op_uclz and lower find_{msb,lsb} to uclz

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22210>
This commit is contained in:
Italo Nicola 2022-09-15 19:13:43 +00:00 committed by Marge Bot
parent 9dc4ee9121
commit c45ce64ea0
2 changed files with 4 additions and 0 deletions

View file

@ -73,6 +73,9 @@ etna_compiler_create(const char *renderer, const struct etna_specs *specs)
.lower_pack_64_2x32_split = true,
.lower_unpack_32_2x16_split = true,
.lower_unpack_64_2x32_split = true,
.lower_find_lsb = true,
.lower_ifind_msb_to_uclz = true,
.lower_ufind_msb_to_uclz = true,
};
compiler->regs = etna_ra_setup(compiler);

View file

@ -128,6 +128,7 @@ static const struct etna_op_info etna_ops[] = {
IOP(ishl, LSHIFT, 0_X_1),
IOP(ishr, RSHIFT, 0_X_1),
UOP(ushr, RSHIFT, 0_X_1),
UOP(uclz, LEADZERO, 0_X_X),
};
void