=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: d3d10core/tests: Remove test_texture_data_init().

Alexandre Julliard julliard at winehq.org
Wed Nov 9 13:47:02 CST 2016


Module: wine
Branch: master
Commit: 474288a03ae3cda10483b0cb6e74156833e3d0e9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=474288a03ae3cda10483b0cb6e74156833e3d0e9

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Wed Nov  9 12:35:30 2016 +0100

d3d10core/tests: Remove test_texture_data_init().

This test fails consistently on Windows 10 with Intel GPU, and MSDN says
that the initial content of the resource memory is undefined. Moreover,
failures in other tests have shown that the initial texture data is not
always initialized on other vendors GPUs.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d10core/tests/device.c | 94 -------------------------------------------
 1 file changed, 94 deletions(-)

diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index 0633470..1952a87 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -6931,99 +6931,6 @@ static void test_copy_subresource_region(void)
     release_test_context(&test_context);
 }
 
-static void test_texture_data_init(void)
-{
-    static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f};
-    struct d3d10core_test_context test_context;
-    D3D10_TEXTURE2D_DESC desc;
-    ID3D10Texture2D *texture;
-    ID3D10Device *device;
-    UINT count = 0;
-    HRESULT hr;
-
-    if (!init_test_context(&test_context))
-        return;
-
-    device = test_context.device;
-
-    desc.Width = 640;
-    desc.Height = 480;
-    desc.MipLevels = 1;
-    desc.ArraySize = 1;
-    desc.SampleDesc.Count = 1;
-    desc.SampleDesc.Quality = 0;
-    desc.Usage = D3D10_USAGE_DEFAULT;
-    desc.BindFlags = 0;
-    desc.CPUAccessFlags = 0;
-    desc.MiscFlags = 0;
-
-    desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
-    hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture);
-    ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
-    check_texture_color(texture, 0x00000000, 0);
-    ID3D10Texture2D_Release(texture);
-
-    desc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
-    hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture);
-    ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
-    check_texture_color(texture, 0x00000000, 0);
-    ID3D10Texture2D_Release(texture);
-
-    desc.Format = DXGI_FORMAT_D32_FLOAT;
-    hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture);
-    ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
-    check_texture_float(texture, 0.0f, 0);
-    ID3D10Texture2D_Release(texture);
-
-    desc.ArraySize = 4;
-
-    desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
-    hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture);
-    ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
-    check_texture_float(texture, 0.0f, 0);
-    ID3D10Texture2D_Release(texture);
-
-    desc.Format = DXGI_FORMAT_D24_UNORM_S8_UINT;
-    hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture);
-    ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
-    check_texture_color(texture, 0x00000000, 0);
-    ID3D10Texture2D_Release(texture);
-
-    desc.Format = DXGI_FORMAT_D32_FLOAT;
-    hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture);
-    ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
-    check_texture_float(texture, 0.0f, 0);
-    ID3D10Texture2D_Release(texture);
-
-    hr = ID3D10Device_CheckMultisampleQualityLevels(device, DXGI_FORMAT_R8G8B8A8_UNORM, 2, &count);
-    ok(SUCCEEDED(hr), "Failed to get quality levels, hr %#x.\n", hr);
-    if (!count)
-    {
-        skip("Multisampling not supported for DXGI_FORMAT_R8G8B8A8_UNORM, skipping tests.\n");
-        release_test_context(&test_context);
-        return;
-    }
-
-    ID3D10Device_ClearRenderTargetView(device, test_context.backbuffer_rtv, white);
-
-    desc.ArraySize = 1;
-    desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
-    desc.SampleDesc.Count = 2;
-    desc.SampleDesc.Quality = 0;
-    desc.BindFlags = D3D10_BIND_RENDER_TARGET;
-    hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture);
-    ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
-
-    ID3D10Device_ResolveSubresource(device, (ID3D10Resource *)test_context.backbuffer, 0,
-            (ID3D10Resource *)texture, 0, DXGI_FORMAT_R8G8B8A8_UNORM);
-
-    todo_wine check_texture_color(test_context.backbuffer, 0x00000000, 0);
-
-    ID3D10Texture2D_Release(texture);
-
-    release_test_context(&test_context);
-}
-
 static void test_check_multisample_quality_levels(void)
 {
     ID3D10Device *device;
@@ -9726,7 +9633,6 @@ START_TEST(device)
     test_fragment_coords();
     test_update_subresource();
     test_copy_subresource_region();
-    test_texture_data_init();
     test_check_multisample_quality_levels();
     test_cb_relative_addressing();
     test_swapchain_formats();




More information about the wine-cvs mailing list