Commit 73c32df3 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

d3d11/tests: Add a test for the default feature level selection.

parent ce32dcce
......@@ -411,6 +411,15 @@ static void draw_quad_(unsigned int line, struct d3d11_test_context *context)
static void test_create_device(void)
{
static const D3D_FEATURE_LEVEL default_feature_levels[] =
{
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,
};
D3D_FEATURE_LEVEL feature_level, supported_feature_level;
DXGI_SWAP_CHAIN_DESC swapchain_desc, obtained_desc;
ID3D11DeviceContext *immediate_context;
......@@ -440,6 +449,13 @@ static void test_create_device(void)
ok(feature_level == supported_feature_level, "Got feature level %#x, expected %#x.\n",
feature_level, supported_feature_level);
hr = D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, default_feature_levels,
sizeof(default_feature_levels) / sizeof(default_feature_levels[0]), D3D11_SDK_VERSION, NULL,
&feature_level, NULL);
ok(SUCCEEDED(hr), "D3D11CreateDevice failed %#x.\n", hr);
ok(feature_level == supported_feature_level, "Got feature level %#x, expected %#x.\n",
feature_level, supported_feature_level);
hr = D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, NULL, 0, D3D11_SDK_VERSION, NULL, NULL,
&immediate_context);
ok(SUCCEEDED(hr), "D3D11CreateDevice failed %#x.\n", hr);
......
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