[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

Chris Bieneman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 7 10:52:48 PDT 2022


beanz added inline comments.


================
Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:135
+    llvm::Function *DxThreadID = CGM.getIntrinsic(Intrinsic::dx_thread_id);
+    // dx_thread_id
+    return buildVectorInput(B, DxThreadID, Ty);
----------------
nit: this comment doesn't add value


================
Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:166
+  unsigned SRetOffset = 0;
+  for (auto &Param : Fn->args()) {
+    if (Param.hasStructRetAttr()) {
----------------
Was dropping the `const` here intentional? Getting the parameter's type shouldn't modify it.


================
Comment at: clang/test/CodeGenHLSL/sret_output.hlsl:5
+
+// FIXME: add semantic to a
+// See https://github.com/llvm/llvm-project/issues/57874
----------------



================
Comment at: clang/test/CodeGenHLSL/sret_output.hlsl:18
+};
\ No newline at end of file

----------------
add newline to the end of the file


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133983



More information about the cfe-commits mailing list