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

Method Tr2SuballocatedBuffer

trinity/Tr2SuballocatedBuffer.cpp:15–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13
14
15Tr2SuballocatedBuffer::Tr2SuballocatedBuffer( const char* name, const Tr2GpuUsage::Type gpuUsage, const uint32_t blockSize, const uint32_t maxSize ) :
16 m_name( name ),
17 m_gpuUsage( gpuUsage ),
18 m_allocator( blockSize, maxSize, blockSize )
19{
20 CCP_STATS_SET( suballocatedBufferAllocated, m_allocator.GetAllocatedMemory() );
21 CCP_STATS_SET( suballocatedBufferCapacity, m_allocator.GetMaxSize() );
22}
23
24ALResult Tr2SuballocatedBuffer::Allocate( uint32_t stride, uint32_t count, void* data, Tr2RenderContextAL& renderContext, Allocation& result )
25{

Callers

nothing calls this directly

Calls 2

GetAllocatedMemoryMethod · 0.80
GetMaxSizeMethod · 0.80

Tested by

no test coverage detected