Error messages when WebGPU is not available should be clearer
Categories
(Core :: Graphics: WebGPU, enhancement, P2)
Tracking
()
People
(Reporter: jimb, Unassigned)
References
(Blocks 1 open bug)
Details
I've seen some confusion in public discussion about when/whether WebGPU is enabled in Firefox. We should do better in release and beta builds at explaining exactly how people can try out WebGPU.
The audience for this clarification would be developers, not users, so we aren't talking about alerts, just console messages.
If an application tries to use navigator.gpu
right now in release or beta, they get undefined
, so the error in the console is:
Uncaught TypeError: navigator.gpu is undefined
If they flip the dom.webgpu.enabled
pref to true in release or beta, they get:
Uncaught (in promise) DOMException: WebGPU is not yet available in Release or Beta builds.
Both of these could be improved. The message should convey:
- WebGPU is only available in Firefox Nightly, where it is enabled by default.
- WebGPU is not available in Firefox Beta or official releases, and cannot be enabled through about:config.
Reporter | ||
Comment 1•2 years ago
|
||
To improve the undefined
case, we should probably make the GPU
interface available in all builds, and harden requestAdapter
.
Looking at the patch for bug 1746245, in addition to the WebGPU code itself, this will require changes to:
dom/tests/mochitest/general/test_interfaces.js
dom/webgpu/mochitest/test_disabled.html
Reporter | ||
Updated•11 months ago
|
Description
•