mirror of
https://github.com/wolfpld/tracy
synced 2025-05-08 16:03:53 +00:00
New context events are not serialized.
This commit is contained in:
parent
f73e8aaa59
commit
68f8bb906e
@ -830,7 +830,10 @@ void View::ProcessMessageLiteral( const QueueMessage& ev )
|
||||
|
||||
void View::ProcessGpuNewContext( const QueueGpuNewContext& ev )
|
||||
{
|
||||
assert( ev.context == m_gpuData.size() );
|
||||
assert( m_gpuCtxMap.find( ev.context ) == m_gpuCtxMap.end() );
|
||||
const auto idx = m_gpuData.size();
|
||||
m_gpuCtxMap.emplace( ev.context, idx );
|
||||
|
||||
auto gpu = m_slab.AllocInit<GpuCtxData>();
|
||||
gpu->timeDiff = int64_t( ev.cputime * m_timerMul - ev.gputime );
|
||||
gpu->thread = ev.thread;
|
||||
@ -842,8 +845,9 @@ void View::ProcessGpuNewContext( const QueueGpuNewContext& ev )
|
||||
|
||||
void View::ProcessGpuZoneBegin( const QueueGpuZoneBegin& ev )
|
||||
{
|
||||
assert( m_gpuData.size() >= ev.context );
|
||||
auto ctx = m_gpuData[ev.context];
|
||||
auto it = m_gpuCtxMap.find( ev.context );
|
||||
assert( it != m_gpuCtxMap.end() );
|
||||
auto ctx = m_gpuData[it->second];
|
||||
|
||||
CheckSourceLocation( ev.srcloc );
|
||||
|
||||
@ -869,8 +873,9 @@ void View::ProcessGpuZoneBegin( const QueueGpuZoneBegin& ev )
|
||||
|
||||
void View::ProcessGpuZoneEnd( const QueueGpuZoneEnd& ev )
|
||||
{
|
||||
assert( m_gpuData.size() >= ev.context );
|
||||
auto ctx = m_gpuData[ev.context];
|
||||
auto it = m_gpuCtxMap.find( ev.context );
|
||||
assert( it != m_gpuCtxMap.end() );
|
||||
auto ctx = m_gpuData[it->second];
|
||||
|
||||
assert( !ctx->stack.empty() );
|
||||
auto zone = ctx->stack.back();
|
||||
@ -882,8 +887,9 @@ void View::ProcessGpuZoneEnd( const QueueGpuZoneEnd& ev )
|
||||
|
||||
void View::ProcessGpuTime( const QueueGpuTime& ev )
|
||||
{
|
||||
assert( m_gpuData.size() >= ev.context );
|
||||
auto ctx = m_gpuData[ev.context];
|
||||
auto it = m_gpuCtxMap.find( ev.context );
|
||||
assert( it != m_gpuCtxMap.end() );
|
||||
auto ctx = m_gpuData[it->second];
|
||||
|
||||
auto zone = ctx->queue.front();
|
||||
if( zone->gpuStart == std::numeric_limits<int64_t>::max() )
|
||||
|
@ -193,6 +193,7 @@ private:
|
||||
flat_hash_set<uint64_t, power_of_two_std_hash<uint64_t>> m_pendingSourceLocation;
|
||||
flat_hash_map<uint64_t, StringLocation, power_of_two_std_hash<uint64_t>> m_pendingCustomStrings;
|
||||
flat_hash_map<uint64_t, uint32_t, power_of_two_std_hash<uint64_t>> m_threadMap;
|
||||
flat_hash_map<uint16_t, uint32_t, power_of_two_std_hash<uint16_t>> m_gpuCtxMap;
|
||||
flat_hash_map<uint64_t, uint32_t, power_of_two_std_hash<uint64_t>> m_plotMap;
|
||||
std::unordered_map<const char*, uint32_t, charutil::Hasher, charutil::Comparator> m_plotRev;
|
||||
flat_hash_map<uint64_t, PlotData*, power_of_two_std_hash<uint64_t>> m_pendingPlots;
|
||||
|
Loading…
x
Reference in New Issue
Block a user