Fix some DXGI-related D3D11 debug-layer warnings when using swapchains
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox113 | --- | fixed |
People
(Reporter: rkraesig, Assigned: rkraesig)
References
Details
Attachments
(3 files)
When enabling the D3D11 debug layer and running without DirectComposition, an easily-fixed DXGI warning and error appear in the debug output:
[18532] DXGI WARNING: IDXGIFactory::CreateSwapChain: Blt-model swap effects (DXGI_SWAP_EFFECT_DISCARD and DXGI_SWAP_EFFECT_SEQUENTIAL) are legacy swap effects that are predominantly superceded by their flip-model counterparts (DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL and DXGI_SWAP_EFFECT_FLIP_DISCARD). Please consider updating your application to leverage flip-model swap effects to benefit from modern presentation enhancements. More information is available at http://aka.ms/dxgiflipmodel. [ MISCELLANEOUS WARNING #294: ]
[18532] DXGI ERROR: IDXGIFactory::CreateSwapChain: Blt model swapchains (DXGI_SWAP_EFFECT_SEQUENTIAL and DXGI_SWAP_EFFECT_DISCARD) do not support DXGI_SCALING_NONE. [function arguments omitted] [ MISCELLANEOUS ERROR #141: ]
These are relatively easy to address, and doing so has other salutary effects -- in particular, suppressing bug 1763981.
Assignee | ||
Comment 1•2 years ago
|
||
Per Microsoft documentation, DXGI_SCALING_NONE is only supported by
swap chains using DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; for any other swap
effect, including DXGI_SWAP_EFFECT_SEQUENTIAL, another value must be
supplied. Prior to Windows 10 the only such available entry was
DXGI_SCALING_STRETCH, so use that.
This causes the CreateSwapChainForHwnd
call to succeed, rather than
causing us to fall back to CreateSwapChain
. There is no known user-
facing effect here, as DXGI_SCALING_STRETCH is documented to be the
semantics applied by CreateSwapChain
-- but it does eliminate an error
message from the D3D11 debug layer's output.
Assignee | ||
Comment 2•2 years ago
|
||
This silences a warning emitted by the D3D11 debug layer.
Conveniently, it also suppresses bug 1763981.
Depends on D171521
Assignee | ||
Comment 3•2 years ago
|
||
N.B.: Bug 1435995 was previously filed concerning swapchains with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL
causing the fallback in-process compositor not to work. I can no longer reproduce this on my local build (with WebRender DirectComposition disabled).
This appears to be dealt with by bug 1567347: when gfx.webrender.flip-sequential
is set to true, a separate compositor window (like that used with DirectComposition) is created. The DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL
swapchain is associated with the compositor HWND instead of the parent-process HWND, so there's no issue when falling back to the parent process.
Updated•2 years ago
|
Assignee | ||
Comment 4•2 years ago
|
||
The in-process compositor assumes that no compositor window was present.
This is not guaranteed to be true if, for example, the preference
gfx.webrender.flip-sequential
is set.
Make the in-process compositor more closely mirror the out-of-process
compositor. (At present this effectively just means calling ::SetParent
on the compositor window.)
Depends on D171521
Updated•2 years ago
|
Comment 5•2 years ago
|
||
The severity field is not set for this bug.
:gw, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Comment 7•2 years ago
|
||
Backed out for causing xpc failures in widget/headless/tests/test_headless.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/2e7828044675351f72c755a059c1530b71455c21
Assignee | ||
Comment 8•2 years ago
|
||
It's a relatively simple fix to handle headless mode properly; but it's still worth requesting rereview before landing, I think.
Comment 10•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c8742f6c466f
https://hg.mozilla.org/mozilla-central/rev/062f325dfd28
https://hg.mozilla.org/mozilla-central/rev/ec948153333a
Assignee | ||
Comment 11•2 years ago
|
||
Partially reverted in bug 1830792.
Description
•