[llvm] [DXIL] Adding support to RootSignatureFlags in obj2yaml (PR #122396)
Chris B via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 6 20:06:18 PST 2025
================
@@ -541,6 +548,21 @@ struct ProgramSignatureElement {
static_assert(sizeof(ProgramSignatureElement) == 32,
"ProgramSignatureElement is misaligned");
+struct RootSignatureValidations {
+
+ static Expected<uint32_t> validateRootFlag(uint32_t Flags) {
+ if ((Flags & ~0x80000fff) != 0)
+ return llvm::make_error<BinaryStreamError>("Invalid flag");
+ return Flags;
+ }
+
+ static Expected<uint32_t> validateVersion(uint32_t Version) {
+ if (Version < 1 || Version > 2)
+ return llvm::make_error<BinaryStreamError>("Invalid Version");
----------------
llvm-beanz wrote:
What version is invalid?
```suggestion
return llvm::make_error<BinaryStreamError>("Invalid Root Signature Version");
```
https://github.com/llvm/llvm-project/pull/122396
More information about the llvm-commits
mailing list