[v11] The story suite runs real WebGPU and discards 207 validation errors
The story suite has real WebGPU and throws away the evidence
I have been saying the headless runner has no navigator.gpu and falls back to WebGLBackend. That is wrong. Running the suite on v11-working:
$ npx vitest run --config vite.config.mts
Test Files 136 passed (136)
Tests 222 passed (222)
$ grep -c "GPUValidationError" <log>
207Every one is prefixed THREE.WebGPURenderer: Uncaptured WebGPU GPUValidationError. A GPUValidationError can only be produced by a real GPUDevice, so Dawn is present, WGSL is being compiled, and shaders are being validated for real.
So what is actually missing
Not the GPU. Three things:
- Nothing asserts on pixels. A story passes if it mounts without throwing.
Starsrenders nothing in a browser (#2786) and passes. Setupsetsframeloop: 'never'under test, souseFramenever runs. ForTrail,ContactShadowsandBlurPassthat is essentially the whole component — construction is covered, behaviour is not.- Uncaptured device errors do not fail anything. 207 validation errors, suite green. React also swallows constructor throws into "An error occurred in the
<CanvasImpl>component" — which is exactly how #2813 (Outlinesthrows on every construction) survived.
Proposal
Fail the suite on an uncaptured GPUValidationError, with an allowlist for the known-environmental one. That converts shader-compile breakage from noise into a hard signal, and it is much cheaper than pixel comparison.
The one to allowlist is three's own mipmap generator, which emits WGSL this Chromium's Dawn is too old to parse:
Error while parsing WGSL: :5:36 error: unresolved interpolation sampling 'either'
@location( 1 ) @interpolate(flat, either) vBaseArrayLayer: u32,7 occurrences of that message, cascading into the rest (Invalid RenderPipeline "mipmap-…", Invalid BindGroupLayout, Invalid CommandBuffer from "mipmapEncoder"). It is three r185 against an old Dawn, not drei's code, and will not reproduce in a current browser — bumping the Playwright/Chromium version may remove the need for the allowlist entirely, and should be tried first.
Separately, consider a story-level opt-in to run a few frames rather than frameloop: 'never', so per-frame components get any coverage at all.
What this changes about the plan
Automated WebGPU verification is more tractable than I have been reporting. It does not replace a human looking at pixels — none of this would catch Stars rendering nothing — but "the shader compiles on a real WebGPU device" is available today and currently being discarded.
Source: pmndrs/drei