Mesa (master): aco: Abort when RA can't find a register.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 24 18:09:08 UTC 2020
Module: Mesa
Branch: master
Commit: f321dc33c82635b5190845e59553ccb3ccfd332f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f321dc33c82635b5190845e59553ccb3ccfd332f
Author: Timur Kristóf <timur.kristof at gmail.com>
Date: Mon Feb 10 16:34:56 2020 +0100
aco: Abort when RA can't find a register.
Previously, it was just unreachable, which means it will generate
invalid shaders when it encounters a situation when it can't allocate
registers for eg. a large load.
This commit makes it slightly easier to notice such problems without
triggering a GPU hang.
Signed-off-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4536>
---
src/amd/compiler/aco_register_allocation.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp
index 44fb2907cdd..03c0c334cdf 100644
--- a/src/amd/compiler/aco_register_allocation.cpp
+++ b/src/amd/compiler/aco_register_allocation.cpp
@@ -988,7 +988,8 @@ PhysReg get_reg(ra_ctx& ctx,
//FIXME: if nothing helps, shift-rotate the registers to make space
- unreachable("did not find a register");
+ fprintf(stderr, "ACO: failed to allocate registers during shader compilation\n");
+ abort();
}
PhysReg get_reg_create_vector(ra_ctx& ctx,
More information about the mesa-commit
mailing list