From 045ed4e6885128bf57ca6b1e495303b5a1f28c8c Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 3 May 2022 17:14:20 -0400 Subject: [PATCH] pan/bi: Assert that blend shaders may not spill The set of blend shaders is closed. They are completely internal. As such, we know that the registers we reserve for them suffice, and we don't permit register spilling. Refusing to support spilling in blend shaders simplifies a number of parts of the compiler. Add a check that we don't try to spill anyway, which will silently fail. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_ra.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panfrost/bifrost/bi_ra.c b/src/panfrost/bifrost/bi_ra.c index 4a15b560abf..231fe93d271 100644 --- a/src/panfrost/bifrost/bi_ra.c +++ b/src/panfrost/bifrost/bi_ra.c @@ -595,6 +595,9 @@ bi_register_allocate(bi_context *ctx) if (spill_node == -1) unreachable("Failed to choose spill node\n"); + if (ctx->inputs->is_blend) + unreachable("Blend shaders may not spill"); + /* By default, we use packed TLS addressing on Valhall. * We cannot cross 16 byte boundaries with packed TLS * addressing. Align to ensure this doesn't happen. This