glXFBEvaluator.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_XFB_EVALUATOR_H
26 #define OPENSUBDIV3_OSD_GL_XFB_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
52 class GLStencilTableTBO {
53 public:
54 static GLStencilTableTBO *Create(
55 Far::StencilTable const *stencilTable, void *deviceContext = NULL) {
56 (void)deviceContext; // unused
57 return new GLStencilTableTBO(stencilTable);
58 }
59
60 static GLStencilTableTBO *Create(
61 Far::LimitStencilTable const *limitStencilTable,
62 void *deviceContext = NULL) {
63 (void)deviceContext; // unused
64 return new GLStencilTableTBO(limitStencilTable);
65 }
66
67 explicit GLStencilTableTBO(Far::StencilTable const *stencilTable);
68 explicit GLStencilTableTBO(Far::LimitStencilTable const *limitStencilTable);
69 ~GLStencilTableTBO();
70
71 // interfaces needed for GLSLTransformFeedbackKernel
72 GLuint GetSizesTexture() const { return _sizes; }
73 GLuint GetOffsetsTexture() const { return _offsets; }
74 GLuint GetIndicesTexture() const { return _indices; }
75 GLuint GetWeightsTexture() const { return _weights; }
76 GLuint GetDuWeightsTexture() const { return _duWeights; }
77 GLuint GetDvWeightsTexture() const { return _dvWeights; }
78 int GetNumStencils() const { return _numStencils; }
79
80 private:
81 GLuint _sizes;
82 GLuint _offsets;
83 GLuint _indices;
84 GLuint _weights;
85 GLuint _duWeights;
86 GLuint _dvWeights;
87 int _numStencils;
88 };
89
90 // ---------------------------------------------------------------------------
91
92 class GLXFBEvaluator {
93 public:
94 typedef bool Instantiatable;
95 static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc,
96 BufferDescriptor const &dstDesc,
97 BufferDescriptor const &duDesc,
98 BufferDescriptor const &dvDesc,
99 void * deviceContext = NULL) {
100 (void)deviceContext; // not used
101 GLXFBEvaluator *instance = new GLXFBEvaluator();
102 if (instance->Compile(srcDesc, dstDesc, duDesc, dvDesc))
103 return instance;
104 delete instance;
105 return NULL;
106 }
107
109 GLXFBEvaluator();
110
112 ~GLXFBEvaluator();
113
119
147 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
148 static bool EvalStencils(
149 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
150 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
151 STENCIL_TABLE const *stencilTable,
152 GLXFBEvaluator const *instance,
153 void * deviceContext = NULL) {
154
155 if (instance) {
156 return instance->EvalStencils(srcBuffer, srcDesc,
157 dstBuffer, dstDesc,
158 stencilTable);
159 } else {
160 // Create an instance on demand (slow)
161 (void)deviceContext; // unused
162 instance = Create(srcDesc, dstDesc,
163 BufferDescriptor(),
164 BufferDescriptor());
165 if (instance) {
166 bool r = instance->EvalStencils(srcBuffer, srcDesc,
167 dstBuffer, dstDesc,
168 stencilTable);
169 delete instance;
170 return r;
171 }
172 return false;
173 }
174 }
175
215 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
216 static bool EvalStencils(
217 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
218 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
219 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
220 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
221 STENCIL_TABLE const *stencilTable,
222 GLXFBEvaluator const *instance,
223 void * deviceContext = NULL) {
224
225 if (instance) {
226 return instance->EvalStencils(srcBuffer, srcDesc,
227 dstBuffer, dstDesc,
228 duBuffer, duDesc,
229 dvBuffer, dvDesc,
230 stencilTable);
231 } else {
232 // Create an instance on demand (slow)
233 (void)deviceContext; // unused
234 instance = Create(srcDesc, dstDesc, duDesc, dvDesc);
235 if (instance) {
236 bool r = instance->EvalStencils(srcBuffer, srcDesc,
237 dstBuffer, dstDesc,
238 duBuffer, duDesc,
239 dvBuffer, dvDesc,
240 stencilTable);
241 delete instance;
242 return r;
243 }
244 return false;
245 }
246 }
247
264 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
265 bool EvalStencils(
266 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
267 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
268 STENCIL_TABLE const *stencilTable) const {
269
270 return EvalStencils(srcBuffer->BindVBO(), srcDesc,
271 dstBuffer->BindVBO(), dstDesc,
272 0, BufferDescriptor(),
273 0, BufferDescriptor(),
274 stencilTable->GetSizesTexture(),
275 stencilTable->GetOffsetsTexture(),
276 stencilTable->GetIndicesTexture(),
277 stencilTable->GetWeightsTexture(),
278 0,
279 0,
280 /* start = */ 0,
281 /* end = */ stencilTable->GetNumStencils());
282 }
283
308 template <typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE>
309 bool EvalStencils(
310 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
311 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
312 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
313 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
314 STENCIL_TABLE const *stencilTable) const {
315
316 return EvalStencils(srcBuffer->BindVBO(), srcDesc,
317 dstBuffer->BindVBO(), dstDesc,
318 duBuffer->BindVBO(), duDesc,
319 dvBuffer->BindVBO(), dvDesc,
320 stencilTable->GetSizesTexture(),
321 stencilTable->GetOffsetsTexture(),
322 stencilTable->GetIndicesTexture(),
323 stencilTable->GetWeightsTexture(),
324 stencilTable->GetDuWeightsTexture(),
325 stencilTable->GetDvWeightsTexture(),
326 /* start = */ 0,
327 /* end = */ stencilTable->GetNumStencils());
328 }
329
365 bool EvalStencils(GLuint srcBuffer, BufferDescriptor const &srcDesc,
366 GLuint dstBuffer, BufferDescriptor const &dstDesc,
367 GLuint duBuffer, BufferDescriptor const &duDesc,
368 GLuint dvBuffer, BufferDescriptor const &dvDesc,
369 GLuint sizesBuffer,
370 GLuint offsetsBuffer,
371 GLuint indicesBuffer,
372 GLuint weightsBuffer,
373 GLuint duWeightsBuffer,
374 GLuint dvWeightsBuffer,
375 int start,
376 int end) const;
377
383
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 int numPatchCoords,
422 PATCHCOORD_BUFFER *patchCoords,
423 PATCH_TABLE *patchTable,
424 GLXFBEvaluator const *instance,
425 void * deviceContext = NULL) {
426
427 if (instance) {
428 return instance->EvalPatches(srcBuffer, srcDesc,
429 dstBuffer, dstDesc,
430 numPatchCoords, patchCoords,
431 patchTable);
432 } else {
433 // Create an instance on demand (slow)
434 (void)deviceContext; // unused
435 instance = Create(srcDesc, dstDesc,
436 BufferDescriptor(),
437 BufferDescriptor());
438 if (instance) {
439 bool r = instance->EvalPatches(srcBuffer, srcDesc,
440 dstBuffer, dstDesc,
441 numPatchCoords, patchCoords,
442 patchTable);
443 delete instance;
444 return r;
445 }
446 return false;
447 }
448 }
449
490 template <typename SRC_BUFFER, typename DST_BUFFER,
491 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
492 static bool EvalPatches(
493 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
494 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
495 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
496 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
497 int numPatchCoords,
498 PATCHCOORD_BUFFER *patchCoords,
499 PATCH_TABLE *patchTable,
500 GLXFBEvaluator const *instance,
501 void * deviceContext = NULL) {
502
503 if (instance) {
504 return instance->EvalPatches(srcBuffer, srcDesc,
505 dstBuffer, dstDesc,
506 duBuffer, duDesc,
507 dvBuffer, dvDesc,
508 numPatchCoords, patchCoords,
509 patchTable);
510 } else {
511 // Create an instance on demand (slow)
512 (void)deviceContext; // unused
513 instance = Create(srcDesc, dstDesc, duDesc, dvDesc);
514 if (instance) {
515 bool r = instance->EvalPatches(srcBuffer, srcDesc,
516 dstBuffer, dstDesc,
517 duBuffer, duDesc,
518 dvBuffer, dvDesc,
519 numPatchCoords, patchCoords,
520 patchTable);
521 delete instance;
522 return r;
523 }
524 return false;
525 }
526 }
527
552 template <typename SRC_BUFFER, typename DST_BUFFER,
553 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
554 bool EvalPatches(
555 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
556 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
557 int numPatchCoords,
558 PATCHCOORD_BUFFER *patchCoords,
559 PATCH_TABLE *patchTable) const {
560
561 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
562 dstBuffer->BindVBO(), dstDesc,
563 0, BufferDescriptor(),
564 0, BufferDescriptor(),
565 numPatchCoords,
566 patchCoords->BindVBO(),
567 patchTable->GetPatchArrays(),
568 patchTable->GetPatchIndexTextureBuffer(),
569 patchTable->GetPatchParamTextureBuffer());
570 }
571
606 template <typename SRC_BUFFER, typename DST_BUFFER,
607 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
608 bool EvalPatches(
609 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
610 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
611 DST_BUFFER *duBuffer, BufferDescriptor const &duDesc,
612 DST_BUFFER *dvBuffer, BufferDescriptor const &dvDesc,
613 int numPatchCoords,
614 PATCHCOORD_BUFFER *patchCoords,
615 PATCH_TABLE *patchTable) const {
616
617 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
618 dstBuffer->BindVBO(), dstDesc,
619 duBuffer->BindVBO(), duDesc,
620 dvBuffer->BindVBO(), dvDesc,
621 numPatchCoords,
622 patchCoords->BindVBO(),
623 patchTable->GetPatchArrays(),
624 patchTable->GetPatchIndexTextureBuffer(),
625 patchTable->GetPatchParamTextureBuffer());
626 }
627
628 bool EvalPatches(GLuint srcBuffer, BufferDescriptor const &srcDesc,
629 GLuint dstBuffer, BufferDescriptor const &dstDesc,
630 GLuint duBuffer, BufferDescriptor const &duDesc,
631 GLuint dvBuffer, BufferDescriptor const &dvDesc,
632 int numPatchCoords,
633 GLuint patchCoordsBuffer,
634 const PatchArrayVector &patchArrays,
635 GLuint patchIndexBuffer,
636 GLuint patchParamsBuffer) const;
637
671 template <typename SRC_BUFFER, typename DST_BUFFER,
672 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
673 static bool EvalPatchesVarying(
674 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
675 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
676 int numPatchCoords,
677 PATCHCOORD_BUFFER *patchCoords,
678 PATCH_TABLE *patchTable,
679 GLXFBEvaluator const *instance,
680 void * deviceContext = NULL) {
681
682 if (instance) {
683 return instance->EvalPatchesVarying(
684 srcBuffer, srcDesc,
685 dstBuffer, dstDesc,
686 numPatchCoords, patchCoords,
687 patchTable);
688 } else {
689 // Create an instance on demand (slow)
690 (void)deviceContext; // unused
691 instance = Create(srcDesc, dstDesc,
692 BufferDescriptor(),
693 BufferDescriptor());
694 if (instance) {
695 bool r = instance->EvalPatchesVarying(
696 srcBuffer, srcDesc,
697 dstBuffer, dstDesc,
698 numPatchCoords, patchCoords,
699 patchTable);
700 delete instance;
701 return r;
702 }
703 return false;
704 }
705 }
706
731 template <typename SRC_BUFFER, typename DST_BUFFER,
732 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
733 bool EvalPatchesVarying(
734 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
735 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
736 int numPatchCoords,
737 PATCHCOORD_BUFFER *patchCoords,
738 PATCH_TABLE *patchTable) const {
739
740 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
741 dstBuffer->BindVBO(), dstDesc,
742 0, BufferDescriptor(),
743 0, BufferDescriptor(),
744 numPatchCoords,
745 patchCoords->BindVBO(),
746 patchTable->GetVaryingPatchArrays(),
747 patchTable->GetVaryingPatchIndexTextureBuffer(),
748 patchTable->GetPatchParamTextureBuffer());
749 }
750
786 template <typename SRC_BUFFER, typename DST_BUFFER,
787 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
788 static bool EvalPatchesFaceVarying(
789 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
790 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
791 int numPatchCoords,
792 PATCHCOORD_BUFFER *patchCoords,
793 PATCH_TABLE *patchTable,
794 int fvarChannel,
795 GLXFBEvaluator const *instance,
796 void * deviceContext = NULL) {
797
798 if (instance) {
799 return instance->EvalPatchesFaceVarying(
800 srcBuffer, srcDesc,
801 dstBuffer, dstDesc,
802 numPatchCoords, patchCoords,
803 patchTable, fvarChannel);
804 } else {
805 // Create an instance on demand (slow)
806 (void)deviceContext; // unused
807 instance = Create(srcDesc, dstDesc,
808 BufferDescriptor(),
809 BufferDescriptor());
810 if (instance) {
811 bool r = instance->EvalPatchesFaceVarying(
812 srcBuffer, srcDesc,
813 dstBuffer, dstDesc,
814 numPatchCoords, patchCoords,
815 patchTable, fvarChannel);
816 delete instance;
817 return r;
818 }
819 return false;
820 }
821 }
822
849 template <typename SRC_BUFFER, typename DST_BUFFER,
850 typename PATCHCOORD_BUFFER, typename PATCH_TABLE>
851 bool EvalPatchesFaceVarying(
852 SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc,
853 DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc,
854 int numPatchCoords,
855 PATCHCOORD_BUFFER *patchCoords,
856 PATCH_TABLE *patchTable,
857 int fvarChannel = 0) const {
858
859 return EvalPatches(srcBuffer->BindVBO(), srcDesc,
860 dstBuffer->BindVBO(), dstDesc,
861 0, BufferDescriptor(),
862 0, BufferDescriptor(),
863 numPatchCoords,
864 patchCoords->BindVBO(),
865 patchTable->GetFVarPatchArrays(fvarChannel),
866 patchTable->GetFVarPatchIndexTextureBuffer(fvarChannel),
867 patchTable->GetFVarPatchParamTextureBuffer(fvarChannel));
868 }
869
875
878 bool Compile(BufferDescriptor const &srcDesc,
879 BufferDescriptor const &dstDesc,
880 BufferDescriptor const &duDesc,
881 BufferDescriptor const &dvDesc);
882
884 static void Synchronize(void *kernel);
885
886 private:
887 GLuint _srcBufferTexture;
888
889 struct _StencilKernel {
890 _StencilKernel();
891 ~_StencilKernel();
892 bool Compile(BufferDescriptor const &srcDesc,
893 BufferDescriptor const &dstDesc,
894 BufferDescriptor const &duDesc,
895 BufferDescriptor const &dvDesc);
896 GLuint program;
897 GLint uniformSrcBufferTexture;
898 GLint uniformSrcOffset; // src buffer offset (in elements)
899
900 GLint uniformSizesTexture;
901 GLint uniformOffsetsTexture;
902 GLint uniformIndicesTexture;
903 GLint uniformWeightsTexture;
904 GLint uniformDuWeightsTexture;
905 GLint uniformDvWeightsTexture;
906 GLint uniformStart; // range
907 GLint uniformEnd;
908 } _stencilKernel;
909
910 struct _PatchKernel {
911 _PatchKernel();
912 ~_PatchKernel();
913 bool Compile(BufferDescriptor const &srcDesc,
914 BufferDescriptor const &dstDesc,
915 BufferDescriptor const &duDesc,
916 BufferDescriptor const &dvDesc);
917 GLuint program;
918 GLint uniformSrcBufferTexture;
919 GLint uniformSrcOffset; // src buffer offset (in elements)
920
921 GLint uniformPatchArray;
922 GLint uniformPatchParamTexture;
923 GLint uniformPatchIndexTexture;
924 } _patchKernel;
925
926 };
927
928 } // end namespace Osd
929
930 } // end namespace OPENSUBDIV_VERSION
931 using namespace OPENSUBDIV_VERSION;
932
933 } // end namespace OpenSubdiv
934
935
936 #endif // OPENSUBDIV3_OSD_GL_XFB_EVALUATOR_H
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator
Definition: glXFBEvaluator.h:92
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableTBO::GetSizesTexture
GLuint GetSizesTexture() const
Definition: glXFBEvaluator.h:72
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::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: glXFBEvaluator.h:851
OpenSubdiv::OPENSUBDIV_VERSION::Far::StencilTable
Table of subdivision stencils.
Definition: stencilTable.h:125
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableTBO
GL TextureBuffer stencil table.
Definition: glXFBEvaluator.h:52
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::EvalStencils
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...
Definition: glXFBEvaluator.h:148
OpenSubdiv::OPENSUBDIV_VERSION::Far::LimitStencilTable
Table of limit subdivision stencils.
Definition: stencilTable.h:333
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::EvalPatchesVarying
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 ...
Definition: glXFBEvaluator.h:673
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::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
Generic eval stencils function with derivative evaluation.
Definition: glXFBEvaluator.h:309
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::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, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
Definition: glXFBEvaluator.h:492
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableTBO::GetDvWeightsTexture
GLuint GetDvWeightsTexture() const
Definition: glXFBEvaluator.h:77
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::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, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic limit eval function. This function has a same signature as other device kernels have so that ...
Definition: glXFBEvaluator.h:788
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableTBO::Create
static GLStencilTableTBO * Create(Far::StencilTable const *stencilTable, void *deviceContext=NULL)
Definition: glXFBEvaluator.h:54
OpenSubdiv::OPENSUBDIV_VERSION::Osd::PatchArrayVector
std::vector< PatchArray > PatchArrayVector
Definition: types.h:98
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableTBO::GetWeightsTexture
GLuint GetWeightsTexture() const
Definition: glXFBEvaluator.h:75
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::GLXFBEvaluator::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: glXFBEvaluator.h:608
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::Compile
bool Compile(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc)
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::EvalStencils
bool EvalStencils(SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable) const
Generic eval stencils function.
Definition: glXFBEvaluator.h:265
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableTBO::GetNumStencils
int GetNumStencils() const
Definition: glXFBEvaluator.h:78
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableTBO::GetDuWeightsTexture
GLuint GetDuWeightsTexture() const
Definition: glXFBEvaluator.h:76
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableTBO::GetOffsetsTexture
GLuint GetOffsetsTexture() const
Definition: glXFBEvaluator.h:73
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableTBO::GetIndicesTexture
GLuint GetIndicesTexture() const
Definition: glXFBEvaluator.h:74
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::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: glXFBEvaluator.h:554
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::EvalPatches
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 ...
Definition: glXFBEvaluator.h:418
OpenSubdiv
Definition: error.h:30
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::Create
static GLXFBEvaluator * Create(BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, void *deviceContext=NULL)
Definition: glXFBEvaluator.h:95
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::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: glXFBEvaluator.h:733
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::Instantiatable
bool Instantiatable
Definition: glXFBEvaluator.h:94
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLStencilTableTBO::Create
static GLStencilTableTBO * Create(Far::LimitStencilTable const *limitStencilTable, void *deviceContext=NULL)
Definition: glXFBEvaluator.h:60
OpenSubdiv::OPENSUBDIV_VERSION::Osd::GLXFBEvaluator::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, GLXFBEvaluator const *instance, void *deviceContext=NULL)
Generic static stencil function. This function has a same signature as other device kernels have so t...
Definition: glXFBEvaluator.h:216