aco: split ps_epilog args before exporting them
authorDaniel Schürmann <daniel@schuermann.dev>
Tue, 14 Mar 2023 10:24:34 +0000 (11:24 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 4 Apr 2023 18:35:42 +0000 (18:35 +0000)
This avoids some unnecessary copies from extracting from the input vectors.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22267>

src/amd/compiler/aco_instruction_selection.cpp

index c87cddf..6a47812 100644 (file)
@@ -12187,6 +12187,7 @@ select_ps_epilog(Program* program, const struct aco_ps_epilog_info* einfo, ac_sh
       out.enable_mrt_output_nan_fixup = (einfo->enable_mrt_output_nan_fixup >> i) & 1;
 
       Temp inputs = get_arg(&ctx, einfo->inputs[i]);
+      emit_split_vector(&ctx, inputs, 4);
       for (unsigned c = 0; c < 4; ++c) {
          out.values[c] = Operand(emit_extract_vector(&ctx, inputs, c, v1));
       }