Commit 570e83cf by Austin Kinross Committed by Geoff Lang

Rename ANGLE_ENABLE_PERF -> ANGLE_ENABLE_DEBUG_ANNOTATIONS

Change-Id: I701cd5ee749797428171e9c58a46fce626b9a969 Reviewed-on: https://chromium-review.googlesource.com/223590Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 73b8de78
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;NOMINMAX;GL_APICALL=;GL_GLEXT_PROTOTYPES=;EGLAPI=;ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ &quot;d3dcompiler_46.dll&quot;, &quot;d3dcompiler_43.dll&quot; };ANGLE_ENABLE_D3D11;NTDDI_VERSION=NTDDI_WINBLUE;_DEBUG;ANGLE_ENABLE_PERF;ANGLE_GENERATE_SHADER_DEBUG_INFO;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;NOMINMAX;GL_APICALL=;GL_GLEXT_PROTOTYPES=;EGLAPI=;ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ &quot;d3dcompiler_46.dll&quot;, &quot;d3dcompiler_43.dll&quot; };ANGLE_ENABLE_D3D11;NTDDI_VERSION=NTDDI_WINBLUE;_DEBUG;ANGLE_ENABLE_DEBUG_ANNOTATIONS;ANGLE_GENERATE_SHADER_DEBUG_INFO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<ResourceCompile> <ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\..\src;..\..\..\..\include;..\..\..\..\src\libGLESv2;$(OutDir)obj\global_intermediate\angle;C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\..\..\..\src;..\..\..\..\include;..\..\..\..\src\libGLESv2;$(OutDir)obj\global_intermediate\angle;C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Culture>0x0409</Culture> <Culture>0x0409</Culture>
<PreprocessorDefinitions>GL_APICALL=;GL_GLEXT_PROTOTYPES=;EGLAPI=;ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ &quot;d3dcompiler_46.dll&quot;, &quot;d3dcompiler_43.dll&quot; };ANGLE_ENABLE_D3D11;NTDDI_VERSION=NTDDI_WINBLUE;_DEBUG;ANGLE_ENABLE_PERF;ANGLE_GENERATE_SHADER_DEBUG_INFO;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>GL_APICALL=;GL_GLEXT_PROTOTYPES=;EGLAPI=;ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ &quot;d3dcompiler_46.dll&quot;, &quot;d3dcompiler_43.dll&quot; };ANGLE_ENABLE_D3D11;NTDDI_VERSION=NTDDI_WINBLUE;_DEBUG;ANGLE_ENABLE_DEBUG_ANNOTATIONS;ANGLE_GENERATE_SHADER_DEBUG_INFO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
......
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;NOMINMAX;GL_APICALL=;GL_GLEXT_PROTOTYPES=;EGLAPI=;ANGLE_ENABLE_D3D11;NTDDI_VERSION=NTDDI_WINBLUE;_DEBUG;ANGLE_ENABLE_PERF;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;NOMINMAX;GL_APICALL=;GL_GLEXT_PROTOTYPES=;EGLAPI=;ANGLE_ENABLE_D3D11;NTDDI_VERSION=NTDDI_WINBLUE;_DEBUG;ANGLE_ENABLE_DEBUG_ANNOTATIONS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<TreatWarningAsError>true</TreatWarningAsError> <TreatWarningAsError>true</TreatWarningAsError>
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
<ResourceCompile> <ResourceCompile>
<AdditionalIncludeDirectories>..\..\..\..\src;..\..\..\..\include;..\..\..\..\src\libGLESv2;$(OutDir)obj\global_intermediate\angle;C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>..\..\..\..\src;..\..\..\..\include;..\..\..\..\src\libGLESv2;$(OutDir)obj\global_intermediate\angle;C:\Program Files (x86)\Windows Kits\8.1\Include\shared;C:\Program Files (x86)\Windows Kits\8.1\Include\um;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Culture>0x0409</Culture> <Culture>0x0409</Culture>
<PreprocessorDefinitions>GL_APICALL=;GL_GLEXT_PROTOTYPES=;EGLAPI=;ANGLE_ENABLE_D3D11;NTDDI_VERSION=NTDDI_WINBLUE;_DEBUG;ANGLE_ENABLE_PERF;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>GL_APICALL=;GL_GLEXT_PROTOTYPES=;EGLAPI=;ANGLE_ENABLE_D3D11;NTDDI_VERSION=NTDDI_WINBLUE;_DEBUG;ANGLE_ENABLE_DEBUG_ANNOTATIONS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ResourceCompile> </ResourceCompile>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
namespace gl namespace gl
{ {
#if defined(ANGLE_ENABLE_PERF) #if defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
typedef void (WINAPI *PerfOutputFunction)(D3DCOLOR, LPCWSTR); typedef void (WINAPI *PerfOutputFunction)(D3DCOLOR, LPCWSTR);
#else #else
typedef void (*PerfOutputFunction)(unsigned int, const wchar_t*); typedef void (*PerfOutputFunction)(unsigned int, const wchar_t*);
...@@ -25,11 +25,11 @@ typedef void (*PerfOutputFunction)(unsigned int, const wchar_t*); ...@@ -25,11 +25,11 @@ typedef void (*PerfOutputFunction)(unsigned int, const wchar_t*);
static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const char *format, va_list vararg) static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const char *format, va_list vararg)
{ {
#if defined(ANGLE_ENABLE_PERF) || defined(ANGLE_ENABLE_TRACE) #if defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS) || defined(ANGLE_ENABLE_TRACE)
std::string formattedMessage = FormatString(format, vararg); std::string formattedMessage = FormatString(format, vararg);
#endif #endif
#if defined(ANGLE_ENABLE_PERF) #if defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
if (perfActive()) if (perfActive())
{ {
// The perf function only accepts wide strings, widen the ascii message // The perf function only accepts wide strings, widen the ascii message
...@@ -43,7 +43,7 @@ static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const c ...@@ -43,7 +43,7 @@ static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const c
perfFunc(0, wideMessage.c_str()); perfFunc(0, wideMessage.c_str());
} }
#endif // ANGLE_ENABLE_PERF #endif // ANGLE_ENABLE_DEBUG_ANNOTATIONS
#if defined(ANGLE_ENABLE_TRACE) #if defined(ANGLE_ENABLE_TRACE)
#if defined(NDEBUG) #if defined(NDEBUG)
...@@ -67,7 +67,7 @@ void trace(bool traceFileDebugOnly, const char *format, ...) ...@@ -67,7 +67,7 @@ void trace(bool traceFileDebugOnly, const char *format, ...)
{ {
va_list vararg; va_list vararg;
va_start(vararg, format); va_start(vararg, format);
#if defined(ANGLE_ENABLE_PERF) #if defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
output(traceFileDebugOnly, D3DPERF_SetMarker, format, vararg); output(traceFileDebugOnly, D3DPERF_SetMarker, format, vararg);
#else #else
output(traceFileDebugOnly, NULL, format, vararg); output(traceFileDebugOnly, NULL, format, vararg);
...@@ -77,7 +77,7 @@ void trace(bool traceFileDebugOnly, const char *format, ...) ...@@ -77,7 +77,7 @@ void trace(bool traceFileDebugOnly, const char *format, ...)
bool perfActive() bool perfActive()
{ {
#if defined(ANGLE_ENABLE_PERF) #if defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
static bool active = D3DPERF_GetStatus() != 0; static bool active = D3DPERF_GetStatus() != 0;
return active; return active;
#else #else
...@@ -95,17 +95,17 @@ ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...) ...@@ -95,17 +95,17 @@ ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...)
#endif // !ANGLE_ENABLE_TRACE #endif // !ANGLE_ENABLE_TRACE
va_list vararg; va_list vararg;
va_start(vararg, format); va_start(vararg, format);
#if defined(ANGLE_ENABLE_PERF) #if defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
output(true, reinterpret_cast<PerfOutputFunction>(D3DPERF_BeginEvent), format, vararg); output(true, reinterpret_cast<PerfOutputFunction>(D3DPERF_BeginEvent), format, vararg);
#else #else
output(true, NULL, format, vararg); output(true, NULL, format, vararg);
#endif // ANGLE_ENABLE_PERF #endif // ANGLE_ENABLE_DEBUG_ANNOTATIONS
va_end(vararg); va_end(vararg);
} }
ScopedPerfEventHelper::~ScopedPerfEventHelper() ScopedPerfEventHelper::~ScopedPerfEventHelper()
{ {
#if defined(ANGLE_ENABLE_PERF) #if defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
if (perfActive()) if (perfActive())
{ {
D3DPERF_EndEvent(); D3DPERF_EndEvent();
......
...@@ -39,28 +39,28 @@ namespace gl ...@@ -39,28 +39,28 @@ namespace gl
} }
// A macro to output a trace of a function call and its arguments to the debugging log // A macro to output a trace of a function call and its arguments to the debugging log
#if defined(ANGLE_ENABLE_TRACE) || defined(ANGLE_ENABLE_PERF) #if defined(ANGLE_ENABLE_TRACE) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
#define TRACE(message, ...) gl::trace(true, "trace: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) #define TRACE(message, ...) gl::trace(true, "trace: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__)
#else #else
#define TRACE(message, ...) (void(0)) #define TRACE(message, ...) (void(0))
#endif #endif
// A macro to output a function call and its arguments to the debugging log, to denote an item in need of fixing. // A macro to output a function call and its arguments to the debugging log, to denote an item in need of fixing.
#if defined(ANGLE_ENABLE_TRACE) || defined(ANGLE_ENABLE_PERF) #if defined(ANGLE_ENABLE_TRACE) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
#define FIXME(message, ...) gl::trace(false, "fixme: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) #define FIXME(message, ...) gl::trace(false, "fixme: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__)
#else #else
#define FIXME(message, ...) (void(0)) #define FIXME(message, ...) (void(0))
#endif #endif
// A macro to output a function call and its arguments to the debugging log, in case of error. // A macro to output a function call and its arguments to the debugging log, in case of error.
#if defined(ANGLE_ENABLE_TRACE) || defined(ANGLE_ENABLE_PERF) #if defined(ANGLE_ENABLE_TRACE) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
#define ERR(message, ...) gl::trace(false, "err: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__) #define ERR(message, ...) gl::trace(false, "err: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__)
#else #else
#define ERR(message, ...) (void(0)) #define ERR(message, ...) (void(0))
#endif #endif
// A macro to log a performance event around a scope. // A macro to log a performance event around a scope.
#if defined(ANGLE_ENABLE_TRACE) || defined(ANGLE_ENABLE_PERF) #if defined(ANGLE_ENABLE_TRACE) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define EVENT(message, ...) gl::ScopedPerfEventHelper scopedPerfEventHelper ## __LINE__("%s" message "\n", __FUNCTION__, __VA_ARGS__); #define EVENT(message, ...) gl::ScopedPerfEventHelper scopedPerfEventHelper ## __LINE__("%s" message "\n", __FUNCTION__, __VA_ARGS__);
#else #else
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
# include <windows.h> # include <windows.h>
# include <intrin.h> # include <intrin.h>
# if defined(ANGLE_ENABLE_D3D9) || defined(ANGLE_ENABLE_PERF) # if defined(ANGLE_ENABLE_D3D9) || defined(ANGLE_ENABLE_DEBUG_ANNOTATIONS)
# include <d3d9.h> # include <d3d9.h>
# include <d3dcompiler.h> # include <d3dcompiler.h>
# endif # endif
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
# endif # endif
# if defined(ANGLE_ENABLE_WINDOWS_STORE) # if defined(ANGLE_ENABLE_WINDOWS_STORE)
# undef ANGLE_ENABLE_PERF # undef ANGLE_ENABLE_DEBUG_ANNOTATIONS
# include <dxgi1_3.h> # include <dxgi1_3.h>
# endif # endif
......
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
{ {
'defines': 'defines':
[ [
'ANGLE_ENABLE_PERF', 'ANGLE_ENABLE_DEBUG_ANNOTATIONS',
], ],
}, },
}, },
......
...@@ -472,7 +472,7 @@ ...@@ -472,7 +472,7 @@
{ {
'defines': 'defines':
[ [
'ANGLE_ENABLE_PERF', 'ANGLE_ENABLE_DEBUG_ANNOTATIONS',
'ANGLE_GENERATE_SHADER_DEBUG_INFO' 'ANGLE_GENERATE_SHADER_DEBUG_INFO'
], ],
'msvs_settings': 'msvs_settings':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment