diff --git a/TracyOpenGL.hpp b/TracyOpenGL.hpp index 89e8a120..a3350ced 100644 --- a/TracyOpenGL.hpp +++ b/TracyOpenGL.hpp @@ -13,6 +13,7 @@ #else #include +#include #include "Tracy.hpp" #include "client/TracyProfiler.hpp" @@ -158,6 +159,7 @@ public: MemWrite( &item->hdr.type, QueueType::GpuZoneBegin ); MemWrite( &item->gpuZoneBegin.cpuTime, Profiler::GetTime() ); MemWrite( &item->gpuZoneBegin.srcloc, (uint64_t)srcloc ); + memset( &item->gpuZoneBegin.thread, 0, sizeof( item->gpuZoneBegin.thread ) ); MemWrite( &item->gpuZoneBegin.context, s_gpuCtx.ptr->GetId() ); tail.store( magic + 1, std::memory_order_release ); } diff --git a/TracyVulkan.hpp b/TracyVulkan.hpp index 5ed6a591..632101df 100644 --- a/TracyVulkan.hpp +++ b/TracyVulkan.hpp @@ -174,6 +174,7 @@ public: MemWrite( &item->hdr.type, QueueType::GpuZoneBegin ); MemWrite( &item->gpuZoneBegin.cpuTime, Profiler::GetTime() ); MemWrite( &item->gpuZoneBegin.srcloc, (uint64_t)srcloc ); + MemWrite( &item->gpuZoneBegin.thread, GetThreadHandle() ); MemWrite( &item->gpuZoneBegin.context, ctx->GetId() ); tail.store( magic + 1, std::memory_order_release ); } diff --git a/common/TracyQueue.hpp b/common/TracyQueue.hpp index 45e80590..d394006d 100644 --- a/common/TracyQueue.hpp +++ b/common/TracyQueue.hpp @@ -168,6 +168,7 @@ struct QueueGpuZoneBegin { int64_t cpuTime; uint64_t srcloc; + uint64_t thread; uint16_t context; };