|
Blender V5.0
|
#include <gpu_compute_evaluator.h>
Public Types | |
| using | Instantiatable = bool |
Public Member Functions | |
| GPUComputeEvaluator () | |
| Constructor. | |
| ~GPUComputeEvaluator () | |
| Destructor. note that the GL context must be made current. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE> | |
| bool | EvalStencils (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable) const |
| Generic stencil function. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE> | |
| bool | EvalStencils (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, OpenSubdiv::Osd::BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, OpenSubdiv::Osd::BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable) const |
| Generic stencil function. | |
| bool | EvalStencils (gpu::VertBuf *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, gpu::VertBuf *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, gpu::VertBuf *duBuffer, OpenSubdiv::Osd::BufferDescriptor const &duDesc, gpu::VertBuf *dvBuffer, OpenSubdiv::Osd::BufferDescriptor const &dvDesc, gpu::StorageBuf *sizesBuffer, gpu::StorageBuf *offsetsBuffer, gpu::StorageBuf *indicesBuffer, gpu::StorageBuf *weightsBuffer, gpu::StorageBuf *duWeightsBuffer, gpu::StorageBuf *dvWeightsBuffer, int start, int end) const |
| Dispatch the GLSL compute kernel on GPU asynchronously returns false if the kernel hasn't been compiled yet. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename PATCHCOORD_BUFFER, typename PATCH_TABLE> | |
| bool | EvalPatches (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) |
| Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename PATCHCOORD_BUFFER, typename PATCH_TABLE> | |
| bool | EvalPatches (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, OpenSubdiv::Osd::BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, OpenSubdiv::Osd::BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) |
| Generic limit eval function with derivatives. This function has a same signature as other device kernels have so that it can be called in the same way. | |
| bool | EvalPatches (gpu::VertBuf *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, gpu::VertBuf *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, gpu::VertBuf *duBuffer, OpenSubdiv::Osd::BufferDescriptor const &duDesc, gpu::VertBuf *dvBuffer, OpenSubdiv::Osd::BufferDescriptor const &dvDesc, int numPatchCoords, gpu::VertBuf *patchCoordsBuffer, const OpenSubdiv::Osd::PatchArrayVector &patchArrays, gpu::StorageBuf *patchIndexBuffer, gpu::StorageBuf *patchParamsBuffer) |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename PATCHCOORD_BUFFER, typename PATCH_TABLE> | |
| bool | EvalPatchesVarying (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) |
| Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename PATCHCOORD_BUFFER, typename PATCH_TABLE> | |
| bool | EvalPatchesVarying (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, OpenSubdiv::Osd::BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, OpenSubdiv::Osd::BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable) |
| Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename PATCHCOORD_BUFFER, typename PATCH_TABLE> | |
| bool | EvalPatchesFaceVarying (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) |
| Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename PATCHCOORD_BUFFER, typename PATCH_TABLE> | |
| bool | EvalPatchesFaceVarying (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, OpenSubdiv::Osd::BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, OpenSubdiv::Osd::BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel=0) |
| Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way. | |
| bool | Compile (OpenSubdiv::Osd::BufferDescriptor const &srcDesc, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, OpenSubdiv::Osd::BufferDescriptor const &duDesc=OpenSubdiv::Osd::BufferDescriptor(), OpenSubdiv::Osd::BufferDescriptor const &dvDesc=OpenSubdiv::Osd::BufferDescriptor()) |
Static Public Member Functions | |
| static GPUComputeEvaluator * | Create (OpenSubdiv::Osd::BufferDescriptor const &srcDesc, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, OpenSubdiv::Osd::BufferDescriptor const &duDesc, OpenSubdiv::Osd::BufferDescriptor const &dvDesc, OpenSubdiv::Osd::BufferDescriptor const &, OpenSubdiv::Osd::BufferDescriptor const &, OpenSubdiv::Osd::BufferDescriptor const &, void *deviceContext=nullptr) |
| static GPUComputeEvaluator * | Create (OpenSubdiv::Osd::BufferDescriptor const &srcDesc, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, OpenSubdiv::Osd::BufferDescriptor const &duDesc, OpenSubdiv::Osd::BufferDescriptor const &dvDesc, void *=nullptr) |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE> | |
| static bool | EvalStencils (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, GPUComputeEvaluator *instance, void *deviceContext=nullptr) |
| Generic static stencil function. This function has a same signature as other device kernels have so that it can be called transparently from OsdMesh template interface. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE> | |
| static bool | EvalStencils (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, OpenSubdiv::Osd::BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, OpenSubdiv::Osd::BufferDescriptor const &dvDesc, STENCIL_TABLE const *stencilTable, GPUComputeEvaluator *instance, void *deviceContext=nullptr) |
| Generic static stencil function. This function has a same signature as other device kernels have so that it can be called transparently from OsdMesh template interface. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename PATCHCOORD_BUFFER, typename PATCH_TABLE> | |
| static bool | EvalPatches (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GPUComputeEvaluator *instance, void *deviceContext=nullptr) |
| Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename PATCHCOORD_BUFFER, typename PATCH_TABLE> | |
| static bool | EvalPatches (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, OpenSubdiv::Osd::BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, OpenSubdiv::Osd::BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GPUComputeEvaluator *instance, void *deviceContext=nullptr) |
| Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename PATCHCOORD_BUFFER, typename PATCH_TABLE> | |
| static bool | EvalPatchesVarying (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GPUComputeEvaluator *instance, void *deviceContext=nullptr) |
| Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename PATCHCOORD_BUFFER, typename PATCH_TABLE> | |
| static bool | EvalPatchesVarying (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, OpenSubdiv::Osd::BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, OpenSubdiv::Osd::BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, GPUComputeEvaluator *instance, void *deviceContext=nullptr) |
| Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename PATCHCOORD_BUFFER, typename PATCH_TABLE> | |
| static bool | EvalPatchesFaceVarying (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GPUComputeEvaluator *instance, void *deviceContext=nullptr) |
| Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename PATCHCOORD_BUFFER, typename PATCH_TABLE> | |
| static bool | EvalPatchesFaceVarying (SRC_BUFFER *srcBuffer, OpenSubdiv::Osd::BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, OpenSubdiv::Osd::BufferDescriptor const &dstDesc, DST_BUFFER *duBuffer, OpenSubdiv::Osd::BufferDescriptor const &duDesc, DST_BUFFER *dvBuffer, OpenSubdiv::Osd::BufferDescriptor const &dvDesc, int numPatchCoords, PATCHCOORD_BUFFER *patchCoords, PATCH_TABLE *patchTable, int fvarChannel, GPUComputeEvaluator *instance, void *deviceContext=nullptr) |
| Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way. | |
| static void | Synchronize (void *deviceContext) |
| Wait the dispatched kernel finishes. | |
Definition at line 104 of file gpu_compute_evaluator.h.
Definition at line 106 of file gpu_compute_evaluator.h.
| blender::opensubdiv::GPUComputeEvaluator::GPUComputeEvaluator | ( | ) |
Constructor.
Definition at line 114 of file gpu_compute_evaluator.cc.
References nullptr.
Referenced by Create(), Create(), EvalPatches(), EvalPatches(), EvalPatchesFaceVarying(), EvalPatchesFaceVarying(), EvalPatchesVarying(), EvalPatchesVarying(), EvalStencils(), and EvalStencils().
| blender::opensubdiv::GPUComputeEvaluator::~GPUComputeEvaluator | ( | ) |
Destructor. note that the GL context must be made current.
Definition at line 120 of file gpu_compute_evaluator.cc.
References GPU_storagebuf_free().
| bool blender::opensubdiv::GPUComputeEvaluator::Compile | ( | OpenSubdiv::Osd::BufferDescriptor const & | srcDesc, |
| OpenSubdiv::Osd::BufferDescriptor const & | dstDesc, | ||
| OpenSubdiv::Osd::BufferDescriptor const & | duDesc = OpenSubdiv::Osd::BufferDescriptor(), | ||
| OpenSubdiv::Osd::BufferDescriptor const & | dvDesc = OpenSubdiv::Osd::BufferDescriptor() ) |
Other methods
Configure GLSL kernel. A valid GL context must be made current before calling this function. Returns false if it fails to compile the kernel.
Definition at line 128 of file gpu_compute_evaluator.cc.
Referenced by Create().
|
inlinestatic |
Blender doesn't use 2nd derivatives, but the OSD evaluator cache does expect this constructor to be present.
Definition at line 111 of file gpu_compute_evaluator.h.
References Create(), and GPUComputeEvaluator().
Referenced by Create(), EvalPatches(), EvalPatches(), EvalPatchesFaceVarying(), EvalPatchesFaceVarying(), EvalPatchesVarying(), EvalPatchesVarying(), EvalStencils(), and EvalStencils().
|
inlinestatic |
Definition at line 123 of file gpu_compute_evaluator.h.
References Compile(), and GPUComputeEvaluator().
| bool blender::opensubdiv::GPUComputeEvaluator::EvalPatches | ( | gpu::VertBuf * | srcBuffer, |
| OpenSubdiv::Osd::BufferDescriptor const & | srcDesc, | ||
| gpu::VertBuf * | dstBuffer, | ||
| OpenSubdiv::Osd::BufferDescriptor const & | dstDesc, | ||
| gpu::VertBuf * | duBuffer, | ||
| OpenSubdiv::Osd::BufferDescriptor const & | duDesc, | ||
| gpu::VertBuf * | dvBuffer, | ||
| OpenSubdiv::Osd::BufferDescriptor const & | dvDesc, | ||
| int | numPatchCoords, | ||
| gpu::VertBuf * | patchCoordsBuffer, | ||
| const OpenSubdiv::Osd::PatchArrayVector & | patchArrays, | ||
| gpu::StorageBuf * | patchIndexBuffer, | ||
| gpu::StorageBuf * | patchParamsBuffer ) |
|
inline |
Generic limit eval function with derivatives. This function has a same signature as other device kernels have so that it can be called in the same way.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| duBuffer | Output buffer derivative wrt u Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| duDesc | vertex buffer descriptor for the duBuffer |
| dvBuffer | Output buffer derivative wrt v Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dvDesc | vertex buffer descriptor for the dvBuffer |
| numPatchCoords | number of patchCoords. |
| patchCoords | array of locations to be evaluated. |
| patchTable | GLPatchTable or equivalent |
Definition at line 699 of file gpu_compute_evaluator.h.
References EvalPatches().
|
inlinestatic |
Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| duBuffer | Output buffer derivative wrt u Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| duDesc | vertex buffer descriptor for the duBuffer |
| dvBuffer | Output buffer derivative wrt v Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dvDesc | vertex buffer descriptor for the dvBuffer |
| numPatchCoords | number of patchCoords. |
| patchCoords | array of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. |
| patchTable | GLPatchTable or equivalent |
| instance | cached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. |
| deviceContext | not used in the GLXFB evaluator |
Definition at line 560 of file gpu_compute_evaluator.h.
References Create(), EvalPatches(), and GPUComputeEvaluator().
|
inline |
Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| numPatchCoords | number of patchCoords. |
| patchCoords | array of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. |
| patchTable | GLPatchTable or equivalent |
Definition at line 637 of file gpu_compute_evaluator.h.
References EvalPatches().
|
inlinestatic |
Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way.
Limit evaluations with PatchTable
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| numPatchCoords | number of patchCoords. |
| patchCoords | array of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. |
| patchTable | GLPatchTable or equivalent |
| instance | cached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. |
| deviceContext | not used in the GLXFB evaluator |
Definition at line 482 of file gpu_compute_evaluator.h.
References Create(), EvalPatches(), and GPUComputeEvaluator().
Referenced by EvalPatches(), EvalPatches(), EvalPatches(), EvalPatches(), EvalPatchesFaceVarying(), EvalPatchesFaceVarying(), EvalPatchesVarying(), and EvalPatchesVarying().
|
inlinestatic |
Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| duBuffer | Output buffer derivative wrt u Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| duDesc | vertex buffer descriptor for the duBuffer |
| dvBuffer | Output buffer derivative wrt v Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dvDesc | vertex buffer descriptor for the dvBuffer |
| numPatchCoords | number of patchCoords. |
| patchCoords | array of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. |
| patchTable | GLPatchTable or equivalent |
| fvarChannel | face-varying channel |
| instance | cached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. |
| deviceContext | not used in the GLXFB evaluator |
Definition at line 1210 of file gpu_compute_evaluator.h.
References Create(), EvalPatchesFaceVarying(), and GPUComputeEvaluator().
|
inline |
Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| duBuffer | Output buffer derivative wrt u Must have get_vertex_buffer() returning a gpu::VertBuf object of destination data |
| duDesc | vertex buffer descriptor for the duBuffer |
| dvBuffer | Output buffer derivative wrt v Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dvDesc | vertex buffer descriptor for the dvBuffer |
| numPatchCoords | number of patchCoords. |
| patchCoords | array of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. |
| patchTable | GLPatchTable or equivalent |
| fvarChannel | face-varying channel |
Definition at line 1304 of file gpu_compute_evaluator.h.
References EvalPatches().
|
inlinestatic |
Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| numPatchCoords | number of patchCoords. |
| patchCoords | array of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. |
| patchTable | GLPatchTable or equivalent |
| fvarChannel | face-varying channel |
| instance | cached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. |
| deviceContext | not used in the GLXFB evaluator |
Definition at line 1062 of file gpu_compute_evaluator.h.
References Create(), EvalPatchesFaceVarying(), and GPUComputeEvaluator().
Referenced by EvalPatchesFaceVarying(), and EvalPatchesFaceVarying().
|
inline |
Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| numPatchCoords | number of patchCoords. |
| patchCoords | array of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. |
| patchTable | GLPatchTable or equivalent |
| fvarChannel | face-varying channel |
Definition at line 1135 of file gpu_compute_evaluator.h.
References EvalPatches().
|
inline |
Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| duBuffer | Output buffer derivative wrt u Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| duDesc | vertex buffer descriptor for the duBuffer |
| dvBuffer | Output buffer derivative wrt v Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dvDesc | vertex buffer descriptor for the dvBuffer |
| numPatchCoords | number of patchCoords. |
| patchCoords | array of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. |
| patchTable | GLPatchTable or equivalent |
Definition at line 996 of file gpu_compute_evaluator.h.
References EvalPatches().
|
inlinestatic |
Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| duBuffer | Output buffer derivative wrt u Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| duDesc | vertex buffer descriptor for the duBuffer |
| dvBuffer | Output buffer derivative wrt v Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dvDesc | vertex buffer descriptor for the dvBuffer |
| numPatchCoords | number of patchCoords. |
| patchCoords | array of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. |
| patchTable | GLPatchTable or equivalent |
| instance | cached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. |
| deviceContext | not used in the GLXFB evaluator |
Definition at line 907 of file gpu_compute_evaluator.h.
References Create(), EvalPatchesVarying(), and GPUComputeEvaluator().
|
inline |
Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| numPatchCoords | number of patchCoords. |
| patchCoords | array of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. |
| patchTable | GLPatchTable or equivalent |
Definition at line 835 of file gpu_compute_evaluator.h.
References EvalPatches().
|
inlinestatic |
Generic limit eval function. This function has a same signature as other device kernels have so that it can be called in the same way.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| numPatchCoords | number of patchCoords. |
| patchCoords | array of locations to be evaluated. must have BindVBO() method returning an array of PatchCoord struct in VBO. |
| patchTable | GLPatchTable or equivalent |
| instance | cached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. |
| deviceContext | not used in the GLXFB evaluator |
Definition at line 777 of file gpu_compute_evaluator.h.
References Create(), EvalPatchesVarying(), and GPUComputeEvaluator().
Referenced by EvalPatchesVarying(), and EvalPatchesVarying().
| bool blender::opensubdiv::GPUComputeEvaluator::EvalStencils | ( | gpu::VertBuf * | srcBuffer, |
| OpenSubdiv::Osd::BufferDescriptor const & | srcDesc, | ||
| gpu::VertBuf * | dstBuffer, | ||
| OpenSubdiv::Osd::BufferDescriptor const & | dstDesc, | ||
| gpu::VertBuf * | duBuffer, | ||
| OpenSubdiv::Osd::BufferDescriptor const & | duDesc, | ||
| gpu::VertBuf * | dvBuffer, | ||
| OpenSubdiv::Osd::BufferDescriptor const & | dvDesc, | ||
| gpu::StorageBuf * | sizesBuffer, | ||
| gpu::StorageBuf * | offsetsBuffer, | ||
| gpu::StorageBuf * | indicesBuffer, | ||
| gpu::StorageBuf * | weightsBuffer, | ||
| gpu::StorageBuf * | duWeightsBuffer, | ||
| gpu::StorageBuf * | dvWeightsBuffer, | ||
| int | start, | ||
| int | end ) const |
Dispatch the GLSL compute kernel on GPU asynchronously returns false if the kernel hasn't been compiled yet.
| srcBuffer | GL buffer of input primvar source data |
| srcDesc | vertex buffer descriptor for the srcBuffer |
| dstBuffer | GL buffer of output primvar destination data |
| dstDesc | vertex buffer descriptor for the dstBuffer |
| duBuffer | GL buffer of output derivative wrt u |
| duDesc | vertex buffer descriptor for the duBuffer |
| dvBuffer | GL buffer of output derivative wrt v |
| dvDesc | vertex buffer descriptor for the dvBuffer |
| sizesBuffer | GL buffer of the sizes in the stencil table |
| offsetsBuffer | GL buffer of the offsets in the stencil table |
| indicesBuffer | GL buffer of the indices in the stencil table |
| weightsBuffer | GL buffer of the weights in the stencil table |
| duWeightsBuffer | GL buffer of the du weights in the stencil table |
| dvWeightsBuffer | GL buffer of the dv weights in the stencil table |
| start | start index of stencil table |
| end | end index of stencil table |
|
inline |
Generic stencil function.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the dstBuffer |
| duBuffer | Output buffer derivative wrt u Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| duDesc | vertex buffer descriptor for the duBuffer |
| dvBuffer | Output buffer derivative wrt v Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dvDesc | vertex buffer descriptor for the dvBuffer |
| stencilTable | stencil table to be applied. The table must have SSBO interfaces. |
Definition at line 360 of file gpu_compute_evaluator.h.
References EvalStencils().
|
inlinestatic |
Generic static stencil function. This function has a same signature as other device kernels have so that it can be called transparently from OsdMesh template interface.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the dstBuffer |
| duBuffer | Output buffer derivative wrt u Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| duDesc | vertex buffer descriptor for the duBuffer |
| dvBuffer | Output buffer derivative wrt v Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dvDesc | vertex buffer descriptor for the dvBuffer |
| stencilTable | stencil table to be applied. The table must have SSBO interfaces. |
| instance | cached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. |
| deviceContext | not used in the GLSL kernel |
Definition at line 244 of file gpu_compute_evaluator.h.
References Create(), EvalStencils(), and GPUComputeEvaluator().
|
inline |
Generic stencil function.
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| stencilTable | stencil table to be applied. The table must have SSBO interfaces. |
Definition at line 306 of file gpu_compute_evaluator.h.
References EvalStencils().
|
inlinestatic |
Generic static stencil function. This function has a same signature as other device kernels have so that it can be called transparently from OsdMesh template interface.
Stencil evaluations with StencilTable
| srcBuffer | Input primvar buffer. Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of source data |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer Must have get_vertex_buffer() returning a gpu::VertBuf buffer object of destination data |
| dstDesc | vertex buffer descriptor for the output buffer |
| stencilTable | stencil table to be applied. The table must have SSBO interfaces. |
| instance | cached compiled instance. Clients are supposed to pre-compile an instance of this class and provide to this function. If it's null the kernel still compute by instantiating on-demand kernel although it may cause a performance problem. |
| deviceContext | not used in the GLSL kernel |
Definition at line 177 of file gpu_compute_evaluator.h.
References Create(), EvalStencils(), and GPUComputeEvaluator().
Referenced by EvalStencils(), EvalStencils(), EvalStencils(), and EvalStencils().
|
static |
Wait the dispatched kernel finishes.
Definition at line 146 of file gpu_compute_evaluator.cc.
References GPU_finish().