Unverified Commit 0f1ee61f authored by Alovchin91's avatar Alovchin91 Committed by GitHub

Enable DirectX 12 feature level 11.1 (#1117)

Skia supports all DX12 feature levels, see here for example:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/tools/ganesh/d3d/D3DTestUtils.cpp;l=60;drc=cbb0388767d2b8a5a5c1f5484a68fb0ff201561b

It appears however that some GPUs (like Intel(R) HD Graphics 4600) don't
work with Skia's DirectX backend at all. Those adapters should be marked
as unsupported in Skiko instead.

The reason for this change is that the current choice of feature levels
disables support for "good" FL11.1-compatible adapters, for example, the
Parallels Virtual GPU.

Feature level 11.1 is chosen as a safe bet for now since it's
effectively the same as 12.0, with some baseline features of 12.0 being
optional here.

The original issue: #601 
The original PR: #603
parent 942e9a0c
......@@ -198,10 +198,11 @@ extern "C"
}
gr_cp<IDXGIAdapter1> adapter((IDXGIAdapter1 *) adapterPtr);
D3D_FEATURE_LEVEL maxSupportedFeatureLevel = D3D_FEATURE_LEVEL_12_0;
D3D_FEATURE_LEVEL maxSupportedFeatureLevel = D3D_FEATURE_LEVEL_11_1;
D3D_FEATURE_LEVEL featureLevels[] = {
D3D_FEATURE_LEVEL_12_1,
D3D_FEATURE_LEVEL_12_0
D3D_FEATURE_LEVEL_12_0,
D3D_FEATURE_LEVEL_11_1
};
for (int i = 0; i < _countof(featureLevels); i++) {
......
......@@ -312,11 +312,12 @@ extern "C"
}
gr_cp<IDXGIAdapter1> adapter((IDXGIAdapter1 *) adapterPtr);
D3D_FEATURE_LEVEL maxSupportedFeatureLevel = D3D_FEATURE_LEVEL_12_0;
D3D_FEATURE_LEVEL maxSupportedFeatureLevel = D3D_FEATURE_LEVEL_11_1;
D3D_FEATURE_LEVEL featureLevels[] = {
// TODO add D3D_FEATURE_LEVEL_12_2
D3D_FEATURE_LEVEL_12_1,
D3D_FEATURE_LEVEL_12_0
D3D_FEATURE_LEVEL_12_0,
D3D_FEATURE_LEVEL_11_1
};
for (int i = 0; i < _countof(featureLevels); i++) {
......
......@@ -15,6 +15,7 @@ private val notSupportedAdapters: List<NotSupportedAdapter> by lazy {
NotSupportedAdapter(os = OS.Windows, api = GraphicsApi.DIRECT3D, pattern = Regex("Intel(R) HD Graphics 520")),
NotSupportedAdapter(os = OS.Windows, api = GraphicsApi.DIRECT3D, pattern = Regex("Intel(R) HD Graphics 530")),
NotSupportedAdapter(os = OS.Windows, api = GraphicsApi.DIRECT3D, pattern = Regex("Intel(R) HD Graphics 4400")),
NotSupportedAdapter(os = OS.Windows, api = GraphicsApi.DIRECT3D, pattern = Regex("Intel(R) HD Graphics 4600")),
NotSupportedAdapter(os = OS.Windows, api = GraphicsApi.DIRECT3D, pattern = Regex("NVIDIA GeForce GTX 750 Ti")),
NotSupportedAdapter(os = OS.Windows, api = GraphicsApi.DIRECT3D, pattern = Regex("NVIDIA GeForce GTX 960M")),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment