diff options
author | Rhys Perry <pendingchaos02@gmail.com> | 2020-10-27 13:23:07 +0000 |
---|---|---|
committer | Rhys Perry <pendingchaos02@gmail.com> | 2020-10-28 10:56:27 +0000 |
commit | 57d977a23fbcf513ebc167def0acc2cbb58bfe99 (patch) | |
tree | 5dcec818a1fcb9a119d80098233d36009c98b395 | |
parent | 41839d38cf367baea66dfe2306cc4dd0b4adaf2f (diff) |
aco: round bytes_written to dwords if larger than 4 bytes
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7276>
-rw-r--r-- | src/amd/compiler/aco_register_allocation.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp index 81e4072a2b7..2561baefc1a 100644 --- a/src/amd/compiler/aco_register_allocation.cpp +++ b/src/amd/compiler/aco_register_allocation.cpp @@ -456,6 +456,7 @@ std::pair<unsigned, unsigned> get_subdword_definition_info(Program *program, con default: break; } + bytes_written = bytes_written > 4 ? align(bytes_written, 4) : bytes_written; bytes_written = MAX2(bytes_written, instr_info.definition_size[(int)instr->opcode] / 8u); if (can_use_SDWA(chip, instr)) { |