Closed Bug 1549674 Opened 1 year ago Closed 1 year ago

DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL usage on D3D compositor makes HWND unreusable

Categories

(Core :: Graphics: Layers, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla68
Tracking Status
firefox67 --- unaffected
firefox68 --- verified
firefox69 --- verified

People

(Reporter: sotaro, Assigned: bas.schouten)

References

(Regressed 2 open bugs, Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Bug 1547775 enables DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL usage, it makes makes HWND unreusable.

STR
[1] Start Firefox by disabling WebRender.
[2] Open about:support
[3] Push "Terminate GPU Process" button or "Trigger Device Reset" button several times.

Expected result: Compositor fallback to BasicCompositor and rendering update works as expected.

Actual results: Firefox does not update rendering anymore until restarting Firefox.

On WebRender case, CompositorWindow and DirectComposition are used to avoid the problem.

Blocks: 1547775
Priority: -- → P1

:jbonisteel, how do we handle this bug? m-c is already in soft freeze.

Flags: needinfo?(jbonisteel)

I think we should probably back out bug 1547775 until we have a solution to this problem.

Flags: needinfo?(bas)
No longer blocks: 1547775
Regressed by: 1547775
Flags: needinfo?(jbonisteel)

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

I think we should probably back out bug 1547775 until we have a solution to this problem.

Maybe we should just use DComp to composite D3D11 layers, I feel that wouldn't be particularly hard, it would probably help us in other ways. I'm a little confused as to why this would happen. So I'll look for a workaround for current painting as well :).

Flags: needinfo?(bas)
Assignee: nobody → bas
Status: NEW → ASSIGNED

This fix should be simple enough to go to central in soft-freeze, since we already use WebRender using the CompositorWindow. I will follow-up with a bug & patch that implements DirectComposite for the next train. I have it running locally and just need to clean it up.

Attachment #9063913 - Attachment description: Bug 1549674: Use the CompositorWindow to draw to when using DoubleBuffering. r=jrmuizel → Bug 1549674: Use the CompositorWindow to draw to when using DoubleBuffering. r=sotaro
Summary: DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL usage on D3D compositro makes HWND unreusable → DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL usage on D3D compositor makes HWND unreusable

Note that I expect Tresize to regress a little with this patch. It is also a little worse on WebRender confirmed to central as far as I can tell, I believe that to basically be the additional window resizing.

Pushed by bschouten@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e96752781d2d
Use the CompositorWindow to draw to when using DoubleBuffering. r=sotaro
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68

I also believe this will regress Twinopen a little to a point closer to webrender, still better, but worse than it is now. This is unavoidable, but I believe still well off-set by the benefits of bug 1547775, and since we've already decided to accept these numbers for WebRender I believe this should be fine.

Regressions: 1554438
Regressions: 1554610
Flags: qe-verify+

Hi guys, I tried to verify this bug using these steps:
STR
[1] Start Firefox by disabling WebRender.
[2] Open about:support
[3] Push "Terminate GPU Process" button or "Trigger Device Reset" button several times.

Expected result: Compositor fallback to BasicCompositor and rendering update works as expected.

But on Beta 68.0b13 (64-bit) I do not have the 2 buttons mentioned in steps 3, is there a preference in about config for it ?
also can someone explain a bit the expected results ? should we see > Composition - Basic ? after terminating the GPU process ? or where can we check the expected results ?

Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(bas)

(In reply to Rares Doghi from comment #11)

Hi guys, I tried to verify this bug using these steps:
STR
[1] Start Firefox by disabling WebRender.
[2] Open about:support
[3] Push "Terminate GPU Process" button or "Trigger Device Reset" button several times.

Expected result: Compositor fallback to BasicCompositor and rendering update works as expected.

But on Beta 68.0b13 (64-bit) I do not have the 2 buttons mentioned in steps 3, is there a preference in about config for it ?

There is no config for it. It is defined by type of build
https://searchfox.org/mozilla-central/source/toolkit/content/aboutSupport.js#367

"Terminate GPU Process" could be done like the following.
[1] Check gpu process id from Graphic section of "about:support".
[2] Kill gpu process from Windows Task Manager.
[3] Re-load "about:support" and check new gpu process id.

also can someone explain a bit the expected results ? should we see > Composition - Basic ? after terminating the GPU process ? or where can we check the expected results ?

Yes, we should see "Composition - Basic" and "GPU_PROCESS 'failed by runtime' " in "about:support". We need to reload "about:support" after killing gpu process.

Flags: needinfo?(sotaro.ikeda.g)
Flags: needinfo?(bas)

Hi, this issue is Verified as fixed using the steps from Comment 12 (Thank you Sotaro), after ending 2 processes from task manager for Firefox Beta 68.0, about:Support would show Basic composition instead of Webrender as for Nightly I had to click Terminate GPU 4 times before it actually changed to Basic.

@Sotaro is this intended, do we have to click Terminate GPU multiple times for the Basic composition to show in about:support ?

If it's normal behavior then this issue is Verified as fixed in Nightly 69 and Beta 68 and we can mark it accordingly.

Flags: needinfo?(sotaro.ikeda.g)

https://searchfox.org/mozilla-central/rev/f711552789d6308796e34170ddaabead044adc1e/modules/libpref/init/all.js#4737-4739
With Stable and Beta you kill 2 GPU processes before Basic (initial process and the retry), with Nightly 4 GPU processes (the initial one and 3 retries).

Great, Thank you Jan. I will mark this issue accordingly.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Flags: needinfo?(sotaro.ikeda.g)
Regressions: 1556611
Regressions: 1565980
Regressions: 1572096
Regressions: 1579732
Regressions: 1586555
No longer regressions: 1586555
Regressions: 1586555
Regressions: 1608028
Regressions: 1617517
You need to log in before you can comment on or make changes to this bug.