d3d12: Include wsl/winadapter.h when not compiling for Windows
authorJesse Natalie <jenatali@microsoft.com>
Tue, 8 Dec 2020 17:56:46 +0000 (09:56 -0800)
committerMarge Bot <eric+marge@anholt.net>
Wed, 16 Dec 2020 16:25:54 +0000 (16:25 +0000)
The winadapter.h provides typedefs and defines to enable the
D3D/DXCore headers to be included as-is when targeting non-
Windows platforms.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7937>

src/gallium/drivers/d3d12/d3d12_batch.h
src/gallium/drivers/d3d12/d3d12_bufmgr.h
src/gallium/drivers/d3d12/d3d12_fence.h
src/gallium/drivers/d3d12/d3d12_pipeline_state.h
src/gallium/drivers/d3d12/d3d12_screen.h
src/microsoft/resource_state_manager/D3D12ResourceState.h

index 7180d95..05039eb 100644 (file)
 #include "util/u_dynarray.h"
 #include <stdint.h>
 
+#ifndef _WIN32
+#include <wsl/winadapter.h>
+#endif
+
 #define D3D12_IGNORE_SDK_LAYERS
 #include <directx/d3d12.h>
 
index f66dd6a..338731a 100644 (file)
 #include "pipebuffer/pb_buffer.h"
 #include "util/u_atomic.h"
 
+#ifndef _WIN32
+#include <wsl/winadapter.h>
+#endif
+
 #include <directx/d3d12.h>
 
 struct d3d12_bufmgr;
index c72d801..1ff9160 100644 (file)
 
 #include "util/u_inlines.h"
 
+#ifndef _WIN32
+#include <wsl/winadapter.h>
+#endif
+
 #include <directx/d3d12.h>
 
 struct pipe_screen;
index 972d291..bcc6413 100644 (file)
 
 #include "pipe/p_state.h"
 
+#ifndef _WIN32
+#include <wsl/winadapter.h>
+#endif
+
 #define D3D12_IGNORE_SDK_LAYERS
 #include <directx/d3d12.h>
 
index 1d32ad9..7555521 100644 (file)
 
 #include "util/slab.h"
 
+#ifndef _WIN32
+#include <wsl/winadapter.h>
+#endif
+
 #define D3D12_IGNORE_SDK_LAYERS
 #include <directx/d3d12.h>
 
index 07071a3..3a78f69 100644 (file)
 #ifndef D3D12_RESOURCE_STATE_H
 #define D3D12_RESOURCE_STATE_H
 
+#ifndef _WIN32
+#include <wsl/winadapter.h>
+#endif
+
 #include <vector>
 #include <assert.h>
 #include <directx/d3d12.h>