ID3D11ComputeContextX::CSSetShader Method

Set a compute shader to the device.

Syntax

public:
void CSSetShader(
         ID3D11ComputeShader *pComputeShader,
         ID3D11ClassInstance * const *ppClassInstances,
         UINT NumClassInstances
)  

Parameters

pComputeShader
Type: ID3D11ComputeShader *

[in, optional] Pointer to a compute shader (see ID3D11ComputeShader). Passing in NULL disables the shader for this pipeline stage.

ppClassInstances
Type: ID3D11ClassInstance * const *

[in, optional] Array of class-instance interfaces (see ID3D11ClassInstance).

NumClassInstances
Type: UINT 

The number of class-instance interfaces in the array.

Return value

None.

Remarks

The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.

The maximum number of instances a shader can have is 256.

Requirements

Header: Declared in d3d11_x.h.

Library: Use d3d11_x.lib.

See also

Reference

ID3D11ComputeContextX Interface

ID3D11ComputeContextX Members