Mesa (main): pan/bi: Assert that blend shaders may not spill

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 4 13:07:03 UTC 2022


Module: Mesa
Branch: main
Commit: 045ed4e6885128bf57ca6b1e495303b5a1f28c8c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=045ed4e6885128bf57ca6b1e495303b5a1f28c8c

Author: Alyssa Rosenzweig <alyssa at collabora.com>
Date:   Tue May  3 17:14:20 2022 -0400

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 <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16314>

---

 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



More information about the mesa-commit mailing list