[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 1 06:54:01 PDT 2022
aaron.ballman added a comment.
General question about the new syntax -- how does this work on field declarations of a record? e.g.,
struct S {
int i : SV_GroupIndex;
};
(Please tell me the answer is: it doesn't, because bit-fields are a thing.) Similar question applies to other places where a colon can show up. like `for (int i : SV_GroupIndex)` or `class C : SV_GroupIndex`.
================
Comment at: clang/include/clang/Basic/AttrDocs.td:6386
+ let Content = [{
+The ``SV_GroupIndex`` semantic when applied to an input parameter, specifies a
+data binding to map the group index to the specified parameter. This attribute
----------------
Minor grammar nit
================
Comment at: clang/test/SemaHLSL/Semantics/semantic_parsing.hlsl:7
+// expected-warning at +1 {{unknown attribute 'SV_IWantAPony' ignored}}
+void Pony(int GI : SV_IWantAPony) { }
----------------
There doesn't appear to be a test for parsing on global variables, you should add one for that.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122699/new/
https://reviews.llvm.org/D122699
More information about the cfe-commits
mailing list