|
SleakEngine 0.1.0
C++23 multi-backend game engine
|
#include <DirectX12UploadRing.hpp>
Classes | |
| struct | Allocation |
| CPU write pointer and matching GPU address of one allocation. More... | |
Public Member Functions | |
| DirectX12UploadRing ()=default | |
| DirectX12UploadRing (const DirectX12UploadRing &)=delete | |
| ~DirectX12UploadRing () | |
| bool | Allocate (uint64_t size, Allocation &out) |
| Returns 256-byte aligned memory valid until the frame is reused. | |
| void | BeginFrame (uint32_t frameIndex) |
| Rewinds the frame's pages. The GPU must be done with that frame. | |
| void | Initialize (ID3D12Device *device, uint32_t frameCount, uint64_t pageSize) |
| Stores the device and sizes the ring. Pages are created on demand. | |
| DirectX12UploadRing & | operator= (const DirectX12UploadRing &)=delete |
| void | Release () |
| Unmaps and frees every page. The GPU must be idle. | |
Per-frame linear allocator over upload heap pages for transient GPU data. Each frame in flight owns its own pages, which are rewound by BeginFrame.
Definition at line 15 of file DirectX12UploadRing.hpp.
|
default |
|
inline |
Definition at line 24 of file DirectX12UploadRing.hpp.
|
delete |
| bool Sleak::RenderEngine::DirectX12UploadRing::Allocate | ( | uint64_t | size, |
| Allocation & | out ) |
Returns 256-byte aligned memory valid until the frame is reused.
Definition at line 32 of file DirectX12UploadRing.cpp.
| void Sleak::RenderEngine::DirectX12UploadRing::BeginFrame | ( | uint32_t | frameIndex | ) |
Rewinds the frame's pages. The GPU must be done with that frame.
Definition at line 25 of file DirectX12UploadRing.cpp.
| void Sleak::RenderEngine::DirectX12UploadRing::Initialize | ( | ID3D12Device * | device, |
| uint32_t | frameCount, | ||
| uint64_t | pageSize ) |
Stores the device and sizes the ring. Pages are created on demand.
Definition at line 16 of file DirectX12UploadRing.cpp.
|
delete |
| void Sleak::RenderEngine::DirectX12UploadRing::Release | ( | ) |
Unmaps and frees every page. The GPU must be idle.
Definition at line 63 of file DirectX12UploadRing.cpp.