|
Foundation
|
Bump-only allocation buffer used for staging data to be transferred to GPU. More...
#include <StagingBuffer.hpp>
Public Member Functions | |
| StagingBuffer (RHIDevice *device, size_t size, Allocator *allocator) | |
| size_t | Write (Span< const char > data, size_t alignment) |
| Writes data to the staging buffer, returning the offset of the data in the buffer. | |
| void | Seek (size_t offset, size_t alignment) |
| Seeks the current offset to the given offset, aligned to the given alignment. | |
| size_t | Tell () const |
| Resets the staging buffer, allowing it to be reused. No GPU-side data transfer is performed. | |
| size_t | Size () const |
| size_t | FreeSize () const |
| void | Reset () |
| RHIBuffer * | GetBuffer () const |
Private Attributes | |
| Allocator * | mAllocator |
| RHIDevice * | mDevice |
| RHIDeviceScopedObjectHandle< RHIBuffer > | mBuffer |
| void * | mMapped |
| size_t | mSize |
| size_t | mOffset = 0 |
Bump-only allocation buffer used for staging data to be transferred to GPU.
| Foundation::Rendering::StagingBuffer::StagingBuffer | ( | RHIDevice * | device, |
| size_t | size, | ||
| Allocator * | allocator | ||
| ) |
|
inline |
|
inline |
| void Foundation::Rendering::StagingBuffer::Reset | ( | ) |
Seeks the current offset to the given offset, aligned to the given alignment.
|
inline |
|
inline |
Resets the staging buffer, allowing it to be reused. No GPU-side data transfer is performed.
Writes data to the staging buffer, returning the offset of the data in the buffer.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |