[clang] [llvm] [HLSL][RootSignature] Add `hlsl-rootsig-ver` option to specify root signature version (PR #144813)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 20 16:15:13 PDT 2025
================
@@ -9288,6 +9288,23 @@ def fcgl : DXCFlag<"fcgl">, Alias<emit_pristine_llvm>;
def enable_16bit_types : DXCFlag<"enable-16bit-types">, Alias<fnative_half_type>,
HelpText<"Enable 16-bit types and disable min precision types."
"Available in HLSL 2018 and shader model 6.2.">;
+def hlsl_rootsig_ver :
+ Option<["-"], "hlsl-rootsig-ver", KIND_SEPARATE>,
+ Group<dxc_Group>,
+ Visibility<[ClangOption, CC1Option]>,
+ HelpText<"Root Signature Version">,
+ Values<"rootsig_1_0,rootsig_1_1">,
+ NormalizedValuesScope<"llvm::dxbc::RootSignatureVersion">,
+ NormalizedValues<["V1_0", "V1_1"]>,
+ MarshallingInfoEnum<LangOpts<"HLSLRootSigVer">, "V1_1">;
+def dxc_rootsig_ver :
+ Option<["-"], "force-rootsig-ver", KIND_SEPARATE>,
+ Group<dxc_Group>,
+ Visibility<[ClangOption, CC1Option, DXCOption]>,
+ HelpText<"Root Signature Version">,
+ Values<"rootsig_1_0,rootsig_1_1">,
+ NormalizedValuesScope<"llvm::dxbc::RootSignatureVersion">,
+ NormalizedValues<["V1_0", "V1_1"]>;
----------------
bogner wrote:
We should think a bit about the ergonomics here.
- I don't think we want `-force-rootsig-ver` to be available in the clang driver mode or -cc1
- The `-hlsl-rootsig-ver` naming is a bit funny, since this is really DirectX related moreso than HLSL
- Clang driver options should generally follow the gcc-style conventions, so this should probably be a `-f` option (maybe `-fhlsl-` if we deem it language-wide?) or even `-m` if it's specific to the DirectX backend
I think the `-force-rootsig-ver` could potentially just be an alias for the other spelling that's only exposed in the dxc mode.
https://github.com/llvm/llvm-project/pull/144813
More information about the llvm-commits
mailing list