From: Samuel Pitoiset Date: Mon, 25 May 2020 16:33:18 +0000 (+0200) Subject: aco: fix alignment of vectors with 4 elements X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5446e3cf2e381d061e625291ce3d5d587db2e6e0;p=mesa.git aco: fix alignment of vectors with 4 elements I think this case was just missing. This fixes a bunch of 16-bit storage related CTS failures like dEQP-VK.ssbo.phys.layout.single_basic_type.std430.u16vec4. Signed-off-by: Samuel Pitoiset Reviewed-by: Daniel Schürmann 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 66f6c8857e2..76462b1b23b 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -3027,9 +3027,12 @@ void byte_align_vector(isel_context *ctx, Temp vec, Operand offset, Temp dst) { Builder bld(ctx->program, ctx->block); if (offset.isTemp()) { - Temp tmp[3] = {vec, vec, vec}; + Temp tmp[4] = {vec, vec, vec, vec}; - if (vec.size() == 3) { + if (vec.size() == 4) { + tmp[0] = bld.tmp(v1), tmp[1] = bld.tmp(v1), tmp[2] = bld.tmp(v1), tmp[3] = bld.tmp(v1); + bld.pseudo(aco_opcode::p_split_vector, Definition(tmp[0]), Definition(tmp[1]), Definition(tmp[2]), Definition(tmp[3]), vec); + } else if (vec.size() == 3) { tmp[0] = bld.tmp(v1), tmp[1] = bld.tmp(v1), tmp[2] = bld.tmp(v1); bld.pseudo(aco_opcode::p_split_vector, Definition(tmp[0]), Definition(tmp[1]), Definition(tmp[2]), vec); } else if (vec.size() == 2) {