From d223e4e8de8207b320473207764f2a4d6299b2ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 25 Feb 2020 11:52:08 +0100 Subject: [PATCH] aco: don't vectorize 8/16bit load/store_ssbo MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Rhys Perry Reviewed-By: Timur Kristóf Part-of: --- src/amd/compiler/aco_instruction_selection_setup.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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: -- 2.30.2