Fix regression from 38a0718b70
This commit is contained in:
@@ -108,7 +108,7 @@ namespace
|
|||||||
};
|
};
|
||||||
|
|
||||||
ChunkedArray<Location, 256> ManagedSourceLocations;
|
ChunkedArray<Location, 256> ManagedSourceLocations;
|
||||||
uint32 ManagedEventsCount[PLATFORM_THREADS_LIMIT] = { 0 };
|
ThreadLocal<uint32> ManagedEventsCount;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -148,7 +148,7 @@ DEFINE_INTERNAL_CALL(void) ProfilerInternal_BeginEvent(MString* nameObj)
|
|||||||
//static constexpr tracy::SourceLocationData tracySrcLoc{ nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 };
|
//static constexpr tracy::SourceLocationData tracySrcLoc{ nullptr, __FUNCTION__, __FILE__, (uint32_t)__LINE__, 0 };
|
||||||
const bool tracyActive = tracy::ScopedZone::Begin(srcLoc);
|
const bool tracyActive = tracy::ScopedZone::Begin(srcLoc);
|
||||||
if (tracyActive)
|
if (tracyActive)
|
||||||
ManagedEventsCount[Platform::GetCurrentThreadID()]++;
|
ManagedEventsCount.Get()++;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@@ -158,7 +158,7 @@ DEFINE_INTERNAL_CALL(void) ProfilerInternal_EndEvent()
|
|||||||
{
|
{
|
||||||
#if COMPILE_WITH_PROFILER
|
#if COMPILE_WITH_PROFILER
|
||||||
#if TRACY_ENABLE
|
#if TRACY_ENABLE
|
||||||
auto& tracyActive = ManagedEventsCount[Platform::GetCurrentThreadID()];
|
uint32& tracyActive = ManagedEventsCount.Get();
|
||||||
if (tracyActive > 0)
|
if (tracyActive > 0)
|
||||||
{
|
{
|
||||||
tracyActive--;
|
tracyActive--;
|
||||||
|
|||||||
Reference in New Issue
Block a user