17 #error "Only C++ files can include pix.h. C is not supported." 20 #if defined(XBOX) || defined(_XBOX_ONE) || defined(_DURANGO) 21 #include "pix3_xbox.h" 29 #if (!defined(USE_PIX)) && ((defined(_DEBUG) || DBG || (defined(PROFILE) && !defined(FASTCAP)) || defined(PROFILE_BUILD)) && !defined(i386) && defined(_AMD64_) && !defined(_PREFAST_)) 33 #if defined(USE_PIX) && !defined(_AMD64_) 34 #pragma message("Warning: Pix markers are only supported on AMD64") 38 #define PIX_CAPTURE_TIMING (1 << 0) 39 #define PIX_CAPTURE_GPU (1 << 1) 40 #define PIX_CAPTURE_FUNCTION_SUMMARY (1 << 2) 41 #define PIX_CAPTURE_FUNCTION_DETAILS (1 << 3) 42 #define PIX_CAPTURE_CALLGRAPH (1 << 4) 43 #define PIX_CAPTURE_INSTRUCTION_TRACE (1 << 5) 44 #define PIX_CAPTURE_SYSTEM_MONITOR_COUNTERS (1 << 6) 45 #define PIX_CAPTURE_VIDEO (1 << 7) 46 #define PIX_CAPTURE_AUDIO (1 << 8) 57 BOOL CaptureCallstacks;
65 #if defined (USE_PIX) && defined(_AMD64_) 67 #include "PIXEventsCommon.h" 68 #include "PIXEventsGenerated.h" 72 extern "C" HRESULT WINAPI PIXBeginCapture(DWORD captureFlags, _In_opt_
const PPIXCaptureParameters captureParameters);
77 extern "C" HRESULT WINAPI PIXEndCapture(BOOL discard);
79 extern "C" DWORD WINAPI PIXGetCaptureState();
81 extern "C" void WINAPI PIXReportCounter(_In_ PCWSTR name,
float value);
87 inline HRESULT PIXEndCapture(BOOL) {
return S_OK; }
88 inline DWORD PIXGetCaptureState() {
return 0; }
89 inline void PIXReportCounter(_In_ PCWSTR,
float) {}
91 inline void PIXBeginEvent(UINT64, _In_ PCSTR, ...) {}
92 inline void PIXBeginEvent(UINT64, _In_ PCWSTR, ...) {}
93 inline void PIXBeginEvent(
void*, UINT64, _In_ PCSTR, ...) {}
94 inline void PIXBeginEvent(
void*, UINT64, _In_ PCWSTR, ...) {}
95 inline void PIXEndEvent() {}
96 inline void PIXEndEvent(
void*) {}
97 inline void PIXSetMarker(UINT64, _In_ PCSTR, ...) {}
98 inline void PIXSetMarker(UINT64, _In_ PCWSTR, ...) {}
99 inline void PIXSetMarker(
void*, UINT64, _In_ PCSTR, ...) {}
100 inline void PIXSetMarker(
void*, UINT64, _In_ PCWSTR, ...) {}
101 inline void PIXScopedEvent(UINT64, _In_ PCSTR, ...) {}
102 inline void PIXScopedEvent(UINT64, _In_ PCWSTR, ...) {}
103 inline void PIXScopedEvent(
void*, UINT64, _In_ PCSTR, ...) {}
104 inline void PIXScopedEvent(
void*, UINT64, _In_ PCWSTR, ...) {}
107 #pragma warning(disable:4548) 108 #pragma warning(disable:4555) 116 inline UINT PIX_COLOR(BYTE r, BYTE g, BYTE b) {
return 0xff000000 | (r << 16) | (g << 8) | b; }
117 inline UINT PIX_COLOR_INDEX(BYTE i) {
return i; }
118 const UINT PIX_COLOR_DEFAULT = PIX_COLOR_INDEX(0);