ID3D11Device::CreateComputeShader method
Create a compute shader.
Syntax
HRESULT CreateComputeShader( [in] const void *pShaderBytecode, [in] SIZE_T BytecodeLength, [in, optional] ID3D11ClassLinkage *pClassLinkage, [out, optional] ID3D11ComputeShader **ppComputeShader );
Parameters
- pShaderBytecode [in]
-
Type: const void*
A pointer to a compiled shader.
- BytecodeLength [in]
-
Type: SIZE_T
Size of the compiled shader in pShaderBytecode.
- pClassLinkage [in, optional]
-
Type: ID3D11ClassLinkage*
A pointer to a ID3D11ClassLinkage, which represents class linkage interface; the value can be NULL.
- ppComputeShader [out, optional]
-
Type: ID3D11ComputeShader**
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.
Return value
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.
Remarks
For an example, see How To: Create a Compute Shader and HDRToneMappingCS11 Sample.
Requirements
|
Header |
|
|---|---|
|
Library |
|
See also