diff --git a/winrt/lib/drawing/CanvasDevice.cpp b/winrt/lib/drawing/CanvasDevice.cpp index 7e9f13be1..363c7a3e2 100644 --- a/winrt/lib/drawing/CanvasDevice.cpp +++ b/winrt/lib/drawing/CanvasDevice.cpp @@ -49,14 +49,15 @@ namespace ABI { namespace Microsoft { namespace Graphics { namespace Canvas deviceFlags |= D3D11_CREATE_DEVICE_DEBUG; } + auto 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, D3D_FEATURE_LEVEL_9_2, D3D_FEATURE_LEVEL_9_1 }; ComPtr createdDevice; if (SUCCEEDED(D3D11CreateDevice( NULL, // adapter driverType, NULL, // software handle deviceFlags, - NULL, // feature level array - 0, // feature level count + featureLevels, // feature level array + ARRAYSIZE(featureLevels), // feature level count D3D11_SDK_VERSION, &createdDevice, NULL,