Save/load GPU context names.

This commit is contained in:
Bartosz Taudul 2021-01-31 18:56:12 +01:00
parent 7bb6114270
commit c4a6f3f980

View File

@ -965,7 +965,13 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
for( uint64_t i=0; i<sz; i++ )
{
auto ctx = m_slab.AllocInit<GpuCtxData>();
if( fileVer >= FileVersion( 0, 7, 1 ) )
if( fileVer >= FileVersion( 0, 7, 6 ) )
{
uint8_t calibration;
f.Read6( ctx->thread, calibration, ctx->count, ctx->period, ctx->type, ctx->name );
ctx->hasCalibration = calibration;
}
else if( fileVer >= FileVersion( 0, 7, 1 ) )
{
uint8_t calibration;
f.Read5( ctx->thread, calibration, ctx->count, ctx->period, ctx->type );
@ -7031,6 +7037,7 @@ void Worker::Write( FileWrite& f )
f.Write( &ctx->count, sizeof( ctx->count ) );
f.Write( &ctx->period, sizeof( ctx->period ) );
f.Write( &ctx->type, sizeof( ctx->type ) );
f.Write( &ctx->name, sizeof( ctx->name ) );
sz = ctx->threadData.size();
f.Write( &sz, sizeof( sz ) );
for( auto& td : ctx->threadData )