From: Daniel Schürmann Date: Tue, 25 Feb 2020 10:52:08 +0000 (+0100) Subject: aco: don't vectorize 8/16bit load/store_ssbo X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d223e4e8de8207b320473207764f2a4d6299b2ff;p=mesa.git aco: don't vectorize 8/16bit load/store_ssbo Reviewed-by: Rhys Perry Reviewed-By: Timur Kristóf Part-of: --- diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp index 6caedc4347f..d7d294e7044 100644 --- a/src/amd/compiler/aco_instruction_selection_setup.cpp +++ b/src/amd/compiler/aco_instruction_selection_setup.cpp @@ -706,9 +706,14 @@ mem_vectorize_callback(unsigned align, unsigned bit_size, return false; switch (low->intrinsic) { - case nir_intrinsic_load_ubo: - case nir_intrinsic_load_ssbo: case nir_intrinsic_store_ssbo: + if (low->src[0].ssa->bit_size < 32 || high->src[0].ssa->bit_size < 32) + return false; + return align % 4 == 0; + case nir_intrinsic_load_ssbo: + if (low->dest.ssa.bit_size < 32 || high->dest.ssa.bit_size < 32) + return false; + case nir_intrinsic_load_ubo: case nir_intrinsic_load_push_constant: return align % 4 == 0; case nir_intrinsic_load_deref: