mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Remove GPU resync support.
The whole concept is not really reliable. And it forces CPU to GPU sync, which is bad.
This commit is contained in:
@@ -1570,9 +1570,6 @@ void Worker::Process( const QueueItem& ev )
|
||||
case QueueType::GpuTime:
|
||||
ProcessGpuTime( ev.gpuTime );
|
||||
break;
|
||||
case QueueType::GpuResync:
|
||||
ProcessGpuResync( ev.gpuResync );
|
||||
break;
|
||||
case QueueType::MemAlloc:
|
||||
ProcessMemAlloc( ev.memAlloc );
|
||||
break;
|
||||
@@ -2063,42 +2060,6 @@ void Worker::ProcessGpuTime( const QueueGpuTime& ev )
|
||||
}
|
||||
}
|
||||
|
||||
void Worker::ProcessGpuResync( const QueueGpuResync& ev )
|
||||
{
|
||||
auto ctx = m_gpuCtxMap[ev.context];
|
||||
assert( ctx );
|
||||
|
||||
int64_t gpuTime;
|
||||
if( ctx->period == 1.f )
|
||||
{
|
||||
gpuTime = ev.gpuTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
gpuTime = int64_t( double( ctx->period ) * ev.gpuTime ); // precision loss
|
||||
}
|
||||
|
||||
const auto timeDiff = TscTime( ev.cpuTime ) - gpuTime;
|
||||
|
||||
if( ctx->queue.empty() )
|
||||
{
|
||||
assert( ctx->resync.empty() );
|
||||
ctx->timeDiff = timeDiff;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ctx->resync.empty() )
|
||||
{
|
||||
ctx->resync.push_back( { timeDiff, uint16_t( ctx->queue.size() ) } );
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto last = ctx->resync.back().events;
|
||||
ctx->resync.push_back( { timeDiff, uint16_t( ctx->queue.size() - last ) } );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Worker::ProcessMemAlloc( const QueueMemAlloc& ev )
|
||||
{
|
||||
const auto time = TscTime( ev.time );
|
||||
|
||||
Reference in New Issue
Block a user