<https://ludicon.com/webspark/firefox-crash/ > fails to run properly
Categories
(Core :: Graphics: WebGPU, defect, P3)
Tracking
()
People
(Reporter: ErichDonGubler, Unassigned)
References
(Blocks 1 open bug, )
Details
| Reporter | ||
Comment 1•6 months ago
|
||
Symptoms on macOS: WebGPU reports an internal error with the message Texture view format Rgba8UnormSrgb is not storage bindable to the web console.
| Reporter | ||
Comment 2•6 months ago
|
||
Symptoms on Windows: panic on GPUCommandEncoder.finish like this one with the message GraphicsCommandList::close failed: The parameter is incorrect. (0x80070057).
Comment 3•6 months ago
|
||
The error under macOS is interesting. The code is not trying to write to a texture view with Rgba8UnormSrgb format, but to a texture that has that format as one of its viewFormats. Maybe a solution would be to specify the view format explicitly when creating the texture view? I'll play with that to see if that helps.
Regardless, this code is still in development and may not be correct, but Firefox should not crash!
Comment 4•6 months ago
|
||
Providing the non-srgb format explicitly in the call to createView does not seem to solve the problem.
What the application is trying to do is to use linear filtering when creating the mipmap chain. For this it creates a texture with:
format: "rgba8unorm",
viewFormats: ["rgba8unorm", "rgba8unorm-srgb"]
When sampling the texture it creates a view with the sRGB format, and when using it for storage it creates a view with the non-sRGB format. A workaround would be to use non-sRGB views in both cases and perform the sRGB to linear conversion in the shader manually, but it's faster and convenient to rely on the hardware sRGB conversion.
Comment 5•6 months ago
|
||
Fixing Bug 1825419 would probably have helped diagnose this.
Updated•6 months ago
|
Comment 7•4 months ago
|
||
I just wanted to check in to see if there's been any progress on this issue.
This bug can now be reproduced using the GLTF three.js example in the spark.js repository:
| Reporter | ||
Comment 8•2 months ago
|
||
I'm not able to reproduce this issue on Firefox Nightly as of 2025-10-29. Ignacio, are you able to reproduce, still?
| Reporter | ||
Comment 9•2 months ago
|
||
Ah, I'm able to reproduce this with Spark⚡ AVIF portions of the demo on first load, but not on subsequent navigations between them. I'm also not getting a crash anymore in Windows. 🤔
Comment 10•2 months ago
|
||
Yes, it appears that Firefox on windows does not crash anymore!
However, it doesn't yet produce the expected output, neither on windows, nor on macOS.
In the first example (that used to crash) the expected result is a stretched Netflix thumbnail. This example is scaling the input texture to a multiple of 4 and encoding the result to BC7/ASTC. The resizing kernel needs to write to an sRGB texture through a non-srgb texture view.
In the Spark GLTF demo the problem is the same. The albedo/diffuse texture is missing, because albedo is stored in sRGB color space and the mipmap generation kernel needs to write to an sRGB texture through a non-srgb texture view.
In this case, you can see the following messages in the console:
Uncaptured WebGPU error: Texture view format
Rgba8UnormSrgbis not storage bindable
Uncaptured WebGPU error: TextureView with '' label is invalid
Uncaptured WebGPU error: In a pass parameter, caused by: Encoder is invalid
There are various ways I could work around this issue (perform sRGB conversion manually in the shader, or use fragment shaders instead of compute). I'm intentionally leaving this as is for now in order to have a repro case and improve Firefox's WebGPU conformance (WebKit and Chromium handle this correctly already).
Description
•