Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

WebGPU storage-buffer-limit repro

Minimal reproduction of the WebGPU validation error:

Too many bindings of type StorageBuffers in Stage ShaderStages(COMPUTE), limit is 8,
count was 9. Check the limit `max_storage_buffers_per_shader_stage` passed to
`Adapter::request_device`

What it does

index.html is a single, self-contained page. It:

  1. Requests a default WebGPU adapter and device (no raised limits, so the default maxStorageBuffersPerShaderStage of 8 applies).
  2. Generates a compute shader that declares 9 var<storage, read_write> buffers.
  3. Builds the bind group layout / pipeline / bind group with 9 storage buffers and submits a dispatch.

Because 9 > 8, the browser raises the validation error above. It surfaces both as an "Uncaptured WebGPU error" in the console and via the captured error scope shown on the page.

How to run

WebGPU requires a secure context, so serve over localhost (a file:// URL will not work):

cd webgpu-storage-buffer-repro
python3 -m http.server 8000

Then open http://localhost:8000/ in Firefox (WebGPU must be enabled — see below) and open the browser console.

Enabling WebGPU in Firefox

  • Firefox Nightly ships WebGPU enabled. In stable/other builds, set dom.webgpu.enabled = true in about:config.
  • Confirm navigator.gpu is defined; the page reports if it is not.

Tuning the repro

Edit BUFFER_COUNT in index.html:

  • 9 (default) — triggers the error.
  • 8 — within the default limit; no error (sanity check).

About

Reproduces a backwards compatibility bug in Firefox 151.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages