Mesa (master): aco: fix neighboring register check in get_reg_simple()

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


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

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Mon Apr 27 18:15:23 2020 +0100

aco: fix neighboring register check in get_reg_simple()

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, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp
index 595be51ccd1..7fd15295ea8 100644
--- a/src/amd/compiler/aco_register_allocation.cpp
+++ b/src/amd/compiler/aco_register_allocation.cpp
@@ -381,7 +381,7 @@ std::pair<PhysReg, bool> get_reg_simple(ra_ctx& ctx,
                reg_found &= entry.second[i + j] == 0;
 
             /* check neighboring reg if needed */
-            reg_found &= (i <= 4 - rc.bytes() || reg_file[entry.first + 1] == 0);
+            reg_found &= ((int)i <= 4 - (int)rc.bytes() || reg_file[entry.first + 1] == 0);
             if (reg_found) {
                PhysReg res{entry.first};
                res.reg_b += i;



More information about the mesa-commit mailing list