[llvm-branch-commits] [llvm] [DirectX] Documenting Static Samplers binary representation (PR #131011)

Alex Sepkowski via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Mar 12 18:05:56 PDT 2025


================
@@ -612,3 +612,48 @@ RootDescriptorTable provides basic table structure:
 #. **NumDescriptorRanges**: Number of descriptor ranges
 #. **DescriptorRangesOffset**: Offset to descriptor range array
 
+Static Samplers
+~~~~~~~~~~~~~~~
+
+Static samplers provide a way to define fixed sampler states within the root signature itself.
+
+.. code-block:: cpp
+
+   struct StaticSamplerDesc {
+      FilterMode Filter;
+      TextureAddressMode AddressU;
+      TextureAddressMode AddressV;
+      TextureAddressMode AddressW;
+      float MipLODBias;
+      uint32_t MaxAnisotropy;
+      ComparisonFunc ComparisonFunc;
+      StaticBorderColor BorderColor;
+      float MinLOD;
+      float MaxLOD;
+      uint32_t ShaderRegister;
+      uint32_t RegisterSpace;
+      ShaderVisibility ShaderVisibility;
+   };
+
+
+The StaticSamplerDesc structure defines all properties of a static sampler:
----------------
alsepkow wrote:

Does that mean that this struct will be defined in [.../BinaryFormat/DXContainer.h](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/BinaryFormat/DXContainer.h) ?

https://github.com/llvm/llvm-project/pull/131011


More information about the llvm-branch-commits mailing list