From a35544c701b223ba08f0607c872d8afbb08114f5 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Tue, 21 Sep 2021 15:56:18 -0700 Subject: SL-16027: Add Tracy OpenGL support --- indra/llrender/llglheaders.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/llrender/llglheaders.h') diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h index 6bca3623e0..e7f9315d11 100644 --- a/indra/llrender/llglheaders.h +++ b/indra/llrender/llglheaders.h @@ -812,4 +812,23 @@ extern void glGetBufferPointervARB (GLenum, GLenum, GLvoid* *); #define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD #endif +#if LL_PROFILER_ENABLE_TRACY_OPENGL + // Tracy uses the following: + // glGenQueries + // glGetQueryiv + // glGetQueryObjectiv + #define glGenQueries glGenQueriesARB + #define glGetQueryiv glGetQueryivARB + #define glGetQueryObjectiv glGetQueryObjectivARB + #include + + #define LL_PROFILER_GPU_ZONEC(name,color) TracyGpuZoneC(name,color); + #define LL_PROFILER_GPU_COLLECT TracyGpuCollect + #define LL_PROFILER_GPU_CONTEXT TracyGpuContext +#else + #define LL_PROFILER_GPU_ZONEC(name,color) (void)name;(void)color; + #define LL_PROFILER_GPU_COLLECT + #define LL_PROFILER_GPU_CONTEXT +#endif + #endif // LL_LLGLHEADERS_H -- cgit v1.2.3 From d03ade68d36525a8b7abc0a783636cebda006ef4 Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Tue, 21 Sep 2021 17:46:11 -0700 Subject: SL-16027: Only enable Tracy OpengL macros if Tracy is enabled --- indra/llrender/llglheaders.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llrender/llglheaders.h') diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h index e7f9315d11..3d93cc0762 100644 --- a/indra/llrender/llglheaders.h +++ b/indra/llrender/llglheaders.h @@ -812,7 +812,7 @@ extern void glGetBufferPointervARB (GLenum, GLenum, GLvoid* *); #define GL_RENDERBUFFER_FREE_MEMORY_ATI 0x87FD #endif -#if LL_PROFILER_ENABLE_TRACY_OPENGL +#if defined(TRACY_ENABLE) && LL_PROFILER_ENABLE_TRACY_OPENGL // Tracy uses the following: // glGenQueries // glGetQueryiv -- cgit v1.2.3