Root Signatures

The root signature defines what types of resources are bound to the graphics pipeline.

In this section

Topic Description
Root Signatures Overview
A root signature is configured by the app and links command lists to the resources the shaders require. The graphics command list has both a graphics and compute root signature. A compute command list will simply have one compute root signature. These root signatures are independent of each other.
Using a Root Signature
The root signature is the definition of an arbitrarily arranged collection of descriptor tables (including their layout), root constants and root descriptors. Each entry has a cost towards a maximum limit, so the application can trade off the balance between how many of each type of entry the root signature will contain.
Creating a Root Signature
Root signatures are a complex data structure containing nested structures. These can be defined programmatically using the data structure definition below (which includes methods to help initialize members). Alternatively, they can be authored in High Level Shading Language (HLSL) giving the advantage that the compiler will validate early that the layout is compatible with the shader.
Root Signature Limits
The root signature is prime real estate, and there are strict limits and costs to consider.
Using Constants Directly in the Root Signature
Applications can define root constants in the root signature, each as a set of 32-bit values. They appear in High Level Shading Language (HLSL) as a constant buffer. Note that constant buffers for historical reasons are viewed as sets of 4x32-bit values.
Using Descriptors Directly in the Root Signature
Applications can put descriptors directly in the root signature to avoid having to go through a descriptor heap. These descriptors take a lot of space in the root signature (see the root signature limits section), so applications have to use them sparingly.
Example Root Signatures
The following section shows root signatures varying in complexity from empty to completely full.
Specifying Root Signatures in HLSL
Specifying root signatures in HLSL Shader Model 5.1 is an alternative to specifying them in C++ code.
Root Signature Version 1.1
The purpose of Root Signature version 1.1 is to enable applications to indicate to drivers when descriptors in a descriptor heap won t change or the data descriptors point to won t change. This allows the option for drivers to make optimizations that might be possible knowing that a descriptor or the memory it points to is static for some period of time.



Resource Binding