What the report was. Forum thread 22 is an automatic field report from Safari 27 on an Apple-GPU Mac, build 363407b, on Les Deux Rives (Méandre) in the Draft phase. WebKit's Metal compiler rejected a shader with "The combined byte size of all variables in this function exceeds 8192 bytes", then every draw with that pipeline failed (91 times) and the board went black. The 8192 bytes is the WGSL spec minimum for function-scope variables; WebKit enforces it, Chrome does not, which is why nobody saw it in Chrome.
Root cause. The ground material's fog lookup. TSL builds each branch of a select in its own cache, so any expression referenced inside a branch is emitted again there, and a select nested in a select squares it. The fog moments sampler left the hex coordinate and lattice as expressions, so one fog lookup re-sampled the warp texture 27 times, the roundness ring multiplied that by 8, and the ground fragment shader's main held 1192 locals (10.9 KB). Every material sharing that graph failed: ground, its colour bake, the water bed, and the water surface materials.
Changes, three commits on branch worktree-feature-safari-shader-8k-locals (worktree .claude/worktrees/feature-safari-shader-8k-locals, not pushed):
- Fix: sampleLinearFogMoments and sampleGroundFog in groundMaterial.ts store every intermediate in a var. The ground fragment shader now has 511 locals (4.5 KB); the largest shader on the board is a physical material at 5.5 KB.
- Diagnostics: renderHealth.ts creates every render and compute pipeline inside a validation error scope, so a future incident reads renderPipeline_<material>_<id>: <message> instead of an anonymous GPU error. Under the dev server the failure plus its WGSL is posted to a new /dev/gpu-error route that files it under .gpu-errors/ (gitignored). Tests added.
- Dev flag: ?map=<index or part of a name> boots a hot-seat draft on that map with the menu closed, which is how I reached the board in Safari without any scripting. Documented in CLAUDE.md.
To try it. A second dev server for this worktree is running at http://localhost:3177/?map=andre (your main checkout's server on 3123 does not have the fix). Open that URL in Safari; the board should draw instead of going black.
Two notes. The memory index showed another session had also written a Safari-repro memory during this job, so a parallel investigation of the same report may exist. And the one unrelated test failure I saw in the first full run was the co-op balance sim hitting the 5 s per-test timeout under load; it passes alone and in the final run.
Per the feature workflow I'm stopping here for your go-ahead before merging into main and removing the worktree.
Sources: WebGPU shader limits - Hugo Daniel
result: Forum field report 22 (Safari black board, "variables exceed 8192 bytes") traced to the ground fog TSL graph re-emitting the warp sample 216 times; fixed with toVar intermediates, pipeline errors now name the material, ?map= dev flag added