Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions llvm/docs/DirectX/DXContainer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -544,3 +544,71 @@ Version 1.1 Root Descriptor
The Version 1.1 RootDescriptor_V1_1 extends the base structure with the following additional fields:

#. **Flags**: Provides additional metadata about the descriptor's usage pattern.

Root Descriptor Table
~~~~~~~~~~~~~~~~~~~~~

Descriptor tables function as containers that hold references to descriptors in descriptor heaps.
They allow multiple descriptors to be bound to the pipeline through a single root signature parameter.

.. code-block:: cpp

struct DescriptorRange_V1_0 {
dxbc::DescriptorRangeType RangeType;
uint32_t NumDescriptors;
uint32_t BaseShaderRegister;
uint32_t RegisterSpace;
uint32_t OffsetInDescriptorsFromTableStart;
};

struct DescriptorRange_V1_1 {
dxbc::DescriptorRangeType RangeType;
uint32_t NumDescriptors;
uint32_t BaseShaderRegister;
uint32_t RegisterSpace;
uint32_t OffsetInDescriptorsFromTableStart;
// New flags for Version 1.1
enum Flags {
None = 0x0,
// Descriptors are static and known at root signature creation
DESCRIPTORS_STATIC = 0x1,
// Descriptors remain constant during command list execution
DESCRIPTORS_STATIC_KEEPING_BUFFER_BOUNDS_CHECKS = 0x2,
// Descriptors may change frequently
DESCRIPTORS_VOLATILE = 0x4
};

// Bitfield of flags from the Flags enum
uint32_t Flags;
};

struct RootDescriptorTable {
uint32_t NumDescriptorRanges;
uint32_t DescriptorRangesOffset;
};


Descriptor Range Version 1.0
''''''''''''''''''''''''''''
The Version 1.0 ``DescriptorRange_V1_0`` provides basic descriptor range definition:

#. **RangeType**: Type of descriptors (CBV, SRV, UAV, or Sampler)
#. **NumDescriptors**: Number of descriptors in the range
#. **BaseShaderRegister**: First shader register in the range
#. **RegisterSpace**: Register space for the range
#. **OffsetInDescriptorsFromTableStart**: Offset from the descriptor heap start

Descriptor Range Version 1.1
''''''''''''''''''''''''''''
The Version 1.1 DescriptorRange_V1_1 extends the base structure with performance optimization flags.

#. **Flags**: Provide additional information about the descriptors and enable further driver optimizations.
For details, check `Direct X documentation <https://learn.microsoft.com/en-us/windows/win32/direct3d12/root-signature-version-1-1#static-and-volatile-flags>`_.

Root Descriptor Table
'''''''''''''''''''''
RootDescriptorTable provides basic table structure:

#. **NumDescriptorRanges**: Number of descriptor ranges
#. **DescriptorRangesOffset**: Offset to descriptor range array