25 #ifndef OPENSUBDIV3_OSD_GL_XFB_EVALUATOR_H
26 #define OPENSUBDIV3_OSD_GL_XFB_EVALUATOR_H
28 #include "../version.h"
30 #include "../osd/opengl.h"
31 #include "../osd/types.h"
32 #include "../osd/bufferDescriptor.h"
34 namespace OpenSubdiv {
35 namespace OPENSUBDIV_VERSION {
40 class LimitStencilTable;
62 void *deviceContext = NULL) {
103 template <
typename DEVICE_CONTEXT>
108 DEVICE_CONTEXT deviceContext) {
109 bool interleavedDerivativeBuffers = deviceContext
110 ? deviceContext->AreInterleavedDerivativeBuffers()
112 return Create(srcDesc, dstDesc, duDesc, dvDesc,
113 interleavedDerivativeBuffers);
121 void * deviceContext) {
123 return Create(srcDesc, dstDesc, duDesc, dvDesc);
130 bool interleavedDerivativeBuffers =
false) {
132 if (instance->
Compile(srcDesc, dstDesc, duDesc, dvDesc))
139 template <
typename DEVICE_CONTEXT>
147 DEVICE_CONTEXT deviceContext) {
148 bool interleavedDerivativeBuffers = deviceContext
149 ? deviceContext->AreInterleavedDerivativeBuffers()
151 return Create(srcDesc, dstDesc, duDesc, dvDesc,
152 duuDesc, duvDesc, dvvDesc,
153 interleavedDerivativeBuffers);
164 void * deviceContext) {
166 return Create(srcDesc, dstDesc, duDesc, dvDesc,
167 duuDesc, duvDesc, dvvDesc);
177 bool interleavedDerivativeBuffers =
false) {
179 if (instance->
Compile(srcDesc, dstDesc, duDesc, dvDesc,
180 duuDesc, duvDesc, dvvDesc))
237 template <
typename SRC_BUFFER,
typename DST_BUFFER,
typename STENCIL_TABLE>
241 STENCIL_TABLE
const *stencilTable,
243 void * deviceContext = NULL) {
252 instance =
Create(srcDesc, dstDesc,
305 template <
typename SRC_BUFFER,
typename DST_BUFFER,
typename STENCIL_TABLE>
311 STENCIL_TABLE
const *stencilTable,
313 void * deviceContext = NULL) {
324 instance =
Create(srcDesc, dstDesc, duDesc, dvDesc);
395 template <
typename SRC_BUFFER,
typename DST_BUFFER,
typename STENCIL_TABLE>
404 STENCIL_TABLE
const *stencilTable,
406 void * deviceContext = NULL) {
420 instance =
Create(srcDesc, dstDesc,
422 duuDesc, duvDesc, dvvDesc);
456 template <
typename SRC_BUFFER,
typename DST_BUFFER,
typename STENCIL_TABLE>
460 STENCIL_TABLE
const *stencilTable)
const {
463 dstBuffer->BindVBO(), dstDesc,
466 stencilTable->GetSizesTexture(),
467 stencilTable->GetOffsetsTexture(),
468 stencilTable->GetIndicesTexture(),
469 stencilTable->GetWeightsTexture(),
473 stencilTable->GetNumStencils());
505 template <
typename SRC_BUFFER,
typename DST_BUFFER,
typename STENCIL_TABLE>
511 STENCIL_TABLE
const *stencilTable)
const {
514 dstBuffer->BindVBO(), dstDesc,
515 duBuffer->BindVBO(), duDesc,
516 dvBuffer->BindVBO(), dvDesc,
517 stencilTable->GetSizesTexture(),
518 stencilTable->GetOffsetsTexture(),
519 stencilTable->GetIndicesTexture(),
520 stencilTable->GetWeightsTexture(),
521 stencilTable->GetDuWeightsTexture(),
522 stencilTable->GetDvWeightsTexture(),
524 stencilTable->GetNumStencils());
574 template <
typename SRC_BUFFER,
typename DST_BUFFER,
typename STENCIL_TABLE>
583 STENCIL_TABLE
const *stencilTable)
const {
586 dstBuffer->BindVBO(), dstDesc,
587 duBuffer->BindVBO(), duDesc,
588 dvBuffer->BindVBO(), dvDesc,
589 duuBuffer->BindVBO(), duuDesc,
590 duvBuffer->BindVBO(), duvDesc,
591 dvvBuffer->BindVBO(), dvvDesc,
592 stencilTable->GetSizesTexture(),
593 stencilTable->GetOffsetsTexture(),
594 stencilTable->GetIndicesTexture(),
595 stencilTable->GetWeightsTexture(),
596 stencilTable->GetDuWeightsTexture(),
597 stencilTable->GetDvWeightsTexture(),
598 stencilTable->GetDuuWeightsTexture(),
599 stencilTable->GetDuvWeightsTexture(),
600 stencilTable->GetDvvWeightsTexture(),
602 stencilTable->GetNumStencils());
645 GLuint offsetsBuffer,
646 GLuint indicesBuffer,
647 GLuint weightsBuffer,
648 GLuint duWeightsBuffer,
649 GLuint dvWeightsBuffer,
714 GLuint offsetsBuffer,
715 GLuint indicesBuffer,
716 GLuint weightsBuffer,
717 GLuint duWeightsBuffer,
718 GLuint dvWeightsBuffer,
719 GLuint duuWeightsBuffer,
720 GLuint duvWeightsBuffer,
721 GLuint dvvWeightsBuffer,
763 template <
typename SRC_BUFFER,
typename DST_BUFFER,
764 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
769 PATCHCOORD_BUFFER *patchCoords,
770 PATCH_TABLE *patchTable,
772 void * deviceContext = NULL) {
777 numPatchCoords, patchCoords,
782 instance =
Create(srcDesc, dstDesc,
788 numPatchCoords, patchCoords,
841 template <
typename SRC_BUFFER,
typename DST_BUFFER,
842 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
849 PATCHCOORD_BUFFER *patchCoords,
850 PATCH_TABLE *patchTable,
852 void * deviceContext = NULL) {
859 numPatchCoords, patchCoords,
864 instance =
Create(srcDesc, dstDesc, duDesc, dvDesc);
870 numPatchCoords, patchCoords,
941 template <
typename SRC_BUFFER,
typename DST_BUFFER,
942 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
952 PATCHCOORD_BUFFER *patchCoords,
953 PATCH_TABLE *patchTable,
955 void * deviceContext = NULL) {
965 numPatchCoords, patchCoords,
970 instance =
Create(srcDesc, dstDesc,
972 duuDesc, duvDesc, dvvDesc);
981 numPatchCoords, patchCoords,
1014 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1015 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1020 PATCHCOORD_BUFFER *patchCoords,
1021 PATCH_TABLE *patchTable)
const {
1024 dstBuffer->BindVBO(), dstDesc,
1028 patchCoords->BindVBO(),
1029 patchTable->GetPatchArrays(),
1030 patchTable->GetPatchIndexTextureBuffer(),
1031 patchTable->GetPatchParamTextureBuffer());
1068 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1069 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1076 PATCHCOORD_BUFFER *patchCoords,
1077 PATCH_TABLE *patchTable)
const {
1080 dstBuffer->BindVBO(), dstDesc,
1081 duBuffer->BindVBO(), duDesc,
1082 dvBuffer->BindVBO(), dvDesc,
1084 patchCoords->BindVBO(),
1085 patchTable->GetPatchArrays(),
1086 patchTable->GetPatchIndexTextureBuffer(),
1087 patchTable->GetPatchParamTextureBuffer());
1142 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1143 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1153 PATCHCOORD_BUFFER *patchCoords,
1154 PATCH_TABLE *patchTable)
const {
1157 dstBuffer->BindVBO(), dstDesc,
1158 duBuffer->BindVBO(), duDesc,
1159 dvBuffer->BindVBO(), dvDesc,
1160 duuBuffer->BindVBO(), duuDesc,
1161 duvBuffer->BindVBO(), duvDesc,
1162 dvvBuffer->BindVBO(), dvvDesc,
1164 patchCoords->BindVBO(),
1165 patchTable->GetPatchArrays(),
1166 patchTable->GetPatchIndexTextureBuffer(),
1167 patchTable->GetPatchParamTextureBuffer());
1175 GLuint patchCoordsBuffer,
1177 GLuint patchIndexBuffer,
1178 GLuint patchParamsBuffer)
const;
1188 GLuint patchCoordsBuffer,
1190 GLuint patchIndexBuffer,
1191 GLuint patchParamsBuffer)
const;
1225 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1226 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1231 PATCHCOORD_BUFFER *patchCoords,
1232 PATCH_TABLE *patchTable,
1234 void * deviceContext = NULL) {
1240 numPatchCoords, patchCoords,
1244 (void)deviceContext;
1245 instance =
Create(srcDesc, dstDesc,
1252 numPatchCoords, patchCoords,
1285 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1286 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1291 PATCHCOORD_BUFFER *patchCoords,
1292 PATCH_TABLE *patchTable)
const {
1295 dstBuffer->BindVBO(), dstDesc,
1299 patchCoords->BindVBO(),
1300 patchTable->GetVaryingPatchArrays(),
1301 patchTable->GetVaryingPatchIndexTextureBuffer(),
1302 patchTable->GetPatchParamTextureBuffer());
1349 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1350 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1357 PATCHCOORD_BUFFER *patchCoords,
1358 PATCH_TABLE *patchTable,
1360 void * deviceContext = NULL) {
1368 numPatchCoords, patchCoords,
1372 (void)deviceContext;
1373 instance =
Create(srcDesc, dstDesc,
1381 numPatchCoords, patchCoords,
1426 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1427 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1434 PATCHCOORD_BUFFER *patchCoords,
1435 PATCH_TABLE *patchTable)
const {
1438 dstBuffer->BindVBO(), dstDesc,
1439 duBuffer->BindVBO(), duDesc,
1440 dvBuffer->BindVBO(), dvDesc,
1442 patchCoords->BindVBO(),
1443 patchTable->GetVaryingPatchArrays(),
1444 patchTable->GetVaryingPatchIndexTextureBuffer(),
1445 patchTable->GetPatchParamTextureBuffer());
1510 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1511 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1521 PATCHCOORD_BUFFER *patchCoords,
1522 PATCH_TABLE *patchTable,
1524 void * deviceContext = NULL) {
1535 numPatchCoords, patchCoords,
1539 (void)deviceContext;
1540 instance =
Create(srcDesc, dstDesc,
1542 duuDesc, duvDesc, dvvDesc);
1552 numPatchCoords, patchCoords,
1615 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1616 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1626 PATCHCOORD_BUFFER *patchCoords,
1627 PATCH_TABLE *patchTable)
const {
1630 dstBuffer->BindVBO(), dstDesc,
1631 duBuffer->BindVBO(), duDesc,
1632 dvBuffer->BindVBO(), dvDesc,
1633 duuBuffer->BindVBO(), duuDesc,
1634 duvBuffer->BindVBO(), duvDesc,
1635 dvvBuffer->BindVBO(), dvvDesc,
1637 patchCoords->BindVBO(),
1638 patchTable->GetVaryingPatchArrays(),
1639 patchTable->GetVaryingPatchIndexTextureBuffer(),
1640 patchTable->GetPatchParamTextureBuffer());
1677 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1678 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1683 PATCHCOORD_BUFFER *patchCoords,
1684 PATCH_TABLE *patchTable,
1687 void * deviceContext = NULL) {
1693 numPatchCoords, patchCoords,
1694 patchTable, fvarChannel);
1697 (void)deviceContext;
1698 instance =
Create(srcDesc, dstDesc,
1705 numPatchCoords, patchCoords,
1706 patchTable, fvarChannel);
1740 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1741 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1746 PATCHCOORD_BUFFER *patchCoords,
1747 PATCH_TABLE *patchTable,
1748 int fvarChannel = 0)
const {
1751 dstBuffer->BindVBO(), dstDesc,
1755 patchCoords->BindVBO(),
1756 patchTable->GetFVarPatchArrays(fvarChannel),
1757 patchTable->GetFVarPatchIndexTextureBuffer(fvarChannel),
1758 patchTable->GetFVarPatchParamTextureBuffer(fvarChannel));
1807 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1808 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1815 PATCHCOORD_BUFFER *patchCoords,
1816 PATCH_TABLE *patchTable,
1819 void * deviceContext = NULL) {
1827 numPatchCoords, patchCoords,
1828 patchTable, fvarChannel);
1831 (void)deviceContext;
1832 instance =
Create(srcDesc, dstDesc,
1840 numPatchCoords, patchCoords,
1841 patchTable, fvarChannel);
1887 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1888 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1895 PATCHCOORD_BUFFER *patchCoords,
1896 PATCH_TABLE *patchTable,
1897 int fvarChannel = 0)
const {
1900 dstBuffer->BindVBO(), dstDesc,
1901 duBuffer->BindVBO(), duDesc,
1902 dvBuffer->BindVBO(), dvDesc,
1904 patchCoords->BindVBO(),
1905 patchTable->GetFVarPatchArrays(fvarChannel),
1906 patchTable->GetFVarPatchIndexTextureBuffer(fvarChannel),
1907 patchTable->GetFVarPatchParamTextureBuffer(fvarChannel));
1974 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1975 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1985 PATCHCOORD_BUFFER *patchCoords,
1986 PATCH_TABLE *patchTable,
1989 void * deviceContext = NULL) {
2000 numPatchCoords, patchCoords,
2001 patchTable, fvarChannel);
2004 (void)deviceContext;
2005 instance =
Create(srcDesc, dstDesc,
2007 duuDesc, duvDesc, dvvDesc);
2017 numPatchCoords, patchCoords,
2018 patchTable, fvarChannel);
2082 template <
typename SRC_BUFFER,
typename DST_BUFFER,
2083 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
2093 PATCHCOORD_BUFFER *patchCoords,
2094 PATCH_TABLE *patchTable,
2095 int fvarChannel = 0)
const {
2098 dstBuffer->BindVBO(), dstDesc,
2099 duBuffer->BindVBO(), duDesc,
2100 dvBuffer->BindVBO(), dvDesc,
2101 duuBuffer->BindVBO(), duuDesc,
2102 duvBuffer->BindVBO(), duvDesc,
2103 dvvBuffer->BindVBO(), dvvDesc,
2105 patchCoords->BindVBO(),
2106 patchTable->GetFVarPatchArrays(fvarChannel),
2107 patchTable->GetFVarPatchIndexTextureBuffer(fvarChannel),
2108 patchTable->GetFVarPatchParamTextureBuffer(fvarChannel));
2131 GLuint _srcBufferTexture;
2132 GLuint _patchArraysUBO;
2133 bool _interleavedDerivativeBuffers;
2135 struct _StencilKernel {
2145 bool interleavedDerivativeBuffers);
2147 GLint uniformSrcBufferTexture;
2148 GLint uniformSrcOffset;
2150 GLint uniformSizesTexture;
2151 GLint uniformOffsetsTexture;
2152 GLint uniformIndicesTexture;
2153 GLint uniformWeightsTexture;
2154 GLint uniformDuWeightsTexture;
2155 GLint uniformDvWeightsTexture;
2156 GLint uniformDuuWeightsTexture;
2157 GLint uniformDuvWeightsTexture;
2158 GLint uniformDvvWeightsTexture;
2163 struct _PatchKernel {
2166 bool Compile(BufferDescriptor
const &srcDesc,
2167 BufferDescriptor
const &dstDesc,
2168 BufferDescriptor
const &duDesc,
2169 BufferDescriptor
const &dvDesc,
2170 BufferDescriptor
const &duuDesc,
2171 BufferDescriptor
const &duvDesc,
2172 BufferDescriptor
const &dvvDesc,
2173 bool interleavedDerivativeBuffers);
2175 GLint uniformSrcBufferTexture;
2176 GLint uniformSrcOffset;
2178 GLint uniformPatchArraysUBOBinding;
2179 GLint uniformPatchParamTexture;
2180 GLint uniformPatchIndexTexture;
2188 using namespace OPENSUBDIV_VERSION;
2193 #endif // OPENSUBDIV3_OSD_GL_XFB_EVALUATOR_H
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc=BufferDescriptor(), BufferDescriptor const &dvDesc=BufferDescriptor(), BufferDescriptor const &duuDesc=BufferDescriptor(), BufferDescriptor const &duvDesc=BufferDescriptor(), BufferDescriptor const &dvvDesc=BufferDescriptor())
GLuint GetDuvWeightsTexture() const
static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, DEVICE_CONTEXT deviceContext)
Generic creator template.
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers. Almost all Osd Evaluator APIs take BufferDescriptors along with device-specific buffer objects.
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable) const
Generic stencil function.
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function with derivatives. This function has a same signature as other device kern...
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function with derivatives. This function has a same signature as other device kern...
GLuint GetOffsetsTexture() const
static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, void *deviceContext)
Specialization to allow creation without a device context.
Limit stencil table class wrapping the template for compatibility.
GLuint GetDuuWeightsTexture() const
GLuint GetIndicesTexture() const
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
static GLStencilTableTBO * Create(Far::LimitStencilTable const *limitStencilTable, void *deviceContext=NULL)
GL TextureBuffer stencil table.
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable) const
Generic stencil function.
GLuint GetDvvWeightsTexture() const
GLStencilTableTBO(Far::StencilTable const *stencilTable)
GLuint GetDuWeightsTexture() const
GLuint GetDvWeightsTexture() const
int GetNumStencils() const
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
GLuint GetWeightsTexture() const
bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic static stencil function. This function has a same signature as other device kernels have so t...
static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, void *deviceContext)
Specialization to allow creation without a device context.
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic static stencil function. This function has a same signature as other device kernels have so t...
static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, bool interleavedDerivativeBuffers=false)
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
~GLXFBEvaluator()
Destructor. note that the GL context must be made current.
static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, DEVICE_CONTEXT deviceContext)
Generic creator template.
static void Synchronize(void *kernel)
Wait the dispatched kernel finishes.
std::vector< PatchArray > PatchArrayVector
GLXFBEvaluator(bool interleavedDerivativeBuffers=false)
Constructor.
bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) const
Generic limit eval function. This function has a same signature as other device kernels have so that ...
Stencil table class wrapping the template for compatibility.
static GLStencilTableTBO * Create(Far::StencilTable const *stencilTable, void *deviceContext=NULL)
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, bool interleavedDerivativeBuffers=false)
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic static stencil function. This function has a same signature as other device kernels have so t...
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, STENCIL_TABLE const *stencilTable) const
Generic stencil function.
static bool EvalPatchesVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
static bool EvalPatchesFaceVarying(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, DST_BUFFER *duuBuffer, BufferDescriptor const &duuDesc, DST_BUFFER *duvBuffer, BufferDescriptor const &duvDesc, DST_BUFFER *dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
GLuint GetSizesTexture() const