MCPcopy Create free account
hub / github.com/carbonengine/trinity / PrepareParallelContext

Method PrepareParallelContext

trinity/Tr2RenderContext.cpp:161–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161void Tr2RenderContext::PrepareParallelContext( uint32_t index, Tr2RenderContext& context )
162{
163#if TRINITY_PLATFORM_SUPPORTS_PARALLEL_CONTEXTS
164 ForkContext( &context, index );
165 for( uint32_t i = 0; i != CBUFFER_COUNT; ++i )
166 {
167 Tr2ConstantBufferAL* buffer = GetConstantBuffer( i );
168 if( buffer && buffer->IsValid() )
169 {
170 void* data = nullptr;
171 buffer->Lock( &data, *this );
172 context.GetConstantBuffer( i )->Create( buffer->GetSize(), Tr2ConstantUsageAL::REUSABLE, data, *this );
173 buffer->Unlock( *this );
174 }
175 }
176 context.m_esm.AssignFrom( m_esm );
177#endif
178}
179
180uint32_t Tr2RenderContext::BeginParallelEncoding( uint32_t count )
181{

Callers

nothing calls this directly

Calls 7

GetConstantBufferMethod · 0.80
AssignFromMethod · 0.80
IsValidMethod · 0.45
LockMethod · 0.45
CreateMethod · 0.45
GetSizeMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected