glComputeEvaluator.h
Go to the documentation of this file.
1 //
2 // Copyright 2015 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24
25 #ifndef OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H
26 #define OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H
27
28 #include "../version.h"
29
30 #include "../osd/opengl.h"
31 #include "../osd/types.h"
32 #include "../osd/bufferDescriptor.h"
33
34 namespace OpenSubdiv {
35 namespace OPENSUBDIV_VERSION {
36
37 namespace Far {
38 class PatchTable;
39 class StencilTable;
40 class LimitStencilTable;
41 }
42
43 namespace Osd {
44
51 class GLStencilTableSSBO {
52 public:
53 static GLStencilTableSSBO *Create(Far::StencilTable const *stencilTable,
54 void *deviceContext = NULL) {
55 (void)deviceContext; // unused
56 return new GLStencilTableSSBO(stencilTable);
57 }
58 static GLStencilTableSSBO *Create(
59 Far::LimitStencilTable const *limitStencilTable,
60 void *deviceContext = NULL) {
61 (void)deviceContext; // unused
62 return new GLStencilTableSSBO(limitStencilTable);
63 }
64
65 explicit GLStencilTableSSBO(Far::StencilTable const *stencilTable);
66 explicit GLStencilTableSSBO(Far::LimitStencilTable const *limitStencilTable);
67 ~GLStencilTableSSBO();
68
69 // interfaces needed for GLSLComputeKernel
70 GLuint GetSizesBuffer() const { return _sizes; }
71 GLuint GetOffsetsBuffer() const { return _offsets; }
72 GLuint GetIndicesBuffer() const { return _indices; }
73 GLuint GetWeightsBuffer() const { return _weights; }
74 GLuint GetDuWeightsBuffer() const { return _duWeights; }
75 GLuint GetDvWeightsBuffer() const { return _dvWeights; }
76 int GetNumStencils() const { return _numStencils; }
77
78 private:
79 GLuint _sizes;
80 GLuint _offsets;
81 GLuint _indices;
82 GLuint _weights;
83 GLuint _duWeights;
84 GLuint _dvWeights;
85 int _numStencils;
86 };
87
88 // ---------------------------------------------------------------------------
89
90 class GLComputeEvaluator {
91 public:
92 typedef bool Instantiatable;
93 static GLComputeEvaluator * Create(BufferDescriptor const &srcDesc,
94 BufferDescriptor const &dstDesc,
95 BufferDescriptor const &duDesc,
96 BufferDescriptor const &dvDesc,
97 void * deviceContext = NULL) {
98 (void)deviceContext; // not used
99 GLComputeEvaluator *instance = new GLComputeEvaluator();
100 if (instance->Compile(srcDesc, dstDesc, duDesc, dvDesc)) return instance;
101 delete instance;
102 return NULL;
103 }
104
106 GLComputeEvaluator();
107
109 ~GLComputeEvaluator();
110
116
144 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
145 static bool EvalStencils(
146 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
147 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
148 STENCIL_TABLE const *stencilTable,
149 GLComputeEvaluator const *instance,
150 void * deviceContext = NULL) {
151
152 if (instance) {
153 return instance->EvalStencils(srcBuffer, srcDesc,
154 dstBuffer, dstDesc,
155 stencilTable);
156 } else {
157 // Create a kernel on demand (slow)
158 (void)deviceContext; // unused
159 instance = Create(srcDesc, dstDesc,
160 BufferDescriptor(),
161 BufferDescriptor());
162 if (instance) {
163 bool r = instance->EvalStencils(srcBuffer, srcDesc,
164 dstBuffer, dstDesc,
165 stencilTable);
166 delete instance;
167 return r;
168 }
169 return false;
170 }
171 }
172
212 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
213 static bool EvalStencils(
214 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
215 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
216 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
217 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
218 STENCIL_TABLE const *stencilTable,
219 GLComputeEvaluator const *instance,
220 void * deviceContext = NULL) {
221
222 if (instance) {
223 return instance->EvalStencils(srcBuffer, srcDesc,
224 dstBuffer, dstDesc,
225 duBuffer, duDesc,
226 dvBuffer, dvDesc,
227 stencilTable);
228 } else {
229 // Create a kernel on demand (slow)
230 (void)deviceContext; // unused
231 instance = Create(srcDesc, dstDesc, duDesc, dvDesc);
232 if (instance) {
233 bool r = instance->EvalStencils(srcBuffer, srcDesc,
234 dstBuffer, dstDesc,
235 duBuffer, duDesc,
236 dvBuffer, dvDesc,
237 stencilTable);
238 delete instance;
239 return r;
240 }
241 return false;
242 }
243 }
244
247 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
248 bool EvalStencils(
249 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
250 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
251 STENCIL_TABLE const *stencilTable) const {
252 return EvalStencils(srcBuffer->BindVBO(), srcDesc,
253 dstBuffer->BindVBO(), dstDesc,
254 0, BufferDescriptor(),
255 0, BufferDescriptor(),
256 stencilTable->GetSizesBuffer(),
257 stencilTable->GetOffsetsBuffer(),
258 stencilTable->GetIndicesBuffer(),
259 stencilTable->GetWeightsBuffer(),
260 0,
261 0,
262 /* start = */ 0,
263 /* end = */ stencilTable->GetNumStencils());
264 }
265
268 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
269 bool EvalStencils(
270 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
271 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
272 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
273 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
274 STENCIL_TABLE const *stencilTable) const {
275 return EvalStencils(srcBuffer->BindVBO(), srcDesc,
276 dstBuffer->BindVBO(), dstDesc,
277 duBuffer->BindVBO(), duDesc,
278 dvBuffer->BindVBO(), dvDesc,
279 stencilTable->GetSizesBuffer(),
280 stencilTable->GetOffsetsBuffer(),
281 stencilTable->GetIndicesBuffer(),
282 stencilTable->GetWeightsBuffer(),
283 stencilTable->GetDuWeightsBuffer(),
284 stencilTable->GetDvWeightsBuffer(),
285 /* start = */ 0,
286 /* end = */ stencilTable->GetNumStencils());
287 }
288
291 bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc,
292 GLuint dstBuffer, BufferDescriptor const &dstDesc,
293 GLuint duBuffer, BufferDescriptor const &duDesc,
294 GLuint dvBuffer, BufferDescriptor const &dvDesc,
295 GLuint sizesBuffer,
296 GLuint offsetsBuffer,
297 GLuint indicesBuffer,
298 GLuint weightsBuffer,
299 GLuint duWeightsBuffer,
300 GLuint dvWeightsBuffer,
301 int start,
302 int end) const;
303
309
342 template <typename SRC_BUFFER, typename DST_BUFFER,
343 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
344 static bool EvalPatches(
345 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
346 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
347 int numPatchCoords,
348 PATCHCOORD_BUFFER *patchCoords,
349 PATCH_TABLE *patchTable,
350 GLComputeEvaluator const *instance,
351 void * deviceContext = NULL) {
352
353 if (instance) {
354 return instance->EvalPatches(srcBuffer, srcDesc,
355 dstBuffer, dstDesc,
356 numPatchCoords, patchCoords,
357 patchTable);
358 } else {
359 // Create an instance on demand (slow)
360 (void)deviceContext; // unused
361 instance = Create(srcDesc, dstDesc,
362 BufferDescriptor(),
363 BufferDescriptor());
364 if (instance) {
365 bool r = instance->EvalPatches(srcBuffer, srcDesc,
366 dstBuffer, dstDesc,
367 numPatchCoords, patchCoords,
368 patchTable);
369 delete instance;
370 return r;
371 }
372 return false;
373 }
374 }
375
416 template <typename SRC_BUFFER, typename DST_BUFFER,
417 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
418 static bool EvalPatches(
419 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
420 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
421 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
422 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
423 int numPatchCoords,
424 PATCHCOORD_BUFFER *patchCoords,
425 PATCH_TABLE *patchTable,
426 GLComputeEvaluator const *instance,
427 void * deviceContext = NULL) {
428
429 if (instance) {
430 return instance->EvalPatches(srcBuffer, srcDesc,
431 dstBuffer, dstDesc,
432 duBuffer, duDesc,
433 dvBuffer, dvDesc,
434 numPatchCoords, patchCoords,
435 patchTable);
436 } else {
437 // Create an instance on demand (slow)
438 (void)deviceContext; // unused
439 instance = Create(srcDesc, dstDesc, duDesc, dvDesc);
440 if (instance) {
441 bool r = instance->EvalPatches(srcBuffer, srcDesc,
442 dstBuffer, dstDesc,
443 duBuffer, duDesc,
444 dvBuffer, dvDesc,
445 numPatchCoords, patchCoords,
446 patchTable);
447 delete instance;
448 return r;
449 }
450 return false;
451 }
452 }
453
478 template <typename SRC_BUFFER, typename DST_BUFFER,
479 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
480 bool EvalPatches(
481 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
482 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
483 int numPatchCoords,
484 PATCHCOORD_BUFFER *patchCoords,
485 PATCH_TABLE *patchTable) const {
486
487 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
488 dstBuffer->BindVBO(), dstDesc,
489 0, BufferDescriptor(),
490 0, BufferDescriptor(),
491 numPatchCoords,
492 patchCoords->BindVBO(),
493 patchTable->GetPatchArrays(),
494 patchTable->GetPatchIndexBuffer(),
495 patchTable->GetPatchParamBuffer());
496 }
497
532 template <typename SRC_BUFFER, typename DST_BUFFER,
533 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
534 bool EvalPatches(
535 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
536 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
537 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
538 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
539 int numPatchCoords,
540 PATCHCOORD_BUFFER *patchCoords,
541 PATCH_TABLE *patchTable) const {
542
543 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
544 dstBuffer->BindVBO(), dstDesc,
545 duBuffer->BindVBO(), duDesc,
546 dvBuffer->BindVBO(), dvDesc,
547 numPatchCoords,
548 patchCoords->BindVBO(),
549 patchTable->GetPatchArrays(),
550 patchTable->GetPatchIndexBuffer(),
551 patchTable->GetPatchParamBuffer());
552 }
553
554 bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc,
555 GLuint dstBuffer, BufferDescriptor const &dstDesc,
556 GLuint duBuffer, BufferDescriptor const &duDesc,
557 GLuint dvBuffer, BufferDescriptor const &dvDesc,
558 int numPatchCoords,
559 GLuint patchCoordsBuffer,
560 const PatchArrayVector &patchArrays,
561 GLuint patchIndexBuffer,
562 GLuint patchParamsBuffer) const;
563
596 template <typename SRC_BUFFER, typename DST_BUFFER,
597 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
598 static bool EvalPatchesVarying(
599 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
600 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
601 int numPatchCoords,
602 PATCHCOORD_BUFFER *patchCoords,
603 PATCH_TABLE *patchTable,
604 GLComputeEvaluator const *instance,
605 void * deviceContext = NULL) {
606
607 if (instance) {
608 return instance->EvalPatchesVarying(
609 srcBuffer, srcDesc,
610 dstBuffer, dstDesc,
611 numPatchCoords, patchCoords,
612 patchTable);
613 } else {
614 // Create an instance on demand (slow)
615 (void)deviceContext; // unused
616 instance = Create(srcDesc, dstDesc,
617 BufferDescriptor(),
618 BufferDescriptor());
619 if (instance) {
620 bool r = instance->EvalPatchesVarying(
621 srcBuffer, srcDesc,
622 dstBuffer, dstDesc,
623 numPatchCoords, patchCoords,
624 patchTable);
625 delete instance;
626 return r;
627 }
628 return false;
629 }
630 }
631
656 template <typename SRC_BUFFER, typename DST_BUFFER,
657 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
658 bool EvalPatchesVarying(
659 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
660 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
661 int numPatchCoords,
662 PATCHCOORD_BUFFER *patchCoords,
663 PATCH_TABLE *patchTable) const {
664
665 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
666 dstBuffer->BindVBO(), dstDesc,
667 0, BufferDescriptor(),
668 0, BufferDescriptor(),
669 numPatchCoords,
670 patchCoords->BindVBO(),
671 patchTable->GetVaryingPatchArrays(),
672 patchTable->GetVaryingPatchIndexBuffer(),
673 patchTable->GetPatchParamBuffer());
674 }
675
710 template <typename SRC_BUFFER, typename DST_BUFFER,
711 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
712 static bool EvalPatchesFaceVarying(
713 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
714 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
715 int numPatchCoords,
716 PATCHCOORD_BUFFER *patchCoords,
717 PATCH_TABLE *patchTable,
718 int fvarChannel,
719 GLComputeEvaluator const *instance,
720 void * deviceContext = NULL) {
721
722 if (instance) {
723 return instance->EvalPatchesFaceVarying(
724 srcBuffer, srcDesc,
725 dstBuffer, dstDesc,
726 numPatchCoords, patchCoords,
727 patchTable, fvarChannel);
728 } else {
729 // Create an instance on demand (slow)
730 (void)deviceContext; // unused
731 instance = Create(srcDesc, dstDesc,
732 BufferDescriptor(),
733 BufferDescriptor());
734 if (instance) {
735 bool r = instance->EvalPatchesFaceVarying(
736 srcBuffer, srcDesc,
737 dstBuffer, dstDesc,
738 numPatchCoords, patchCoords,
739 patchTable, fvarChannel);
740 delete instance;
741 return r;
742 }
743 return false;
744 }
745 }
746
773 template <typename SRC_BUFFER, typename DST_BUFFER,
774 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
775 bool EvalPatchesFaceVarying(
776 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
777 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
778 int numPatchCoords,
779 PATCHCOORD_BUFFER *patchCoords,
780 PATCH_TABLE *patchTable,
781 int fvarChannel = 0) const {
782
783 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
784 dstBuffer->BindVBO(), dstDesc,
785 0, BufferDescriptor(),
786 0, BufferDescriptor(),
787 numPatchCoords,
788 patchCoords->BindVBO(),
789 patchTable->GetFVarPatchArrays(fvarChannel),
790 patchTable->GetFVarPatchIndexBuffer(fvarChannel),
791 patchTable->GetFVarPatchParamBuffer(fvarChannel));
792 }
793
799
802 bool Compile(BufferDescriptor const &srcDesc,
803 BufferDescriptor const &dstDesc,
804 BufferDescriptor const &duDesc,
805 BufferDescriptor const &dvDesc);
806
808 static void Synchronize(void *deviceContext);
809
810 private:
811 struct _StencilKernel {
812 _StencilKernel();
813 ~_StencilKernel();
814 bool Compile(BufferDescriptor const &srcDesc,
815 BufferDescriptor const &dstDesc,
816 BufferDescriptor const &duDesc,
817 BufferDescriptor const &dvDesc,
818 int workGroupSize);
819 GLuint program;
820 GLuint uniformStart;
821 GLuint uniformEnd;
822 GLuint uniformSrcOffset;
823 GLuint uniformDstOffset;
824 GLuint uniformDuDesc;
825 GLuint uniformDvDesc;
826 } _stencilKernel;
827
828 struct _PatchKernel {
829 _PatchKernel();
830 ~_PatchKernel();
831 bool Compile(BufferDescriptor const &srcDesc,
832 BufferDescriptor const &dstDesc,
833 BufferDescriptor const &duDesc,
834 BufferDescriptor const &dvDesc,
835 int workGroupSize);
836 GLuint program;
837 GLuint uniformSrcOffset;
838 GLuint uniformDstOffset;
839 GLuint uniformPatchArray;
840 GLuint uniformDuDesc;
841 GLuint uniformDvDesc;
842
843 } _patchKernel;
844
845 int _workGroupSize;
846 };
847
848 } // end namespace Osd
849
850 } // end namespace OPENSUBDIV_VERSION
851 using namespace OPENSUBDIV_VERSION;
852
853 } // end namespace OpenSubdiv
854
855
856 #endif // OPENSUBDIV3_OSD_GL_COMPUTE_EVALUATOR_H
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::EvalPatchesVarying
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 ...
Definition: glComputeEvaluator.h:598
OpenSubdiv::OPENSUBDIV_VERSION::Far::StencilTable
Table of subdivision stencils.
Definition: stencilTable.h:125
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::EvalStencils
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
Definition: glComputeEvaluator.h:269
OpenSubdiv::OPENSUBDIV_VERSION::Far::LimitStencilTable
Table of limit subdivision stencils.
Definition: stencilTable.h:333
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::EvalStencils
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 compute function. This function has a same signature as other device kernels have so t...
Definition: glComputeEvaluator.h:213
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::EvalPatches
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...
Definition: glComputeEvaluator.h:534
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableSSBO::GetNumStencils
int GetNumStencils() const
Definition: glComputeEvaluator.h:76
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::EvalPatchesFaceVarying
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 ...
Definition: glComputeEvaluator.h:712
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableSSBO::GetDuWeightsBuffer
GLuint GetDuWeightsBuffer() const
Definition: glComputeEvaluator.h:74
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::EvalPatches
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 ...
Definition: glComputeEvaluator.h:418
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator
Definition: glComputeEvaluator.h:90
OpenSubdiv::OPENSUBDIV_VERSION::Osd::PatchArrayVector
std::vector< PatchArray > PatchArrayVector
Definition: types.h:98
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::EvalStencils
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable) const
Definition: glComputeEvaluator.h:248
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::EvalStencils
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 compute function. This function has a same signature as other device kernels have so t...
Definition: glComputeEvaluator.h:145
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableSSBO::Create
static GLStencilTableSSBO * Create(Far::StencilTable const *stencilTable, void *deviceContext=NULL)
Definition: glComputeEvaluator.h:53
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::EvalPatches
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 ...
Definition: glComputeEvaluator.h:480
OpenSubdiv::OPENSUBDIV_VERSION::Osd::BufferDescriptor
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.
Definition: bufferDescriptor.h:61
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableSSBO::Create
static GLStencilTableSSBO * Create(Far::LimitStencilTable const *limitStencilTable, void *deviceContext=NULL)
Definition: glComputeEvaluator.h:58
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableSSBO::GetOffsetsBuffer
GLuint GetOffsetsBuffer() const
Definition: glComputeEvaluator.h:71
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::Create
static GLComputeEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, void *deviceContext=NULL)
Definition: glComputeEvaluator.h:93
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::Compile
bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc)
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::EvalPatchesVarying
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 ...
Definition: glComputeEvaluator.h:658
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::EvalPatchesFaceVarying
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 ...
Definition: glComputeEvaluator.h:775
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableSSBO::GetIndicesBuffer
GLuint GetIndicesBuffer() const
Definition: glComputeEvaluator.h:72
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableSSBO::GetSizesBuffer
GLuint GetSizesBuffer() const
Definition: glComputeEvaluator.h:70
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::Instantiatable
bool Instantiatable
Definition: glComputeEvaluator.h:92
OpenSubdiv
Definition: error.h:30
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableSSBO::GetWeightsBuffer
GLuint GetWeightsBuffer() const
Definition: glComputeEvaluator.h:73
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLComputeEvaluator::EvalPatches
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 ...
Definition: glComputeEvaluator.h:344
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableSSBO::GetDvWeightsBuffer
GLuint GetDvWeightsBuffer() const
Definition: glComputeEvaluator.h:75
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableSSBO
GL stencil table (Shader Storage buffer)
Definition: glComputeEvaluator.h:51