Mesa (main): dzn: Fixes compiling error by include `<unknwn.h>`

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 3 17:14:15 UTC 2022


Module: Mesa
Branch: main
Commit: 1720672e3364d204c59da20f0eacfa3165193755
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1720672e3364d204c59da20f0eacfa3165193755

Author: Yonggang Luo <luoyonggang at gmail.com>
Date:   Sat Apr 30 05:30:22 2022 +0800

dzn: Fixes compiling error by include `<unknwn.h>`

In mingw's `<unknwn.h>`, it's defeind __REQUIRED_RPCNDR_H_VERSION__ to 475,
so that gcc/mingw won't raise compiling error that because directx/d3d12.h
define __REQUIRED_RPCNDR_H_VERSION__ to 500, but the maximal supported __REQUIRED_RPCNDR_H_VERSION__ in mingw
are 475.

Signed-off-by: Yonggang Luo <luoyonggang at gmail.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16767>

---

 src/microsoft/vulkan/dzn_nir.h     | 1 +
 src/microsoft/vulkan/dzn_private.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/microsoft/vulkan/dzn_nir.h b/src/microsoft/vulkan/dzn_nir.h
index 8e095ddb040..9492764fbb1 100644
--- a/src/microsoft/vulkan/dzn_nir.h
+++ b/src/microsoft/vulkan/dzn_nir.h
@@ -26,6 +26,7 @@
 
 #define D3D12_IGNORE_SDK_LAYERS
 #define COBJMACROS
+#include <unknwn.h>
 #include <directx/d3d12.h>
 
 #include "nir.h"
diff --git a/src/microsoft/vulkan/dzn_private.h b/src/microsoft/vulkan/dzn_private.h
index 85dfa9f2130..78af26d90cb 100644
--- a/src/microsoft/vulkan/dzn_private.h
+++ b/src/microsoft/vulkan/dzn_private.h
@@ -55,6 +55,7 @@
 
 #define D3D12_IGNORE_SDK_LAYERS
 #define COBJMACROS
+#include <unknwn.h>
 #include <dxgi1_4.h>
 #include <directx/d3d12.h>
 



More information about the mesa-commit mailing list