Mesa (main): d3d12: Include windows.h on Windows before dxgicommon.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 18 16:37:13 UTC 2022


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

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Wed May 18 09:12:39 2022 -0700

d3d12: Include windows.h on Windows before dxgicommon.h

The dxgicommon.h header uses UINT types without including windows.h itself.

Fixes: 6dbe05ff ("d3d12: Add util video functions to d3d12_format")
Reviewed-by: Sil Vilerino <sivileri at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16588>

---

 src/gallium/drivers/d3d12/d3d12_format.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/d3d12/d3d12_format.h b/src/gallium/drivers/d3d12/d3d12_format.h
index ef5a1721d9e..3f5054b4776 100644
--- a/src/gallium/drivers/d3d12/d3d12_format.h
+++ b/src/gallium/drivers/d3d12/d3d12_format.h
@@ -25,7 +25,9 @@
 #define D3D12_FORMATS_H
 
 #include <directx/dxgiformat.h>
-#ifndef _WIN32
+#ifdef _WIN32
+#include <Windows.h>
+#else
 #include <wsl/winadapter.h>
 #endif
 #include <directx/dxgicommon.h>



More information about the mesa-commit mailing list