d3d11/tests: Require D3D_FEATURE_LEVEL_11_0 for using DSV flags.

Fixes test failures on older Testbot Windows versions in test_sample_attached_rtv().

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2019-11-01 11:02:42 +03:00 committed by Alexandre Julliard
parent 413aad3913
commit 484e3f9c4c
1 changed files with 13 additions and 0 deletions

View File

@ -29403,6 +29403,7 @@ static void test_sample_attached_rtv(void)
struct d3d11_test_context test_context;
ID3D11RenderTargetView *rtv, *rtvs[2];
D3D11_TEXTURE2D_DESC texture_desc;
D3D_FEATURE_LEVEL feature_level;
D3D11_SAMPLER_DESC sampler_desc;
ID3D11DepthStencilView *dsview;
ID3D11BlendState *blend_state;
@ -29486,6 +29487,8 @@ static void test_sample_attached_rtv(void)
device = test_context.device;
context = test_context.immediate_context;
feature_level = ID3D11Device_GetFeatureLevel(device);
texture_desc.SampleDesc.Count = 1;
texture_desc.SampleDesc.Quality = 0;
texture_desc.Usage = D3D11_USAGE_DEFAULT;
@ -29655,6 +29658,16 @@ static void test_sample_attached_rtv(void)
for (i = 0; i < ARRAY_SIZE(ds_tests); ++i)
{
if (ds_tests[i].dsv_flags && feature_level < D3D_FEATURE_LEVEL_11_0)
{
static unsigned int skip_once;
if (!skip_once++)
skip("Read only depths or stencils are not supported.\n");
continue;
}
texture_desc.Format = ds_tests[i].texture_format;
hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &dstexture);
ok(hr == S_OK, "Test %u, got unexpected hr %#x.\n", i, hr);