gpu-error: webgpu · apple metal-3 · macOS

Closed
#1

gpu-error — renderPipeline_MeshBasicNodeMaterial_5511: [EntryPoint "main"] infringes limits:

  • Vertex output variable "<retval>.nodeVarying16" has a location (16) that is too large. It should be less than (16).
  • While validating vertex stage ([ShaderModule "vertex"], entryPoint: "main").
  • While validating vertex state.
  • While calling [Device].CreateRenderPipeline([RenderPipelineDescriptor ""renderPipe…

Renderer WebGPU · apple metal-3 · 935×481 @1x · r180 · post: smaa
Render incidents 40 (gpu-error)
Build d9f1bb8 · Origin https://dev.wartabletactics.com · Map Pegasus Bridge · Phase Battle · Turn 4

Incidents so far:

  • +2229.2s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.2s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.2s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.2s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.2s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.2s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.2s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.2s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.2s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.2s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.3s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.3s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.3s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.3s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.3s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.3s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.3s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.3s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.3s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.3s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.3s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.3s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.4s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.4s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.4s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.4s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.4s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.4s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.4s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.4s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.4s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.4s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.4s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.4s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.5s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.5s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.5s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.5s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])
  • +2229.5s gpu-error: GPUValidationError: [Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"] is invalid due to a previous error.
  • While encoding [RenderPassEncoder (unlabeled)].SetPipeline([Invalid RenderPipeline "renderPipeline_MeshBasicNodeMaterial_5511"]).
  • While finishing [CommandEncoder "renderContext_3"].
  • +2229.5s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_3"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_3"]])

Console, last lines:

  • warn: THREE.TSL: Vertex attribute "normal" not found on geometry.
  • warn: THREE.TSL: Vertex attribute "normal" not found on geometry.
  • warn: THREE.TSL: Vertex attribute "normal" not found on geometry.
  • warn: THREE.TSL: Vertex attribute "normal" not found on geometry.
  • warn: THREE.TSL: Vertex attribute "normal" not found on geometry.

Diagnostics attached as wtt-render-report.json (game state included).

Staff #2

What the report says

Field Report thread 35 is a WebGPU pipeline that fails to validate on a Mac (Apple Metal, Chrome 152), on Pegasus Bridge, turn 4. The error is:

renderPipeline_MeshBasicNodeMaterial_5511: Vertex output variable "nodeVarying16"
has a location (16) that is too large. It should be less than (16).

The attached log ends on an MG gunner throwing smoke at the very second the incidents start.

Cause

The particle shader in src/render/particles.ts sent every per-particle value across the vertex/fragment boundary as its own varying: eleven varyings for sixteen components. WebGPU counts varyings by location, so a scalar costs as much as a vec4, and the default device limit is 16, which three never raises. Together with three's own uv, view position and normal that made 15. The Smoke effect is the only effect with a fog-of-war mix, and its fog branch samples the ground fog at the world position, adding the 17th varying. Its pipeline is invalid, so every frame the smoke lived the whole scene-pass submit was dropped. The player sees a frozen board behind the SMAA output pass, not a black one, which is why the blank-frame probe saw nothing. This is deterministic on any WebGPU device, not only Apple, since the limit is the same everywhere. It has been latent since the fog-of-war mix landed in commit 795c4a65.

Fix, built in the worktree

Each of the five instanced vec4 attributes now crosses as one packed varying and is unpacked in the fragment graph. Nine locations in all, fog branch included. The values are constant across the quad, so nothing interpolates differently. The colour attribute, which used to be read straight from the fragment and so got an anonymous varying, goes through the same path.

  • Reproduced in headless Chrome on this Mac's Apple GPU by playing the Smoke effect on Pegasus Bridge: 16 gpu-error incidents on the old code, zero on the new.
  • particleVaryings.test.ts walks the built node graph and asserts five vec4 varyings with no attribute read outside one. It fails on the old shader.

This thread is closed. Replies and edits are frozen — start a new thread if there is more to say.