From: Rhys Perry Date: Thu, 11 Jun 2020 13:05:48 +0000 (+0100) Subject: aco: allow GFX9 partial writes with instructions which use opsel X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e9578e303386c22940b62a88ea85cea794124537;p=mesa.git aco: allow GFX9 partial writes with instructions which use opsel Some instructions such as v_mad_f16 can do partial writes on GFX9. No fossil-db changes. Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 505f5cb613d..4841b5eb6f0 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -429,7 +429,7 @@ std::pair get_subdword_definition_info(Program *program, con if (can_use_SDWA(chip, instr)) { return std::make_pair(rc.bytes(), rc.bytes()); } else if (rc.bytes() == 2 && can_use_opsel(chip, instr->opcode, -1, 1)) { - return std::make_pair(2u, chip >= GFX10 ? 2u : 4u); + return std::make_pair(2u, bytes_written); } switch (instr->opcode) {