[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

Xiang Li via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 5 08:39:31 PDT 2024


python3kgae wrote:

> I did not see any discussion of local root signatures here. It is probably good to consider those as well when thinking about this design. There is alternate syntax for specifying both local root signatues and global root signatures starting in SM 6.3
> 
> https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-state-object
> 
> https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-state-object#globalrootsignature
> 
> ```
> GlobalRootSignature MyGlobalRootSignature =
> {
>     "DescriptorTable(UAV(u0)),"                     // Output texture
>     "SRV(t0),"                                      // Acceleration structure
>     "CBV(b0),"                                      // Scene constants
>     "DescriptorTable(SRV(t1, numDescriptors = 2))"  // Static index and vertex buffers.
> };
> ```
> 
> https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-state-object#localrootsignature
> 
> ```
> LocalRootSignature MyLocalRootSignature = 
> {
>     "RootConstants(num32BitConstants = 4, b1)"  // Cube constants 
> };
> ```

Added local/global root signature to the doc.

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


More information about the cfe-commits mailing list