[PATCH v5 3/5] vkd3d: Support using vkd3d-utils path when testing on Windows.

Hans-Kristian Arntzen post at arntzen-software.no
Mon Nov 18 08:38:00 CST 2019


When testing vkd3d on Windows, we were only able to use the native D3D12
path. Add an ifdef to configure this.

Signed-off-by: Hans-Kristian Arntzen <post at arntzen-software.no>
---
 tests/d3d12_crosstest.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/d3d12_crosstest.h b/tests/d3d12_crosstest.h
index 7b59471..7592000 100644
--- a/tests/d3d12_crosstest.h
+++ b/tests/d3d12_crosstest.h
@@ -52,17 +52,17 @@ typedef int HRESULT;
 #include <math.h>
 #include <time.h>
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(VKD3D_FORCE_UTILS_WRAPPER)
 # include "vkd3d_dxgi1_4.h"
 #else
-# include <pthread.h>
+# include "vkd3d_threads.h"
 # include "vkd3d.h"
 # include "vkd3d_utils.h"
 #endif
 
 #include "d3d12_test_utils.h"
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(VKD3D_FORCE_UTILS_WRAPPER)
 static inline HANDLE create_event(void)
 {
     return CreateEventA(NULL, FALSE, FALSE, NULL);
@@ -124,7 +124,7 @@ struct test_thread_data
     void *user_data;
 };
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(VKD3D_FORCE_UTILS_WRAPPER)
 static inline DWORD WINAPI test_thread_main(void *untyped_data)
 {
     struct test_thread_data *data = untyped_data;
@@ -242,7 +242,7 @@ static void wait_queue_idle_(unsigned int line, ID3D12Device *device, ID3D12Comm
 static bool use_warp_device;
 static unsigned int use_adapter_idx;
 
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(VKD3D_FORCE_UTILS_WRAPPER)
 static IUnknown *create_warp_adapter(IDXGIFactory4 *factory)
 {
     IUnknown *adapter;
-- 
2.24.0




More information about the wine-devel mailing list