diff options
author | Timur Kristóf <[email protected]> | 2020-02-10 16:34:56 +0100 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-24 17:58:57 +0000 |
commit | f321dc33c82635b5190845e59553ccb3ccfd332f (patch) | |
tree | da9dd6ad6aa5a3fbfcfb34ff898518c817c8790a /src | |
parent | f2e7aee2440943f13d221fddcb3aabbb5bc3c59a (diff) |
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 <[email protected]>
Reviewed-by: Rhys Perry <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4536>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/compiler/aco_register_allocation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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, |