Scthe / nanite-webgpu

UE5's Nanite implementation using WebGPU. Includes the meshlet LOD hierarchy, software rasterizer and billboard impostors. Culling on both per-instance and per-meshlet basis.
https://scthe.github.io/nanite-webgpu/?scene_file=jinxCombined&impostors_threshold=4000&softwarerasterizer_threshold=1360&nanite_errorthreshold=0.1
MIT License
667 stars 12 forks source link

Chrome throw error when creating pipeline state and gpu lost #7

Open deepkolos opened 1 week ago

deepkolos commented 1 week ago
image
Scthe commented 1 week ago

Yay, a WGSL compiler error! WGSL is a shading language used in WebGPU, an example would be here. Dawn, mentioned in the error message is a WebGPU implementation for Chrome. Part of it is a compiler from WGSL to Metal shading language to execute on Apple devices.

As this is a compiler error, I've created a thread on https://groups.google.com/g/dawn-graphics. Not sure if they have some rate limiting, first-time poster screening, or something, but I hope it will appear soon.

While I know it's an unsatisfactory answer, not much I can do. May I ask you to check if there is some more info in the Chrome dev tools console? What operating system and Chrome version are you using?

I also want to thank you for creating this issue. It will actually lead to fixing a compiler error! A lot of people would have just closed the tab. If I knew someone was going to post this on Hacker News, I would have added Sentry.

PS. This is not the first time I've seen a compiler error in Chrome WebGPU. The first was in WGSL->HLSL compiler. Something about superfluous braces. Wish I had kept the source code.

deepkolos commented 1 week ago

Chrome 128.0.6613.120 MacOS 13.6.8

image
Kangz commented 1 week ago

Thanks for the FYI on the mailing list. This seems like a Metal internal compiler error reported here.

The best channel to report errors is https://issues.chromium.org/ with the "WebGPU" component and the report from about:gpu is often necessary as issues are often GPU / OS / ... specific, especially for internal driver compiler errors. In this case knowing which pipeline causes the issue would also help. Our error messages should contain the pipeline label but we missed it in this case, so I'll file an issue to improve this.

Scthe commented 1 week ago

Here is a link to dawn-graphic group thread for this issue: https://groups.google.com/g/dawn-graphics/c/8uFnnhW5XmE. As mentioned in the thread, creating an issue in the Chromium project would require a report from about:gpu to be useful. And I would fully understand if Deepkolos was hesitant. This is all a volunteer work and they have already been disappointed with the app not working. I also see that submitting an issue requires a Google account, which for many people is a no-go.

deepkolos commented 1 week ago

about-gpu-2024-09-11T10-18-00-496Z.txt

Scthe commented 1 week ago

Thanks for the log, I've created https://issues.chromium.org/issues/365957553 which summarises all the info we have.