From 77ecde1524989a39c4e96a7856888e4c6565b802 Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Sun, 6 Sep 2026 02:31:56 -0400 Subject: [PATCH] [Fix] (Pipe): refuse an eighth sticky row at compile time - the forwarded count equals the generated sticky count - kMGPipeForwardedFieldCount = 7 was a hand-written twin of the generated kMGPipeInputStickyFieldCount, tied only by PipeCatalogue.StickyFieldsAreExactlyTheSeven; a static_assert in the header makes a PipeFields.def sticky row without a forwarder a build error instead of a test failure. --- MobileGL/MG_Backend/MGPipe/PipeInputs.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MobileGL/MG_Backend/MGPipe/PipeInputs.h b/MobileGL/MG_Backend/MGPipe/PipeInputs.h index 3b51f7d2..5f143642 100644 --- a/MobileGL/MG_Backend/MGPipe/PipeInputs.h +++ b/MobileGL/MG_Backend/MGPipe/PipeInputs.h @@ -130,7 +130,11 @@ namespace MobileGL::MG_Pipe { // clang-format on // The seven F-class fields, for the arithmetic below and for the sticky table's proof. + // The forwarded set IS the sticky set (PipeFields.def marks the same seven rows F and + // sticky), so an eighth sticky row without a forwarder is refused here, not by a test. inline constexpr SizeT kMGPipeForwardedFieldCount = 7; + static_assert(kMGPipeForwardedFieldCount == kMGPipeInputStickyFieldCount, + "the forwarded (F-class) fields and the sticky fields of PipeFields.def are the same seven rows"); // The block the backends read instead of GLContext (ARCHITECTURE.md 9.2 phase A, P1 brief // D4). One struct, three storage classes, and every accessor keeps the NAME, PARAMETERS