From b7f18ff5b1ef5575d84f2d4ec1dde91fe0c23259 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 17 Oct 2026 13:24:11 +0200 Subject: [PATCH] build-glsl.sh: fail on inout, param_var_, wrapper names, export and mix(mix( in the output Co-Authored-By: Claude Sonnet 5.5 --- packages/cultmath/tools/glsl/build-glsl.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/cultmath/tools/glsl/build-glsl.sh b/packages/cultmath/tools/glsl/build-glsl.sh index e018fc96..8897cc80 100644 --- a/packages/cultmath/tools/glsl/build-glsl.sh +++ b/packages/cultmath/tools/glsl/build-glsl.sh @@ -72,3 +72,8 @@ for part in core cycles phacelle; do echo "$part: functions $fn, distinct names $names, lines $(wc -l <"$g"), bytes $(wc -c <"$g"), sha256 $(sha256sum "$g" | cut -c1-64)" done echo "suffixed ids: $(cat "$OUT"/*.glsl | grep -oE '\bcultmath_\w+_[0-9]+\(' | sort -u | wc -l); inout: $(cat "$OUT"/*.glsl | grep -c inout || true)" +# Build shape: the lowering leaves none of these, and the NaN-check option leaves no mix(mix( expansions. +if cat "$OUT"/*.glsl | grep -Eq 'inout|param_var_|cmw[0-9]{3}_|export |mix\(mix\('; then + echo "build shape failed:"; cat "$OUT"/*.glsl | grep -Eo 'inout|param_var_|cmw[0-9]{3}_|export |mix\(mix\(' | sort | uniq -c; exit 1 +fi +echo "build shape ok"