[llvm] [Documentation][DirectX] Updating RTS0 structs to match d3d12 docs (PR #161593)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 1 14:59:16 PDT 2025


https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/161593

>From 0a88d59790af67f95d5d19c8b40f3d6d88f4620e Mon Sep 17 00:00:00 2001
From: joaosaffran <joaosaffran at gmail.com>
Date: Wed, 1 Oct 2025 17:46:00 -0400
Subject: [PATCH 1/2] Update DXContainer.rst

Update RTS0 structs to match code and d3d12 docs
---
 llvm/docs/DirectX/DXContainer.rst | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

diff --git a/llvm/docs/DirectX/DXContainer.rst b/llvm/docs/DirectX/DXContainer.rst
index 17452d99e1d99..e76a7bd135848 100644
--- a/llvm/docs/DirectX/DXContainer.rst
+++ b/llvm/docs/DirectX/DXContainer.rst
@@ -530,7 +530,7 @@ but adds a 32-bit access flag.
 .. code-block:: c
 
    struct DescriptorRange_V1_0 {
-      uint32_t RangeType;
+      dxil::ResourceClass RangeType;
       uint32_t NumDescriptors;
       uint32_t BaseShaderRegister;
       uint32_t RegisterSpace;
@@ -538,12 +538,12 @@ but adds a 32-bit access flag.
    };
 
    struct DescriptorRange_V1_1 {
-      dxbc::DescriptorRangeType RangeType;
+      dxil::ResourceClass RangeType;
       uint32_t NumDescriptors;
       uint32_t BaseShaderRegister;
       uint32_t RegisterSpace;
-      uint32_t OffsetInDescriptorsFromTableStart;      
       uint32_t Flags;
+      uint32_t OffsetInDescriptorsFromTableStart;      
    };
 
 Static Samplers
@@ -556,22 +556,25 @@ This section also has a variable size, since it can contain multiple static
 samplers definitions. However, the definition is a fixed sized struct, 
 containing 13 32-byte fields of various enum, float, and integer values. 
 
+In version 1.2, the static sampler is 17 bytes. It matches the 1.0 static sampler
+but adds a 32-bit access flag. In Version 1.1, it matches static sampler 
+version 1.0.
 .. code-block:: c
 
    struct StaticSamplerDesc {
-      FilterMode Filter; 
-      TextureAddressMode AddressU;
-      TextureAddressMode AddressV;
-      TextureAddressMode AddressW;
+      dxbc::FilterMode Filter; 
+      dxbc::TextureAddressMode AddressU;
+      dxbc::TextureAddressMode AddressV;
+      dxbc::TextureAddressMode AddressW;
       float MipLODBias;
       uint32_t MaxAnisotropy;
-      ComparisonFunc ComparisonFunc; 
-      StaticBorderColor BorderColor;
+      dxbc::ComparisonFunc ComparisonFunc; 
+      dxbc::StaticBorderColor BorderColor;
       float MinLOD;
       float MaxLOD;
       uint32_t ShaderRegister;
       uint32_t RegisterSpace;
-      ShaderVisibility ShaderVisibility;
+      dxbc::ShaderVisibility ShaderVisibility;
    };
 
 SFI0 Part

>From 4ff18a720f8f4488d52b8f81585600511db7718a Mon Sep 17 00:00:00 2001
From: joaosaffran <joaosaffran at gmail.com>
Date: Wed, 1 Oct 2025 17:59:08 -0400
Subject: [PATCH 2/2] Update DXContainer.rst

Fix build
---
 llvm/docs/DirectX/DXContainer.rst | 1 +
 1 file changed, 1 insertion(+)

diff --git a/llvm/docs/DirectX/DXContainer.rst b/llvm/docs/DirectX/DXContainer.rst
index e76a7bd135848..4473f4ed8d002 100644
--- a/llvm/docs/DirectX/DXContainer.rst
+++ b/llvm/docs/DirectX/DXContainer.rst
@@ -559,6 +559,7 @@ containing 13 32-byte fields of various enum, float, and integer values.
 In version 1.2, the static sampler is 17 bytes. It matches the 1.0 static sampler
 but adds a 32-bit access flag. In Version 1.1, it matches static sampler 
 version 1.0.
+
 .. code-block:: c
 
    struct StaticSamplerDesc {



More information about the llvm-commits mailing list