From 9777bef9df7e4c9d1b84fb11f78c56e944483cdb Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Fri, 10 May 2024 22:12:14 +0300 Subject: [PATCH] Patch pix3.h for Windows on ARM --- .../DirectX/DX12/GPUContextDX12.cpp | 17 ++++++++++++++--- Source/ThirdParty/WinPixEventRuntime/pix3.h | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Source/Engine/GraphicsDevice/DirectX/DX12/GPUContextDX12.cpp b/Source/Engine/GraphicsDevice/DirectX/DX12/GPUContextDX12.cpp index 2eb143857..97360246d 100644 --- a/Source/Engine/GraphicsDevice/DirectX/DX12/GPUContextDX12.cpp +++ b/Source/Engine/GraphicsDevice/DirectX/DX12/GPUContextDX12.cpp @@ -2,6 +2,20 @@ #if GRAPHICS_API_DIRECTX12 +#include "Engine/Graphics/Config.h" +#if USE_PIX && GPU_ALLOW_PROFILE_EVENTS +// Include these header files before pix3 +#define WIN32_LEAN_AND_MEAN +#define NOMINMAX +#define NOGDI +#define NODRAWTEXT +//#define NOCTLMGR +#define NOFLATSBAPIS +#include +#include +#include +#endif + #include "GPUContextDX12.h" #include "Engine/Core/Log.h" #include "Engine/Core/Math/Viewport.h" @@ -22,9 +36,6 @@ #include "Engine/Profiler/RenderStats.h" #include "Engine/Graphics/Shaders/GPUShader.h" #include "Engine/Threading/Threading.h" -#if USE_PIX && GPU_ALLOW_PROFILE_EVENTS -#include -#endif #define DX12_ENABLE_RESOURCE_BARRIERS_BATCHING 1 #define DX12_ENABLE_RESOURCE_BARRIERS_DEBUGGING 0 diff --git a/Source/ThirdParty/WinPixEventRuntime/pix3.h b/Source/ThirdParty/WinPixEventRuntime/pix3.h index 9d3ba301b..74f1338b7 100644 --- a/Source/ThirdParty/WinPixEventRuntime/pix3.h +++ b/Source/ThirdParty/WinPixEventRuntime/pix3.h @@ -18,7 +18,7 @@ #endif #if !defined(USE_PIX_SUPPORTED_ARCHITECTURE) -#if defined(_M_X64) || defined(USE_PIX_ON_ALL_ARCHITECTURES) || defined(_M_ARM64) +#if defined(_M_X64) || defined(USE_PIX_ON_ALL_ARCHITECTURES) || defined(_M_ARM64) || defined(_M_ARM64EC) #define USE_PIX_SUPPORTED_ARCHITECTURE #endif #endif