![]() |
ezEngine
Release 25.03
|
Allocates temporary staging buffers from a large pool. Allocations will automatically be freed at the end of the frame. New (larger) pools will be created if the existing ones run out of space. Pools will be deleted after a certain time of no usage. More...
#include <StagingBufferPoolVulkan.h>
Public Member Functions | |
void | Initialize (ezGALDeviceVulkan *pDevice, ezUInt64 uiStartingPoolSize) |
Initializes the pool. More... | |
void | DeInitialize () |
Needs to be called before destroying this instance. Ensure that the GPU is idle before calling. | |
void | AfterBeginFrame () |
Needs to be called after begin frame to free memory. | |
void | BeforeCommandBufferSubmit () |
Needs to be called before submitting work to the GPU to flush GPU caches. | |
ezStagingBufferVulkan | AllocateBuffer (ezUInt64 size) |
Allocates a temp buffer of the given size. More... | |
Allocates temporary staging buffers from a large pool. Allocations will automatically be freed at the end of the frame. New (larger) pools will be created if the existing ones run out of space. Pools will be deleted after a certain time of no usage.
ezStagingBufferVulkan ezStagingBufferPoolVulkan::AllocateBuffer | ( | ezUInt64 | size | ) |
Allocates a temp buffer of the given size.
size | The size of the temp buffer. |
void ezStagingBufferPoolVulkan::Initialize | ( | ezGALDeviceVulkan * | pDevice, |
ezUInt64 | uiStartingPoolSize | ||
) |
Initializes the pool.
pDevice | GAL device. |
uiStartingPoolSize | Size of the first pool. If depleted, a new one with twice the size of the previous one is created. |