OpenSubdiv: D3D11ComputeEvaluator Class Reference

| OpenSubdiv

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
D3D11ComputeEvaluator Class Reference

`#include <d3d11ComputeEvaluator.h>`

## Public Types
typedef bool | Instantiatable

## Public Member Functions
| D3D11ComputeEvaluator ()
| Constructor. More...
| ~D3D11ComputeEvaluator ()
| Destructor. More...
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. More...

## 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. More...
static void | Synchronize (ID3D11DeviceContext *deviceContext)
| Wait the dispatched kernel finishes. More...

## 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()

D3D11ComputeEvaluator | ( |  | ) |

Constructor.

## ◆ ~D3D11ComputeEvaluator()

~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

  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 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:

- opensubdiv/osd/d3d11ComputeEvaluator.h