mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
Fix regression where WARP could be used as a fallback on Windows 7. (bug 1179051 part 2.1, r=jrmuizel)
--HG-- extra : rebase_source : 0e7932489d2a91d4535047f5d9c59cee323a52cf
This commit is contained in:
parent
0d6cf23aa9
commit
4f74031f0f
@ -1914,12 +1914,6 @@ gfxWindowsPlatform::CheckD3D11Support() -> D3D11Status
|
||||
if (gfxPrefs::LayersD3D11DisableWARP() || GetModuleHandleA("nvdxgiwrap.dll")) {
|
||||
return D3D11Status::Blocked;
|
||||
}
|
||||
|
||||
if (!IsWin8OrLater()) {
|
||||
// We do not use WARP on Windows 7 or earlier.
|
||||
return D3D11Status::Blocked;
|
||||
}
|
||||
|
||||
return D3D11Status::TryWARP;
|
||||
}
|
||||
}
|
||||
@ -1978,10 +1972,6 @@ gfxWindowsPlatform::AttemptD3D11DeviceCreation(const nsTArray<D3D_FEATURE_LEVEL>
|
||||
bool
|
||||
gfxWindowsPlatform::AttemptWARPDeviceCreation(const nsTArray<D3D_FEATURE_LEVEL>& aFeatureLevels)
|
||||
{
|
||||
if (gfxPrefs::LayersD3D11DisableWARP()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(!mD3D11Device);
|
||||
|
||||
ScopedGfxFeatureReporter reporterWARP("D3D11-WARP", gfxPrefs::LayersD3D11ForceWARP());
|
||||
@ -2102,11 +2092,16 @@ gfxWindowsPlatform::InitD3D11Devices()
|
||||
}
|
||||
}
|
||||
|
||||
if (status == D3D11Status::TryWARP || status == D3D11Status::ForceWARP) {
|
||||
if (!AttemptWARPDeviceCreation(featureLevels)) {
|
||||
// Nothing more we can do.
|
||||
return;
|
||||
}
|
||||
if (IsWin8OrLater() &&
|
||||
!gfxPrefs::LayersD3D11DisableWARP() &&
|
||||
(status == D3D11Status::TryWARP || status == D3D11Status::ForceWARP))
|
||||
{
|
||||
AttemptWARPDeviceCreation(featureLevels);
|
||||
}
|
||||
|
||||
if (!mD3D11Device) {
|
||||
// We could not get a D3D11 compositor, and there's nothing more we can try.
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mD3D11Device) {
|
||||
|
Loading…
Reference in New Issue
Block a user