HDK
|
#include <stagingBuffer.h>
Public Member Functions | |
HDST_API | HdStStagingBuffer (HdStResourceRegistry *resourceRegistry) |
HDST_API | ~HdStStagingBuffer () |
HDST_API void | Deallocate () |
Destroys contained HgiBuffers and resets state to empty. More... | |
HDST_API void | Resize (size_t totalSize) |
HDST_API void | StageCopy (HgiBufferCpuToGpuOp const ©Op) |
HDST_API void | Flush () |
Provides a staging buffer for CPU writes of triple-buffered resources. None of the function calls are thread safe, they should be only accessed from the commit call to ResourceRegistry.
Definition at line 49 of file stagingBuffer.h.
HDST_API HdStStagingBuffer::HdStStagingBuffer | ( | HdStResourceRegistry * | resourceRegistry | ) |
HDST_API HdStStagingBuffer::~HdStStagingBuffer | ( | ) |
Destroys contained HgiBuffers and resets state to empty.
Flush the queued GPU to GPU blits from the calls to StageCopy. Resets the state for the next ResoureRegistry commit.
Set the capacity for the staging buffer. Only applied once first call to StageCopy is called. Cannot be called if there have already been calls to StageCopy for this commit.
HDST_API void HdStStagingBuffer::StageCopy | ( | HgiBufferCpuToGpuOp const & | copyOp | ) |
Submit a CPU to GPU copy operation to be added to the staging buffer. The contents are memcpy'd over into the staging buffer during this call and a GPU to GPU blit is queued up to do the final copy to destination.