ID3D11DeviceContext::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 (d3d11.h on other Windows platforms).

Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).

See also

ID3D11DeviceContext

ID3D11DeviceContext Members