Mesa (master): aco: check alignment of non-subdword registers in get_reg_specified()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 28 23:29:08 UTC 2020


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

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Mon Apr 27 17:54:49 2020 +0100

aco: check alignment of non-subdword registers in get_reg_specified()

When splitting a v6b vector into v1 and v2b components, we should ensure
the v1 definition doesn't start at the upper half.

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/4772>

---

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

diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp
index 02d4e9f8781..595be51ccd1 100644
--- a/src/amd/compiler/aco_register_allocation.cpp
+++ b/src/amd/compiler/aco_register_allocation.cpp
@@ -877,6 +877,8 @@ bool get_reg_specified(ra_ctx& ctx,
 {
    if (rc.is_subdword() && reg.byte() && !instr_can_access_subdword(instr))
       return false;
+   if (!rc.is_subdword() && reg.byte())
+      return false;
 
    uint32_t size = rc.size();
    uint32_t stride = 1;



More information about the mesa-commit mailing list