Create a compute shader.
public:
HRESULT CreateComputeShader(
const void *pShaderBytecode,
SIZE_T BytecodeLength,
ID3D11ClassLinkage *pClassLinkage,
ID3D11ComputeShader **ppComputeShader
)
pShaderBytecode
Type: void *
[in] A pointer to a compiled shader.
BytecodeLength
Type: SIZE_T
[in] Size of the compiled shader in pShaderBytecode.
pClassLinkage
Type: ID3D11ClassLinkage *
[in, optional] A pointer to a ID3D11ClassLinkage, which represents class linkage interface; the value can be NULL.
ppComputeShader
Type: ID3D11ComputeShader **
[out, optional] Address of a pointer to an ID3D11ComputeShader interface. If this is NULL, all other parameters will be validated; if validation passes, CreateComputeShader returns S_FALSE instead of S_OK.
Type: HRESULT
This method returns E_OUTOFMEMORY if there is insufficient memory to create the compute shader. See Direct3D 11 return codes for other possible return values.
For an example, see How To: Create a Compute Shader and HDRToneMappingCS11 Sample.
Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).
Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).