Closed Bug 1766684 Opened 4 years ago Closed 4 years ago

Twitter animations flash green visual artifacts when looping with SWGL

Categories

(Core :: Graphics: WebRender, defect)

Unspecified
Windows
defect

Tracking

()

VERIFIED FIXED
102 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- fixed
firefox99 --- wontfix
firefox100 + wontfix
firefox101 + wontfix
firefox102 --- verified
firefox103 --- verified

People

(Reporter: cpeterson, Assigned: sotaro)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(3 files)

[Tracking Requested - why for this release]:

@ Jeff or Glenn, I suspect this regression in Firefox 100 was caused bug 1762125 to change the Intel GPU blocklist. I bisected this regression to this pushlog:

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=9286536a7dbe063e054bc786960c976463d691a7&tochange=ed124d06d67623a6227a41ecffd8533733755976

Twitter's "GIF" animations are actually videos, but this bug only happens with SWGL enabled (gfx.webrender.software = true), so I don't know if this is a video bug or a SWGL bug. It only happens with D3D11 SWGL (gfx.webrender.software.d3d11 = true), not full SWGL (gfx.webrender.software.d3d11 = false).

Steps to reproduce:

  1. In Firefox 100 or later, enable gfx.webrender.software and leave gfx.webrender.software.d3d11 = true.
  2. Load a Twitter "GIF" animation, such as:

https://twitter.com/claviska/status/1519085364069244932

Expected result

The animation should loop without flash green visual artifacts like Firefox 99 and Chrome.

Actual result

The animation flashes green visual artifacts when looping in Firefox 100 and 101. Unfortunately, I wasn't able to capture a screenshot.

Flags: needinfo?(jmuizelaar)
Flags: needinfo?(gwatson)
Attached file about-support.txt

Chris, can you try downgrading your driver to something with the last digits > 2849, see if it's still broken and try to get a regression range?

Flags: needinfo?(jmuizelaar) → needinfo?(cpeterson)

