> ## 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.

# InitializeMetaCommand (XBOX Series consoles)

> Initializes the specified meta command.

Initializes the specified meta command.

You must initialize a meta command at least once prior (on the GPU's timeline) to executing it. Initializing gives the  implementation the chance to perform any work necessary to accelerate the invocation of the meta command. You must supply the sufficient resource parameters, including the persistent cache resource.

## Syntax

```cpp theme={null}
void InitializeMetaCommand(
    ID3D12MetaCommand  pMetaCommand,
    const void  pInitializationParametersData,
    SIZE_T InitializationParametersDataSizeInBytes
)
```

### Parameters

*pMetaCommand \[in]*\
Type: ID3D12MetaCommand \*

A pointer to an [ID3D12MetaCommand](/reference/graphics/d3d12/interfaces/id3d12metacommand/id3d12metacommand_public) representing the meta command to initialize.

*pInitializationParametersData \[in, optional]*\
Type: const void \*

An optional pointer to a constant structure containing the values of the parameters for initializing the meta command.

*InitializationParametersDataSizeInBytes \[in]*\
Type: SIZE\_T

A [SIZE\_T](https://learn.microsoft.com/en-us/windows/desktop/WinProg/windows-data-types) containing the size of the structure pointed to by <i>pInitializationParametersData</i>, if set, otherwise 0.

### Return value

Type: void

If this method succeeds, it returns **S\_OK**. Otherwise, it returns an **HRESULT** error code.

## Requirements

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

## See Also

[ID3D12GraphicsCommandList4](/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList4/id3d12graphicscommandlist4)


## Related topics

- [CreateMetaCommand (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_createmetacommand_public.md)
- [EnumerateMetaCommands (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_enumeratemetacommands_public.md)
- [EnumerateMetaCommandParameters (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device5/methods/id3d12device5_enumeratemetacommandparameters_public.md)
- [CreateCommandList1 (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device4/methods/id3d12device4_createcommandlist1_public.md)
- [CreateCommandQueue1 (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12device9/methods/id3d12device9_createcommandqueue1_public.md)
