|
SleakEngine 0.1.0
C++23 multi-backend game engine
|
#include <DirectX12UploadContext.hpp>
Public Member Functions | |
| DirectX12UploadContext ()=default | |
| DirectX12UploadContext (const DirectX12UploadContext &)=delete | |
| ~DirectX12UploadContext () | |
| void * | AllocateStaging (uint64_t size, ID3D12Resource **resource) |
| Returns a mapped upload buffer that lives until the open batch is done. | |
| void | Flush () |
| Submits and blocks until every batch has finished on the GPU. | |
| ID3D12GraphicsCommandList * | GetCommandList () |
| Returns the open copy command list, starting a new batch if needed. | |
| bool | Initialize (ID3D12Device *device, ID3D12CommandQueue *queue) |
| Creates the fence used to track submitted batches. | |
| DirectX12UploadContext & | operator= (const DirectX12UploadContext &)=delete |
| void | Release () |
| Flushes outstanding work and frees everything. | |
| void | Retire () |
| Frees staging memory of batches the GPU has finished. | |
| void | Submit () |
| Executes the recorded copies without waiting for them. | |
Batches CPU to GPU copies into one command list on the direct queue. Staging memory is freed once the batch that used it is done on the GPU.
Definition at line 15 of file DirectX12UploadContext.hpp.
|
default |
|
inline |
Definition at line 18 of file DirectX12UploadContext.hpp.
|
delete |
| void * Sleak::RenderEngine::DirectX12UploadContext::AllocateStaging | ( | uint64_t | size, |
| ID3D12Resource ** | resource ) |
Returns a mapped upload buffer that lives until the open batch is done.
Definition at line 72 of file DirectX12UploadContext.cpp.
| void Sleak::RenderEngine::DirectX12UploadContext::Flush | ( | ) |
Submits and blocks until every batch has finished on the GPU.
Definition at line 134 of file DirectX12UploadContext.cpp.
| ID3D12GraphicsCommandList * Sleak::RenderEngine::DirectX12UploadContext::GetCommandList | ( | ) |
Returns the open copy command list, starting a new batch if needed.
Definition at line 33 of file DirectX12UploadContext.cpp.
| bool Sleak::RenderEngine::DirectX12UploadContext::Initialize | ( | ID3D12Device * | device, |
| ID3D12CommandQueue * | queue ) |
Creates the fence used to track submitted batches.
Definition at line 8 of file DirectX12UploadContext.cpp.
|
delete |
| void Sleak::RenderEngine::DirectX12UploadContext::Release | ( | ) |
Flushes outstanding work and frees everything.
Definition at line 157 of file DirectX12UploadContext.cpp.
| void Sleak::RenderEngine::DirectX12UploadContext::Retire | ( | ) |
Frees staging memory of batches the GPU has finished.
Definition at line 144 of file DirectX12UploadContext.cpp.
| void Sleak::RenderEngine::DirectX12UploadContext::Submit | ( | ) |
Executes the recorded copies without waiting for them.
Definition at line 113 of file DirectX12UploadContext.cpp.