#2817·drei

[v11] The story suite runs real WebGPU and discards 207 validation errors

Author: DennisSmolekCreated Sep 2, 2026Updated Sep 24, 2026
Labelswebgpuv11

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>
207

Every 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:

  1. Nothing asserts on pixels. A story passes if it mounts without throwing. Stars renders nothing in a browser (#2786) and passes.
  2. Setup sets frameloop: 'never' under test, so useFrame never runs. For Trail, ContactShadows and BlurPass that is essentially the whole component — construction is covered, behaviour is not.
  3. 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 (Outlines throws 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.