24#ifndef PXR_IMAGING_HD_ST_BUFFER_UTILS_H
25#define PXR_IMAGING_HD_ST_BUFFER_UTILS_H
28#include "pxr/imaging/hdSt/api.h"
29#include "pxr/imaging/hd/types.h"
30#include "pxr/imaging/hgi/buffer.h"
32#include "pxr/base/vt/value.h"
34PXR_NAMESPACE_OPEN_SCOPE
57 _srcBuffer(srcBuffer), _dstBuffer(dstBuffer) {}
63 ptrdiff_t writeOffset,
72 _CopyUnit(ptrdiff_t read, ptrdiff_t write, ptrdiff_t size)
73 : readOffset(read), writeOffset(write), copySize(size) {}
75 bool Concat(_CopyUnit
const &next) {
76 if (readOffset + copySize == next.readOffset &&
77 writeOffset + copySize == next.writeOffset) {
78 copySize += next.copySize;
85 ptrdiff_t writeOffset;
89 std::vector<_CopyUnit> _queue;
95PXR_NAMESPACE_CLOSE_SCOPE
A utility class to perform batched buffer copy.
HDST_API void Commit(class HgiBlitCmds *blitCmds)
Execute Hgi buffer copy command to flush all scheduled range copies.
HDST_API void AddRange(ptrdiff_t readOffset, ptrdiff_t writeOffset, ptrdiff_t copySize)
Schedule the range to be copied.
A central registry of all GPU resources.
A graphics API independent abstraction of resource copy commands.
Provides a container which may hold any type, and provides introspection and iteration over array typ...
HdTupleType represents zero, one, or more values of the same HdType.