nak: Fix 64-bit bit_count, ufind_msb, ifind_msb, find_lsb

Previously, these were going through nir_lower_bit_size, which handles
upscaling from lower bit sizes to 32-bit only and is incorrect for higher sizes.
This change uses nir_lower_int64 instead, which handles them properly and
correctly.

Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35804>
This commit is contained in:
Mohamed Ahmed 2025-06-30 18:06:04 +03:00 committed by Marge Bot
parent 3dc9f2f70f
commit 16f3b9d984

View file

@ -247,7 +247,7 @@ lower_bit_size_cb(const nir_instr *instr, void *data)
* 32-bit and so the bit size of the instruction is given by the
* source.
*/
return alu->src[0].src.ssa->bit_size == 32 ? 0 : 32;
return alu->src[0].src.ssa->bit_size >= 32 ? 0 : 32;
case nir_op_fabs:
case nir_op_fadd: