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

# SetComputeRoot32BitConstant

> 在计算根签名中设置一个常量。

在计算根签名中设置一个常量。

## 语法

```cpp theme={null}
void SetComputeRoot32BitConstant(
    UINT RootParameterIndex,
    UINT SrcData,
    UINT DestOffsetIn32BitValues
)
```

### 参数

*RootParameterIndex \[in]*\
类型：UINT

绑定的插槽号。

*SrcData \[in]*\
类型：UINT

要设置的常量的源数据。

*DestOffsetIn32BitValues \[in]*\
类型：UINT

在根签名中设置常量的偏移量（以 32 位值为单位）。

### 返回值

类型：void

无。

## 要求

**头文件：** d3d12\_xs.h 或 d3d12\_x.h\
**库：** d3d12\_xs.lib 或 d3d12\_x.lib\
**支持的平台**：XBOX Series 主机和 XBOX One 系列

## 另请参阅

[ID3D12GraphicsCommandList](/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList/id3d12graphicscommandlist_xs)


## Related topics

- [SetComputeRoot32BitConstants](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputeroot32bitconstants_public.md)
- [SetGraphicsRoot32BitConstant](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setgraphicsroot32bitconstant_public.md)
- [SetGraphicsRoot32BitConstants](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setgraphicsroot32bitconstants_public.md)
- [SetComputeRootConstantBufferView](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputerootconstantbufferview_public.md)
- [SetComputeRootSignature](/zh-CN/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_setcomputerootsignature_public.md)
