You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llvm/docs/DirectX/DXContainer.rst
+31-13Lines changed: 31 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -399,16 +399,23 @@ SFI0 Part
399
399
400
400
The SFI0 part encodes a 64-bit unsigned integer bitmask of the feature flags.
401
401
This denotes which optional features the shader requires. The flag values are
402
-
defined in `llvm/include/llvm/BinaryFormat/DXContainerConstants.def <https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/BinaryFormat/DXContainerConstants.def>`_.
402
+
defined in `llvm/include/llvm/BinaryFormat/DXContainerConstants.def
The Root Signature defines the interface between the shader and the pipeline, specifying which resources are bound to the shader and how they are accessed. This structure serves as a contract between the application and the GPU, establishing a layout for resource binding that both the shader compiler and the runtime can understand.
410
+
The Root Signature defines the interface between the shader and the pipeline,
411
+
specifying which resources are bound to the shader and how they are accessed.
412
+
This structure serves as a contract between the application and the GPU,
413
+
establishing a layout for resource binding that both the shader compiler and
414
+
the runtime can understand.
410
415
411
-
The Root Signature consists of a header followed by a collection of root parameters and static samplers. The structure uses a versioned design with offset-based references to allow for flexible serialization and deserialization.
416
+
The Root Signature consists of a header followed by a collection of root parameters
417
+
and static samplers. The structure uses a versioned design with offset-based references
418
+
to allow for flexible serialization and deserialization.
412
419
413
420
Root Signature Header
414
421
~~~~~~~~~~~~~~~~~~~~~~~
@@ -427,14 +434,17 @@ Root Signature Header
427
434
428
435
The `RootSignatureHeader` structure contains the top-level information about a root signature:
429
436
430
-
- **Version**: Specifies the version of the root signature format. This allows for backward compatibility as the format evolves.
437
+
- **Version**: Specifies the version of the root signature format. This allows for
438
+
backward compatibility as the format evolves.
431
439
- **NumParameters**: The number of root parameters contained in this root signature.
432
440
- **ParametersOffset**: Byte offset from the beginning to the array of root parameters header.
433
441
- **NumStaticSamplers**: The number of static samplers defined in the root signature.
434
442
- **StaticSamplerOffset**: Byte offset from the beginning to the array of static samplers.
435
-
- **Flags**: Bit flags that define global behaviors for the root signature, such as whether to deny vertex shader access to certain resources.
443
+
- **Flags**: Bit flags that define global behaviors for the root signature, such as whether
444
+
to deny vertex shader access to certain resources.
436
445
437
-
This header allows readers to navigate the binary representation of the root signature by providing counts and offsets to locate each component within the serialized data.
446
+
This header allows readers to navigate the binary representation of the root signature by
447
+
providing counts and offsets to locate each component within the serialized data.
438
448
439
449
Root Parameter Header
440
450
~~~~~~~~~~~~~~~~~~~~~~~
@@ -448,18 +458,25 @@ Root Parameter Header
448
458
};
449
459
450
460
451
-
Each root parameter in the signature is preceded by a `RootParameterHeader` that describes the parameter's basic attributes:
461
+
Each root parameter in the signature is preceded by a `RootParameterHeader` that describes
462
+
the parameter's basic attributes:
452
463
453
-
- **ParameterType**: Enumeration indicating what type of parameter this is (e.g., descriptor table, constants, CBV, SRV, UAV).
454
-
- **ShaderVisibility**: Specifies which shader stages can access this parameter (e.g., all stages, vertex shader only, pixel shader only).
455
-
- **ParameterOffset**: Byte offset from the beginning to the specific parameter data structure for this entry.
464
+
- **ParameterType**: Enumeration indicating what type of parameter this is (e.g., descriptor
465
+
table, constants, CBV, SRV, UAV).
466
+
- **ShaderVisibility**: Specifies which shader stages can access this parameter (e.g., all stages,
467
+
vertex shader only, pixel shader only).
468
+
- **ParameterOffset**: Byte offset from the beginning to the specific parameter data structure
469
+
for this entry.
456
470
457
-
The header uses a parameter type field rather than encoding the version of the parameter through size, allowing for a more explicit representation of the parameter's nature.
471
+
The header uses a parameter type field rather than encoding the version of the parameter through
472
+
size, allowing for a more explicit representation of the parameter's nature.
458
473
459
474
Root Parameters
460
475
~~~~~~~~~~~~~~~
461
476
462
-
The Root Parameters section contains structured definitions for each type of root parameter that can be included in a root signature. Each structure corresponds to a specific parameter type as identified by the ``ParameterType`` field in the ``RootParameterHeader``.
477
+
The Root Parameters section contains structured definitions for each type of root parameter that can
478
+
be included in a root signature. Each structure corresponds to a specific parameter type as identified
479
+
by the ``ParameterType`` field in the ``RootParameterHeader``.
463
480
464
481
Root Constants
465
482
~~~~~~~~~~~~~~
@@ -472,7 +489,8 @@ Root Constants
472
489
uint32_t Num32BitValues;
473
490
};
474
491
475
-
The ``RootConstants`` structure represents inline root constants that are directly embedded in the root signature and passed to the shader without requiring a constant buffer resource:
492
+
The ``RootConstants`` structure represents inline root constants that are directly embedded in the root
493
+
signature and passed to the shader without requiring a constant buffer resource:
476
494
477
495
- **ShaderRegister**: The shader register (b#) where these constants are bound.
478
496
- **RegisterSpace**: The register space used for the binding.
0 commit comments