SL-16027: Fix SL-15962 breaking Tracy OpenGL. Can now log memory + OpenGL in Tracy at the same time.

master
Ptolemy 2021-10-15 16:13:06 -07:00
parent 997907ec43
commit 32f46e17d3
4 changed files with 6 additions and 5 deletions

View File

@ -271,6 +271,7 @@ Beq Janus
SL-14766
SL-14927
SL-15709
SL-16027
Beth Walcher
Bezilon Kasei
Biancaluce Robbiani

View File

@ -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))

View File

@ -114,7 +114,7 @@ template <typename T> 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 <typename T> 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)
{

View File

@ -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)
{