OpenSubdiv
Loading...
Searching...
No Matches
D3D11ComputeEvaluator Class Reference

#include <d3d11ComputeEvaluator.h>

Public Types

typedef bool Instantiatable
 

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 D3D11ComputeEvaluatorCreate (BufferDescriptor const &srcDesc, BufferDescriptor const &dstDesc, BufferDescriptor const &duDesc, BufferDescriptor const &dvDesc, ID3D11DeviceContext *deviceContext)
 
static D3D11ComputeEvaluatorCreate (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.
 

Detailed Description

Definition at line 96 of file d3d11ComputeEvaluator.h.

Member Typedef Documentation

◆ Instantiatable

typedef bool Instantiatable

Definition at line 98 of file d3d11ComputeEvaluator.h.

Constructor & Destructor Documentation

◆ D3D11ComputeEvaluator()

Constructor.

◆ ~D3D11ComputeEvaluator()

Destructor.

Member Function Documentation

◆ Compile()

bool Compile ( BufferDescriptor const &  srcDesc,
BufferDescriptor const &  dstDesc,
ID3D11DeviceContext *  deviceContext 
)

Configure DX kernel. Returns false if it fails to compile the kernel.

◆ Create() [1/2]

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 
)
static

◆ Create() [2/2]

static D3D11ComputeEvaluator * Create ( BufferDescriptor const &  srcDesc,
BufferDescriptor const &  dstDesc,
BufferDescriptor const &  duDesc,
BufferDescriptor const &  dvDesc,
ID3D11DeviceContext *  deviceContext 
)
static

◆ EvalStencils() [1/3]

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.

◆ EvalStencils() [2/3]

static bool EvalStencils ( SRC_BUFFER *  srcBuffer,
BufferDescriptor const &  srcDesc,
DST_BUFFER *  dstBuffer,
BufferDescriptor const &  dstDesc,
STENCIL_TABLE const *  stencilTable,
D3D11ComputeEvaluator const *  instance,
ID3D11DeviceContext *  deviceContext 
)
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.

Parameters
srcBufferInput primvar buffer. must have BindVBO() method returning a const float pointer for read
srcDescvertex buffer descriptor for the input buffer
dstBufferOutput primvar buffer must have BindVBO() method returning a float pointer for write
dstDescvertex buffer descriptor for the output buffer
stencilTablestencil table to be applied. The table must have SSBO interfaces.
instancecached 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.
deviceContextID3D11DeviceContext.

Definition at line 148 of file d3d11ComputeEvaluator.h.

◆ EvalStencils() [3/3]

bool EvalStencils ( SRC_BUFFER *  srcBuffer,
BufferDescriptor const &  srcDesc,
DST_BUFFER *  dstBuffer,
BufferDescriptor const &  dstDesc,
STENCIL_TABLE const *  stencilTable,
ID3D11DeviceContext *  deviceContext 
) const
inline

Dispatch the DX compute kernel on GPU asynchronously. returns false if the kernel hasn't been compiled yet.

Definition at line 181 of file d3d11ComputeEvaluator.h.

◆ Synchronize()

static void Synchronize ( ID3D11DeviceContext *  deviceContext)
static

Wait the dispatched kernel finishes.


The documentation for this class was generated from the following file: