Support WebGL extension KHR_parallel_shader_compile
Categories
(Core :: Graphics: CanvasWebGL, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox95 | --- | affected |
People
(Reporter: rverschelde, Assigned: bradwerth, NeedInfo)
References
(Blocks 3 open bugs)
Details
(4 keywords, Whiteboard: [platform-feature])
User Story
web-feature: khr-parallel-shader-compile user-impact-score:90
Attachments
(1 file, 2 obsolete files)
According to MDN, the KHR_parallel_shader_compile WebGL 1.0 extension should be supported in Firefox 80+ on desktop.
Yet websites such as WebGL Caps Viewer don't list it, and my application Godot Engine is unable to use it to compile shaders in parallel. It is however reported as supported and working fine with latest Chrome and Chromium.
I tested both on Windows and Linux, with both Intel and AMD drivers (Linux system details listed below), and neither combination seems to expose KHR_parallel_shader_compile in Firefox. I've had multiple users confirm the same issue on both Windows and Linux (though I don't know with which GPU drivers, if that's relevant to the availability of the extension).
I tried enabling webgl.enable-draft-extensions and webgl.enable-privileged-extensions but that doesn't change the result.
The feature implementation was tracked in https://bugzilla.mozilla.org/show_bug.cgi?id=1536674, but it seems the resolution was a patch that added the extension to the enum, but no actual code to implement it? https://phabricator.services.mozilla.com/D32056
So is MDN incorrect and the extension is actually not supported in Firefox currently?
I tested on current Nightly (95) and release (93). I tried FF 80 but it seems broken on my Linux system, but I had one teammate test and confirm that the extension is also not present there.
$ inxi -CSG
System: Host: cauldron Kernel: 5.14.12-desktop-2.mga9 x86_64 bits: 64 Desktop: KDE Plasma 5.22.3 Distro: Mageia 9 mga9
CPU: Info: Quad Core model: Intel Core i7-8705G bits: 64 type: MT MCP cache: L2: 8 MiB
Speed: 3066 MHz min/max: 800/3100 MHz Core speeds (MHz): 1: 3066 2: 3100 3: 3100 4: 3091 5: 3098 6: 2955 7: 3029
8: 3025
Graphics: Device-1: Intel HD Graphics 630 driver: i915 v: kernel
Device-2: Advanced Micro Devices [AMD/ATI] Polaris 22 XL [Radeon RX Vega M GL] driver: amdgpu v: kernel
Device-3: Cheng Uei Precision Industry (Foxlink) HP Wide Vision FHD Camera type: USB driver: uvcvideo
Display: x11 server: Mageia X.org 1.21.0.99 driver: loaded: intel,v4l resolution: 1920x1080~100Hz
OpenGL: renderer: Mesa Intel HD Graphics 630 (KBL GT2) v: 4.6 Mesa 21.2.4
| Reporter | ||
Comment 1•4 years ago
|
||
(In reply to Rémi Verschelde from comment #0)
The feature implementation was tracked in https://bugzilla.mozilla.org/show_bug.cgi?id=1536674, but it seems the resolution was a patch that added the extension to the enum, but no actual code to implement it? https://phabricator.services.mozilla.com/D32056
Sorry about that, I had reviewed the bug a bit too quickly, there are links to various intermediate patches which implement the feature.
| Reporter | ||
Comment 2•4 years ago
|
||
So on second review, it seems to me that https://bugzilla.mozilla.org/show_bug.cgi?id=1536674 was wrongly closed as fixed by https://hg.mozilla.org/mozilla-central/rev/c534308b0e49 in https://bugzilla.mozilla.org/show_bug.cgi?id=1536674#c5
The actual implementation of the draft extension seems to be https://phabricator.services.mozilla.com/D83315#change-9IYWqbnfEgqP linked in https://bugzilla.mozilla.org/show_bug.cgi?id=1536674#c6, which has yet to be merged in trunk.
So MDN should be updated to remove the reference that FF supports the extension since version 80, likewise with https://caniuse.com/mdn-api_khr_parallel_shader_compile and other similar references.
And https://bugzilla.mozilla.org/show_bug.cgi?id=1536674 should probably be reopened.
Hi Rémi,
Thanks for your report and for providing information about it.
I'll be setting up a component so the Core WebGL team can take a look and advice.
Regards,
Virginia
I'm happy to update MDN with the relevant information. Do we have an indication of when this will be merged in trunk? The version associated with this bug is 95 - should I go with that? Thanks
Comment 5•4 years ago
|
||
The severity field is not set for this bug.
:jgilbert, could you have a look please?
For more information, please visit auto_nag documentation.
Comment 6•4 years ago
|
||
Seems like I can't reopen bug 1536674, so I'll rename it I guess?
Updated•4 years ago
|
Comment 7•4 years ago
|
||
Can you please confirm the only change from this is that the Firefox compatibility with version 80 needs to be set as false? This is done in https://github.com/mdn/browser-compat-data/pull/13291
Comment 9•4 years ago
|
||
The bug has a release status flag that shows some version of Firefox is affected, thus it will be considered confirmed.
Updated•2 years ago
|
Comment 10•10 months ago
|
||
I guess we can use this as the tracking bug for whatever's needed to land and ship the support.
Updated•10 months ago
|
Comment 11•9 months ago
|
||
It would really be great to have KHR_parallel_shader_compile supported in Firefox. In my application, Mol*, we would be able to avoid blocking user input for multiple seconds. The extension works great in other Browsers.
| Assignee | ||
Comment 13•8 months ago
|
||
I'll see if I can do this by reviving the patches in Bug 1536674.
Comment 15•7 months ago
|
||
Google is updating how we render maps on the web to support future improvements, and we've launched our new renderer on Chrome. Supporting this extension would go a long way towards allowing us to bring the new renderer to Firefox.
Updated•5 months ago
|
Updated•5 months ago
|
Comment 16•3 months ago
|
||
| Assignee | ||
Comment 17•3 months ago
|
||
Jeff M developing the patch.
| Assignee | ||
Comment 18•2 months ago
|
||
Jeff, is this ready to land?
| Assignee | ||
Updated•2 months ago
|
Comment 19•2 months ago
|
||
(In reply to Brad Werth [:bradwerth] from comment #18)
Jeff, is this ready to land?
Probably not. I only rebased the patch. I haven't tested it.
Comment 20•1 month ago
|
||
Carries forward the rebased patch in D289914 by Jeff Muizelaar.
Delta from that revision:
- Replace incorrect Run<RPROC(...)> sync-IPC calls with the Send...
pattern + new sync IPDL messages (CompileCompleted, LinkCompleted)
and matching Recv handlers in WebGLParent. - Register the new sync messages in ipc/ipdl/sync-messages.ini.
- Return true for COMPLETION_STATUS_KHR queries on a lost context,
per the KHR_parallel_shader_compile spec. - Add the spec link in WebGLRenderingContext.webidl per smaug's review.
| Assignee | ||
Comment 21•1 month ago
|
||
Updated•1 month ago
|
| Assignee | ||
Comment 22•1 month ago
|
||
I'll take this Bug as I try to finish up the patches.
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 23•1 month ago
|
||
(In reply to Brad Werth [:bradwerth] from comment #21)
We'll use https://registry.khronos.org/webgl/sdk/tests/conformance/extensions/khr-parallel-shader-compile.html?webglVersion=2&quiet=0&quick=1 as a test.
This conformance test shows 2 failures:
FAIL Querying shader status should not wait for compilation. Took 485 ms
FAIL Program should have taken many more than 6 frames to compile. Actual value: 2 frames, duration 730 ms.
The call to gl.getShaderParameter needs to complete in less than 100ms to pass this test. I'll figure out where the slowdown is.
| Assignee | ||
Comment 24•1 month ago
|
||
This is a profile of a DEBUG BUILD reloading the khronos test page. Might be useful figuring out which GL calls are contributing to the failed test.
Comment 25•1 month ago
|
||
That profile doesn't have URLs which makes it harder to figure out what's going on
Comment 26•1 month ago
|
||
I'd also suggest getting a profile with flows feature turned on.
| Assignee | ||
Comment 27•1 month ago
|
||
This debug build profile of the Kronos test page has "flow" markers turned on.
Comment 28•1 month ago
|
||
Yeah, that profile clearly shows us getting stuck in the content process on sync ipc:
https://share.firefox.dev/4fKle2t
Updated•1 month ago
|
| Assignee | ||
Comment 29•1 month ago
|
||
This patch adds the necessary pieces for KHR_parallel_shader_compile
when that extension is not actually available from the GL context.
If this approach is acceptable, the shim should be gated by a pref.
Updated•1 month ago
|
Updated•1 month ago
|
Updated•13 days ago
|
Comment 30•6 days ago
|
||
Patches have landed for bug 1908744, with an update to ANGLE that's been waiting for years. I believe dependencies for this are unblocked now. Is that right, :bwerth?
Description
•