[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-09-22 Thread Xiang Li 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 rGe3fd0b20731f: [HLSL] Add resource binding attribute for HLSL. (authored by python3kgae). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461990. python3kgae added a comment. Add Issue link for FIXME. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files: clang/include/clang/Basic/Attr.td clang/

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-09-21 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 461987. python3kgae added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 ___ cfe-commits mailing list cfe-comm

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/test/SemaHLSL/resource_binding_attr_error.hlsl:15 +// expected-error@+1 {{invalid space specifier 's2' used; expected 'space' followed by an integer, like space1}} +cbuffer a : register(b0, s2) { + beanz wrote

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-15 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452739. python3kgae added a comment. Fix format in AttrDocs.td and avoid name conflict in test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files: clang/inc

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/SemaHLSL/resource_binding_attr_error.hlsl:15 +// expected-error@+1 {{invalid space specifier 's2' used; expected 'space' followed by an integer, like space1}} +cbuffer a : register(b0, s2) { + aaron.ballman wro

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-15 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, only nits left that can be fixed when landing (no need for additional review). Comment at: clang/include/clang/Basic/AttrDocs.td:6557-6560 +.. code-block

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:2893-2894 + else if (const auto *RB = dyn_cast(Attr)) +NewAttr = +S.mergeHLSLResourceBindingAttr(D, *RB, RB->getSlot(), RB->getSpace()); else if (Attr->shouldInheritEvenIfAlreadyPresent() |

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452325. python3kgae marked 2 inline comments as done. python3kgae added a comment. Remove mergeHLSLResourceBindingAttr since should not be able to set ResourceBinding more than once. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:6557-6558 +Here're resource binding examples with and without space: +``RWBuffer Uav : register(u3, space1)`` +``Buffer Buf : register(t1)`` +The full documentation is available here: https://

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked an inline comment as done. python3kgae added inline comments. Comment at: clang/lib/Parse/ParseHLSL.cpp:112-113 +} +if (!Tok.is(tok::identifier)) { + Diag(Tok.getLocation(), diag::err_expected) << tok::identifier; + SkipUntil(tok::r_paren, Sto

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452232. python3kgae marked an inline comment as done. python3kgae added a comment. Limit to lower case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files: c

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:6557-6558 +Here're resource binding examples with and without space: +``register(t3, space1)`` +``register(t1)`` +The full documentation is available here: https://docs.microsoft.com/en-us/win

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 452037. python3kgae added a comment. Add fixit for case like space 1. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files: clang/include/clang/Basic/Attr.td

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/include/clang/Basic/Attr.td:4022 + let LangOpts = [HLSL]; + let Args = [StringArgument<"Slot", 1>, StringArgument<"Space", 1>]; + let Documentation = [HLSLResourceBindingDocs]; aaron.ballman wrote: > Do you

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 451917. python3kgae marked 14 inline comments as done. python3kgae added a comment. Remove optional flag for Slot. Update error messages and doc. Add test for empty resource attribute and space only resource attribute. Repository: rG LLVM Github Monore

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-10 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:150 +[{isa(S)}], +"global functions">; This string literal looks suspiciously wrong to me. This is the text that shows up in a diagnostic

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 451282. python3kgae added a comment. Treat resource binding as "HLSLSemantic". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files: clang/include/clang/Basic/

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 451262. python3kgae added a comment. Move resource binding attribute validation to Sema. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130033/new/ https://reviews.llvm.org/D130033 Files: clang/include/cl

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-08 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I have some nitpick comments about the wording of the errors and docs, but the bigger meta issue is that you've implemented this parsing entirely from scratch, and I suspect this should be sharing parsing logic with the generic semantic parser. I know the parameters them

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-07-18 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: svenvh, asavonic, beanz, pow2clk, Anastasia, aaron.ballman. Herald added a project: All. python3kgae requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The resource binding attri