python3kgae added a comment. In D133983#3805761 <https://reviews.llvm.org/D133983#3805761>, @aaron.ballman wrote:
> There are no tests for applying this to a global variable, so those should be > added. The global variable in the Subjects is wrong. It should be Field. Support for semantic on field is a bigger change. Created https://github.com/llvm/llvm-project/issues/57889 to track it. ================ Comment at: clang/include/clang/Basic/AttrDocs.td:6596-6598 +The ``SV_DispatchThreadID`` semantic, when applied to an input parameter, specifies a +data binding to map global thread offset within the Dispatch call(per dimension of the group) to the specified parameter. +This attribute is only supported in compute shaders. ---------------- aaron.ballman wrote: > It doesn't specify what happens when applied to a global variable. The global variable is wrong. Change it to Field and added document. But adding support for field is a big change. Created https://github.com/llvm/llvm-project/issues/57889 to track it. ================ Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6925 + } + + D->addAttr(::new (S.Context) HLSLSV_DispatchThreadIDAttr(S.Context, AL)); ---------------- aaron.ballman wrote: > Are there other restrictions we need to care about, like what the type of the > parameter/global is, etc? Yes. Added the check for type. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133983/new/ https://reviews.llvm.org/D133983 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits