From f321dc33c82635b5190845e59553ccb3ccfd332f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timur=20Krist=C3=B3f?= Date: Mon, 10 Feb 2020 16:34:56 +0100 Subject: [PATCH] aco: Abort when RA can't find a register. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Rhys Perry Part-of: --- 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, -- 2.30.2