Largest partner slot a joint code can name and still survive its own storage.
The code rides an RGBA32F texel, and float32 represents consecutive integers
exactly only to 2^24; the END encoding -(slot + 3) has the larger magnitude
and binds first, so slot + 3 <= 2^24.
The AUTHORITATIVE guard is in the projection kernels (joint_code in
wasm/rust/src/lines_clipping.rs and its TypeScript mirror), because those
emit into Float32Arrays: a code past the bound is rounded at the store and
lands on a valid, in-range slot, which nothing downstream — this function
included — can distinguish from a deliberate one. The check here is a cheap
second bound for codes that did NOT come from the kernel: the TSL parity
harness writes them by hand, and a hand-authored fixture is exactly where an
unrepresentable value would otherwise reach the GPU unnoticed.
Largest partner slot a joint code can name and still survive its own storage.
The code rides an RGBA32F texel, and float32 represents consecutive integers exactly only to 2^24; the END encoding
-(slot + 3)has the larger magnitude and binds first, soslot + 3 <= 2^24.The AUTHORITATIVE guard is in the projection kernels (
joint_codeinwasm/rust/src/lines_clipping.rsand its TypeScript mirror), because those emit into Float32Arrays: a code past the bound is rounded at the store and lands on a valid, in-range slot, which nothing downstream — this function included — can distinguish from a deliberate one. The check here is a cheap second bound for codes that did NOT come from the kernel: the TSL parity harness writes them by hand, and a hand-authored fixture is exactly where an unrepresentable value would otherwise reach the GPU unnoticed.