[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

Damyan Pepper via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 30 07:47:54 PDT 2024


================
@@ -480,6 +480,9 @@ struct RegisterBindingFlags {
 
   bool ContainsNumeric = false;
   bool DefaultGlobals = false;
+
+  // used only when Resource == true
+  llvm::dxil::ResourceClass ResourceClass = llvm::dxil::ResourceClass::UAV;
----------------
damyanp wrote:

Along with this, the various SRV, UAV, CBV, Sampler flags now seem redundant with ResourceClass.  Are these flags only valid when UDR is set?  

If that's the case then I wonder if this might be better expressed as a `std::variant`?

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


More information about the cfe-commits mailing list