Closed Bug 1654957 Opened 4 years ago Closed 4 years ago

Out-of-process WebGL doesn't work on Linux if the GPU process is enabled

Categories

(Core :: Graphics: CanvasWebGL, defect)

Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: jld, Assigned: jld)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

If out-of-process WebGL and the GPU process are both enabled, several things break:

  • The GfxInfo component isn't enabled.
  • The screen manager component isn't enabled.
  • The GfxInfo component needs to be pre-initialized on the main thread, because initialization is main-thread-only and remote WebGL uses it on the compositor thread
  • Nothing launches the glxtest process, so initialization fails.

I have a patch for this, but it probably needs some help; the last two items are wedged into GPUParent::RecvInit (which is where GfxInfo is preloaded on Windows) and I don't know if that's right, especially for glxtest.

I now have two patches for this: one of them is simple, but the GPU process has to re-do the whole thing with forking a process to call glxtest; the other one is more complex and uses GfxInfoBase::SetFeatureStatus to give the GPU process the info that the parent process already computed. Which version should I send for review?

Flags: needinfo?(jgilbert)
OS: Unspecified → Linux
Hardware: Unspecified → Desktop
Summary: Out-of-process WebGL doesn't work if the GPU process is enabled → Out-of-process WebGL doesn't work on Linux if the GPU process is enabled

On second thought I think I'm just going to send the fancier patch; it's not that complicated, and it avoids the possibility of a startup performance regression from the second glxtest invocation.

Flags: needinfo?(jgilbert)

Out-of-process WebGL needs GfxInfo to exist in the composition
process (which is the GPU process if it exists and the parent process
otherwise). This patch enables the Linux version of that component in
the GPU process; the IPC currently used to give content processes copies
of the parent's GPU info is extended to also send it to the GPU process.

Pushed by jedavis@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/49a529a1cc20 Prelude: move GfxInfoFeatureStatus from dom to gfx. r=jgilbert https://hg.mozilla.org/integration/autoland/rev/14761127f6bb Enable the GfxInfo component in the GPU process on Linux. r=jgilbert

GfxInfo registers a shutdown observer to free the data, but only if the GfxInfo component was ever instantiated, and for the Windows GPU process that's only if WebRender is enabled (which, conveniently, it's not in my Windows VM with no “hardware” graphics acceleration, so I could reproduce this locally).

I have a patch that seems to work….

Flags: needinfo?(jld)

The severity field is not set for this bug.
:jgilbert, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jgilbert)
Pushed by jedavis@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4c642b2c5e88 Prelude: move GfxInfoFeatureStatus from dom to gfx. r=jgilbert https://hg.mozilla.org/integration/autoland/rev/488c511a3875 Don't leak GfxInfoBase::sFeatureStatus even if GfxInfo is never created. r=jgilbert https://hg.mozilla.org/integration/autoland/rev/684350205020 Enable the GfxInfo component in the GPU process on Linux. r=jgilbert
Flags: needinfo?(jgilbert)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: