gpu-error: webgpu · nvidia ampere · Windows

Closed
#1

gpu-error — GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

Renderer WebGPU · nvidia ampere · 1280×720 @1x · r180
Render incidents 10 (gpu-error)
Build 13b17a1-dirty · Origin http://localhost:49203 · Map Pont-de-l'Authie · Phase Draft · Turn 0

Incidents so far:

  • +1.4s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.

at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

  • +1.4s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
  • While validating [TextureDescriptor ""colorBuffer""].
  • While calling [Device].CreateTexture([TextureDescriptor ""colorBuffer""]).
  • +2.9s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
  • While validating [TextureDescriptor ""depthBuffer""].
  • While calling [Device].CreateTexture([TextureDescriptor ""depthBuffer""]).
  • +2.9s gpu-error: GPUValidationError: [Invalid Texture "depthBuffer"] is invalid due to a previous error.
  • While calling [Invalid Texture "depthBuffer"].CreateView([TextureViewDescriptor]).
  • +2.9s gpu-error: GPUValidationError: [Invalid Texture "colorBuffer"] is invalid due to a previous error.
  • While calling [Invalid Texture "colorBuffer"].CreateView([TextureViewDescriptor]).
  • +2.9s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.

at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

  • +2.9s gpu-error: GPUValidationError: Could not create a swapchain texture of size 0.

at APIInjectError (..\..\third_party\dawn\src\dawn\native\Device.cpp:1950)

  • +2.9s gpu-error: GPUValidationError: [Invalid Texture] is invalid due to a previous error.
  • While calling [Invalid Texture].CreateView([TextureViewDescriptor]).
  • +2.9s gpu-error: GPUValidationError: [Invalid TextureView] is invalid due to a previous error.
  • While validating colorAttachments[0].
  • While encoding [CommandEncoder "renderContext_1"].BeginRenderPass([RenderPassDescriptor]).
  • While finishing [CommandEncoder "renderContext_1"].
  • +2.9s gpu-error: GPUValidationError: [Invalid CommandBuffer from CommandEncoder "renderContext_1"] is invalid due to a previous error.
  • While calling [Queue].Submit([[Invalid CommandBuffer from CommandEncoder "renderContext_1"]])

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

#2

gpu-error — GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

Renderer WebGPU · nvidia ampere · 0×0 @1x · r180
Render incidents 2 (gpu-error)
Build 13b17a1-dirty · Origin http://localhost:49203 · Map Pegasus Bridge · Phase Battle · Turn 1

Incidents so far:

  • +2.4s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.

at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

  • +2.4s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
  • While validating [TextureDescriptor ""colorBuffer""].
  • While calling [Device].CreateTexture([TextureDescriptor ""colorBuffer""]).

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

#3

gpu-error — GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

Renderer WebGPU · nvidia ampere · 0×0 @1x · r180
Render incidents 2 (gpu-error)
Build 13b17a1-dirty · Origin http://localhost:49203 · Map Pegasus Bridge · Phase Battle · Turn 1

Incidents so far:

  • +3.4s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.

at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

  • +3.4s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
  • While validating [TextureDescriptor ""colorBuffer""].
  • While calling [Device].CreateTexture([TextureDescriptor ""colorBuffer""]).

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

#4

gpu-error — GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

Renderer WebGPU · nvidia ampere · 0×0 @1x · r180
Render incidents 2 (gpu-error)
Build 13b17a1-dirty · Origin http://localhost:49203 · Map Pegasus Bridge · Phase Battle · Turn 1

Incidents so far:

  • +3.0s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.

at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

  • +3.0s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
  • While validating [TextureDescriptor ""colorBuffer""].
  • While calling [Device].CreateTexture([TextureDescriptor ""colorBuffer""]).

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

#5

gpu-error — GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

Renderer WebGPU · nvidia ampere · 0×0 @1x · r180
Render incidents 2 (gpu-error)
Build 13b17a1-dirty · Origin http://localhost:53258 · Map Pont-de-l'Authie · Phase Draft · Turn 0

Incidents so far:

  • +1.2s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.

at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

  • +1.2s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
  • While validating [TextureDescriptor ""colorBuffer""].
  • While calling [Device].CreateTexture([TextureDescriptor ""colorBuffer""]).

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

#6

gpu-error — GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

Renderer WebGPU · nvidia ampere · 0×0 @1x · r180
Render incidents 2 (gpu-error)
Build 13b17a1-dirty · Origin http://localhost:53258 · Map Pont-de-l'Authie · Phase Draft · Turn 0

Incidents so far:

  • +1.2s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.

at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

  • +1.2s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
  • While validating [TextureDescriptor ""colorBuffer""].
  • While calling [Device].CreateTexture([TextureDescriptor ""colorBuffer""]).

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

#7

gpu-error — GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

Renderer WebGPU · nvidia ampere · 0×0 @1x · r180
Render incidents 2 (gpu-error)
Build 13b17a1-dirty · Origin http://localhost:53258 · Map Pont-de-l'Authie · Phase Draft · Turn 0

Incidents so far:

  • +0.9s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.

at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

  • +0.9s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
  • While validating [TextureDescriptor ""colorBuffer""].
  • While calling [Device].CreateTexture([TextureDescriptor ""colorBuffer""]).

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

#8

gpu-error — GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

Renderer WebGPU · nvidia ampere · 0×0 @1x · r180
Render incidents 2 (gpu-error)
Build 13b17a1-dirty · Origin http://localhost:53258 · Map Pont-de-l'Authie · Phase Draft · Turn 0

