Drop accuracy bits from GPU context.

This commit is contained in:
Bartosz Taudul 2020-07-07 01:21:36 +02:00
parent 384e2e3fa1
commit 1013ec8db7
3 changed files with 7 additions and 12 deletions

View File

@ -562,7 +562,6 @@ struct GpuCtxData
int64_t timeDiff;
uint64_t thread;
uint64_t count;
uint8_t accuracyBits;
float period;
GpuContextType type;
bool hasPeriod;

View File

@ -2595,17 +2595,10 @@ void View::DrawZones()
}
}
TextFocused( "Zone count:", RealToString( v->count ) );
//TextFocused( "Top-level zones:", RealToString( v->timeline.size() ) );
if( isMultithreaded )
{
TextFocused( "Timestamp accuracy:", TimeToString( v->period ) );
}
else
{
TextDisabledUnformatted( "Query accuracy bits:" );
ImGui::SameLine();
ImGui::Text( "%i", v->accuracyBits );
}
ImGui::EndTooltip();
}
}

View File

@ -923,13 +923,15 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
for( uint64_t i=0; i<sz; i++ )
{
auto ctx = m_slab.AllocInit<GpuCtxData>();
// TODO remove
uint8_t accuracy;
if( fileVer >= FileVersion( 0, 6, 14 ) )
{
f.Read5( ctx->thread, ctx->accuracyBits, ctx->count, ctx->period, ctx->type );
f.Read5( ctx->thread, accuracy, ctx->count, ctx->period, ctx->type );
}
else
{
f.Read4( ctx->thread, ctx->accuracyBits, ctx->count, ctx->period );
f.Read4( ctx->thread, accuracy, ctx->count, ctx->period );
ctx->type = ctx->thread == 0 ? GpuContextType::Vulkan : GpuContextType::OpenGl;
}
ctx->hasPeriod = ctx->period != 1.f;
@ -4890,7 +4892,6 @@ void Worker::ProcessGpuNewContext( const QueueGpuNewContext& ev )
memset( gpu->query, 0, sizeof( gpu->query ) );
gpu->timeDiff = TscTime( ev.cpuTime - m_data.baseTime ) - gpuTime;
gpu->thread = ev.thread;
gpu->accuracyBits = ev.accuracyBits;
gpu->period = ev.period;
gpu->count = 0;
gpu->type = ev.type;
@ -6575,7 +6576,9 @@ void Worker::Write( FileWrite& f )
for( auto& ctx : m_data.gpuData )
{
f.Write( &ctx->thread, sizeof( ctx->thread ) );
f.Write( &ctx->accuracyBits, sizeof( ctx->accuracyBits ) );
// TODO remove
uint8_t zero = 0;
f.Write( &zero, sizeof( zero ) );
f.Write( &ctx->count, sizeof( ctx->count ) );
f.Write( &ctx->period, sizeof( ctx->period ) );
f.Write( &ctx->type, sizeof( ctx->type ) );