From 72af377a05e14dc57ecc6ab1e726550bc8730854 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 17 Oct 2026 23:20:48 +0200 Subject: [PATCH] build-glsl.sh: the length-in-expression refusal test spells the sentinel in hex, which dxc keeps as the capacity constant Co-Authored-By: Claude Opus 5.5 --- packages/cultmath/tools/glsl/build-glsl.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cultmath/tools/glsl/build-glsl.sh b/packages/cultmath/tools/glsl/build-glsl.sh index 4f2a1a66..e2d07cd4 100644 --- a/packages/cultmath/tools/glsl/build-glsl.sh +++ b/packages/cultmath/tools/glsl/build-glsl.sh @@ -129,7 +129,8 @@ expect_refused() { # label, probe HLSL, pattern the refusal prints } SENTINEL=$(cut -f2 "$W/shw/capacity.tsv") expect_refused macro-in-expression 'int cultmath_zz_probe(int n) { return n + CULTMATH_MAX_SITES; }' 'outside its guard' -expect_refused length-in-expression "uint cultmath_zz_probe(uint n) { return n + (100u + $((SENTINEL - 100))u); }" 'also used by opcode' +# the sentinel spelled in hex: wrappers.py's scan reads decimal tokens, so only the length check can see it +expect_refused length-in-expression "uint cultmath_zz_probe(uint n) { return n + $(printf '0x%xu' "$SENTINEL"); }" 'also used by opcode' variant array-128 'float4 cultmath_zz_probe(float4 x[128], int n) { return x[n]; }' || { echo "array-128 failed: a library array of length 128 broke the build"; tail -5 "$VD/log"; exit 1; } grep -Eq 'cultmath_zz_probe\(.*\[128\]' "$VD/out/core.glsl" || { echo "array-128 failed: the 128 array is not literal in core.glsl"; exit 1; } PROBE='vec4 x[128]; c = cultmath_zz_probe(x, 1);'