Question about the maximum maxStorageBufferBindingSize of WebGPU StorageBuffer array?

The WebGPU document shows the maximum maxStorageBufferBindingSize is 134217728 bytes (128 MiB).

And I can get the parameter from the Chrome Console.

But I could get much larger size when I was in the Playground as below. The limit size is a little less than 2G.

But now, things wired happen. When I set a size like “241582080” of StorageBuffer in my local project, which is larger than 134217728 bytes, I got an error, “Binding size (241582080) of [Buffer “BabylonWebGPUDevice0_Buffer_CopySrc_CopyDst_Storage_size241582080”] is larger than the maximum binding size (134217728).”

So what’s the difference between Playground and my local project? How can I do if I want a larger size of StorageBuffer?

The Playground is configured to request the highest possible limits: the values indicated in the WebGPU specification are the minimal values that must be supported by all WebGPU implementations, but your GPU can report higher supported values.

The code to create the engine in the Playground is:

const engine = new WebGPUEngine(canvas, {
    enableAllFeatures: true,
    setMaximumLimits: true,
});

With enableAllFeatures = true, all features supported by the adapter will be enabled when creating the device.
With setMaximumLimits = true, the device will be created with the maximum possible values for all parameters (the ones reported by engine.supportedLimits).

1 Like

Thank you so much!!! This is what I want!