![]() |
OpenSubdiv
|
#include <d3d11ComputeEvaluator.h>
Public Types | |
| using | Instantiatable = bool |
Public Member Functions | |
| D3D11ComputeEvaluator () | |
| Constructor. | |
| ~D3D11ComputeEvaluator () | |
| Destructor. | |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE> | |
| bool | EvalStencils (SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, ID3D11DeviceContext *deviceContext) const |
| bool | EvalStencils (ID3D11UnorderedAccessView *srcSRV, BufferDescriptor const &srcDesc, ID3D11UnorderedAccessView *dstUAV, BufferDescriptor const &dstDesc, ID3D11ShaderResourceView *sizesSRV, ID3D11ShaderResourceView *offsetsSRV, ID3D11ShaderResourceView *indicesSRV, ID3D11ShaderResourceView *weightsSRV, int start, int end, ID3D11DeviceContext *deviceContext) const |
| bool | Compile (BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, ID3D11DeviceContext *deviceContext) |
| Configure DX kernel. Returns false if it fails to compile the kernel. | |
Static Public Member Functions | |
| static D3D11ComputeEvaluator * | Create (BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, ID3D11DeviceContext *deviceContext) |
| static D3D11ComputeEvaluator * | Create (BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, BufferDescriptor const &duuDesc, BufferDescriptor const &duvDesc, BufferDescriptor const &dvvDesc, ID3D11DeviceContext *deviceContext) |
| template<typename SRC_BUFFER, typename DST_BUFFER, typename STENCIL_TABLE> | |
| static bool | EvalStencils (SRC_BUFFER *srcBuffer, BufferDescriptor const &srcDesc, DST_BUFFER *dstBuffer, BufferDescriptor const &dstDesc, STENCIL_TABLE const *stencilTable, D3D11ComputeEvaluator const *instance, ID3D11DeviceContext *deviceContext) |
| Generic static compute function. This function has a same signature as other device kernels have so that it can be called transparently from OsdMesh template interface. | |
| static void | Synchronize (ID3D11DeviceContext *deviceContext) |
| Wait the dispatched kernel finishes. | |
Definition at line 79 of file d3d11ComputeEvaluator.h.
| using Instantiatable = bool |
Definition at line 81 of file d3d11ComputeEvaluator.h.
| D3D11ComputeEvaluator | ( | ) |
Constructor.
Destructor.
| bool Compile | ( | BufferDescriptor const & | srcDesc, |
| BufferDescriptor const & | dstDesc, | ||
| ID3D11DeviceContext * | deviceContext ) |
Configure DX kernel. Returns false if it fails to compile the kernel.
|
static |
|
static |
| bool EvalStencils | ( | ID3D11UnorderedAccessView * | srcSRV, |
| BufferDescriptor const & | srcDesc, | ||
| ID3D11UnorderedAccessView * | dstUAV, | ||
| BufferDescriptor const & | dstDesc, | ||
| ID3D11ShaderResourceView * | sizesSRV, | ||
| ID3D11ShaderResourceView * | offsetsSRV, | ||
| ID3D11ShaderResourceView * | indicesSRV, | ||
| ID3D11ShaderResourceView * | weightsSRV, | ||
| int | start, | ||
| int | end, | ||
| ID3D11DeviceContext * | deviceContext ) const |
Dispatch the DX compute kernel on GPU asynchronously. returns false if the kernel hasn't been compiled yet.
|
inlinestatic |
Generic static compute 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 BindVBO() method returning a const float pointer for read |
| srcDesc | vertex buffer descriptor for the input buffer |
| dstBuffer | Output primvar buffer must have BindVBO() method returning a float pointer for write |
| 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 | ID3D11DeviceContext. |
Definition at line 132 of file d3d11ComputeEvaluator.h.
|
inline |
Dispatch the DX compute kernel on GPU asynchronously. returns false if the kernel hasn't been compiled yet.
Definition at line 165 of file d3d11ComputeEvaluator.h.
|
static |
Wait the dispatched kernel finishes.