mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Only use DirectX 11.1 on Windows 8 or higher (bug 893221, r=bas).
--HG-- extra : rebase_source : 147493bef3e487c6ab5424c3e4a4fd2fd2440e09
This commit is contained in:
parent
446e746c5c
commit
562e0d0eac
@ -1463,13 +1463,14 @@ gfxWindowsPlatform::GetD3D11Device()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
D3D_FEATURE_LEVEL featureLevels[] = {
|
||||
D3D_FEATURE_LEVEL_11_1,
|
||||
D3D_FEATURE_LEVEL_11_0,
|
||||
D3D_FEATURE_LEVEL_10_1,
|
||||
D3D_FEATURE_LEVEL_10_0,
|
||||
D3D_FEATURE_LEVEL_9_3
|
||||
};
|
||||
nsTArray<D3D_FEATURE_LEVEL> featureLevels;
|
||||
if (gfxWindowsPlatform::WindowsOSVersion() >= gfxWindowsPlatform::kWindows8) {
|
||||
featureLevels.AppendElement(D3D_FEATURE_LEVEL_11_1);
|
||||
}
|
||||
featureLevels.AppendElement(D3D_FEATURE_LEVEL_11_0);
|
||||
featureLevels.AppendElement(D3D_FEATURE_LEVEL_10_1);
|
||||
featureLevels.AppendElement(D3D_FEATURE_LEVEL_10_0);
|
||||
featureLevels.AppendElement(D3D_FEATURE_LEVEL_9_3);
|
||||
|
||||
RefPtr<IDXGIAdapter1> adapter = GetDXGIAdapter();
|
||||
|
||||
@ -1479,7 +1480,7 @@ gfxWindowsPlatform::GetD3D11Device()
|
||||
|
||||
HRESULT hr = d3d11CreateDevice(adapter, D3D_DRIVER_TYPE_UNKNOWN, NULL,
|
||||
D3D11_CREATE_DEVICE_BGRA_SUPPORT,
|
||||
featureLevels, sizeof(featureLevels) / sizeof(D3D_FEATURE_LEVEL),
|
||||
featureLevels.Elements(), featureLevels.Length(),
|
||||
D3D11_SDK_VERSION, byRef(mD3D11Device), nullptr, nullptr);
|
||||
|
||||
// We leak these everywhere and we need them our entire runtime anyway, let's
|
||||
|
Loading…
Reference in New Issue
Block a user