Incidents so far:

  • +1.0s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.

at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

  • +1.0s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
  • While validating [TextureDescriptor ""colorBuffer""].
  • While calling [Device].CreateTexture([TextureDescriptor ""colorBuffer""]).

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

#9

gpu-error — GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

Renderer WebGPU · nvidia ampere · 0×0 @1x · r180
Render incidents 2 (gpu-error)
Build 13b17a1-dirty · Origin http://localhost:65048 · Map Pont-de-l'Authie · Phase Draft · Turn 0

Incidents so far:

  • +0.6s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.

at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

  • +0.6s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
  • While validating [TextureDescriptor ""colorBuffer""].
  • While calling [Device].CreateTexture([TextureDescriptor ""colorBuffer""]).

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

#10

gpu-error — GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

Renderer WebGPU · nvidia ampere · 0×0 @1x · r180
Render incidents 2 (gpu-error)
Build 13b17a1-dirty · Origin http://localhost:65048 · Map Pont-de-l'Authie · Phase Draft · Turn 0

Incidents so far:

  • +1.5s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.

at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

  • +1.5s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
  • While validating [TextureDescriptor ""colorBuffer""].
  • While calling [Device].CreateTexture([TextureDescriptor ""colorBuffer""]).

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

#11

gpu-error — GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

Renderer WebGPU · nvidia ampere · 0×0 @1x · r180
Render incidents 2 (gpu-error)
Build 13b17a1-dirty · Origin http://localhost:65048 · Map Pont-de-l'Authie · Phase Draft · Turn 0

Incidents so far:

  • +1.4s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.

at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

  • +1.4s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
  • While validating [TextureDescriptor ""colorBuffer""].
  • While calling [Device].CreateTexture([TextureDescriptor ""colorBuffer""]).

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

#12

gpu-error — GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

Renderer WebGPU · nvidia ampere · 0×0 @1x · r180
Render incidents 2 (gpu-error)
Build 13b17a1-dirty · Origin http://localhost:65048 · Map Pont-de-l'Authie · Phase Draft · Turn 0

Incidents so far:

  • +1.0s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.

at ValidateTextureDescriptor (..\..\third_party\dawn\src\dawn\native\Texture.cpp:846)

  • +1.0s gpu-error: GPUValidationError: The texture size ([Extent3D width:0, height:0, depthOrArrayLayers:1]) or mipLevelCount (1) is empty.
  • While validating [TextureDescriptor ""colorBuffer""].
  • While calling [Device].CreateTexture([TextureDescriptor ""colorBuffer""]).

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

Staff #13

Committed as 363407b on branch worktree-gpu-zero-size-canvas. Sanity check: type-check clean, 860 tests pass, and the change only alters behaviour when the window reports a zero size, so a normal browser session is unaffected.

What the error is

Dawn (Chrome's WebGPU implementation) is rejecting textures created at 0×0. three's WebGPU backend sizes its colorBuffer, depthBuffer and the swapchain texture from the canvas. Our handleResize reads window.innerWidth/innerHeight and calls setSize with them unguarded. In a window that has no layout yet those are both 0, so the canvas becomes 0×0, three's init() creates the colour buffer at that size, and the first frame adds the depth buffer and swapchain failures. Each one is a gpu-error incident, and the field reporter posts them.

Where it comes from

Every post in that thread has the same fingerprint, and none is from a player:

  • Build 13b17a1-dirty, origin http://localhost:<random port>, so a dev checkout with uncommitted changes.
  • User agent is Claude/1.49585.0 … Chrome/152 … MSIX, the Claude desktop app's embedded browser on Windows, NVIDIA Ampere.
  • The attached diagnostics show visibility: hidden, window 0×0, drawing buffer 0×0, 0 frames presented.

So this is an automated playtest opening the game in a hidden, unsized window on a Windows machine, twelve times on 9 September. The game itself is fine on real screens. The bug is real all the same: the renderer should never hand three a 0×0 canvas.

The fix (in the worktree)

  • New src/render/viewport.ts: viewportSize() returns null for a zero or NaN window, canPresent() says whether a canvas has pixels.
  • renderer.ts: handleResize refuses a zero window, keeps the current canvas size and marks the resize owed. The frame loop retries the owed resize at the top of each tick and skips the frame while the canvas cannot present. This also avoids the NaN camera aspect that 0/0 produced.
  • viewport.test.ts covers the rule. Menu background already had this guard, so it needed no change.

Not done, worth deciding

The field reporter still posts dev-origin (localhost, -dirty) incidents to the production forum. CLAUDE.md says that is by design, but if you want the board to stay player-only, a one-line gate on the origin or a hidden 0×0 window would do it. I did not run a live browser check of the fix; the change is inert unless the window is 0×0, which is hard to reproduce on this Mac.

Worktree: /Users/magnus/Work/wtt/wtt/.claude/worktrees/gpu-zero-size-canvas, branch worktree-gpu-zero-size-canvas, one commit ahead of main. Say the word and I will merge it into main and remove the worktree. Nothing has been pushed.

result: Field Reports GPU error is three's WebGPU backend creating 0×0 textures when the renderer sizes the canvas from a hidden 0×0 window (an automated Windows playtest in the Claude desktop browser, not players); fix committed in worktree gpu-zero-size-canvas, tests and type-check green, awaiting merge approval.

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