return agx_convert_to(b, dst, agx_immediate(mode), s0, AGX_ROUND_RTE);
}
+ case nir_op_pack_32_2x16_split:
case nir_op_pack_64_2x32_split: {
agx_index idx[] = {s0, s1};
return agx_emit_collect_to(b, dst, 2, idx);
}
case nir_op_unpack_64_2x32_split_x:
+ case nir_op_unpack_32_2x16_split_x:
return agx_subdivide_to(b, dst, s0, 0);
case nir_op_unpack_64_2x32_split_y:
+ case nir_op_unpack_32_2x16_split_y:
return agx_subdivide_to(b, dst, s0, 1);
case nir_op_vec2:
.lower_ffract = true,
.lower_pack_half_2x16 = true,
.lower_unpack_half_2x16 = true,
- .lower_pack_split = true,
.lower_extract_byte = true,
.lower_extract_word = true,
.lower_insert_byte = true,
lower_sm5_shift += [((shift, f'a@{s}', b),
(shift, a, ('iand', b, s - 1)))]
+lower_half_pack = [
+ (('pack_half_2x16_split', a, b),
+ ('pack_32_2x16_split', ('f2f16', a), ('f2f16', b))),
+
+ (('unpack_half_2x16_split_x', a), ('f2f32', ('unpack_32_2x16_split_x', a))),
+ (('unpack_half_2x16_split_y', a), ('f2f32', ('unpack_32_2x16_split_y', a))),
+]
+
def main():
parser = argparse.ArgumentParser()
parser.add_argument('-p', '--import-path', required=True)
print('#include "agx_nir.h"')
print(nir_algebraic.AlgebraicPass("agx_nir_lower_algebraic_late",
- lower_sm5_shift).render())
+ lower_sm5_shift + lower_half_pack).render())
if __name__ == '__main__':