https://github.com/spall approved this pull request.
Nit on the PR description. you didn't move the scalarizerPass, you moved the
DXILFlattenArrays pass to be immediately after the scalarizerPass.
https://github.com/llvm/llvm-project/pull/146800
___
l
@@ -223,6 +223,34 @@ TEST_F(ParseHLSLRootSignatureTest,
ValidParseDTClausesTest) {
ASSERT_TRUE(Consumer->isSatisfied());
}
+TEST_F(ParseHLSLRootSignatureTest, ValidParseStaticSamplerTest) {
spall wrote:
Should you add a test where the parsing is unsuccessf
@@ -606,6 +644,30 @@
RootSignatureParser::parseDescriptorTableClauseParams(TokenKind RegType) {
return Params;
}
+std::optional
+RootSignatureParser::parseStaticSamplerParams() {
+ assert(CurToken.TokKind == TokenKind::pu_l_paren &&
+ "Expects to only be invoked st
@@ -606,6 +644,30 @@
RootSignatureParser::parseDescriptorTableClauseParams(TokenKind RegType) {
return Params;
}
+std::optional
+RootSignatureParser::parseStaticSamplerParams() {
+ assert(CurToken.TokKind == TokenKind::pu_l_paren &&
+ "Expects to only be invoked st
@@ -163,11 +163,16 @@ void Parser::ParseHLSLAnnotations(ParsedAttributes &Attrs,
SourceLocation SlotLoc = Tok.getLocation();
ArgExprs.push_back(ParseIdentifierLoc());
-// Add numeric_constant for fix-it.
-if (SlotStr.size() == 1 && Tok.is(tok::numeric_constant)
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/123985
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -286,10 +286,7 @@ void CGHLSLRuntime::emitBufferGlobalsAndMetadata(const
HLSLBufferDecl *BufDecl,
.str( &&
"layout type does not match the converted element type");
-// there might be resources inside the used defined st
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 -finclude-default-header -triple
dxil-pc-shadermodel6.3-compute \
+// RUN: -fnative-half-type -emit-llvm -disable-llvm-passes -o - %s |
FileCheck %s
+
+// CHECK: %"struct.__cblayout_$Globals" = type { float, float,
%struct.__cblayout_S }
+
@@ -5072,6 +5080,20 @@ class HLSLBufferDecl final : public NamedDecl, public
DeclContext {
return static_cast(const_cast(DC));
}
+ // Iterator for the buffer decls. Concatenates the list of decls parented
spall wrote:
I just want to clarify what this
@@ -159,11 +159,16 @@ class SemaHLSL : public SemaBase {
// List of all resource bindings
ResourceBindings Bindings;
+ // default constant buffer $Globals
+ HLSLBufferDecl *DefaultCBuffer;
+
private:
void collectResourcesOnVarDecl(VarDecl *D);
void collectResource
@@ -5753,6 +5765,30 @@ void HLSLBufferDecl::addLayoutStruct(CXXRecordDecl *LS) {
addDecl(LS);
}
+void HLSLBufferDecl::addDefaultBufferDecl(Decl *D) {
+ assert(isImplicit() &&
+ "default decls can only be added to the implicit/default constant "
+ "buffer $Gl
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/123985
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -647,6 +648,40 @@ void SemaHLSL::emitLogicalOperatorFixIt(Expr *LHS, Expr
*RHS,
<< NewFnName << FixItHint::CreateReplacement(FullRange, OS.str());
}
+void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) {
+ if (AL.getNumArgs() != 1)
@@ -647,6 +648,40 @@ void SemaHLSL::emitLogicalOperatorFixIt(Expr *LHS, Expr
*RHS,
<< NewFnName << FixItHint::CreateReplacement(FullRange, OS.str());
}
+void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) {
+ if (AL.getNumArgs() != 1)
+return;
+
+
@@ -0,0 +1,54 @@
+// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - %s
-verify
+
+// This file mirrors the diagnostics testing in ParseHLSLRootSignatureTest.cpp
+// to verify that the correct diagnostics strings are output
+
+// Lexer related tests
+
+#define
https://github.com/spall commented:
LGTM, I'm not familiar enough with root signature syntax to say if the tests
are complete and the lexer/parser isn't included in this PR as far as I can
tell, so I assume it works.
https://github.com/llvm/llvm-project/pull/123985
___
@@ -647,6 +648,40 @@ void SemaHLSL::emitLogicalOperatorFixIt(Expr *LHS, Expr
*RHS,
<< NewFnName << FixItHint::CreateReplacement(FullRange, OS.str());
}
+void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) {
+ if (AL.getNumArgs() != 1)
+return;
+
+
https://github.com/spall approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/119775
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
18 matches
Mail list logo