[all-commits] [llvm/llvm-project] e93a0d: [HLSL][RootSignature] Add `fdx-rootsignature-versi...

Finn Plummer via All-commits all-commits at lists.llvm.org
Tue Jun 24 16:21:46 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e93a0d0d1ed790173e23247fa2833cdac30b8268
      https://github.com/llvm/llvm-project/commit/e93a0d0d1ed790173e23247fa2833cdac30b8268
  Author: Finn Plummer <finn.c.plum at gmail.com>
  Date:   2025-06-24 (Tue, 24 Jun 2025)

  Changed paths:
    M clang/include/clang/AST/Decl.h
    M clang/include/clang/Basic/LangOptions.h
    M clang/include/clang/Driver/Options.td
    M clang/lib/AST/Decl.cpp
    M clang/lib/AST/TextNodeDumper.cpp
    M clang/lib/CodeGen/CGHLSLRuntime.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Driver/ToolChains/HLSL.cpp
    M clang/lib/Frontend/CompilerInvocation.cpp
    M clang/lib/Sema/SemaHLSL.cpp
    M clang/test/AST/HLSL/RootSignatures-AST.hlsl
    A clang/test/Driver/dxc_hlsl-rootsig-ver.hlsl
    M llvm/include/llvm/BinaryFormat/DXContainer.h

  Log Message:
  -----------
  [HLSL][RootSignature] Add `fdx-rootsignature-version` option to specify root signature version (#144813)

This pr provides the ability to specify the root signature version as a
compiler option and to retain this in the root signature decl.

It also updates the methods to serialize the version when dumping the
declaration and to output the version when generating the metadata.

- Update `DXContainer.hI` to define the root signature versions
- Update `Options.td` and `LangOpts.h` to define the
`fdx-rootsignature-version` compiler option
- Update `Options.td` to provide an alias `force-rootsig-ver` in
clang-dxc
- Update `Decl.[h|cpp]` and `SeamHLSL.cpp` so that `RootSignatureDecl`
will retain its version type
- Updates `CGHLSLRuntime.cpp` to generate the extra metadata field
- Add tests to illustrate

Resolves https://github.com/llvm/llvm-project/issues/126557.

Note: this does not implement validation based on versioning.
https://github.com/llvm/llvm-project/issues/129940 is required to
retrieve the version and use it for validations.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list