Skip to main content
Describes constants inline in the root signature that appear in shaders as one constant buffer.

Syntax

Members

ShaderRegister
Type: UINT
The shader register. RegisterSpace
Type: UINT
The register space. Num32BitValues
Type: UINT
The number of constants that occupy a single shader slot (these constants appear like a single constant buffer). All constants occupy a single root signature bind slot.

Remarks

Refer to Resource Binding in HLSL for more information on shader registers and spaces. D3D12_ROOT_CONSTANTS is the data type of the Constants member of D3D12_ROOT_PARAMETER. Use a D3D12_ROOT_CONSTANTS when you set D3D12_ROOT_PARAMETER’s SlotType field to the D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS member of D3D12_ROOT_PARAMETER_TYPE.

Requirements

Header: d3d12_xs.h or d3d12_x.h
Library: d3d12_xs.lib or d3d12_x.lib
Supported Platforms: XBOX Series consoles and XBOX One family

See Also

CD3DX12_ROOT_CONSTANTS Core Structures Creating a Root Signature Using constants directly in the root signature
Last modified on August 20, 2026