Skip to content

Commit 15babc8

Browse files
author
joaosaffran
committed
Merge branch 'documentation/root-descriptors' into documentation/static-samplers
2 parents 4525033 + 73c645d commit 15babc8

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

llvm/docs/DirectX/DXContainer.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -496,17 +496,24 @@ signature and passed to the shader without requiring a constant buffer resource:
496496
#. **RegisterSpace**: The register space used for the binding.
497497
#. **Num32BitValues**: The number of 32-bit values included in this constant buffer.
498498

499-
Root constants provide a fast way to pass small amounts of data directly to the shader without the overhead of creating and binding a constant buffer resource.
499+
Root constants provide a fast way to pass small amounts of data directly to the shader without the
500+
overhead of creating and binding a constant buffer resource.
500501

501502
Root Descriptor
502503
~~~~~~~~~~~~~~~
503504

504-
Root descriptors provide a direct mechanism for binding individual resources to shader stages in the Direct3D 12
505-
rendering pipeline. They represent a critical interface for efficient resource management, allowing applications
506-
to specify how shader stages access specific GPU resources.
505+
Root descriptors provide a mechanism for binding individual resources to shader stages in the Direct3D 12
506+
rendering pipeline. They allow applications to specify how shader stages access specific GPU resources.
507507

508508
.. code-block:: cpp
509509
510+
enum RootDescriptorFlags {
511+
None = 0,
512+
DataVolatile = 0x2,
513+
DataStaticWhileSetAtExecute = 0x4,
514+
DataStatic = 0x8,
515+
}
516+
510517
// Version 1.0 Root Descriptor
511518
struct RootDescriptor_V1_0 {
512519
uint32_t ShaderRegister;
@@ -516,21 +523,14 @@ to specify how shader stages access specific GPU resources.
516523
// Version 1.1 Root Descriptor
517524
struct RootDescriptor_V1_1 {
518525
uint32_t ShaderRegister;
519-
uint32_t RegisterSpace;
520-
// New flags for Version 1.1
521-
enum Flags {
522-
None = 0x0,
523-
DATA_STATIC = 0x1,
524-
DATA_STATIC_WHILE_SET_AT_EXECUTE = 0x2,
525-
DATA_VOLATILE = 0x4
526-
};
527-
526+
uint32_t RegisterSpace;
528527
// Bitfield of flags from the Flags enum
529528
uint32_t Flags;
530529
};
531530
532-
The Root Descriptor structure has evolved to support two versions, providing enhanced flexibility and
533-
performance optimization capabilities.
531+
Version 1.1 of Root Descriptors has introduced some flags that can hint the drivers into
532+
performing further code optimizations. For details, check
533+
`Direct X documentation <https://learn.microsoft.com/en-us/windows/win32/direct3d12/root-signature-version-1-1#static-and-volatile-flags>`_.
534534

535535
Version 1.0 Root Descriptor
536536
'''''''''''''''''''''''''''

0 commit comments

Comments
 (0)