7#ifndef PXR_IMAGING_HD_ST_EXT_COMP_PRIMVAR_BUFFER_SOURCE_H
8#define PXR_IMAGING_HD_ST_EXT_COMP_PRIMVAR_BUFFER_SOURCE_H
11#include "pxr/imaging/hdSt/api.h"
13#include "pxr/imaging/hd/bufferSource.h"
14#include "pxr/imaging/hd/types.h"
20PXR_NAMESPACE_OPEN_SCOPE
23using HdStExtCompCpuComputationSharedPtr =
24 std::shared_ptr<class HdStExtCompCpuComputation>;
41 const HdStExtCompCpuComputationSharedPtr &source,
42 const TfToken &sourceOutputName,
83 template <
class HashState>
84 friend void TfHashAppend(HashState &h,
88 HdStExtCompCpuComputationSharedPtr _source;
89 size_t _sourceOutputIdx;
91 void const *_rawDataPtr;
100PXR_NAMESPACE_CLOSE_SCOPE
A transient buffer of data that has not yet been committed.
Hd Buffer Source that binds a primvar to a Ext Computation output.
HDST_API bool Resolve() override
Extracts the primvar from the source computation.
HDST_API size_t ComputeHash() const override
Computes and returns a hash value for the underlying data.
HDST_API void GetBufferSpecs(HdBufferSpecVector *specs) const override
Adds this Primvar's buffer description to the buffer spec vector.
HDST_API size_t GetNumElements() const override
Returns a count of the number of elements.
HDST_API TfToken const & GetName() const override
Returns the name of the primvar.
HDST_API bool _CheckValid() const override
Returns true if the binding to the source computation was successful.
HDST_API HdTupleType GetTupleType() const override
Returns the tuple data format of the primvar data.
HDST_API HdStExtCompPrimvarBufferSource(const TfToken &primvarName, const HdStExtCompCpuComputationSharedPtr &source, const TfToken &sourceOutputName, const HdTupleType &valueType)
Constructs a new primvar buffer source called primvarName and binds it to the output called sourceOut...
HDST_API void const * GetData() const override
Returns a raw pointer to the primvar data.
Token for efficient comparison, assignment, and hashing of known strings.
HdTupleType represents zero, one, or more values of the same HdType.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...