Use separate texture compression context for saving traces.

This commit is contained in:
Bartosz Taudul 2020-04-14 20:07:30 +02:00
parent c2dd3913d7
commit db9557fc84

View File

@ -7001,6 +7001,8 @@ void Worker::Write( FileWrite& f )
f.Write( &sz, sizeof( sz ) );
if( sz != 0 ) f.Write( m_data.appInfo.data(), sizeof( m_data.appInfo[0] ) * sz );
{
TextureCompression texcomp;
sz = m_data.frameImage.size();
f.Write( &sz, sizeof( sz ) );
for( auto& fi : m_data.frameImage )
@ -7008,9 +7010,10 @@ void Worker::Write( FileWrite& f )
f.Write( &fi->w, sizeof( fi->w ) );
f.Write( &fi->h, sizeof( fi->h ) );
f.Write( &fi->flip, sizeof( fi->flip ) );
const auto image = m_texcomp.Unpack( *fi );
const auto image = texcomp.Unpack( *fi );
f.Write( image, fi->w * fi->h / 2 );
}
}
// Only save context switches relevant to active threads.
std::vector<unordered_flat_map<uint64_t, ContextSwitch*>::const_iterator> ctxValid;