HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdStStagingBuffer Class Reference

#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 &copyOp)
 
HDST_API void Flush ()
 

Detailed Description

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.

Constructor & Destructor Documentation

HDST_API HdStStagingBuffer::HdStStagingBuffer ( HdStResourceRegistry resourceRegistry)
HDST_API HdStStagingBuffer::~HdStStagingBuffer ( )

Member Function Documentation

HDST_API void HdStStagingBuffer::Deallocate ( )

Destroys contained HgiBuffers and resets state to empty.

HDST_API void HdStStagingBuffer::Flush ( )

Flush the queued GPU to GPU blits from the calls to StageCopy. Resets the state for the next ResoureRegistry commit.

HDST_API void HdStStagingBuffer::Resize ( size_t  totalSize)

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.


The documentation for this class was generated from the following file: