Skip to content

Commit b013080

Browse files
authored
Update DXContainer.rst
1 parent 8dc983a commit b013080

File tree

1 file changed

+33
-25
lines changed

1 file changed

+33
-25
lines changed

llvm/docs/DirectX/DXContainer.rst

Lines changed: 33 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,26 @@ Root Descriptor Table
556556
^^^^^^^^^^^^^^^^^^^^^
557557
Descriptor tables function as containers that hold references to descriptors in descriptor heaps.
558558
They allow multiple descriptors to be bound to the pipeline through a single root signature parameter.
559+
Tables are split in a Header and Data Section. The Header contains information that helps locate the data,
560+
which will contain a collection of descriptor ranges.
561+
562+
Root Descriptor Table Header
563+
"""""""""""""""""""""""""""""""
564+
565+
.. code-block:: c
566+
567+
struct RootDescriptorTable {
568+
uint32_t NumDescriptorRanges;
569+
uint32_t DescriptorRangesOffset;
570+
};
571+
572+
RootDescriptorTable provides basic table structure:
573+
574+
#. **NumDescriptorRanges**: Number of descriptor ranges
575+
#. **DescriptorRangesOffset**: Offset to descriptor range array
576+
577+
Descriptor Range Version 1.0
578+
""""""""""""""""""""""""""""
559579

560580
.. code-block:: c
561581
@@ -567,6 +587,19 @@ They allow multiple descriptors to be bound to the pipeline through a single roo
567587
uint32_t OffsetInDescriptorsFromTableStart;
568588
};
569589
590+
The Version 1.0 ``DescriptorRange_V1_0`` provides basic descriptor range definition:
591+
592+
#. **RangeType**: Type of descriptors (CBV, SRV, UAV, or Sampler)
593+
#. **NumDescriptors**: Number of descriptors in the range
594+
#. **BaseShaderRegister**: First shader register in the range
595+
#. **RegisterSpace**: Register space for the range
596+
#. **OffsetInDescriptorsFromTableStart**: Offset from the descriptor heap start
597+
598+
Descriptor Range Version 1.1
599+
""""""""""""""""""""""""""""
600+
601+
.. code-block:: c
602+
570603
struct DescriptorRange_V1_1 {
571604
dxbc::DescriptorRangeType RangeType;
572605
uint32_t NumDescriptors;
@@ -588,36 +621,11 @@ They allow multiple descriptors to be bound to the pipeline through a single roo
588621
uint32_t Flags;
589622
};
590623
591-
struct RootDescriptorTable {
592-
uint32_t NumDescriptorRanges;
593-
uint32_t DescriptorRangesOffset;
594-
};
595-
596-
597-
Descriptor Range Version 1.0
598-
""""""""""""""""""""""""""""
599-
The Version 1.0 ``DescriptorRange_V1_0`` provides basic descriptor range definition:
600-
601-
#. **RangeType**: Type of descriptors (CBV, SRV, UAV, or Sampler)
602-
#. **NumDescriptors**: Number of descriptors in the range
603-
#. **BaseShaderRegister**: First shader register in the range
604-
#. **RegisterSpace**: Register space for the range
605-
#. **OffsetInDescriptorsFromTableStart**: Offset from the descriptor heap start
606-
607-
Descriptor Range Version 1.1
608-
""""""""""""""""""""""""""""
609624
The Version 1.1 DescriptorRange_V1_1 extends the base structure with performance optimization flags.
610625

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

614-
Root Descriptor Table Structure
615-
"""""""""""""""""""""""""""""""
616-
RootDescriptorTable provides basic table structure:
617-
618-
#. **NumDescriptorRanges**: Number of descriptor ranges
619-
#. **DescriptorRangesOffset**: Offset to descriptor range array
620-
621629
Static Samplers
622630
~~~~~~~~~~~~~~~
623631

0 commit comments

Comments
 (0)