mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Drop accuracy bits from GPU context.
This commit is contained in:
parent
384e2e3fa1
commit
1013ec8db7
@ -562,7 +562,6 @@ struct GpuCtxData
|
|||||||
int64_t timeDiff;
|
int64_t timeDiff;
|
||||||
uint64_t thread;
|
uint64_t thread;
|
||||||
uint64_t count;
|
uint64_t count;
|
||||||
uint8_t accuracyBits;
|
|
||||||
float period;
|
float period;
|
||||||
GpuContextType type;
|
GpuContextType type;
|
||||||
bool hasPeriod;
|
bool hasPeriod;
|
||||||
|
@ -2595,17 +2595,10 @@ void View::DrawZones()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
TextFocused( "Zone count:", RealToString( v->count ) );
|
TextFocused( "Zone count:", RealToString( v->count ) );
|
||||||
//TextFocused( "Top-level zones:", RealToString( v->timeline.size() ) );
|
|
||||||
if( isMultithreaded )
|
if( isMultithreaded )
|
||||||
{
|
{
|
||||||
TextFocused( "Timestamp accuracy:", TimeToString( v->period ) );
|
TextFocused( "Timestamp accuracy:", TimeToString( v->period ) );
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
TextDisabledUnformatted( "Query accuracy bits:" );
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Text( "%i", v->accuracyBits );
|
|
||||||
}
|
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -923,13 +923,15 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
|
|||||||
for( uint64_t i=0; i<sz; i++ )
|
for( uint64_t i=0; i<sz; i++ )
|
||||||
{
|
{
|
||||||
auto ctx = m_slab.AllocInit<GpuCtxData>();
|
auto ctx = m_slab.AllocInit<GpuCtxData>();
|
||||||
|
// TODO remove
|
||||||
|
uint8_t accuracy;
|
||||||
if( fileVer >= FileVersion( 0, 6, 14 ) )
|
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
|
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->type = ctx->thread == 0 ? GpuContextType::Vulkan : GpuContextType::OpenGl;
|
||||||
}
|
}
|
||||||
ctx->hasPeriod = ctx->period != 1.f;
|
ctx->hasPeriod = ctx->period != 1.f;
|
||||||
@ -4890,7 +4892,6 @@ void Worker::ProcessGpuNewContext( const QueueGpuNewContext& ev )
|
|||||||
memset( gpu->query, 0, sizeof( gpu->query ) );
|
memset( gpu->query, 0, sizeof( gpu->query ) );
|
||||||
gpu->timeDiff = TscTime( ev.cpuTime - m_data.baseTime ) - gpuTime;
|
gpu->timeDiff = TscTime( ev.cpuTime - m_data.baseTime ) - gpuTime;
|
||||||
gpu->thread = ev.thread;
|
gpu->thread = ev.thread;
|
||||||
gpu->accuracyBits = ev.accuracyBits;
|
|
||||||
gpu->period = ev.period;
|
gpu->period = ev.period;
|
||||||
gpu->count = 0;
|
gpu->count = 0;
|
||||||
gpu->type = ev.type;
|
gpu->type = ev.type;
|
||||||
@ -6575,7 +6576,9 @@ void Worker::Write( FileWrite& f )
|
|||||||
for( auto& ctx : m_data.gpuData )
|
for( auto& ctx : m_data.gpuData )
|
||||||
{
|
{
|
||||||
f.Write( &ctx->thread, sizeof( ctx->thread ) );
|
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->count, sizeof( ctx->count ) );
|
||||||
f.Write( &ctx->period, sizeof( ctx->period ) );
|
f.Write( &ctx->period, sizeof( ctx->period ) );
|
||||||
f.Write( &ctx->type, sizeof( ctx->type ) );
|
f.Write( &ctx->type, sizeof( ctx->type ) );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user