GPU context hiding plumbing.

This commit is contained in:
Bartosz Taudul 2017-11-30 15:31:31 +01:00
parent ab1f93194e
commit 5246098c79
2 changed files with 4 additions and 0 deletions

View File

@ -168,6 +168,7 @@ struct GpuCtxData
Vector<GpuCtxResync> resync; Vector<GpuCtxResync> resync;
uint8_t accuracyBits; uint8_t accuracyBits;
bool showFull; bool showFull;
bool visible;
}; };
struct LockMap struct LockMap

View File

@ -357,6 +357,7 @@ View::View( FileRead& f )
f.Read( &ctx->count, sizeof( ctx->count ) ); f.Read( &ctx->count, sizeof( ctx->count ) );
ReadTimeline( f, ctx->timeline ); ReadTimeline( f, ctx->timeline );
ctx->showFull = true; ctx->showFull = true;
ctx->visible = true;
m_gpuData.push_back( ctx ); m_gpuData.push_back( ctx );
} }
@ -851,6 +852,7 @@ void View::ProcessGpuNewContext( const QueueGpuNewContext& ev )
gpu->accuracyBits = ev.accuracyBits; gpu->accuracyBits = ev.accuracyBits;
gpu->count = 0; gpu->count = 0;
gpu->showFull = true; gpu->showFull = true;
gpu->visible = true;
m_gpuData.push_back( gpu ); m_gpuData.push_back( gpu );
m_gpuCtxMap.emplace( ev.context, gpu ); m_gpuCtxMap.emplace( ev.context, gpu );
} }
@ -2167,6 +2169,7 @@ void View::DrawZones()
for( size_t i=0; i<m_gpuData.size(); i++ ) for( size_t i=0; i<m_gpuData.size(); i++ )
{ {
auto& v = m_gpuData[i]; auto& v = m_gpuData[i];
if( !v->visible ) continue;
draw->AddLine( wpos + ImVec2( 0, offset + ostep - 1 ), wpos + ImVec2( w, offset + ostep - 1 ), 0x33FFFFFF ); draw->AddLine( wpos + ImVec2( 0, offset + ostep - 1 ), wpos + ImVec2( w, offset + ostep - 1 ), 0x33FFFFFF );