Closed Bug 1435995 Opened 5 years ago Closed 5 years ago

DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL makes HWND unreusable

Categories

(Core :: Graphics: WebRender, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file)

This bug is created based on Bug 1435693 comment 3.

RenderCompositorANGLE uses DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL swap chain for performance. But it seems to make HWND unreusable. When WebRender fallback to normal compositor. The compositor could not update HWND's window.
If we want to use DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL, it seems necessary to use DComp with child window.
Assignee: nobody → sotaro.ikeda.g
Blocks: 1419293
(In reply to Sotaro Ikeda [:sotaro] from comment #0)
> This bug is created based on Bug 1435693 comment 3.
> 

Copy of Bug 1435693 comment 3.

------------------------------------------

When WebRender was fallback to normal compositor, the compositor seems to work as normal, but window was not updated. I tried a lot of RenderCompositorANGLE code modification patterns to find out a cause of it. It seems that DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL seems to cause the problem. When I changed DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL to DXGI_SWAP_EFFECT_SEQUENTIAL, the window update problem did not happen.

MDN has the following. It seems to be related.

 > Use one flip model swap chain per HWND. Do not target multiple flip model swap chains to the same HWND.
 https://msdn.microsoft.com/ja-jp/library/windows/desktop/hh706346
Blocks: 1435693
CompositorD3D11 and MLGSwapChainD3D11 also has a capability of using DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL(pref gfx.direct3d11.use-double-buffering). It is disabled by default.

When it was enabled and did fallback from CompositorD3D11 to BasicCompositor. BasicCompositor could not update window. The same problem happened.
It seems better to disable DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL for now.
Attachment #8948653 - Flags: review?(nical.bugzilla)
Comment on attachment 8948653 [details] [diff] [review]
patch - Disable DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL usage

Review of attachment 8948653 [details] [diff] [review]:
-----------------------------------------------------------------

Nice catch!
Attachment #8948653 - Flags: review?(nical.bugzilla) → review+
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1157f9e6cce0
Disable DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL usage r=nical
https://hg.mozilla.org/mozilla-central/rev/1157f9e6cce0
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.