MCPcopy Create free account
hub / github.com/Apress/Ray-Tracing-Gems-II / Initialize

Method Initialize

Chapter_14/src/Graphics.cpp:1801–1811  ·  view source on GitHub ↗

* Initialize linear allocator - allocate block of memory and remember underlying buffer parameters */

Source from the content-addressed store, hash-verified

1799 * Initialize linear allocator - allocate block of memory and remember underlying buffer parameters
1800 */
1801void LinearGPUAllocator::Initialize(D3D12Global& d3d, UINT64 initialSize, UINT64 alignment, D3D12_RESOURCE_FLAGS flags, D3D12_RESOURCE_STATES state, D3D12_HEAP_TYPE heapType) {
1802
1803 bufferInfo.alignment = alignment;
1804 bufferInfo.flags = flags;
1805 bufferInfo.heapType = heapType;
1806 bufferInfo.state = state;
1807
1808 AllocateInternal(d3d, initialSize);
1809
1810 isInitialized = true;
1811}
1812
1813/**
1814 * Allocates memory of requested size from pre-allocated block

Callers 2

InitShaderCompilerFunction · 0.45
CreateDXRResourcesFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected