mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1569881 - Short term workaround for Intel GPU r=jrmuizel
When Windows version is mort than 1903 and GPU is intel GPU, it could cause flickering with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL. See Bug 1556634. As a short term workaround, use DXGI_ALPHA_MODE_PREMULTIPLIED instead of DXGI_ALPHA_MODE_IGNORE at SwapChain. Differential Revision: https://phabricator.services.mozilla.com/D41713 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
52d02ac527
commit
8ea107367c
@ -44,6 +44,7 @@ class gfxVarReceiver;
|
||||
_(UseWebRenderDCompWin, bool, false) \
|
||||
_(UseWebRenderTripleBufferingWin, bool, false) \
|
||||
_(UseWebRenderProgramBinaryDisk, bool, false) \
|
||||
_(WorkaroundWebRenderIntelBug1556634, bool, false) \
|
||||
_(WebRenderDebugFlags, int32_t, 0) \
|
||||
_(ScreenDepth, int32_t, 0) \
|
||||
_(GREDirectory, nsString, nsString()) \
|
||||
|
@ -3115,6 +3115,22 @@ void gfxPlatform::InitWebRenderConfig() {
|
||||
gfxVars::SetUseWebRenderTripleBufferingWin(true);
|
||||
}
|
||||
}
|
||||
|
||||
// When Windows version is mort than 1903 and GPU is intel GPU, it could cause
|
||||
// flickering with DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL. See Bug 1556634.
|
||||
// As a workaround, use DXGI_ALPHA_MODE_PREMULTIPLIED instead of
|
||||
// DXGI_ALPHA_MODE_IGNORE at SwapChain.
|
||||
// XXX remove this workaround.
|
||||
if (IsWin10May2019UpdateOrLater() && UseWebRender() &&
|
||||
gfxVars::UseWebRenderDCompWin()) {
|
||||
nsAutoString adapterVendorID;
|
||||
nsCOMPtr<nsIGfxInfo> gfxInfo = services::GetGfxInfo();
|
||||
gfxInfo->GetAdapterVendorID(adapterVendorID);
|
||||
if (adapterVendorID == u"0x8086") { // Intel
|
||||
gfxVars::SetWorkaroundWebRenderIntelBug1556634(true);
|
||||
gfxCriticalNote << "Use Premul SwapChain for Intel GPU";
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Set features that affect WR's RendererOptions
|
||||
|
@ -317,7 +317,9 @@ void RenderCompositorANGLE::CreateSwapChainForDCompIfPossible(
|
||||
// DXGI_SCALING_NONE caused swap chain creation failure.
|
||||
desc.Scaling = DXGI_SCALING_STRETCH;
|
||||
desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
|
||||
desc.AlphaMode = DXGI_ALPHA_MODE_IGNORE;
|
||||
desc.AlphaMode = gfx::gfxVars::WorkaroundWebRenderIntelBug1556634()
|
||||
? DXGI_ALPHA_MODE_PREMULTIPLIED
|
||||
: DXGI_ALPHA_MODE_IGNORE;
|
||||
desc.Flags = 0;
|
||||
|
||||
hr = aDXGIFactory2->CreateSwapChainForComposition(mDevice, &desc, nullptr,
|
||||
|
Loading…
Reference in New Issue
Block a user