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"
37namespace OPENSUBDIV_VERSION {
56 cl_context clContext);
58 template <
typename DEVICE_CONTEXT>
60 DEVICE_CONTEXT context) {
61 return Create(patchTable, context->GetContext());
115using namespace OPENSUBDIV_VERSION;
Container for arrays of parametric patches.
std::vector< cl_mem > _fvarPatchArrays
~CLPatchTable()
Destructor.
cl_mem GetPatchParamBuffer() const
Returns the CL memory of the array of Osd::PatchParam buffer.
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.
static CLPatchTable * Create(Far::PatchTable const *patchTable, cl_context clContext)
Creator. Returns NULL if error.
cl_mem GetFVarPatchIndexBuffer(int fvarChannel=0) const
Returns the CL memory of the face-varying control vertices.
cl_mem _varyingIndexBuffer
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 GetPatchIndexBuffer() const
Returns the CL memory of the patch control vertices.
static CLPatchTable * Create(Far::PatchTable const *patchTable, DEVICE_CONTEXT context)
cl_mem GetFVarPatchParamBuffer(int fvarChannel=0) const
Returns the CL memory of the array of Osd::PatchParam buffer.
bool allocate(Far::PatchTable const *patchTable, cl_context clContext)
std::vector< cl_mem > _fvarParamBuffers
std::vector< cl_mem > _fvarIndexBuffers
cl_mem _varyingPatchArrays
cl_mem GetVaryingPatchArrayBuffer() const
Returns the CL memory of the array of Osd::PatchArray buffer.