================ @@ -38,6 +38,14 @@ Decl *SemaHLSL::ActOnStartBuffer(Scope *BufferScope, bool CBuffer, HLSLBufferDecl *Result = HLSLBufferDecl::Create( getASTContext(), LexicalParent, CBuffer, KwLoc, Ident, IdentLoc, LBrace); + auto RC = CBuffer ? llvm::hlsl::ResourceClass::CBuffer + : llvm::hlsl::ResourceClass::SRV; + auto RK = CBuffer ? llvm::hlsl::ResourceKind::CBuffer ---------------- damyanp wrote:
ahhhh....so tbuffer's are SRVs! I remember trying to figure that out before reading the docs and getting very confused. I don't quite understand that tbuffers are for. One nit here: it took me a moment to remember that this code treats "not cbuffer" as "tbuffer". Maybe a comment here noting that would help? https://github.com/llvm/llvm-project/pull/97103 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits