[PATCH 1/5] d3d10/tests: Also try a WARP device in create_device().

Henri Verbeet hverbeet at codeweavers.com
Tue Jan 28 03:09:22 CST 2014


---
 dlls/d3d10/tests/device.c |    5 ++---
 dlls/d3d10/tests/effect.c |    5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/dlls/d3d10/tests/device.c b/dlls/d3d10/tests/device.c
index 0d5e0b3..8df4150 100644
--- a/dlls/d3d10/tests/device.c
+++ b/dlls/d3d10/tests/device.c
@@ -27,12 +27,11 @@ static ID3D10Device *create_device(void)
 
     if (SUCCEEDED(D3D10CreateDevice(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0, D3D10_SDK_VERSION, &device)))
         return device;
-
-    trace("Failed to create a HW device, trying REF\n");
+    if (SUCCEEDED(D3D10CreateDevice(NULL, D3D10_DRIVER_TYPE_WARP, NULL, 0, D3D10_SDK_VERSION, &device)))
+        return device;
     if (SUCCEEDED(D3D10CreateDevice(NULL, D3D10_DRIVER_TYPE_REFERENCE, NULL, 0, D3D10_SDK_VERSION, &device)))
         return device;
 
-    trace("Failed to create a device, returning NULL\n");
     return NULL;
 }
 
diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c
index a07bc6c..c75e59f 100644
--- a/dlls/d3d10/tests/effect.c
+++ b/dlls/d3d10/tests/effect.c
@@ -29,12 +29,11 @@ static ID3D10Device *create_device(void)
 
     if (SUCCEEDED(D3D10CreateDevice(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0, D3D10_SDK_VERSION, &device)))
         return device;
-
-    trace("Failed to create a HW device, trying REF\n");
+    if (SUCCEEDED(D3D10CreateDevice(NULL, D3D10_DRIVER_TYPE_WARP, NULL, 0, D3D10_SDK_VERSION, &device)))
+        return device;
     if (SUCCEEDED(D3D10CreateDevice(NULL, D3D10_DRIVER_TYPE_REFERENCE, NULL, 0, D3D10_SDK_VERSION, &device)))
         return device;
 
-    trace("Failed to create a device, returning NULL\n");
     return NULL;
 }
 
-- 
1.7.10.4




More information about the wine-patches mailing list