From 1d293096d0a223ea903125db7756b31aedab451a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Sch=C3=BCrmann?= Date: Thu, 27 Feb 2020 17:52:21 +0100 Subject: [PATCH] aco: use MUBUF to load subdword SSBO MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Rhys Perry Reviewed-By: Timur Kristóf Tested-by: Marge Bot Part-of: --- src/amd/compiler/aco_instruction_selection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/compiler/aco_instruction_selection.cpp b/src/amd/compiler/aco_instruction_selection.cpp index 777072437f0..2d9b78792f3 100644 --- a/src/amd/compiler/aco_instruction_selection.cpp +++ b/src/amd/compiler/aco_instruction_selection.cpp @@ -4481,7 +4481,7 @@ void load_buffer(isel_context *ctx, unsigned num_components, unsigned component_ unsigned num_bytes = num_components * component_size; aco_opcode op; - if (dst.type() == RegType::vgpr || (ctx->options->chip_class < GFX8 && !readonly)) { + if (dst.type() == RegType::vgpr || ((ctx->options->chip_class < GFX8 || component_size < 4) && !readonly)) { Operand vaddr = offset.type() == RegType::vgpr ? Operand(offset) : Operand(v1); Operand soffset = offset.type() == RegType::sgpr ? Operand(offset) : Operand((uint32_t) 0); unsigned const_offset = 0; @@ -4558,7 +4558,7 @@ void load_buffer(isel_context *ctx, unsigned num_components, unsigned component_ mubuf->offset = const_offset; aco_ptr instr = std::move(mubuf); - if (dst.regClass().is_subdword()) { + if (component_size < 4) { Temp vec = num_bytes <= 4 ? bld.tmp(v1) : num_bytes <= 8 ? bld.tmp(v2) : bld.tmp(v3); instr->definitions[0] = Definition(vec); bld.insert(std::move(instr)); -- 2.30.2