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

Support callstack collection for OpenGL GPU zones.

This commit is contained in:
Bartosz Taudul
2018-06-22 02:12:42 +02:00
parent 225ed4e037
commit 3a885bb8fd
2 changed files with 43 additions and 1 deletions
+12 -1
View File
@@ -1964,7 +1964,18 @@ void Worker::ProcessGpuZoneBeginImpl( GpuEvent* zone, const QueueGpuZoneBegin& e
zone->gpuEnd = -1;
zone->srcloc = ShrinkSourceLocation( ev.srcloc );
zone->callstack = 0;
zone->thread = CompressThread( ev.thread );
if( ctx->thread == 0 )
{
// Vulkan context is not bound to any single thread.
zone->thread = CompressThread( ev.thread );
}
else
{
// OpenGL doesn't need per-zone thread id. It still can be sent,
// because it may be needed for callstack collection purposes.
zone->thread = 0;
}
m_data.lastTime = std::max( m_data.lastTime, zone->cpuStart );