[PATCH 1/3] dxgi/tests: Switch to D3D10.1

Nikolay Sivov nsivov at codeweavers.com
Wed Feb 8 02:26:25 CST 2017


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---

The only reason for this change is to be able to create BGRA device,
it does not work for me with D3D10CreateDevice().

 dlls/dxgi/tests/Makefile.in |  2 +-
 dlls/dxgi/tests/device.c    | 15 +++++++++------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/dlls/dxgi/tests/Makefile.in b/dlls/dxgi/tests/Makefile.in
index d706f16f6f..2676bc98d3 100644
--- a/dlls/dxgi/tests/Makefile.in
+++ b/dlls/dxgi/tests/Makefile.in
@@ -1,5 +1,5 @@
 TESTDLL   = dxgi.dll
-IMPORTS   = d3d10 dxgi user32
+IMPORTS   = d3d10_1 dxgi user32
 
 C_SRCS = \
 	device.c
diff --git a/dlls/dxgi/tests/device.c b/dlls/dxgi/tests/device.c
index 0b3891fb46..9fe63b5f6c 100644
--- a/dlls/dxgi/tests/device.c
+++ b/dlls/dxgi/tests/device.c
@@ -306,22 +306,25 @@ static void compute_expected_swapchain_fullscreen_state_after_fullscreen_change_
 static IDXGIDevice *create_device(void)
 {
     IDXGIDevice *dxgi_device;
-    ID3D10Device *device;
+    ID3D10Device1 *device;
     HRESULT hr;
 
-    if (SUCCEEDED(D3D10CreateDevice(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0, D3D10_SDK_VERSION, &device)))
+    if (SUCCEEDED(D3D10CreateDevice1(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL,
+            0, D3D10_FEATURE_LEVEL_10_0, D3D10_1_SDK_VERSION, &device)))
         goto success;
-    if (SUCCEEDED(D3D10CreateDevice(NULL, D3D10_DRIVER_TYPE_WARP, NULL, 0, D3D10_SDK_VERSION, &device)))
+    if (SUCCEEDED(D3D10CreateDevice1(NULL, D3D10_DRIVER_TYPE_WARP, NULL,
+            0, D3D10_FEATURE_LEVEL_10_0, D3D10_1_SDK_VERSION, &device)))
         goto success;
-    if (SUCCEEDED(D3D10CreateDevice(NULL, D3D10_DRIVER_TYPE_REFERENCE, NULL, 0, D3D10_SDK_VERSION, &device)))
+    if (SUCCEEDED(D3D10CreateDevice1(NULL, D3D10_DRIVER_TYPE_REFERENCE, NULL,
+            0, D3D10_FEATURE_LEVEL_10_0, D3D10_1_SDK_VERSION, &device)))
         goto success;
 
     return NULL;
 
 success:
-    hr = ID3D10Device_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device);
+    hr = ID3D10Device1_QueryInterface(device, &IID_IDXGIDevice, (void **)&dxgi_device);
     ok(SUCCEEDED(hr), "Created device does not implement IDXGIDevice\n");
-    ID3D10Device_Release(device);
+    ID3D10Device1_Release(device);
 
     return dxgi_device;
 }
-- 
2.11.0




More information about the wine-patches mailing list