[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-14 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1fdf952deeb9: [HLSL] Add Semantic syntax, and SV_GroupIndex (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D122699?vs=4206

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! There's an open question about the circumstances under which we emit the `err_hlsl_attr_unsupported_in_stage` diagnostic, but if there's code to be changed there, it can be

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 420620. beanz added a comment. Updates based on feedback from @aaron.ballman. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122699/new/ https://reviews.llvm.org/D122699 Files: clang/include/clang/Basic/Attr.td

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/AttributeCommonInfo.h:47-48 // Note TableGen depends on the order above. Do not add or change the order // without adding related code to TableGen/ClangAttrEmitter.cpp. /// Context-sensi

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz marked an inline comment as done. beanz added a comment. Thank you! Will update shortly. Comment at: clang/include/clang/Basic/AttributeCommonInfo.h:47-48 // Note TableGen depends on the order above. Do not add or change the order // without adding related c

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D122699#3422347 , @beanz wrote: > In D122699#3422298 , @aaron.ballman > wrote: > >> General question about the new syntax -- how does this work on field >> declarations of a rec

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 420376. beanz added a comment. Updating based on feedback from @aaron.ballman I think this covers all the cases for parsing as a function parameter. I haven't added the code to parse these in structure definitions or globals yet. If it is okay I'd like to do

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-01 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D122699#3422298 , @aaron.ballman wrote: > 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 answe

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-01 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-03-31 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6916 + Triple Target = S.Context.getTargetInfo().getTriple(); + if (Target.getEnvironment() != Triple::Compute) { +uint32_t Pipeline = It is OK to have SV_GroupIndex on a compute

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-03-31 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 419570. beanz added a comment. Updates based on feedback from @aaron.ballman & @MaskRay. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122699/new/ https://reviews.llvm.org/D122699 Files: clang/incl

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Parse/ParseDecl.cpp:6965-6966 // Parse GNU attributes, if present. MaybeParseGNUAttributes(ParmDeclarator); +MaybeParseHLSLSemantics(DS.getAttributes()); beanz wrote: > aaron.ballman wrote

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-03-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Will try to update today. Thank you! Comment at: clang/lib/Parse/ParseDecl.cpp:6965-6966 // Parse GNU attributes, if present. MaybeParseGNUAttributes(ParmDeclarator); +MaybeParseHLSLSemantics(DS.getAttributes()); aaron.bal

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-03-30 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. You should also add parsing test coverage as this is parsing new syntax. 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

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-03-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. 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 is -

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-03-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: MaskRay, jdoerfert, kuhar, rnk, aaron.ballman, rsmith. Herald added subscribers: StephenFan, arphaman, mgorny. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. HLSL has a language feature called