(In reply to Jeff Muizelaar [:jrmuizel] from comment #2)

Chris, can you try downgrading your driver to something with the last digits > 2849, see if it's still broken and try to get a regression range?

My current Intel driver version is 30.0.101.1405 according to both about:support and the Windows Device Manager. AFAICT, I don't have a driver version that would match the blocklist rule for versions 8.15.10.2849 or 9.17.10.2849. Or am I misunderstanding?

I wasn't able to roll back or install a new driver version. The Device Manager's "Roll Back Driver" button is disabled for my Intel driver. So I went looking for older drivers on https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html. I downloaded more recent versions (30.0.101.1631 and 30.0.101.1660), but the installers failed.

What do you recommend I do to help test?

Flags: needinfo?(jmuizelaar)
Flags: needinfo?(gwatson)
Flags: needinfo?(cpeterson)

Prior to bug 1762125 your driver would've been blocklisted because it's < 2849. Can you try installing 30.0.100.9955 from the Intel website? or if that doesn't work try a driver from: https://www.catalog.update.microsoft.com/Search.aspx?q=subsys_0a611028%20%2030.0.100.9864%20

Flags: needinfo?(jmuizelaar) → needinfo?(cpeterson)

(In reply to Jeff Muizelaar [:jrmuizel] from comment #4)

Prior to bug 1762125 your driver would've been blocklisted because it's < 2849. Can you try installing 30.0.100.9955 from the Intel website? or if that doesn't work try a driver from: https://www.catalog.update.microsoft.com/Search.aspx?q=subsys_0a611028%20%2030.0.100.9864%20

I couldn't find version 30.0.100.9955, so I downloaded and installed 30.0.100.9864 from that Microsoft website. I still able to reproduce the green flashes with 30.0.100.9864.

Correction: I now see 30.0.100.9955 on the Intel website. If you'd like me to test that version, just let me know.

Flags: needinfo?(cpeterson) → needinfo?(jmuizelaar)

9864 is great. Can you get a new regression window with that driver?

Flags: needinfo?(jmuizelaar) → needinfo?(cpeterson)

(In reply to Jeff Muizelaar [:jrmuizel] from comment #6)

9864 is great. Can you get a new regression window with that driver?

Using version 30.0.100.9955 (not 9864), I bisected the regression to this new Firefox 97 pushlog with your reuse-decoder-device fix for bug 1745976:

https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=266622315f357daae531747868b1766e765b18ad&tochange=a87211c8eedde447aec9e270172948f51b8b510e

In summary:

  • With driver version 30.0.100.9955 (the latest 30.0.100.* from Intel's website), I first see the green flashes after bug 1745976.
  • With driver versions 30.0.101.1405 (the version installed by Windows Update for Windows 11 Beta) and 30.0.101.1660 (the latest 30.0.101.* from Intel's website), I first see the green flashes after the driver blocklist changes in bug 1762125.
Component: Audio/Video: Playback → Graphics: WebRender
Flags: needinfo?(cpeterson) → needinfo?(jmuizelaar)
Regressed by: 1745976
Has Regression Range: --- → yes

Sotaro, can you reproduce this?

Flags: needinfo?(jmuizelaar) → needinfo?(sotaro.ikeda.g)

https://www.intel.com/content/www/us/en/download/19387/intel-graphics-beta-windows-dch-drivers.html

Does this happen on Intel 30.0.101.1934 BETA graphics driver? I think Intel is gonna release a 30.0.101.19xx production non beta driver soon.

https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html

If it does, then this should be reported to Mozilla's Intel contacts to get the Intel driver bug fixed.

(In reply to Jeff Muizelaar [:jrmuizel] from comment #8)

Sotaro, can you reproduce this?

I could not reproduce the problem on my 6 Win PCs.

Windows Update installed a new Windows 11 Beta version (10.0.22610 Build 22610) today and now I can no longer reproduce this bug, even using the same Intel driver version 30.0.101.1405 I used in comment 0. So maybe this was a Windows bug and not an Intel driver bug?

I'll close this bug as WORKSFORME.

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(sotaro.ikeda.g)
Resolution: --- → WORKSFORME

Reopening this bug because I can reproduce it again.

I don't know why I couldn't repro two days ago in comment 11. Maybe I had still had gfx.webrender.software temporarily disabled. To make sure I'm not seeing a new regression now, I retested those same builds and can now reproduce the bug.

I can repro with Intel driver version 30.0.101.1405 and 30.0.101.1660.

Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Summary: Some Twitter animations flash green visual artifacts when looping with SWGL → Twitter animations flash green visual artifacts when looping with SWGL

https://www.intel.com/content/www/us/en/download/19344/intel-graphics-windows-dch-drivers.html

Intel released new 30.0.101.1960 graphics driver, does it still happen?

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

For more information, please visit auto_nag documentation.

Flags: needinfo?(gwatson)
Severity: -- → S2
Flags: needinfo?(gwatson)
Blocks: 1722987
Blocks: video-perf

(In reply to Chris Peterson [:cpeterson] from comment #0)

  1. In Firefox 100 or later, enable gfx.webrender.software and leave gfx.webrender.software.d3d11 = true.
  2. Load a Twitter "GIF" animation, such as:

https://twitter.com/claviska/status/1519085364069244932

It seemed that gif animation was actually mp4 video.

I wonder if we need to wait video frame copy end in D3D11DXVA2Manager::CopyToImage().

I wonder if D146877 might work as a workaround.

::cpeterson, can you check if the following build could address the problem? And can you take Firefox profiler result when the problem happens?

Flags: needinfo?(cpeterson)

(In reply to Sotaro Ikeda [:sotaro] from comment #18)

I wonder if D146877 might work as a workaround.

::cpeterson, can you check if the following build could address the problem? And can you take Firefox profiler result when the problem happens?

Success! I can't reproduce the bug with your build.

Do you still need me to take a Firefox profile of the animation playing correctly in your build? Or of the bug happening in my regular Nightly build?

My current Intel driver version is 30.0.101.1340. I haven't tested the new 30.0.101.1960.

Flags: needinfo?(cpeterson)

(In reply to Chris Peterson [:cpeterson] from comment #19)

(In reply to Sotaro Ikeda [:sotaro] from comment #18)

I wonder if D146877 might work as a workaround.

::cpeterson, can you check if the following build could address the problem? And can you take Firefox profiler result when the problem happens?

Success! I can't reproduce the bug with your build.

Do you still need me to take a Firefox profile of the animation playing correctly in your build? Or of the bug happening in my regular Nightly build?

Great! Can you take a Firefox profile with regular Nightly build? I want to check which functions are called on Renderer thread when the problem happen on your PC.

Flags: needinfo?(cpeterson)

(In reply to Sotaro Ikeda [:sotaro] from comment #20)

Great! Can you take a Firefox profile with regular Nightly build? I want to check which functions are called on Renderer thread when the problem happen on your PC.

Here's a Firefox profile of the bug happening. I used the Firefox Profiler's "Graphics" setting.

https://share.firefox.dev/39Hgbji

Flags: needinfo?(cpeterson) → needinfo?(sotaro.ikeda.g)

Thank you. RenderDXGITextureHost::MapPlane() was called. Then RenderDXGITextureHost data was readbacked to cpu.

Then the readback seemed to happen before video frame copy complete.

For hardware decoded video, keyed mutex does not work. Then SyncObjectD3D11Client::Synchronize() was called in D3D11DXVA2Manager::CopyToImage(). But the Synchronize() is not called when compositor device is used for hardware decoding.


wr_renderer_lock_external_image()
->RenderTextureHostSWGL::LockSWGL()
->RenderTextureHostSWGL::UpdatePlanes()
->RenderDXGITextureHost::MapPlane()

Flags: needinfo?(sotaro.ikeda.g)

D146877 could be one workaround. It waits a video frame copy complete.

And calling the Synchronize() without using compositor device for video decoding might be another workaround. It seems less risky than D146877.

(In reply to Sotaro Ikeda [:sotaro] from comment #25)

:cpeterson, can you check if the following build of D147049 could address the problem?

I can't reproduce the bug with that build, so that fix seems to work.

Flags: needinfo?(cpeterson) → needinfo?(sotaro.ikeda.g)

Thank you for the confirmation! Then D147049 is better approach for now.

Flags: needinfo?(sotaro.ikeda.g)
Attachment #9277731 - Attachment description: WIP: Bug 1766684 - Use compositor device for hardware video decoding only with hardware WebRender → Bug 1766684 - Use compositor device for hardware video decoding only with hardware WebRender
Assignee: nobody → sotaro.ikeda.g
Pushed by sikeda.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1b1a27a14740 Use compositor device for hardware video decoding only with hardware WebRender r=jrmuizel,gfx-reviewers
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
Flags: qe-verify+

I couldn't reproduce this issue on Firefox 100/101 on Win10/11 x64. Would you be so kind as to verify the fix on beta and/or nightly?
Thank you.

Flags: needinfo?(sotaro.ikeda.g)

No problem, I am going to check it.

On my PCs, the problem did not happen:(

:cpeterson, can you check if the problem is addressed on beta and/or nightly?

Flags: needinfo?(sotaro.ikeda.g) → needinfo?(cpeterson)

Verified fixed in Beta 102 and Nightly 103.

Flags: needinfo?(cpeterson)
See Also: → 1773714
See Also: → 1774018

Marked as verified based on Comment 33. Removing qa-verify flag.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: