Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Set a compute shader to the device.
Syntax
void CSSetShader(
[in, optional] ID3D11ComputeShader *pComputeShader,
[in, optional] ID3D11ClassInstance * const *ppClassInstances,
UINT NumClassInstances
);
Parameters
[in, optional] pComputeShader
Type: ID3D11ComputeShader*
Pointer to a compute shader (see ID3D11ComputeShader). Passing in NULL disables the shader for this pipeline stage.
[in, optional] ppClassInstances
Type: ID3D11ClassInstance*
A pointer to an array of class-instance interfaces (see ID3D11ClassInstance). Each interface used by a shader must have a corresponding class instance or the shader will get disabled. Set ppClassInstances to NULL if the shader does not use any interfaces.
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
| Requirement | Value |
|---|---|
| Target Platform | Windows |
| Header | d3d11.h |
| Library | D3D11.lib |