From: Timur Kristóf Date: Mon, 10 Feb 2020 15:34:56 +0000 (+0100) Subject: aco: Abort when RA can't find a register. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f321dc33c82635b5190845e59553ccb3ccfd332f;p=mesa.git 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 Reviewed-by: Rhys Perry Part-of: --- 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,