Closed Bug 1733094 Opened 3 years ago Closed 3 years ago

Assume UseWebRender for FindVisual

Categories

(Core :: Graphics, task)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: rmader, Assigned: rmader)

References

Details

Attachments

(1 file)

There are a bunch of special-cased Webrender checks in many places. We should be able to remove them now.

gfxVars::UseWebRender() now always returns true thus stop passing
it around as argument.

At the same time, WR does not require a depth buffer any more, thus
stop requesting it when choosing a matching XVisual.

While on it, also stop requesting an alpha channel were it shouldn't
be needed. This point will require some regression testing, making
this patch 95 material.

Assignee: nobody → robert.mader
Status: NEW → ASSIGNED

} else {
// We add alpha silently to workaround a NVIDIA specific Bug 1663273.
haveVisual = GLContextEGL::FindVisual(/* aUseAlpha */ true, &visualId);

No, bug 1663273/bug 1683341 was a GLX bug.

(In reply to Darkspirit from comment #2)

} else {
// We add alpha silently to workaround a NVIDIA specific Bug 1663273.
haveVisual = GLContextEGL::FindVisual(/* aUseAlpha */ true, &visualId);

No, bug 1663273/bug 1683341 was a GLX bug.

Ah, right - that would mean we hopefully only need in for GLX on nvidia/non-mesa.

Jan, I hope I don't annoy you, but this would be another one were a smoke test on nvidia would be great :)

Flags: needinfo?(jan)

My awkward regression hypochondria in bug 1732365 was enough, here is the table:

Nvidia GTX 1060, 470.63.01 WR EGL SWWR EGL WR GLX SWWR GLX
Gnome X11 bug 1731125 ok ok ok
Gnome X11 with GTK_CSD=1 fallback to SW WR (bug 1677314 comment 2) ok ok ok
KDE X11 without compositing ok ok ok ok
KDE X11 with compositing bug 1731125 ok ok ok

Tested:

  • window corners, pocket extension shadow, main menu shadow
  • tab dragging
  • about:support: WebRender, WebGL, no failures
  • WebGL
  • maximize, unmaximize
  • F11 fullscreen enter, leave

Not tested

  • multiple workspaces, as it seems irrelevant for this patch

mozregression --repo try --launch 9ed8c97234293d2bb963472a9cf3b3d596a1db4c -a about:support -a https://webglsamples.org/aquarium/aquarium.html
mozregression --repo try --launch 9ed8c97234293d2bb963472a9cf3b3d596a1db4c --pref gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html
mozregression --repo try --launch 9ed8c97234293d2bb963472a9cf3b3d596a1db4c --pref gfx.x11-egl.force-disabled:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html
mozregression --repo try --launch 9ed8c97234293d2bb963472a9cf3b3d596a1db4c --pref gfx.x11-egl.force-disabled:true gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html
GTK_CSD=1 mozregression --repo try --launch 9ed8c97234293d2bb963472a9cf3b3d596a1db4c -a about:support -a https://webglsamples.org/aquarium/aquarium.html
GTK_CSD=1 mozregression --repo try --launch 9ed8c97234293d2bb963472a9cf3b3d596a1db4c --pref gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html
GTK_CSD=1 mozregression --repo try --launch 9ed8c97234293d2bb963472a9cf3b3d596a1db4c --pref gfx.x11-egl.force-disabled:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html
GTK_CSD=1 mozregression --repo try --launch 9ed8c97234293d2bb963472a9cf3b3d596a1db4c --pref gfx.x11-egl.force-disabled:true gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html

Flags: needinfo?(jan)

(In reply to Robert Mader [:rmader] from comment #5)
I was already testing this before you asked. ^^

(In reply to Darkspirit from comment #7)

I was already testing this before you asked. ^^

Nice, thanks :)

Concerning bug 1731125, I forgot to pull for the try build. Here's one which should have it fixed: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f67da6192fd3a5e463f45935e828a6718f4636bb

(In reply to Robert Mader [:rmader] from comment #8)

Concerning bug 1731125, I forgot to pull for the try build. Here's one which should have it fixed: https://treeherder.mozilla.org/#/jobs?repo=try&revision=f67da6192fd3a5e463f45935e828a6718f4636bb

Now I tested too intense and had to file bug 1733283 for a general problem and also ran into bug 1553522.

Nvidia GTX 1060, 470.63.01 WR EGL SWWR EGL WR GLX SWWR GLX
Gnome X11 ok (Nvidia-only:non-transparent window corners at the top, bug 1731125/bug 1702546) ok ok (bug 1716049) ok
Gnome X11 with GTK_CSD=1 "ok" (Nvidia-only: fallback to SW WR, bug 1677314 comment 2) ok ok (bug 1716049) ok
KDE X11 without compositing ok ok ok (bug 1716049) ok
KDE X11 with compositing ok ok ok (bug 1716049) ok

Edit: Non-default Firefox themes can also cause non-round/non-transparent window corners on Gnome Xwayland/Intel.

Tested:

  • window corners, pocket extension shadow, main menu shadow
  • tab dragging
  • about:support: WebRender, WebGL, no failures
  • WebGL
  • maximize, unmaximize
  • F11 fullscreen enter, leave
  • two windows

Not tested

  • multiple workspaces, as it seems irrelevant for this patch

mozregression --repo try --launch f67da6192fd3a5e463f45935e828a6718f4636bb -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com
mozregression --repo try --launch f67da6192fd3a5e463f45935e828a6718f4636bb --pref gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com
mozregression --repo try --launch f67da6192fd3a5e463f45935e828a6718f4636bb --pref gfx.x11-egl.force-disabled:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com
mozregression --repo try --launch f67da6192fd3a5e463f45935e828a6718f4636bb --pref gfx.x11-egl.force-disabled:true gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com
GTK_CSD=1 mozregression --repo try --launch f67da6192fd3a5e463f45935e828a6718f4636bb -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com
GTK_CSD=1 mozregression --repo try --launch f67da6192fd3a5e463f45935e828a6718f4636bb --pref gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com
GTK_CSD=1 mozregression --repo try --launch f67da6192fd3a5e463f45935e828a6718f4636bb --pref gfx.x11-egl.force-disabled:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com
GTK_CSD=1 mozregression --repo try --launch f67da6192fd3a5e463f45935e828a6718f4636bb --pref gfx.x11-egl.force-disabled:true gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com

Nvidia-only: non-transparent window corners at the top

Do I understand correctly that 1) this happens for the main window 2) this is the only regression you spotted with this patch?

(In reply to Robert Mader [:rmader] from comment #10)

Nvidia-only: non-transparent window corners at the top

Do I understand correctly that 1) this happens for the main window

Yes. Also reproducible with mozregression --launch 2021-09-29. Enforcing SW WR for popups was an incomplete workaround.

Non-default Firefox themes can also cause non-round/non-transparent window corners on Mesa and Nvidia - doesn't seem to be a graphics bug there.

  1. this is the only regression you spotted with this patch?

No regressions were caused by this patch (yet). I'll test bug 1732443 in 9 hours.

We should not forget that bug 1663273 was fixed by adding alpha, but its equally behaving sister bug 1683341 was fixed by removal of depth (bug 1696905/bug 1711490)
I would also test a try build with || !isMesa removed, if you want. You have already removed useWebRender from "We try to use a fallback alpha visual" and it did not seem to have an impact.

Right, let's hope we don't need that alpha any more. Here you go: https://treeherder.mozilla.org/jobs?repo=try&revision=6dccefc8b0b0bc056d01d0f42e10b690a48d15fe

(In reply to Robert Mader [:rmader] from comment #13)

Right, let's hope we don't need that alpha any more. Here you go: https://treeherder.mozilla.org/jobs?repo=try&revision=6dccefc8b0b0bc056d01d0f42e10b690a48d15fe

Yes, that seems to be good, no regressions found (so far ;) ). You can push this.

Removed all oks from previous table and reconfirmed known bugs:

general problem: often bug 1733283

Nvidia GTX 1060, 470.63.01 WR EGL SWWR EGL WR GLX SWWR GLX
Gnome X11 ok (non-transparent window corners at the top: bug 1731125/bug 1702546) ok ok (bug 1716049) ok
Gnome X11 with GTK_CSD=1 "ok" (fallback to SW WR: bug 1677314 comment 2) ok ok (bug 1716049) ok
KDE X11 without compositing ok (bug 1723323) ok ok (bug 1723323, bug 1716049) ok
KDE X11 with compositing ok (vsynctester = 2x 53fps) ok ok (bug 1716049 = 2x 30fps; "Unexpected BufferProvider over-production" - seems to be related to bug 1553522) ok
i3 ok ok ok (bug 1716049) ok

with gpu process:

Nvidia GTX 1060, 470.63.01 WR EGL SWWR EGL WR GLX SWWR GLX
Gnome X11 ok (non-transparent window corners at the top: bug 1731125/bug 1702546) ok (intermittent bug 1730991 comment 6) ok (bug 1716049) ok (gpu process crash "Unexpected BufferProvider over-production." when I dragged the vsynctester tab from the second window back to the first - seems to be related to bug 1553522)
Gnome X11 with GTK_CSD=1 "ok" (fallback to SW WR: bug 1677314 comment 2, bug 1730991 comment 6 intermittent) ok ok (bug 1716049; "Unexpected BufferProvider over-production." when I dragged the vsynctester tab from the second window back to the first, "Managed to allocate after flush." on second try == bug 1553522) ok
KDE X11 without compositing ok (bug 1723323; bug 1730991 comment 6) ok (bug 1730991 comment 6) ok (bug 1723323; bug 1716049; bug 1730991 comment 6) ok (bug 1730991 comment 6 - even on shutdown once)
KDE X11 with compositing ok (vsynctester=2x 40-60fps) ok ok (bug 1716049 = 2x 30 fps) ok
i3 ok (bug 1730991 comment 6; last hovered main menu entry gets highlighted instead of current) ok (bug 1730991 comment 6) ok (bug 1716049; bug 1730991 comment 6 - even on shutdown; last hovered main menu entry gets highlighted instead of current) ok (bug 1730991 comment 6)
i3 with Nightly 2021-09-29 same same same same

Tested:

  • window corners, pocket extension shadow, main menu shadow
  • tab dragging
  • about:support: WebRender, WebGL, no failures
  • WebGL
  • maximize, unmaximize
  • F11 fullscreen enter, leave
  • two windows

Not tested

  • multiple workspaces, as it seems irrelevant for this patch

mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref gfx.x11-egl.force-disabled:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref gfx.x11-egl.force-disabled:true gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
GTK_CSD=1 mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
GTK_CSD=1 mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
GTK_CSD=1 mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref gfx.x11-egl.force-disabled:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
GTK_CSD=1 mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref gfx.x11-egl.force-disabled:true gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout

mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref layers.gpu-process.force-enabled:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref layers.gpu-process.force-enabled:true gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref layers.gpu-process.force-enabled:true gfx.x11-egl.force-disabled:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref layers.gpu-process.force-enabled:true gfx.x11-egl.force-disabled:true gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
GTK_CSD=1 mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref layers.gpu-process.force-enabled:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
GTK_CSD=1 mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref layers.gpu-process.force-enabled:true gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
GTK_CSD=1 mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref layers.gpu-process.force-enabled:true gfx.x11-egl.force-disabled:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
GTK_CSD=1 mozregression --repo try --launch 6dccefc8b0b0bc056d01d0f42e10b690a48d15fe --pref layers.gpu-process.force-enabled:true gfx.x11-egl.force-disabled:true gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout

mozregression --launch 2021-09-29 --pref layers.gpu-process.force-enabled:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
mozregression --launch 2021-09-29 --pref layers.gpu-process.force-enabled:true gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
mozregression --launch 2021-09-29 --pref layers.gpu-process.force-enabled:true gfx.x11-egl.force-disabled:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout
mozregression --launch 2021-09-29 --pref layers.gpu-process.force-enabled:true gfx.x11-egl.force-disabled:true gfx.webrender.software:true -a about:support -a https://webglsamples.org/aquarium/aquarium.html -a https://vsynctester.com -P stdout

Nice - these tables are really really helpful. It's still correct though that none of the bugs are regressions here, right?

In any case, this has to wait till next week / 95.

That SHAPE error from bug 1730991 comment 6 seems to occur more than thought. Most often when closing pocket, sometimes with the main menu and rarely on shutdown. Yes, even with 2021-09-29. If Gtk code can tell the tab bar when to style differently, couldn't it also tell when border-radius and shadows are forbidden, so that xShape usage gets reduced? (=less complexity)

Hopefully bug 1730533 can kill some of the SHAPE errors. Will test that tomorrow.

so that xShape usage gets reduced

IMO we should avoid XShape whenever possible - i.e. in composited environments, where we can use alpha instead. It's slow[1], increases complexity and really really legacy.

The main issue that stops us from going forward with it is, AFAICS, what you called "non-transparent window corners at the top". What's so weird about it is that it should already work on nvidia. Bug bug 1702546 is (by now) about making it work on mesa as well. So that's something we should look into, as bug 1731125 was not a real fix.

1: https://bugs.chromium.org/p/chromium/issues/detail?id=1198080

Pushed by robert.mader@posteo.de:
https://hg.mozilla.org/integration/autoland/rev/94ec92a5e99f
Assume UseWebRender for FindVisual, r=stransky,emilio

Backed out for causing mochitest failures on test_drawWindow_widget_layers.html.

Flags: needinfo?(robert.mader)

Thanks, will update.

Flags: needinfo?(robert.mader)
Summary: Assume gfxVars::UseWebRender() == true in more places → Assume UseWebRender for FindVisual
Pushed by robert.mader@posteo.de:
https://hg.mozilla.org/integration/autoland/rev/0373877fbe64
Assume UseWebRender for FindVisual, r=stransky,emilio
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: