intel/brw: Use VEC for FS outputs

This writes the whole destination register in a single builder call.
Eventually, VEC will write the whole destination register in one go,
allowing better visibility into how it is defined.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28971>
This commit is contained in:
Kenneth Graunke
2024-01-05 22:19:57 -08:00
parent cbe7a13f2b
commit f0c29c9b71
+6 -4
View File
@@ -3917,10 +3917,12 @@ fs_nir_emit_fs_intrinsic(nir_to_brw_state &ntb,
const fs_reg new_dest = retype(alloc_frag_output(ntb, location),
src.type);
for (unsigned j = 0; j < instr->num_components; j++)
bld.MOV(offset(new_dest, bld, nir_intrinsic_component(instr) + j),
offset(src, bld, j));
fs_reg comps[instr->num_components];
for (unsigned i = 0; i < instr->num_components; i++) {
comps[i] = offset(src, bld, i);
}
bld.VEC(offset(new_dest, bld, nir_intrinsic_component(instr)),
comps, instr->num_components);
break;
}