ir3: use nir_lower_bit_size for 8-bit bit_count

8-bit bit_count cannot simply use the masked result of a 16-bit
bit_count. Make sure it is properly lowered to a 16-bit bit_count.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Fixes: 8aa2cad5df ("ir3: lower relevant 8-bit ALU ops in nir_lower_bit_size")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37116>
This commit is contained in:
Job Noorman 2025-09-01 12:25:07 +02:00 committed by Marge Bot
parent 4035520ca9
commit 603d6fe240

View file

@ -265,6 +265,7 @@ ir3_lower_bit_size(const nir_instr *instr, UNUSED void *data)
case nir_op_ine:
case nir_op_uge:
case nir_op_ult:
case nir_op_bit_count:
return nir_src_bit_size(alu->src[0].src) == 8 ? 16 : 0;
default:
break;