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