Module: wine Branch: master Commit: 484e3f9c4ca698e8473b26c8ac0ae0ff42094034 URL: https://source.winehq.org/git/wine.git/?a=commit;h=484e3f9c4ca698e8473b26c8a...
Author: Paul Gofman gofmanp@gmail.com Date: Fri Nov 1 11:02:42 2019 +0300
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
---
dlls/d3d11/tests/d3d11.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index d23cb15d82..1dbd405001 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -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);