From: Samuel Pitoiset Date: Fri, 8 May 2020 07:30:33 +0000 (+0200) Subject: aco: store 16-bit temporary outputs as v2b X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=462a5fe6f44e03e1f39238174628beda3e43fa18;p=mesa.git aco: store 16-bit temporary outputs as v2b Signed-off-by: Samuel Pitoiset Reviewed-by: Rhys Perry Part-of: --- diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 4a7cef2d7d7..f83aae2b179 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -4213,10 +4213,12 @@ bool store_output_to_temps(isel_context *ctx, nir_intrinsic_instr *instr) if (instr->src[0].ssa->bit_size == 64) write_mask = widen_mask(write_mask, 2); + RegClass rc = instr->src[0].ssa->bit_size == 16 ? v2b : v1; + for (unsigned i = 0; i < 8; ++i) { if (write_mask & (1 << i)) { ctx->outputs.mask[idx / 4u] |= 1 << (idx % 4u); - ctx->outputs.temps[idx] = emit_extract_vector(ctx, src, i, v1); + ctx->outputs.temps[idx] = emit_extract_vector(ctx, src, i, rc); } idx++; }