Send GPU zone thread handle.

This commit is contained in:
Bartosz Taudul 2018-06-17 18:55:12 +02:00
parent 6102f17e29
commit 684ba455a2
3 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,7 @@
#else
#include <atomic>
#include <stdlib.h>
#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 );
}

View File

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

View File

@ -168,6 +168,7 @@ struct QueueGpuZoneBegin
{
int64_t cpuTime;
uint64_t srcloc;
uint64_t thread;
uint16_t context;
};