A specific type of HdBufferResource (GPU resource) representing an HgiBufferHandle. More...
Public Member Functions | |
HDST_API | HdStBufferResource (TfToken const &role, HdTupleType tupleType, int offset, int stride) |
HDST_API void | SetAllocation (HgiBufferHandle const &handle, size_t size) |
Sets the HgiBufferHandle for this resource and its size. More... | |
HgiBufferHandle & | GetHandle () |
Returns the HgiBufferHandle for this GPU resource. More... | |
uint64_t | GetGPUAddress () const |
Returns the gpu address (if available. otherwise returns 0). More... | |
Public Member Functions inherited from HdBufferResource | |
HD_API | HdBufferResource (TfToken const &role, HdTupleType tupleType, int offset, int stride) |
HdTupleType | GetTupleType () const |
Data type and count. More... | |
int | GetOffset () const |
Returns the interleaved offset (in bytes) of this data. More... | |
int | GetStride () const |
Returns the stride (in bytes) of underlying buffer. More... | |
Public Member Functions inherited from HdResource | |
HD_API | HdResource (TfToken const &role) |
TfToken const & | GetRole () const |
Returns the role of the GPU data in this resource. More... | |
HD_API size_t | GetSize () const |
Returns the size of the resource allocated in the GPU. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from HdResource | |
HD_API void | SetSize (size_t size) |
Stores the size of the resource allocated in the GPU. More... | |
Protected Attributes inherited from HdBufferResource | |
HdTupleType | _tupleType |
int | _offset |
int | _stride |
A specific type of HdBufferResource (GPU resource) representing an HgiBufferHandle.
Definition at line 54 of file bufferResource.h.
|
inline |
Returns the gpu address (if available. otherwise returns 0).
Definition at line 74 of file bufferResource.h.
|
inline |
Returns the HgiBufferHandle for this GPU resource.
Definition at line 71 of file bufferResource.h.
HDST_API void SetAllocation | ( | HgiBufferHandle const & | handle, |
size_t | size | ||
) |
Sets the HgiBufferHandle for this resource and its size.
also caches the gpu address of the buffer.