ID3D12StateObjectProperties::GetShaderIdentifier method (d3d12.h)

Retrieves the unique identifier for a shader that can be used in a shader record.

Syntax

void * GetShaderIdentifier(
  LPCWSTR pExportName
);

Parameters

pExportName

Entrypoint in the state object for which to retrieve an identifier.

Return value

A pointer to the shader identifier.

The data referenced by this pointer is valid as long as the state object it came from is valid. The size of the data returned is D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES. Applications should copy and cache this data to avoid the cost of searching for it in the state object if it will need to be retrieved many times. The identifier is used in shader records within shader tables in GPU memory, which the app must populate.

The data itself globally identifies the shader, so even if the shader appears in a different state object with same associations, like any root signatures, it will have the same identifier.

If the shader isn’t fully resolved in the state object, the return value is nullptr.

Requirements

Requirement Value
Target Platform Windows
Header d3d12.h
Library D3D12.lib
DLL D3D12.dll

See also

ID3D12StateObjectProperties