Skip to content

Enable WebGPU in Firefox on the GPU desktop - #268

Draft
brkosebay wants to merge 1 commit into
OrchardLinux:mainfrom
brkosebay:submit/firefox-webgpu
Draft

brkosebay wants to merge 1 commit into
OrchardLinux:mainfrom
brkosebay:submit/firefox-webgpu

Conversation

@brkosebay

Copy link
Copy Markdown
Contributor

Draft, depends on OrchardLinux/mesa#48. Without that Mesa series, WebGPU on the A9 loses the device on the first frame. The two prefs were tested by hand in about:config on the iPad 5; this firefox.cfg change itself has not run on a device yet.

Firefox enables WebGPU only on drivers it knows, so navigator.gpu stayed missing on these boards, although their Vulkan drivers bring a WebGPU adapter and device up. On the GPU desktop, Firefox now defaults to dom.webgpu.enabled and gfx.webgpu.ignore-blocklist. The gate is WLR_RENDERER=gles2, which the login session sets only when the desktop draws on the GPU (its Vulkan driver beside it). Both are defaultPrefs, so the user can turn them off. The software desktop keeps Firefox's defaults.

Tested by hand on the iPad 5 (j71t, Firefox 161): with both prefs set, the adapter and device come up on the PowerVR Vulkan driver (texture-compression-etc2, texture-compression-astc, depth32float-stencil8, dual-source-blending, maxTextureDimension2D 8192). With mesa#48 the passes run instead of losing the device.

How to test

On a stock Orchard install with this omarchy-a and Mesa from OrchardLinux/mesa#48:

# about:config shows dom.webgpu.enabled and gfx.webgpu.ignore-blocklist = true (default, not user-set)
firefox https://webgpu.github.io/webgpu-samples/?sample=helloTriangle
firefox https://webgpureport.org/        # adapter and device listed

A/B: set either pref to false in about:config. Expected on the iPad 5: the samples draw. A10: enabled through the same gate, untested on our side. A12 (asahi/Honeykrisp): enabled too, untested.

Firefox enables WebGPU only on drivers it knows, so navigator.gpu stayed
missing on these boards although their Vulkan drivers bring a WebGPU
adapter and device up. On the GPU desktop (WLR_RENDERER=gles2, set by the
login session only when the desktop draws on the GPU) Firefox now defaults
to dom.webgpu.enabled and gfx.webgpu.ignore-blocklist. The user can still
turn either off; the software desktop keeps Firefox's defaults.

Assisted-by: LLM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant