Mesa (master): aco: round bytes_written to dwords if larger than 4 bytes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Oct 28 13:16:50 UTC 2020


Module: Mesa
Branch: master
Commit: 57d977a23fbcf513ebc167def0acc2cbb58bfe99
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=57d977a23fbcf513ebc167def0acc2cbb58bfe99

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Tue Oct 27 13:23:07 2020 +0000

aco: round bytes_written to dwords if larger than 4 bytes

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7276>

---

 src/amd/compiler/aco_register_allocation.cpp | 1 +
 1 file changed, 1 insertion(+)

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)) {



More information about the mesa-commit mailing list