1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Send thread id in GPU zone end message.

We don't care about OpenGL zone thread ids, so the identifier is zeroed.
This commit is contained in:
Bartosz Taudul 2019-09-23 16:05:49 +02:00
parent daf64c703a
commit 0f68e1e981
4 changed files with 4 additions and 1 deletions

View File

@ -253,6 +253,7 @@ public:
auto item = token->enqueue_begin( magic );
MemWrite( &item->hdr.type, QueueType::GpuZoneEnd );
MemWrite( &item->gpuZoneEnd.cpuTime, Profiler::GetTime() );
memset( &item->gpuZoneEnd.thread, 0, sizeof( item->gpuZoneEnd.thread ) );
MemWrite( &item->gpuZoneEnd.queryId, uint16_t( queryId ) );
MemWrite( &item->gpuZoneEnd.context, GetGpuCtx().ptr->GetId() );
tail.store( magic + 1, std::memory_order_release );

View File

@ -256,6 +256,7 @@ public:
auto item = Profiler::QueueSerial();
MemWrite( &item->hdr.type, QueueType::GpuZoneEnd );
MemWrite( &item->gpuZoneEnd.cpuTime, Profiler::GetTime() );
MemWrite( &item->gpuZoneEnd.thread, GetThreadHandle() );
MemWrite( &item->gpuZoneEnd.queryId, uint16_t( queryId ) );
MemWrite( &item->gpuZoneEnd.context, m_ctx->GetId() );
Profiler::QueueSerialFinish();

View File

@ -9,7 +9,7 @@
namespace tracy
{
enum : uint32_t { ProtocolVersion = 17 };
enum : uint32_t { ProtocolVersion = 18 };
enum : uint32_t { BroadcastVersion = 0 };
using lz4sz_t = uint32_t;

View File

@ -237,6 +237,7 @@ struct QueueGpuZoneBegin
struct QueueGpuZoneEnd
{
int64_t cpuTime;
uint64_t thread;
uint16_t queryId;
uint8_t context;
};