[clang] [llvm] [DirectX] Updating Root Signature Metadata to contain Static Sampler flags (PR #160210)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 1 12:38:00 PDT 2025
================
@@ -501,6 +502,17 @@ Error MetadataParser::parseStaticSampler(mcdxbc::RootSignatureDesc &RSD,
return Error(std::move(E));
Sampler.ShaderVisibility = *Visibility;
+ if (RSD.Version < 3) {
+ RSD.StaticSamplers.push_back(Sampler);
+ return Error::success();
+ }
+ assert(RSD.Version >= 3);
----------------
joaosaffran wrote:
The metadata always had a value, this version exists just to ignore it if we are using the incorrect version and prevent the Flags to be set in the wrong version. We did the same logic for other flags that got added in different versions, like `Root Descriptor` https://github.com/llvm/llvm-project/blob/78c65545d4694e043b593e4cca7c7281a639247b/llvm/lib/Frontend/HLSL/RootSignatureMetadata.cpp#L321
https://github.com/llvm/llvm-project/pull/160210
More information about the llvm-commits
mailing list