From: Daniel Schürmann Date: Thu, 27 Feb 2020 16:52:21 +0000 (+0100) Subject: aco: use MUBUF to load subdword SSBO X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d293096d0a223ea903125db7756b31aedab451a;p=mesa.git aco: use MUBUF to load subdword SSBO Reviewed-by: Rhys Perry Reviewed-By: Timur Kristóf Tested-by: Marge Bot Part-of: --- 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));