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

Reply via email to