> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GetShaderIdentifier (XBOX Series consoles)

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

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

## Syntax

```cpp theme={null}
const GetShaderIdentifier(
    LPCWSTR pExportName
)
```

### Parameters

*pExportName*\
Type: LPCWSTR

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

### Return value

Type: const

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](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/constants).  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

**Header:** d3d12\_xs.h\
**Library:** d3d12\_xs.lib\
**Supported Platforms**: XBOX Series consoles

## See Also

[ID3D12StateObjectProperties](/reference/graphics/d3d12_xs/interfaces/ID3D12StateObjectProperties/id3d12stateobjectproperties)


## Related topics

- [CreateShaderCacheSession (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device9/methods/id3d12device9_createshadercachesession_public.md)
- [GetShaderStackSize (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12stateobjectproperties/methods/id3d12stateobjectproperties_getshaderstacksize_public.md)
- [ShaderCacheControl (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device9/methods/id3d12device9_shadercachecontrol_public.md)
- [D3D_SHADER_INPUT_TYPE (XBOX Series consoles)](/reference/graphics/d3d12_xs/enums/d3d_shader_input_type.md)
- [D3D12_RAYTRACING_SHADER_CONFIG (XBOX Series consoles)](/reference/graphics/d3d12/structs/d3d12_raytracing_shader_config_public.md)
