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 <noreply@anthropic.com>
This commit is contained in:
parent
7416e8a775
commit
72af377a05
1 changed files with 2 additions and 1 deletions
|
|
@ -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);'
|
||||
|
|
|
|||
Loading…
Reference in a new issue