9 using namespace RenderCore;
36 void Seek(
size_t offset,
size_t alignment);
#define ENUM_NAME_CONV_BEGIN(T)
Defines convince to_string() method and format_as() [fmt] for the respective enum class Example usage...
Definition Enums.hpp:84
#define ENUM_NAME(E)
Definition Enums.hpp:95
General Purpose Allocator (GPA) interface.
Definition Allocator.hpp:24
Definition Resource.hpp:30
Definition Command.hpp:34
Definition Device.hpp:131
Base class for all RHI objects.
Definition Details.hpp:16
Helper class for GPU buffer updates.
Definition StagingBuffer.hpp:72
StagingBuffer mStagingBuffer
Definition StagingBuffer.hpp:84
void EndTransfer()
Ends the transfer state, and pushes optimized copy commands to the given command list.
Definition StagingBuffer.cpp:116
BufferStagingList mBufferStagings
Definition StagingBuffer.hpp:89
RHIBuffer * GetBuffer()
Gets the GPU-only backing buffer.
Definition StagingBuffer.hpp:108
State
Definition StagingBuffer.hpp:75
bool HasUpdates()
Check if there are any pending updates to be performed.
Definition StagingBuffer.hpp:138
RHIDevice * mDevice
Definition StagingBuffer.hpp:81
RHIDeviceScopedObjectHandle< RHIBuffer > mBuffer
Definition StagingBuffer.hpp:86
void Update(RHICommandList *cmd)
Push the scheduled uploads onto the command list.
Definition StagingBuffer.cpp:122
Optional< uint32_t > mClearValue
Definition StagingBuffer.hpp:92
StagingBuffer * GetStagingBuffer()
Gets the current staging buffer for data uploads.
Definition StagingBuffer.cpp:92
RHIDeviceIdleGuard mIdleGuard
Definition StagingBuffer.hpp:91
Allocator * mAllocator
Definition StagingBuffer.hpp:82
void BeginTransfer()
Resets the staging buffer and aborts all pending data updates.
Definition StagingBuffer.cpp:85
State mState
Definition StagingBuffer.hpp:88
Bump-only allocation buffer used for staging data to be transferred to GPU.
Definition StagingBuffer.hpp:18
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.
Definition StagingBuffer.cpp:53
Allocator * mAllocator
Definition StagingBuffer.hpp:19
void Reset()
Definition StagingBuffer.cpp:67
void Seek(size_t offset, size_t alignment)
Seeks the current offset to the given offset, aligned to the given alignment.
Definition StagingBuffer.cpp:61
size_t mSize
Definition StagingBuffer.hpp:23
size_t Size() const
Definition StagingBuffer.hpp:42
RHIBuffer * GetBuffer() const
Definition StagingBuffer.hpp:46
size_t Tell() const
Resets the staging buffer, allowing it to be reused. No GPU-side data transfer is performed.
Definition StagingBuffer.hpp:41
void * mMapped
Definition StagingBuffer.hpp:22
RHIDevice * mDevice
Definition StagingBuffer.hpp:20
RHIDeviceScopedObjectHandle< RHIBuffer > mBuffer
Definition StagingBuffer.hpp:21
size_t FreeSize() const
Definition StagingBuffer.hpp:43
size_t mOffset
Definition StagingBuffer.hpp:24
std::unique_ptr< T, StlDeleter< T > > UniquePtr
std::unique_ptr with custom deleter that uses a Foundation::Core::Allocator to deallocate memory.
Definition Allocator.hpp:161
Transfer
Definition Common.hpp:201
static constexpr size_t kFullSize
Definition Common.hpp:8
Reference implementations of real-time rendering routines.
Definition Application.hpp:18
Vector< RHICommandList::CopyBufferRegion > BufferCopyList
Definition StagingBuffer.hpp:13
Vector< BufferStagingItem > BufferStagingList
Definition StagingBuffer.hpp:12
Tuple< RHIBuffer *, RHIBuffer *, RHICommandList::CopyBufferRegion > BufferStagingItem
Definition StagingBuffer.hpp:11
BufferStagingList & CoalesceBufferStaging(BufferStagingList &res)
Two-pointers in-place coalescing of copy regions.
Definition StagingBuffer.cpp:6
Definition Resource.hpp:21
RAII guard to wait for device idle on destruction.
Definition Device.hpp:205