25#ifndef OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H
26#define OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H
28#include "../version.h"
30#include "../osd/opengl.h"
31#include "../osd/types.h"
32#include "../osd/bufferDescriptor.h"
35namespace OPENSUBDIV_VERSION {
40 class LimitStencilTable;
54 void *deviceContext = NULL) {
60 void *deviceContext = NULL) {
103 void * deviceContext = NULL) {
104 return Create(srcDesc, dstDesc, duDesc, dvDesc,
118 void * deviceContext = NULL) {
121 if (instance->
Compile(srcDesc, dstDesc, duDesc, dvDesc,
122 duuDesc, duvDesc, dvvDesc))
167 template <
typename SRC_BUFFER,
typename DST_BUFFER,
typename STENCIL_TABLE>
171 STENCIL_TABLE
const *stencilTable,
173 void * deviceContext = NULL) {
182 instance =
Create(srcDesc, dstDesc,
235 template <
typename SRC_BUFFER,
typename DST_BUFFER,
typename STENCIL_TABLE>
241 STENCIL_TABLE
const *stencilTable,
243 void * deviceContext = NULL) {
254 instance =
Create(srcDesc, dstDesc, duDesc, dvDesc);
325 template <
typename SRC_BUFFER,
typename DST_BUFFER,
typename STENCIL_TABLE>
334 STENCIL_TABLE
const *stencilTable,
336 void * deviceContext = NULL) {
350 instance =
Create(srcDesc, dstDesc, duDesc, dvDesc,
351 duuDesc, duvDesc, dvvDesc);
385 template <
typename SRC_BUFFER,
typename DST_BUFFER,
typename STENCIL_TABLE>
389 STENCIL_TABLE
const *stencilTable)
const {
391 dstBuffer->BindVBO(), dstDesc,
394 stencilTable->GetSizesBuffer(),
395 stencilTable->GetOffsetsBuffer(),
396 stencilTable->GetIndicesBuffer(),
397 stencilTable->GetWeightsBuffer(),
401 stencilTable->GetNumStencils());
433 template <
typename SRC_BUFFER,
typename DST_BUFFER,
typename STENCIL_TABLE>
439 STENCIL_TABLE
const *stencilTable)
const {
441 dstBuffer->BindVBO(), dstDesc,
442 duBuffer->BindVBO(), duDesc,
443 dvBuffer->BindVBO(), dvDesc,
444 stencilTable->GetSizesBuffer(),
445 stencilTable->GetOffsetsBuffer(),
446 stencilTable->GetIndicesBuffer(),
447 stencilTable->GetWeightsBuffer(),
448 stencilTable->GetDuWeightsBuffer(),
449 stencilTable->GetDvWeightsBuffer(),
451 stencilTable->GetNumStencils());
501 template <
typename SRC_BUFFER,
typename DST_BUFFER,
typename STENCIL_TABLE>
510 STENCIL_TABLE
const *stencilTable)
const {
512 dstBuffer->BindVBO(), dstDesc,
513 duBuffer->BindVBO(), duDesc,
514 dvBuffer->BindVBO(), dvDesc,
515 duuBuffer->BindVBO(), duuDesc,
516 duvBuffer->BindVBO(), duvDesc,
517 dvvBuffer->BindVBO(), dvvDesc,
518 stencilTable->GetSizesBuffer(),
519 stencilTable->GetOffsetsBuffer(),
520 stencilTable->GetIndicesBuffer(),
521 stencilTable->GetWeightsBuffer(),
522 stencilTable->GetDuWeightsBuffer(),
523 stencilTable->GetDvWeightsBuffer(),
524 stencilTable->GetDuuWeightsBuffer(),
525 stencilTable->GetDuvWeightsBuffer(),
526 stencilTable->GetDvvWeightsBuffer(),
528 stencilTable->GetNumStencils());
571 GLuint offsetsBuffer,
572 GLuint indicesBuffer,
573 GLuint weightsBuffer,
574 GLuint duWeightsBuffer,
575 GLuint dvWeightsBuffer,
640 GLuint offsetsBuffer,
641 GLuint indicesBuffer,
642 GLuint weightsBuffer,
643 GLuint duWeightsBuffer,
644 GLuint dvWeightsBuffer,
645 GLuint duuWeightsBuffer,
646 GLuint duvWeightsBuffer,
647 GLuint dvvWeightsBuffer,
689 template <
typename SRC_BUFFER,
typename DST_BUFFER,
690 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
695 PATCHCOORD_BUFFER *patchCoords,
696 PATCH_TABLE *patchTable,
698 void * deviceContext = NULL) {
703 numPatchCoords, patchCoords,
708 instance =
Create(srcDesc, dstDesc,
714 numPatchCoords, patchCoords,
767 template <
typename SRC_BUFFER,
typename DST_BUFFER,
768 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
775 PATCHCOORD_BUFFER *patchCoords,
776 PATCH_TABLE *patchTable,
778 void * deviceContext = NULL) {
785 numPatchCoords, patchCoords,
790 instance =
Create(srcDesc, dstDesc,
797 numPatchCoords, patchCoords,
868 template <
typename SRC_BUFFER,
typename DST_BUFFER,
869 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
879 PATCHCOORD_BUFFER *patchCoords,
880 PATCH_TABLE *patchTable,
882 void * deviceContext = NULL) {
892 numPatchCoords, patchCoords,
897 instance =
Create(srcDesc, dstDesc,
899 duuDesc, duvDesc, dvvDesc);
908 numPatchCoords, patchCoords,
941 template <
typename SRC_BUFFER,
typename DST_BUFFER,
942 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
947 PATCHCOORD_BUFFER *patchCoords,
948 PATCH_TABLE *patchTable)
const {
951 dstBuffer->BindVBO(), dstDesc,
955 patchCoords->BindVBO(),
956 patchTable->GetPatchArrays(),
957 patchTable->GetPatchIndexBuffer(),
958 patchTable->GetPatchParamBuffer());
995 template <
typename SRC_BUFFER,
typename DST_BUFFER,
996 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1003 PATCHCOORD_BUFFER *patchCoords,
1004 PATCH_TABLE *patchTable)
const {
1007 dstBuffer->BindVBO(), dstDesc,
1008 duBuffer->BindVBO(), duDesc,
1009 dvBuffer->BindVBO(), dvDesc,
1011 patchCoords->BindVBO(),
1012 patchTable->GetPatchArrays(),
1013 patchTable->GetPatchIndexBuffer(),
1014 patchTable->GetPatchParamBuffer());
1069 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1070 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1080 PATCHCOORD_BUFFER *patchCoords,
1081 PATCH_TABLE *patchTable)
const {
1084 dstBuffer->BindVBO(), dstDesc,
1085 duBuffer->BindVBO(), duDesc,
1086 dvBuffer->BindVBO(), dvDesc,
1087 duuBuffer->BindVBO(), duuDesc,
1088 duvBuffer->BindVBO(), duvDesc,
1089 dvvBuffer->BindVBO(), dvvDesc,
1091 patchCoords->BindVBO(),
1092 patchTable->GetPatchArrays(),
1093 patchTable->GetPatchIndexBuffer(),
1094 patchTable->GetPatchParamBuffer());
1102 GLuint patchCoordsBuffer,
1104 GLuint patchIndexBuffer,
1105 GLuint patchParamsBuffer)
const;
1115 GLuint patchCoordsBuffer,
1117 GLuint patchIndexBuffer,
1118 GLuint patchParamsBuffer)
const;
1152 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1153 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1158 PATCHCOORD_BUFFER *patchCoords,
1159 PATCH_TABLE *patchTable,
1161 void * deviceContext = NULL) {
1167 numPatchCoords, patchCoords,
1171 (void)deviceContext;
1172 instance =
Create(srcDesc, dstDesc,
1179 numPatchCoords, patchCoords,
1212 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1213 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1218 PATCHCOORD_BUFFER *patchCoords,
1219 PATCH_TABLE *patchTable)
const {
1222 dstBuffer->BindVBO(), dstDesc,
1226 patchCoords->BindVBO(),
1227 patchTable->GetVaryingPatchArrays(),
1228 patchTable->GetVaryingPatchIndexBuffer(),
1229 patchTable->GetPatchParamBuffer());
1276 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1277 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1284 PATCHCOORD_BUFFER *patchCoords,
1285 PATCH_TABLE *patchTable,
1287 void * deviceContext = NULL) {
1295 numPatchCoords, patchCoords,
1299 (void)deviceContext;
1300 instance =
Create(srcDesc, dstDesc,
1308 numPatchCoords, patchCoords,
1353 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1354 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1361 PATCHCOORD_BUFFER *patchCoords,
1362 PATCH_TABLE *patchTable)
const {
1365 dstBuffer->BindVBO(), dstDesc,
1366 duBuffer->BindVBO(), duDesc,
1367 dvBuffer->BindVBO(), dvDesc,
1369 patchCoords->BindVBO(),
1370 patchTable->GetVaryingPatchArrays(),
1371 patchTable->GetVaryingPatchIndexBuffer(),
1372 patchTable->GetPatchParamBuffer());
1437 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1438 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1448 PATCHCOORD_BUFFER *patchCoords,
1449 PATCH_TABLE *patchTable,
1451 void * deviceContext = NULL) {
1462 numPatchCoords, patchCoords,
1466 (void)deviceContext;
1467 instance =
Create(srcDesc, dstDesc,
1469 duuDesc, duvDesc, dvvDesc);
1479 numPatchCoords, patchCoords,
1542 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1543 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1553 PATCHCOORD_BUFFER *patchCoords,
1554 PATCH_TABLE *patchTable)
const {
1557 dstBuffer->BindVBO(), dstDesc,
1558 duBuffer->BindVBO(), duDesc,
1559 dvBuffer->BindVBO(), dvDesc,
1560 duuBuffer->BindVBO(), duuDesc,
1561 duvBuffer->BindVBO(), duvDesc,
1562 dvvBuffer->BindVBO(), dvvDesc,
1564 patchCoords->BindVBO(),
1565 patchTable->GetVaryingPatchArrays(),
1566 patchTable->GetVaryingPatchIndexBuffer(),
1567 patchTable->GetPatchParamBuffer());
1604 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1605 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1610 PATCHCOORD_BUFFER *patchCoords,
1611 PATCH_TABLE *patchTable,
1614 void * deviceContext = NULL) {
1620 numPatchCoords, patchCoords,
1621 patchTable, fvarChannel);
1624 (void)deviceContext;
1625 instance =
Create(srcDesc, dstDesc,
1632 numPatchCoords, patchCoords,
1633 patchTable, fvarChannel);
1667 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1668 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1673 PATCHCOORD_BUFFER *patchCoords,
1674 PATCH_TABLE *patchTable,
1675 int fvarChannel = 0)
const {
1678 dstBuffer->BindVBO(), dstDesc,
1682 patchCoords->BindVBO(),
1683 patchTable->GetFVarPatchArrays(fvarChannel),
1684 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
1685 patchTable->GetFVarPatchParamBuffer(fvarChannel));
1734 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1735 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1742 PATCHCOORD_BUFFER *patchCoords,
1743 PATCH_TABLE *patchTable,
1746 void * deviceContext = NULL) {
1754 numPatchCoords, patchCoords,
1755 patchTable, fvarChannel);
1758 (void)deviceContext;
1759 instance =
Create(srcDesc, dstDesc,
1767 numPatchCoords, patchCoords,
1768 patchTable, fvarChannel);
1814 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1815 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1822 PATCHCOORD_BUFFER *patchCoords,
1823 PATCH_TABLE *patchTable,
1824 int fvarChannel = 0)
const {
1827 dstBuffer->BindVBO(), dstDesc,
1828 duBuffer->BindVBO(), duDesc,
1829 dvBuffer->BindVBO(), dvDesc,
1831 patchCoords->BindVBO(),
1832 patchTable->GetFVarPatchArrays(fvarChannel),
1833 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
1834 patchTable->GetFVarPatchParamBuffer(fvarChannel));
1901 template <
typename SRC_BUFFER,
typename DST_BUFFER,
1902 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
1912 PATCHCOORD_BUFFER *patchCoords,
1913 PATCH_TABLE *patchTable,
1916 void * deviceContext = NULL) {
1927 numPatchCoords, patchCoords,
1928 patchTable, fvarChannel);
1931 (void)deviceContext;
1932 instance =
Create(srcDesc, dstDesc,
1934 duuDesc, duvDesc, dvvDesc);
1944 numPatchCoords, patchCoords,
1945 patchTable, fvarChannel);
2009 template <
typename SRC_BUFFER,
typename DST_BUFFER,
2010 typename PATCHCOORD_BUFFER,
typename PATCH_TABLE>
2020 PATCHCOORD_BUFFER *patchCoords,
2021 PATCH_TABLE *patchTable,
2022 int fvarChannel = 0)
const {
2025 dstBuffer->BindVBO(), dstDesc,
2026 duBuffer->BindVBO(), duDesc,
2027 dvBuffer->BindVBO(), dvDesc,
2028 duuBuffer->BindVBO(), duuDesc,
2029 duvBuffer->BindVBO(), duvDesc,
2030 dvvBuffer->BindVBO(), dvvDesc,
2032 patchCoords->BindVBO(),
2033 patchTable->GetFVarPatchArrays(fvarChannel),
2034 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
2035 patchTable->GetFVarPatchParamBuffer(fvarChannel));
2058 struct _StencilKernel {
2070 GLuint uniformStart;
2072 GLuint uniformSrcOffset;
2073 GLuint uniformDstOffset;
2074 GLuint uniformDuDesc;
2075 GLuint uniformDvDesc;
2076 GLuint uniformDuuDesc;
2077 GLuint uniformDuvDesc;
2078 GLuint uniformDvvDesc;
2081 struct _PatchKernel {
2093 GLuint uniformSrcOffset;
2094 GLuint uniformDstOffset;
2095 GLuint uniformPatchArray;
2096 GLuint uniformDuDesc;
2097 GLuint uniformDvDesc;
2098 GLuint uniformDuuDesc;
2099 GLuint uniformDuvDesc;
2100 GLuint uniformDvvDesc;
2104 GLuint _patchArraysSSBO;
2110using namespace OPENSUBDIV_VERSION;
std::vector< PatchArray > PatchArrayVector
Stencil table class wrapping the template for compatibility.
Limit stencil table class wrapping the template for compatibility.
BufferDescriptor is a struct which describes buffer elements in interleaved data buffers....
GL stencil table (Shader Storage buffer)
GLuint GetDuvWeightsBuffer() const
GLuint GetWeightsBuffer() const
GLStencilTableSSBO(Far::LimitStencilTable const *limitStencilTable)
GLuint GetDuWeightsBuffer() const
int GetNumStencils() const
GLuint GetIndicesBuffer() const
GLuint GetOffsetsBuffer() const
GLStencilTableSSBO(Far::StencilTable const *stencilTable)
GLuint GetDvvWeightsBuffer() const
GLuint GetSizesBuffer() const
static GLStencilTableSSBO * Create(Far::LimitStencilTable const *limitStencilTable, void *deviceContext=NULL)
GLuint GetDuuWeightsBuffer() const
GLuint GetDvWeightsBuffer() const
static GLStencilTableSSBO * Create(Far::StencilTable const *stencilTable, void *deviceContext=NULL)
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 ...
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, GLComputeEvaluator const *instance, void *deviceContext=NULL)
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, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, 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, GLComputeEvaluator 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, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GLComputeEvaluator const *instance, void *deviceContext=NULL)
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, 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, DST_BUFFER *duBuffer, BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint duuBuffer, BufferDescriptor const &duuDesc, GLuint duvBuffer, BufferDescriptor const &duvDesc, GLuint dvvBuffer, BufferDescriptor const &dvvDesc, int numPatchCoords, GLuint patchCoordsBuffer, const PatchArrayVector &patchArrays, GLuint patchIndexBuffer, GLuint patchParamsBuffer) const
~GLComputeEvaluator()
Destructor. note that the GL context must be made current.
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...
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, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic static stencil function. This function has a same signature as other device kernels have so t...
bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint duuBuffer, BufferDescriptor const &duuDesc, GLuint duvBuffer, BufferDescriptor const &duvDesc, GLuint dvvBuffer, BufferDescriptor const &dvvDesc, GLuint sizesBuffer, GLuint offsetsBuffer, GLuint indicesBuffer, GLuint weightsBuffer, GLuint duWeightsBuffer, GLuint dvWeightsBuffer, GLuint duuWeightsBuffer, GLuint duvWeightsBuffer, GLuint dvvWeightsBuffer, int start, int end) const
Dispatch the GLSL compute kernel on GPU asynchronously returns false if the kernel hasn't been compil...
static bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic static stencil function. This function has a same signature as other device kernels have so t...
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, GLComputeEvaluator const *instance, void *deviceContext=NULL)
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, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator 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, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
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 ...
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 ...
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 ...
GLComputeEvaluator()
Constructor.
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...
static bool EvalPatches(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GLComputeEvaluator const *instance, void *deviceContext=NULL)
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.
bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, int numPatchCoords, GLuint patchCoordsBuffer, const PatchArrayVector &patchArrays, GLuint patchIndexBuffer, GLuint patchParamsBuffer) const
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 GLComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, void *deviceContext=NULL)
bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc, GLuint dstBuffer, BufferDescriptor const &dstDesc, GLuint duBuffer, BufferDescriptor const &duDesc, GLuint dvBuffer, BufferDescriptor const &dvDesc, GLuint sizesBuffer, GLuint offsetsBuffer, GLuint indicesBuffer, GLuint weightsBuffer, GLuint duWeightsBuffer, GLuint dvWeightsBuffer, int start, int end) const
Dispatch the GLSL compute kernel on GPU asynchronously returns false if the kernel hasn't been compil...
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, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic static stencil function. This function has a same signature as other device kernels have so t...
static void Synchronize(void *deviceContext)
Wait the dispatched kernel finishes.
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())
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 ...
static GLComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, void *deviceContext=NULL)
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, GLComputeEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...