summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/common/debug.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/common/debug.cpp')
-rw-r--r--src/3rdparty/angle/src/common/debug.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/3rdparty/angle/src/common/debug.cpp b/src/3rdparty/angle/src/common/debug.cpp
index b2238f9708..438d3975e8 100644
--- a/src/3rdparty/angle/src/common/debug.cpp
+++ b/src/3rdparty/angle/src/common/debug.cpp
@@ -7,11 +7,12 @@
// debug.cpp: Debugging utilities.
#include "common/debug.h"
-
-#include <stdio.h>
-#include <stdarg.h>
+#include "common/system.h"
+#ifdef ANGLE_ENABLE_D3D11
+typedef DWORD D3DCOLOR;
+#else
#include <d3d9.h>
-#include <windows.h>
+#endif
namespace gl
{
@@ -84,6 +85,12 @@ bool perfActive()
ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...)
{
#if !defined(ANGLE_DISABLE_PERF)
+#if defined(ANGLE_DISABLE_TRACE)
+ if (!perfActive())
+ {
+ return;
+ }
+#endif
va_list vararg;
va_start(vararg, format);
output(true, reinterpret_cast<PerfOutputFunction>(D3DPERF_BeginEvent), format, vararg);