d3d11/tests: Require feature level 11_0 or 10_0 by default.

Otherwise D3D11CreateDevice() might fallback to feature level 9 and the
current tests can't handle (nor are interested in) that.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2016-03-08 23:19:41 +01:00 committed by Alexandre Julliard
parent ab09deac3b
commit 9da6dd2ac9
1 changed files with 16 additions and 1 deletions

View File

@ -187,8 +187,23 @@ static void check_texture_color_(unsigned int line, ID3D11Texture2D *texture,
static ID3D11Device *create_device(const D3D_FEATURE_LEVEL *feature_level)
{
static const D3D_FEATURE_LEVEL default_feature_level[] =
{
D3D_FEATURE_LEVEL_11_0,
D3D_FEATURE_LEVEL_10_0,
};
unsigned int feature_level_count;
ID3D11Device *device;
UINT feature_level_count = feature_level ? 1 : 0;
if (feature_level)
{
feature_level_count = 1;
}
else
{
feature_level = default_feature_level;
feature_level_count = sizeof(default_feature_level) / sizeof(default_feature_level[0]);
}
if (SUCCEEDED(D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, feature_level, feature_level_count,
D3D11_SDK_VERSION, &device, NULL, NULL)))