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

# SetPipelineStackSize (XBOX Series consoles)

> Set the current pipeline stack size.

Set the current pipeline stack size.

## Syntax

```cpp theme={null}
void SetPipelineStackSize(
    UINT64 PipelineStackSizeInBytes
)
```

### Parameters

*PipelineStackSizeInBytes*\
Type: UINT64

Stack size in bytes to use during pipeline execution for each shader thread. There can be many thousands of threads in flight at once on the GPU.

If the value is greater than 0xffffffff (the maximum value of a 32-bit UINT) the runtime will drop the call, and the debug layer will print an error, as this is likely the result of summing up invalid stack sizes returned from [GetShaderStackSize](/reference/graphics/d3d12/interfaces/id3d12stateobjectproperties/methods/id3d12stateobjectproperties_getshaderstacksize_public) called with invalid parameters, which return 0xffffffff.  In this case, the previously set stack size, or the default, remains.

### Return value

Type: void

None.

## Remarks

This method and [GetPipelineStackSize](/reference/graphics/d3d12/interfaces/id3d12stateobjectproperties/methods/id3d12stateobjectproperties_getpipelinestacksize_public) are not re-entrant.  This means if calling either or both from separate threads, the app must synchronize on its own.

The runtime drops calls to state objects other than raytracing pipelines, such as collections.

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

- [GetPipelineStackSize (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12stateobjectproperties/methods/id3d12stateobjectproperties_getpipelinestacksize_public.md)
- [GetShaderStackSize (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12stateobjectproperties/methods/id3d12stateobjectproperties_getshaderstacksize_public.md)
- [SetPipelineState1 (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_setpipelinestate1_public.md)
- [NDA topic directory - live Microsoft Learn links](/nda/nda-topic-directory.md)
- [DispatchRays (XBOX Series consoles)](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist4/methods/id3d12graphicscommandlist4_dispatchrays_public.md)
