[llvm] [DirectX] Add static sampler support to root signature (PR #143422)

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 27 11:02:18 PDT 2025


================
@@ -456,6 +664,48 @@ static bool validate(LLVMContext *Ctx, const mcdxbc::RootSignatureDesc &RSD) {
     }
   }
 
+  for (const dxbc::RTS0::v1::StaticSampler &Sampler : RSD.StaticSamplers) {
+    if (!verifySamplerFilter(Sampler.Filter))
+      return reportValueError(Ctx, "Filter", Sampler.Filter);
+
+    if (!verifyAddress(Sampler.AddressU))
----------------
bogner wrote:

I'll take a look at the other PR and think about it there, but FWIW we don't expect to be getting here from a user's input per se - I would expect we only really get here from a root signature read from a binary format or from a frontend that's presumably already attempted to validate the input.

https://github.com/llvm/llvm-project/pull/143422


More information about the llvm-commits mailing list