if (ins->dest)
pan_print_alu_type(ins->dest_type, fp);
+ if (ins->format && ins->dest != ins->format)
+ pan_print_alu_type(ins->format, fp);
+
if (bi_has_outmod(ins))
fprintf(fp, "%s", bi_output_mod_name(ins->outmod));
ins.load_vary.reuse = false; /* TODO */
ins.load_vary.flat = instr->intrinsic != nir_intrinsic_load_interpolated_input;
ins.dest_type = nir_type_float | nir_dest_bit_size(instr->dest);
+ ins.format = ins.dest_type;
if (nir_src_is_const(*nir_get_io_offset_src(instr))) {
/* Zero it out for direct */
ld.src_types[1] = nir_type_uint32;
ld.src_types[2] = nir_type_uint32;
ld.src_types[3] = nir_intrinsic_type(instr);
+ ld.format = nir_intrinsic_type(instr);
return ld;
}
},
.vector_channels = 1,
.dest_type = nir_type_float32,
+ .format = nir_type_float32,
.dest = bi_make_temp(ctx),
.src = { BIR_INDEX_CONSTANT, BIR_INDEX_ZERO },
.src_types = { nir_type_uint32, nir_type_uint32 },
/* Source types if required by the class */
nir_alu_type src_types[BIR_SRC_COUNT];
+ /* register_format if applicable */
+ nir_alu_type format;
+
/* If the source type is 8-bit or 16-bit such that SIMD is possible,
* and the class has BI_SWIZZLABLE, this is a swizzle in the usual
* sense. On non-SIMD instructions, it can be used for component
.vector_channels = 3,
.dest = BIR_INDEX_REGISTER | 32,
.dest_type = nir_type_uint32,
+ .format = nir_type_uint32,
.src = {
BIR_INDEX_CONSTANT,
BIR_INDEX_REGISTER | 61,