[clang] [HLSL] Collect explicit resource binding information (part 1) (PR #111203)

Joshua Batista via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 4 14:53:54 PDT 2024


================
@@ -4588,6 +4588,35 @@ def HLSLResourceBinding: InheritableAttr {
   let LangOpts = [HLSL];
   let Args = [StringArgument<"Slot">, StringArgument<"Space", 1>];
   let Documentation = [HLSLResourceBindingDocs];
+  let AdditionalMembers = [{
+      enum class RegisterType : unsigned { SRV, UAV, CBuffer, Sampler, C, I, Invalid };
+
+      const FieldDecl *ResourceField = nullptr;
----------------
bob80905 wrote:

Shouldn't this be made more abstract in the case of non-UDT resources? I would think the type would be Decl instead.

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


More information about the cfe-commits mailing list