25 #ifndef OPENSUBDIV3_OSD_CL_PATCH_TABLE_H
26 #define OPENSUBDIV3_OSD_CL_PATCH_TABLE_H
28 #include "../version.h"
30 #include "../osd/opencl.h"
31 #include "../osd/nonCopyable.h"
32 #include "../osd/types.h"
36 namespace OpenSubdiv {
37 namespace OPENSUBDIV_VERSION {
56 cl_context clContext);
58 template <
typename DEVICE_CONTEXT>
60 DEVICE_CONTEXT context) {
61 return Create(patchTable, context->GetContext());
115 using namespace OPENSUBDIV_VERSION;
119 #endif // OPENSUBDIV3_OSD_CL_PATCH_TABLE_H
cl_mem GetVaryingPatchArrayBuffer() const
Returns the CL memory of the array of Osd::PatchArray buffer.
cl_mem GetPatchIndexBuffer() const
Returns the CL memory of the patch control vertices.
bool allocate(Far::PatchTable const *patchTable, cl_context clContext)
std::vector< cl_mem > _fvarIndexBuffers
cl_mem GetFVarPatchArrayBuffer(int fvarChannel=0) const
Returns the CL memory of the array of Osd::PatchArray buffer.
cl_mem GetPatchArrayBuffer() const
Returns the CL memory of the array of Osd::PatchArray buffer.
~CLPatchTable()
Destructor.
std::vector< cl_mem > _fvarPatchArrays
cl_mem _varyingIndexBuffer
Container for arrays of parametric patches.
static CLPatchTable * Create(Far::PatchTable const *patchTable, cl_context clContext)
Creator. Returns NULL if error.
cl_mem GetPatchParamBuffer() const
Returns the CL memory of the array of Osd::PatchParam buffer.
static CLPatchTable * Create(Far::PatchTable const *patchTable, DEVICE_CONTEXT context)
std::vector< cl_mem > _fvarParamBuffers
cl_mem GetVaryingPatchIndexBuffer() const
Returns the CL memory of the varying control vertices.
int GetNumFVarChannels() const
Returns the number of face-varying channel buffers.
cl_mem GetFVarPatchParamBuffer(int fvarChannel=0) const
Returns the CL memory of the array of Osd::PatchParam buffer.
cl_mem GetFVarPatchIndexBuffer(int fvarChannel=0) const
Returns the CL memory of the face-varying control vertices.
cl_mem _varyingPatchArrays