Export (0) Print
Expand All

ID3D11Device::CreateComputeShader method

Create a compute shader.

Syntax


HRESULT CreateComputeShader(
  const void *pShaderBytecode,
  SIZE_T BytecodeLength,
  ID3D11ClassLinkage *pClassLinkage,
  ID3D11ComputeShader **ppComputeShader
);

Parameters

pShaderBytecode

Type: const void*

A pointer to a compiled shader.

BytecodeLength

Type: SIZE_T

Size of the compiled shader in pShaderBytecode.

pClassLinkage

Type: ID3D11ClassLinkage*

A pointer to a ID3D11ClassLinkage, which represents class linkage interface; the value can be NULL.

ppComputeShader

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.

Windows Phone 8: This API is supported.

Requirements

Header

D3D11.h

Library

D3D11.lib

 

 

Community Additions

ADD
Show:
© 2014 Microsoft