[llvm-branch-commits] [llvm] [DirectX] Detect resources with identical overlapping binding (PR #140645)

2025-05-27 Thread Ashley Coleman via llvm-branch-commits
https://github.com/V-FEXrt approved this pull request. https://github.com/llvm/llvm-project/pull/140645 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [DirectX] Improve error message when a binding cannot be found for a resource (PR #140642)

2025-05-27 Thread Ashley Coleman via llvm-branch-commits
https://github.com/V-FEXrt approved this pull request. https://github.com/llvm/llvm-project/pull/140642 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-12 Thread Ashley Coleman via llvm-branch-commits
@@ -55,11 +55,33 @@ export void foo() { // CHECK-SAME: i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) // CHECK-NEXT: ret void -// Buf2 initialization part 1 - FIXME: constructor with implicit binding does not exist yet; -// the global init function currently

[llvm-branch-commits] [clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-12 Thread Ashley Coleman via llvm-branch-commits
@@ -3269,27 +3285,42 @@ static bool initVarDeclWithCtor(Sema &S, VarDecl *VD, return true; } -static bool initGlobalResourceDecl(Sema &S, VarDecl *VD) { +bool SemaHLSL::initGlobalResourceDecl(VarDecl *VD) { + std::optional RegisterSlot; + uint32_t SpaceNo = 0; HLSLResou

[llvm-branch-commits] [clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-12 Thread Ashley Coleman via llvm-branch-commits
https://github.com/V-FEXrt approved this pull request. https://github.com/llvm/llvm-project/pull/138976 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-12 Thread Ashley Coleman via llvm-branch-commits
@@ -668,6 +668,26 @@ BuiltinTypeDeclBuilder::addHandleConstructorFromBinding() { .finalize(); } +BuiltinTypeDeclBuilder & +BuiltinTypeDeclBuilder::addHandleConstructorFromImplicitBinding() { + if (Record->isCompleteDefinition()) V-FEXrt wrote: Could yo

[llvm-branch-commits] [clang] [llvm] [HLSL] Add resource constructor with implicit binding for global resources (PR #138976)

2025-05-12 Thread Ashley Coleman via llvm-branch-commits
@@ -668,6 +668,26 @@ BuiltinTypeDeclBuilder::addHandleConstructorFromBinding() { .finalize(); } +BuiltinTypeDeclBuilder & +BuiltinTypeDeclBuilder::addHandleConstructorFromImplicitBinding() { + if (Record->isCompleteDefinition()) +return *this; + + using PH = Builti

[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Add parsing for RootFlags (PR #138055)

2025-05-08 Thread Ashley Coleman via llvm-branch-commits
@@ -27,6 +27,13 @@ RootSignatureParser::RootSignatureParser(SmallVector &Elements, bool RootSignatureParser::parse() { // Iterate as many RootElements as possible do { +if (tryConsumeExpectedToken(TokenKind::kw_RootFlags)) { + auto Flags = parseRootFlags(); +

[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Add parsing for RootFlags (PR #138055)

2025-05-08 Thread Ashley Coleman via llvm-branch-commits
https://github.com/V-FEXrt approved this pull request. https://github.com/llvm/llvm-project/pull/138055 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Add optional parameters for RootConstants (PR #138007)

2025-05-08 Thread Ashley Coleman via llvm-branch-commits
@@ -78,6 +78,13 @@ std::optional RootSignatureParser::parseRootConstants() { Constants.Reg = Params->Reg.value(); + // Fill in optional parameters + if (Params->Visibility.has_value()) V-FEXrt wrote: nit: ```suggestion if (Params->Visibility) ``` htt

[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Add optional parameters for RootConstants (PR #138007)

2025-05-08 Thread Ashley Coleman via llvm-branch-commits
https://github.com/V-FEXrt approved this pull request. https://github.com/llvm/llvm-project/pull/138007 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Add optional parameters for RootConstants (PR #138007)

2025-05-08 Thread Ashley Coleman via llvm-branch-commits
@@ -82,6 +82,8 @@ class RootSignatureParser { struct ParsedConstantParams { std::optional Reg; std::optional Num32BitConstants; +std::optional Space; V-FEXrt wrote: Yeah I think I agree with Finn here. Seems to map more directly to the source to

[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Add mandatory parameters for RootConstants (PR #138002)

2025-05-08 Thread Ashley Coleman via llvm-branch-commits
@@ -57,6 +57,27 @@ std::optional RootSignatureParser::parseRootConstants() { RootConstants Constants; + auto Params = parseRootConstantParams(); + if (!Params.has_value()) V-FEXrt wrote: nit: ```suggestion if (Params) ``` https://github.com/llvm/llv

[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Add mandatory parameters for RootConstants (PR #138002)

2025-05-08 Thread Ashley Coleman via llvm-branch-commits
@@ -57,6 +57,27 @@ std::optional RootSignatureParser::parseRootConstants() { RootConstants Constants; + auto Params = parseRootConstantParams(); + if (!Params.has_value()) +return std::nullopt; + + // Check mandatory parameters were provided + if (!Params->Num32Bit

[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Add mandatory parameters for RootConstants (PR #138002)

2025-05-08 Thread Ashley Coleman via llvm-branch-commits
https://github.com/V-FEXrt approved this pull request. https://github.com/llvm/llvm-project/pull/138002 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Add mandatory parameters for RootConstants (PR #138002)

2025-05-08 Thread Ashley Coleman via llvm-branch-commits
@@ -57,6 +57,27 @@ std::optional RootSignatureParser::parseRootConstants() { RootConstants Constants; + auto Params = parseRootConstantParams(); + if (!Params.has_value()) +return std::nullopt; + + // Check mandatory parameters were provided V-FEXrt

[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Implement Parsing of Descriptor Tables (PR #122982)

2025-01-22 Thread Ashley Coleman via llvm-branch-commits
@@ -148,6 +148,333 @@ bool RootSignatureLexer::LexToken(RootSignatureToken &Result) { return false; } +// Parser Definitions + +RootSignatureParser::RootSignatureParser( +SmallVector &Elements, +const SmallVector &Tokens) +: Elements(Elements) { + CurTok = Toke

[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Implement Parsing of Descriptor Tables (PR #122982)

2025-01-22 Thread Ashley Coleman via llvm-branch-commits
@@ -148,6 +148,333 @@ bool RootSignatureLexer::LexToken(RootSignatureToken &Result) { return false; } +// Parser Definitions + +RootSignatureParser::RootSignatureParser( +SmallVector &Elements, +const SmallVector &Tokens) +: Elements(Elements) { + CurTok = Toke

[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Implement Parsing of Descriptor Tables (PR #122982)

2025-01-22 Thread Ashley Coleman via llvm-branch-commits
@@ -148,6 +148,333 @@ bool RootSignatureLexer::LexToken(RootSignatureToken &Result) { return false; } +// Parser Definitions + +RootSignatureParser::RootSignatureParser( +SmallVector &Elements, +const SmallVector &Tokens) +: Elements(Elements) { + CurTok = Toke

[llvm-branch-commits] [clang] [llvm] [HLSL][RootSignature] Implement Parsing of Descriptor Tables (PR #122982)

2025-01-22 Thread Ashley Coleman via llvm-branch-commits
@@ -148,6 +148,333 @@ bool RootSignatureLexer::LexToken(RootSignatureToken &Result) { return false; } +// Parser Definitions + +RootSignatureParser::RootSignatureParser( +SmallVector &Elements, +const SmallVector &Tokens) +: Elements(Elements) { + CurTok = Toke