Francois Gouget : Disable multithreaded DirectX tests if WINETEST_NO_MT_D3D is set.

Alexandre Julliard julliard at winehq.org
Wed Apr 3 15:26:20 CDT 2019


Module: wine
Branch: master
Commit: 1684b011189435d9bd3d6838be4cf1ce62edba4d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1684b011189435d9bd3d6838be4cf1ce62edba4d

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Tue Apr  2 19:26:10 2019 +0200

Disable multithreaded DirectX tests if WINETEST_NO_MT_D3D is set.

The nouveau graphics driver's support for multithreaded OpenGL is
buggy at least up to (18.2.8) so that any Wine test that performs
multithreaded OpenGL accesses freezes, crashes the Mesa stack and
eventually freezes the whole computer. Typically the first such test
is d2d1:d2d1.
The relevant tests have a --single option but WineTest neither knows
which tests accept this option, nor whether it is needed for the
current host.
The WINETEST_NO_MT_D3D environnement variable can be set on hosts
that need it (such as the cw2-gtx560 box) and is automatically
inherited by the relevant tests thus working around this issue.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d2d1/tests/d2d1.c           | 2 ++
 dlls/d3d10core/tests/d3d10core.c | 2 ++
 dlls/d3d11/tests/d3d11.c         | 2 ++
 dlls/dxgi/tests/dxgi.c           | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 2214be6..f8fc1f5 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -8051,6 +8051,8 @@ START_TEST(d2d1)
     unsigned int argc, i;
     char **argv;
 
+    use_mt = !getenv("WINETEST_NO_MT_D3D");
+
     argc = winetest_get_mainargs(&argv);
     for (i = 2; i < argc; ++i)
     {
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c
index 00bd16b..f799922 100644
--- a/dlls/d3d10core/tests/d3d10core.c
+++ b/dlls/d3d10core/tests/d3d10core.c
@@ -17925,6 +17925,8 @@ START_TEST(d3d10core)
     unsigned int argc, i;
     char **argv;
 
+    use_mt = !getenv("WINETEST_NO_MT_D3D");
+
     argc = winetest_get_mainargs(&argv);
     for (i = 2; i < argc; ++i)
     {
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 90bcbae..d5445ef 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -29191,6 +29191,8 @@ START_TEST(d3d11)
     unsigned int argc, i;
     char **argv;
 
+    use_mt = !getenv("WINETEST_NO_MT_D3D");
+
     argc = winetest_get_mainargs(&argv);
     for (i = 2; i < argc; ++i)
     {
diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c
index 91d218f..79e4bc0 100644
--- a/dlls/dxgi/tests/dxgi.c
+++ b/dlls/dxgi/tests/dxgi.c
@@ -5041,6 +5041,8 @@ START_TEST(dxgi)
     registry_mode.dmSize = sizeof(registry_mode);
     ok(EnumDisplaySettingsW(NULL, ENUM_REGISTRY_SETTINGS, &registry_mode), "Failed to get display mode.\n");
 
+    use_mt = !getenv("WINETEST_NO_MT_D3D");
+
     argc = winetest_get_mainargs(&argv);
     for (i = 2; i < argc; ++i)
     {




More information about the wine-cvs mailing list