[PATCH 1/2] d3d11/tests: Require D3D_FEATURE_LEVEL_11_0 for using DSV flags.

Paul Gofman gofmanp at gmail.com
Fri Nov 1 03:02:42 CDT 2019


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

Signed-off-by: Paul Gofman <gofmanp at gmail.com>
---
 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 47a974e9fc..675a9ee49c 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -29392,6 +29392,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;
@@ -29475,6 +29476,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;
@@ -29644,6 +29647,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);
-- 
2.23.0




More information about the wine-devel mailing list