From 32f46e17d3b621e09438aa36325a1681f198c7df Mon Sep 17 00:00:00 2001 From: Ptolemy Date: Fri, 15 Oct 2021 16:13:06 -0700 Subject: [PATCH] SL-16027: Fix SL-15962 breaking Tracy OpenGL. Can now log memory + OpenGL in Tracy at the same time. --- doc/contributions.txt | 1 + indra/llcommon/linden_common.h | 2 +- indra/llcommon/llmemory.h | 4 ++-- indra/llwindow/llwindowwin32.cpp | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/contributions.txt b/doc/contributions.txt index a8deb9c2ae..ca42aedfc4 100755 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -271,6 +271,7 @@ Beq Janus SL-14766 SL-14927 SL-15709 + SL-16027 Beth Walcher Bezilon Kasei Biancaluce Robbiani diff --git a/indra/llcommon/linden_common.h b/indra/llcommon/linden_common.h index a228fd22be..bb7fd9a868 100644 --- a/indra/llcommon/linden_common.h +++ b/indra/llcommon/linden_common.h @@ -28,7 +28,7 @@ #define LL_LINDEN_COMMON_H #include "llprofiler.h" -#if TRACY_ENABLE && !defined(LL_PROFILER_ENABLE_TRACY_OPENGL) // hooks for memory profiling +#if TRACY_ENABLE // hooks for memory profiling void *tracy_aligned_malloc(size_t size, size_t alignment); void tracy_aligned_free(void *memblock); #define _aligned_malloc(X, Y) tracy_aligned_malloc((X), (Y)) diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 24f86cc11e..abed23bf01 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -114,7 +114,7 @@ template T* LL_NEXT_ALIGNED_ADDRESS_64(T* address) inline void* ll_aligned_malloc_fallback( size_t size, int align ) { #if defined(LL_WINDOWS) - return _aligned_malloc(size, align); + return (_aligned_malloc)(size, align); #else char* aligned = NULL; void* mem = malloc( size + (align - 1) + sizeof(void*) ); @@ -132,7 +132,7 @@ template T* LL_NEXT_ALIGNED_ADDRESS_64(T* address) inline void ll_aligned_free_fallback( void* ptr ) { #if defined(LL_WINDOWS) - _aligned_free(ptr); + (_aligned_free)(ptr); #else if (ptr) { diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 1b8881cc86..0a6eef072b 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1748,8 +1748,6 @@ const S32 max_format = (S32)num_formats - 1; return FALSE; } - LL_PROFILER_GPU_CONTEXT - if (!gGLManager.initGL()) { close(); @@ -1757,6 +1755,8 @@ const S32 max_format = (S32)num_formats - 1; return FALSE; } + LL_PROFILER_GPU_CONTEXT + // Disable vertical sync for swap if (disable_vsync && wglSwapIntervalEXT) {