[llvm-branch-commits] [llvm] [DirectX] Add static sampler support to root signature and fix descriptor range flags (PR #143422)

Finn Plummer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jun 12 09:00:15 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))
----------------
inbelic wrote:

One thought that just came up. I don't think it is required for us to early exit on all these verifications.

Maybe we can report all invalid errors in one go rather than exiting on the first one? Can you provide an argument for why or why not?

I would assume reporting all errors (so long as they aren't too verbose) reduces the number of compile cycles for the user to correct their input.

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


More information about the llvm-branch-commits mailing list