================ @@ -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 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits