Closed Bug 1814745 Opened 1 year ago Closed 1 year ago

`dom.webgpu.enabled` requires a browser restart after changes to work properly

Categories

(Core :: Graphics: WebGPU, defect, P1)

defect

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox111 --- wontfix
firefox112 --- fixed

People

(Reporter: ErichDonGubler, Assigned: jgilbert, Mentored)

References

Details

Attachments

(4 files)

When attempting to use the WebGPU API (entry point navigator.gpu.requestAdapter, to be precise), a fresh Firefox instance with the dom.webgpu.enabled pref. set to true behaves as expected (see attached expected-webgpu-enabled-from-start.png). That is, calls to navigator.gpu.requestAdapter().await in a JS console returns expected results. Attempting to use requestAdapter while the pref. is disabled from start also yields expected behavior (see attached expected-webgpu-disabled-from-start.png).

Now, the problem: when changing dom.webgpu.enabled to true after it was false on start-up doesn't work! A restart of Firefox can work around this issue, but we should fully support dynamically enabling or disabling WebGPU via the dom.webgpu.enabled pref.

Steps to reproduce:

  1. Run a fresh session of Firefox Nightly with the dom.webgpu.enabled pref. set to false from start.
  2. Open about:config and set dom.webgpu.enabled to true.
  3. Open a JS console (i.e., via F12), and evaluate the expression navigator.gpu. Observe that we get a GPU object back, implying that the WebGPU API is available for usage.
  4. Using the console again, evaluate the expression navigator.gpu.requestAdapter(). Observe that we get a Promise rejection with the message WebGPU is not enabled!, which is unexpected. See also the attached actual.png.
Attached image actual.png
Assignee: nobody → egubler
Status: NEW → ASSIGNED
Mentor: jimb, jgilbert
Assignee: egubler → jgilbert
Severity: -- → S3
Priority: -- → P1

about:support's feature table still shows blocklisting, just not whether
the pref is set.
If different from default, dom.webgpu.enabled still shows up in about:support under
"Important Modified Prefs" like normal.

Also renames "gfx.webgpu.force-enabled" to "gfx.webgpu.ignore-blocklist"
to reflect its functionality.

Pushed by jgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/73aef8594e9d
Don't require a browser restart to update dom.webgpu.enabled. r=jimb
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
Regressions: 1817271
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: