WASM example from the website crashes on Windows machine
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Bevy version
0.11, since webgpu has been served from 0.11.
## Relevant system information
OS & Browser info: Windows 11 Home, Chrome Version 115.0.5790.110
Processor & GPU info: AMD Ryzen Z1 Extreme (I'm using ROG Ally)
If your bug is rendering-related, copy the adapter info that appears when you run Bevy.
```ignore
AdapterInfo { name: "", vendor: 0, device: 0, device_type: Other, driver: "", driver_info: "", backend: BrowserWebGpu }
```
## What you did
I loaded `Update glTF Scene` [example](https://bevyengine.org/examples-webgpu/3D%20Rendering/update-gltf-scene/) from the website, in WebGPU
## What went wrong
It is expected to show the usual example that disassembles the model and reassembles again, but the browser froze for a minute and gave the error below
```ignore
wasm_example.js:852 Uncaught RangeError: Failed to execute 'createBuffer' on 'GPUDevice': createBuffer failed, size is too large for the implementation when mappedAtCreation == true
at imports.wbg.__wbg_createBuffer_36e159f52cc644a7 (wasm_example.js:852:37)
at 03e11766:0xa49866
at 03e11766:0x5320ca
at 03e11766:0xa3d188
at 03e11766:0x2e9d37
at 03e11766:0x535cd0
at 03e11766:0x3aa435
at 03e11766:0xa1d23d
at 03e11766:0x5ff957
at 03e11766:0x9dbe08
```
## Additional information
### Screenshot

### Theories about what might be going wrong
I think this is due to some bugs from bevy because the [examples](https://webgpu.github.io/webgpu-samples/) from webgpu github repo was fine.
### Detailed log and screenshot by building the example locally
```ignore
Uncaught RangeError: Failed to execute 'createBuffer' on 'GPUDevice': createBuffer failed, size is too large for the implementation when mappedAtCreation == true
at imports.wbg.__wbg_createBuffer_36e159f52cc644a7 (wasm_example.js:742:37)
at web_sys::features::gen_GpuDevice::GpuDevice::create_buffer::he3f415a7e1a5aed5 (wasm_example_bg.wasm:0x122a853)
at ::device_create_buffer::h81085d0d7ccf61fc (wasm_example_bg.wasm:0x106815b)
at ::create_buffer_init::hca4d931f8732d83f (wasm_example_bg.wasm:0x74818a)
at bevy_render::renderer::render_device::RenderDevice::create_buffer_with_data::h646822324f1f3da0 (wasm_example_bg.wasm:0x101b133)
at bevy_render::render_resource::storage_buffer::StorageBuffer::write_buffer::h028d05298825b440 (wasm_example_bg.wasm:0xea3eb6)
at bevy_pbr::render::light::prepare_clusters::h8059070cef1d3ed0 (wasm_example_bg.wasm:0x37f755)
at bevy_ecs::system::system::System::run::h8d898f852405ff18 (wasm_example_bg.wasm:0x6fec75)
at ::run::h358834e4ef55f76c (wasm_example_bg.wasm:0x45a53f)
at bevy_ecs::schedule::schedule::Schedule::run::hb408ec093979fbcb (wasm_example_bg.wasm:0xfed2a9)
```

Contributor guide
Research direction
Reproduce the `Update glTF Scene` WebGPU example on Windows 11 with Chrome, then trace the failure from `bevy_pbr::render::light::prepare_clusters` through `StorageBuffer::write_buffer` and `RenderDevice::create_buffer_with_data`. Use the reported `createBuffer` error to identify the cause; done means the example loads and runs without freezing or exceeding the browser's buffer limit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- computer-graphics, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100