mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 22:56:09 +00:00
d3d12_platform: ensure windows.h macros don't cause compile errors
The windows.h macros were undefined only at the end of this platform header previously but with the addition of d3d12sdklayers.h the definition of ID3D12DebugQueue::GetMessage picked up the macro and became GetMessageA or GetMessageW, but Dawn code referred to it as GetMessage causing a compilation error. Fix this by preemptively loading windows.h and undefing some of the macros so that the D3D12 headers don't see them. Bug: Change-Id: I1985cc20a9bdec1d25619ac5088e918b2acf8ecb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22400 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
0357eed7de
commit
13110bff05
@@ -15,7 +15,7 @@
|
||||
#ifndef COMMON_WINDOWS_WITH_UNDEFS_H_
|
||||
#define COMMON_WINDOWS_WITH_UNDEFS_H_
|
||||
|
||||
#include "common/Compiler.h"
|
||||
#include "common/Platform.h"
|
||||
|
||||
#if !defined(DAWN_PLATFORM_WINDOWS)
|
||||
# error "windows_with_undefs.h included on non-Windows"
|
||||
|
||||
Reference in New Issue
Block a user