[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

Xiang Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 28 11:57:39 PDT 2022


python3kgae marked an inline comment as done.
python3kgae added inline comments.


================
Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:142
+      if (!Inner) {
+        DiagnosticsEngine &Diags = CGM.getDiags();
+        unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
----------------
python3kgae wrote:
> Anastasia wrote:
> > Is this case covered by the test?
> Nice catch.
> I'll add a test for this.
Cannot add a test before other HLSL resource type like Texture2D is supported :(


================
Comment at: clang/lib/CodeGen/CGHLSLRuntime.h:39
+    llvm::StringRef Name;
+    bool IsCBuffer;
+    unsigned Reg;
----------------
python3kgae wrote:
> Anastasia wrote:
> > what does this field represent?
> The field is for marking the CBuffer as a cbuffer or tbuffer.
> The name is confusing.
> How about adding an enum BufferKind { CBuffer, TBuffer };?
Change struct CBuffer into struct Buffer to match HLSLBufferDecl.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130131/new/

https://reviews.llvm.org/D130131



More information about the cfe-commits mailing list