agx: enable bitfield lowering for cl_khr_extended_bit_ops

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35448>
This commit is contained in:
Karol Herbst
2025-06-12 11:24:31 +02:00
committed by Marge Bot
parent a16eb630fa
commit dd652bb8f0
2 changed files with 10 additions and 0 deletions
+8
View File
@@ -3341,6 +3341,14 @@ lower_bit_size_callback(const nir_instr *instr, UNUSED void *_)
* implemented natively.
*/
nir_alu_instr *alu = nir_instr_as_alu(instr);
switch (alu->op) {
case nir_op_bitfield_reverse:
return alu->def.bit_size < 32 ? 32 : 0;
default:
break;
}
if (alu->def.bit_size == 8 && !is_conversion_to_8bit(alu->op))
return 16;
else if (alu->def.bit_size == 1 && alu->src[0].src.ssa->bit_size == 8)
+2
View File
@@ -335,6 +335,8 @@ static const nir_shader_compiler_options agx_nir_options = {
.lower_flrp32 = true,
.lower_fpow = true,
.lower_fmod = true,
.lower_bitfield_extract8 = true,
.lower_bitfield_extract16 = true,
.lower_bitfield_insert = true,
.lower_ifind_msb = true,
.lower_find_lsb = true,