Shaves 5 instructions off of one manhattan31 shader.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16616>
ir3_get_type_for_image_intrinsic(const nir_intrinsic_instr *instr)
{
const nir_intrinsic_info *info = &nir_intrinsic_infos[instr->intrinsic];
- int bit_size = info->has_dest ? nir_dest_bit_size(instr->dest) : 32;
+ int bit_size = info->has_dest ? nir_dest_bit_size(instr->dest) : nir_src_bit_size(instr->src[3]);
nir_alu_type type = nir_type_uint;
switch (instr->intrinsic) {
(1 << nir_tex_src_ddy),
~0);
+ OPT(s, nir_fold_16bit_image_load_store_conversions);
+
/* Now that we stripped off the 16-bit conversions, legalize so that we
* don't have a mix of 16- and 32-bit args that will need to be
* collected together in the coordinate vector.