mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add transient OpenGL zones.
This commit is contained in:
@@ -1771,6 +1771,13 @@ static void FreeAssociatedMemory( const QueueItem& item )
|
||||
ptr = MemRead<uint64_t>( &item.zoneBegin.srcloc );
|
||||
tracy_free( (void*)ptr );
|
||||
break;
|
||||
case QueueType::GpuZoneBeginAllocSrcLoc:
|
||||
case QueueType::GpuZoneBeginAllocSrcLocCallstack:
|
||||
case QueueType::GpuZoneBeginAllocSrcLocSerial:
|
||||
case QueueType::GpuZoneBeginAllocSrcLocCallstackSerial:
|
||||
ptr = MemRead<uint64_t>( &item.gpuZoneBegin.srcloc );
|
||||
tracy_free( (void*)ptr );
|
||||
break;
|
||||
case QueueType::CallstackMemory:
|
||||
case QueueType::Callstack:
|
||||
ptr = MemRead<uint64_t>( &item.callstackFat.ptr );
|
||||
@@ -1976,6 +1983,18 @@ Profiler::DequeueStatus Profiler::Dequeue( moodycamel::ConsumerToken& token )
|
||||
MemWrite( &item->gpuZoneBegin.cpuTime, dt );
|
||||
break;
|
||||
}
|
||||
case QueueType::GpuZoneBeginAllocSrcLoc:
|
||||
case QueueType::GpuZoneBeginAllocSrcLocCallstack:
|
||||
{
|
||||
int64_t t = MemRead<int64_t>( &item->gpuZoneBegin.cpuTime );
|
||||
int64_t dt = t - refThread;
|
||||
refThread = t;
|
||||
MemWrite( &item->gpuZoneBegin.cpuTime, dt );
|
||||
ptr = MemRead<uint64_t>( &item->gpuZoneBegin.srcloc );
|
||||
SendSourceLocationPayload( ptr );
|
||||
tracy_free( (void*)ptr );
|
||||
break;
|
||||
}
|
||||
case QueueType::GpuZoneEnd:
|
||||
{
|
||||
int64_t t = MemRead<int64_t>( &item->gpuZoneEnd.cpuTime );
|
||||
@@ -2206,6 +2225,18 @@ Profiler::DequeueStatus Profiler::DequeueSerial()
|
||||
MemWrite( &item->gpuZoneBegin.cpuTime, dt );
|
||||
break;
|
||||
}
|
||||
case QueueType::GpuZoneBeginAllocSrcLocSerial:
|
||||
case QueueType::GpuZoneBeginAllocSrcLocCallstackSerial:
|
||||
{
|
||||
int64_t t = MemRead<int64_t>( &item->gpuZoneBegin.cpuTime );
|
||||
int64_t dt = t - refSerial;
|
||||
refSerial = t;
|
||||
MemWrite( &item->gpuZoneBegin.cpuTime, dt );
|
||||
ptr = MemRead<uint64_t>( &item->gpuZoneBegin.srcloc );
|
||||
SendSourceLocationPayload( ptr );
|
||||
tracy_free( (void*)ptr );
|
||||
break;
|
||||
}
|
||||
case QueueType::GpuZoneEndSerial:
|
||||
{
|
||||
int64_t t = MemRead<int64_t>( &item->gpuZoneEnd.cpuTime );
|
||||
|
||||
Reference in New Issue
Block a user