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

> 设置当前的管道堆栈大小。

设置当前的管道堆栈大小。

## 语法

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

### 参数

*PipelineStackSizeInBytes*\
类型：UINT64

在管道执行期间为每个着色器线程使用的堆栈大小（以字节为单位）。GPU 上可能同时有数千个正在运行的线程。

如果该值大于 0xffffffff（32 位 UINT 的最大值），运行时将放弃该调用，调试层将输出错误，因为这很可能是由于使用无效参数调用 [GetShaderStackSize](/reference/graphics/d3d12/interfaces/id3d12stateobjectproperties/methods/id3d12stateobjectproperties_getshaderstacksize_public) 时返回的无效堆栈大小（返回 0xffffffff）相加所致。在这种情况下，之前设置的堆栈大小或默认值将保留。

### 返回值

类型：void

无。

## 备注

此方法与 [GetPipelineStackSize](/reference/graphics/d3d12/interfaces/id3d12stateobjectproperties/methods/id3d12stateobjectproperties_getpipelinestacksize_public) 不可重入。这意味着如果从多个线程调用其中之一或两者，应用程序必须自行进行同步。

对于光线追踪管道以外的状态对象（例如集合），运行时会放弃该调用。

## 要求

**头文件：** d3d12\_xs.h\
**库：** d3d12\_xs.lib\
**支持的平台**：XBOX Series 主机

## 另请参阅

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