7#ifndef PXR_IMAGING_HD_ST_BUFFER_UTILS_H
8#define PXR_IMAGING_HD_ST_BUFFER_UTILS_H
11#include "pxr/imaging/hdSt/api.h"
12#include "pxr/imaging/hd/types.h"
13#include "pxr/imaging/hgi/buffer.h"
15#include "pxr/base/vt/value.h"
17PXR_NAMESPACE_OPEN_SCOPE
40 _srcBuffer(srcBuffer), _dstBuffer(dstBuffer) {}
46 ptrdiff_t writeOffset,
55 _CopyUnit(ptrdiff_t read, ptrdiff_t write, ptrdiff_t size)
56 : readOffset(read), writeOffset(write), copySize(size) {}
58 bool Concat(_CopyUnit
const &next) {
59 if (readOffset + copySize == next.readOffset &&
60 writeOffset + copySize == next.writeOffset) {
61 copySize += next.copySize;
68 ptrdiff_t writeOffset;
72 std::vector<_CopyUnit> _queue;
78PXR_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.