[llvm-branch-commits] [llvm] [HLSL] Adding support for Root Constants in LLVM Metadata (PR #135085)
Finn Plummer via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Apr 16 14:11:06 PDT 2025
================
@@ -94,10 +144,56 @@ static bool parse(LLVMContext *Ctx, mcdxbc::RootSignatureDesc &RSD,
static bool verifyRootFlag(uint32_t Flags) { return (Flags & ~0xfff) == 0; }
+static bool verifyShaderVisibility(dxbc::ShaderVisibility Flags) {
+ switch (Flags) {
+
+ case dxbc::ShaderVisibility::All:
+ case dxbc::ShaderVisibility::Vertex:
+ case dxbc::ShaderVisibility::Hull:
+ case dxbc::ShaderVisibility::Domain:
+ case dxbc::ShaderVisibility::Geometry:
+ case dxbc::ShaderVisibility::Pixel:
+ case dxbc::ShaderVisibility::Amplification:
+ case dxbc::ShaderVisibility::Mesh:
+ return true;
+ }
+
+ return false;
+}
+
+static bool verifyParameterType(dxbc::RootParameterType Flags) {
+ switch (Flags) {
+ case dxbc::RootParameterType::Constants32Bit:
----------------
inbelic wrote:
I see. What was the reason to change the input parameter to `uint32_t`? Do we want the printed output to be the literal metadata values? It seemed more explicit with the enums
https://github.com/llvm/llvm-project/pull/135085
More information about the llvm-branch-commits
mailing list