You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Awesome to see vk::ReadClock introduced in d7bb9ee!
However, I forgot to write the scope by accident (ie. using uint64_t start = vk::ReadClock() directly in code), but instead of getting a nice compiler error needing 1 argument, it crashes:
../tools/clang/include/clang/AST/Type.h:580: const clang::ExtQualsTypeCommonBase *clang::QualType::getCommonPtr() const: Assertion `!isNull() && "Cannot retrieve a NULL type pointer"' failed.
And the backtrace:
#00x00007f00481db615 in raise () from /usr/lib/libc.so.6
#10x00007f00481c4862 in abort () from /usr/lib/libc.so.6
#20x00007f00481c4747 in __assert_fail_base.cold () from /usr/lib/libc.so.6
#30x00007f00481d3bf6 in __assert_fail () from /usr/lib/libc.so.6
#40x00007effe8dbc067 in clang::QualType::getCommonPtr (this=0x7f0047a3cc70) at ../tools/clang/include/clang/AST/Type.h:580
#50x00007effe8db3a15 in clang::QualType::getTypePtr (this=0x7f0047a3cc70) at ../tools/clang/include/clang/AST/Type.h:5060
#60x00007effe8db1445 in clang::QualType::operator-> (this=0x7f0047a3cc70) at ../tools/clang/include/clang/AST/Type.h:626
#70x00007effe97ff324 in clang::Sema::AddOverloadCandidate (this=0x7efff40d5b90, Function=0x7efff40f8950, FoundDecl=..., Args=..., CandidateSet=..., SuppressUserConversions=false, PartialOverloading=false, AllowExplicit=false)
at ../tools/clang/lib/Sema/SemaOverload.cpp:5721
#80x00007effe9816552 in AddOverloadedCallCandidate (S=..., FoundDecl=..., ExplicitTemplateArgs=0x0, Args=..., CandidateSet=..., PartialOverloading=false, KnownValid=true) at ../tools/clang/lib/Sema/SemaOverload.cpp:10595
#90x00007effe9816297 in clang::Sema::AddOverloadedCallCandidates (this=0x7efff40d5b90, ULE=0x7efff4110508, Args=..., CandidateSet=..., PartialOverloading=false) at ../tools/clang/lib/Sema/SemaOverload.cpp:10665
#100x00007effe9816aa8 in clang::Sema::buildOverloadedCallSet (this=0x7efff40d5b90, S=0x7efff4079aa0, Fn=0x7efff4110508, ULE=0x7efff4110508, Args=..., RParenLoc=..., CandidateSet=0x7f0047a3d450, Result=0x7f0047a3d430) at ../tools/clang/lib/Sema/SemaOverload.cpp:10951
#110x00007effe9817199 in clang::Sema::BuildOverloadedCallExpr (this=0x7efff40d5b90, S=0x7efff4079aa0, Fn=0x7efff4110508, ULE=0x7efff4110508, LParenLoc=..., Args=..., RParenLoc=..., ExecConfig=0x0, AllowTypoCorrection=true) at ../tools/clang/lib/Sema/SemaOverload.cpp:11070
#120x00007effe94f2802 in clang::Sema::ActOnCallExpr (this=0x7efff40d5b90, S=0x7efff4079aa0, Fn=0x7efff4110508, LParenLoc=..., ArgExprs=..., RParenLoc=..., ExecConfig=0x0, IsExecConfig=false) at ../tools/clang/lib/Sema/SemaExpr.cpp:5001
#130x00007effea4a8cd1 in clang::Parser::ParsePostfixExpressionSuffix (this=0x7efff40d8740, LHS=...) at ../tools/clang/lib/Parse/ParseExpr.cpp:1655
#140x00007effea4aedf5 in clang::Parser::ParseCastExpression (this=0x7efff40d8740, isUnaryExpression=false, isAddressOfOperand=false, NotCastExpr=@0x7f0047a40ae7: false, isTypeCast=clang::Parser::NotTypeCast) at ../tools/clang/lib/Parse/ParseExpr.cpp:1460
#150x00007effea4a747f in clang::Parser::ParseCastExpression (this=0x7efff40d8740, isUnaryExpression=false, isAddressOfOperand=false, isTypeCast=clang::Parser::NotTypeCast) at ../tools/clang/lib/Parse/ParseExpr.cpp:480
#160x00007effea4abc99 in clang::Parser::ParseCastExpression (this=0x7efff40d8740, isUnaryExpression=false, isAddressOfOperand=false, NotCastExpr=@0x7f0047a42b97: false, isTypeCast=clang::Parser::NotTypeCast) at ../tools/clang/lib/Parse/ParseExpr.cpp:905
#170x00007effea4a747f in clang::Parser::ParseCastExpression (this=0x7efff40d8740, isUnaryExpression=false, isAddressOfOperand=false, isTypeCast=clang::Parser::NotTypeCast) at ../tools/clang/lib/Parse/ParseExpr.cpp:480
#180x00007effea4a5bc9 in clang::Parser::ParseAssignmentExpression (this=0x7efff40d8740, isTypeCast=clang::Parser::NotTypeCast) at ../tools/clang/lib/Parse/ParseExpr.cpp:175
#190x00007effea4781a3 in clang::Parser::ParseInitializer (this=0x7efff40d8740) at ../tools/clang/include/clang/Parse/Parser.h:1601
#200x00007effea464745 in clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes (this=0x7efff40d8740, D=..., TemplateInfo=..., FRI=0x0) at ../tools/clang/lib/Parse/ParseDecl.cpp:2610
#210x00007effea462fc4 in clang::Parser::ParseDeclGroup (this=0x7efff40d8740, DS=..., Context=7, DeclEnd=0x7f0047a44778, FRI=0x0) at ../tools/clang/lib/Parse/ParseDecl.cpp:2381
#220x00007effea45be64 in clang::Parser::ParseSimpleDeclaration (this=0x7efff40d8740, Context=7, DeclEnd=..., Attrs=..., RequireSemi=true, FRI=0x0) at ../tools/clang/lib/Parse/ParseDecl.cpp:2029
#230x00007effea45b70b in clang::Parser::ParseDeclaration (this=0x7efff40d8740, Context=7, DeclEnd=..., attrs=...) at ../tools/clang/lib/Parse/ParseDecl.cpp:1974
#240x00007effea4fe163 in clang::Parser::ParseStatementOrDeclarationAfterAttributes (this=0x7efff40d8740, Stmts=..., OnlyStatement=false, TrailingElseLoc=0x0, Attrs=...) at ../tools/clang/lib/Parse/ParseStmt.cpp:243
#250x00007effea4fd9d7 in clang::Parser::ParseStatementOrDeclaration (this=0x7efff40d8740, Stmts=..., OnlyStatement=false, TrailingElseLoc=0x0) at ../tools/clang/lib/Parse/ParseStmt.cpp:107
#260x00007effea50789c in clang::Parser::ParseCompoundStatementBody (this=0x7efff40d8740, isStmtExpr=false) at ../tools/clang/lib/Parse/ParseStmt.cpp:1048
#270x00007effea50652d in clang::Parser::ParseCompoundStatement (this=0x7efff40d8740, isStmtExpr=false, ScopeFlags=8) at ../tools/clang/lib/Parse/ParseStmt.cpp:926
#280x00007effea500f3a in clang::Parser::ParseCompoundStatement (this=0x7efff40d8740, isStmtExpr=false) at ../tools/clang/lib/Parse/ParseStmt.cpp:892
#290x00007effea4fe292 in clang::Parser::ParseStatementOrDeclarationAfterAttributes (this=0x7efff40d8740, Stmts=..., OnlyStatement=true, TrailingElseLoc=0x0, Attrs=...) at ../tools/clang/lib/Parse/ParseStmt.cpp:262
#300x00007effea4fd9d7 in clang::Parser::ParseStatementOrDeclaration (this=0x7efff40d8740, Stmts=..., OnlyStatement=true, TrailingElseLoc=0x0) at ../tools/clang/lib/Parse/ParseStmt.cpp:107
#310x00007effea4fd83c in clang::Parser::ParseStatement (this=0x7efff40d8740, TrailingElseLoc=0x0) at ../tools/clang/lib/Parse/ParseStmt.cpp:42
#320x00007effea504842 in clang::Parser::ParseForStatement (this=0x7efff40d8740, TrailingElseLoc=0x0) at ../tools/clang/lib/Parse/ParseStmt.cpp:1821
#330x00007effea4fe3a9 in clang::Parser::ParseStatementOrDeclarationAfterAttributes (this=0x7efff40d8740, Stmts=..., OnlyStatement=false, TrailingElseLoc=0x0, Attrs=...) at ../tools/clang/lib/Parse/ParseStmt.cpp:280
#340x00007effea4fd9d7 in clang::Parser::ParseStatementOrDeclaration (this=0x7efff40d8740, Stmts=..., OnlyStatement=false, TrailingElseLoc=0x0) at ../tools/clang/lib/Parse/ParseStmt.cpp:107
#350x00007effea50789c in clang::Parser::ParseCompoundStatementBody (this=0x7efff40d8740, isStmtExpr=false) at ../tools/clang/lib/Parse/ParseStmt.cpp:1048
#360x00007effea5087c2 in clang::Parser::ParseFunctionStatementBody (this=0x7efff40d8740, Decl=0x7efff410dd78, BodyScope=...) at ../tools/clang/lib/Parse/ParseStmt.cpp:1982
#370x00007effea43bf2a in clang::Parser::ParseFunctionDefinition (this=0x7efff40d8740, D=..., TemplateInfo=..., LateParsedAttrs=0x7f0047a46ff8) at ../tools/clang/lib/Parse/Parser.cpp:1177
#380x00007effea462a7c in clang::Parser::ParseDeclGroup (this=0x7efff40d8740, DS=..., Context=0, DeclEnd=0x0, FRI=0x0) at ../tools/clang/lib/Parse/ParseDecl.cpp:2328
#390x00007effea43ab2f in clang::Parser::ParseDeclOrFunctionDefInternal (this=0x7efff40d8740, attrs=..., DS=..., AS=clang::AS_none) at ../tools/clang/lib/Parse/Parser.cpp:965
#400x00007effea43a1d6 in clang::Parser::ParseDeclarationOrFunctionDefinition (this=0x7efff40d8740, attrs=..., DS=0x0, AS=clang::AS_none) at ../tools/clang/lib/Parse/Parser.cpp:981
#410x00007effea439670 in clang::Parser::ParseExternalDeclaration (this=0x7efff40d8740, attrs=..., DS=0x0) at ../tools/clang/lib/Parse/Parser.cpp:839
#420x00007effea4382ac in clang::Parser::ParseTopLevelDecl (this=0x7efff40d8740, Result=...) at ../tools/clang/lib/Parse/Parser.cpp:606
#430x00007effea43334c in clang::ParseAST (S=..., PrintStats=false, SkipFunctionBodies=false) at ../tools/clang/lib/Parse/ParseAST.cpp:146
#440x00007effe918ab41 in clang::ASTFrontendAction::ExecuteAction (this=0x7f0047a491f0) at ../tools/clang/lib/Frontend/FrontendAction.cpp:554
#450x00007effe918a5ad in clang::FrontendAction::Execute (this=0x7f0047a491f0) at ../tools/clang/lib/Frontend/FrontendAction.cpp:455
#460x00007effe83b429f in DxcCompiler::Compile (this=0x7efff4099650, pSource=0x7f0047a4a328, pArguments=0x7f00422a83a0, argCount=15, pIncludeHandler=0x7f0043e2db20, riid=..., ppResult=0x7f0047a4a2c0) at ../tools/clang/tools/dxcompiler/dxcompilerobj.cpp:773
#470x00007effe83a9feb in hlsl::DxcCompilerAdapter::WrapCompile (this=0x7efff4099828, bPreprocess=false, pSource=0x7f0043f0c4f0, pSourceName=0x7f0043f0bd20L"main.cs.hlsl", pEntryPoint=0x7f0042f35070L"main", pTargetProfile=0x7efff4025ec0L"cs_6_3",
pArguments=0x7f0042ee7200, argCount=4, pDefines=0x7f0043f0b550, defineCount=3, pIncludeHandler=0x7f0043e2db20, ppResult=0x7f0047a4ae78, ppDebugBlobName=0x0, ppDebugBlob=0x0) at ../tools/clang/tools/dxcompiler/dxcompilerobj.cpp:1418
#480x00007effe83ab367 in hlsl::DxcCompilerAdapter::CompileWithDebug (this=0x7efff4099828, pSource=0x7f0043f0c4f0, pSourceName=0x7f0043f0bd20L"main.cs.hlsl", pEntryPoint=0x7f0042f35070L"main", pTargetProfile=0x7efff4025ec0L"cs_6_3", pArguments=0x7f0042ee7200,
argCount=4, pDefines=0x7f0043f0b550, defineCount=3, pIncludeHandler=0x7f0043e2db20, ppResult=0x7f0047a4ae78, ppDebugBlobName=0x0, ppDebugBlob=0x0) at ../tools/clang/tools/dxcompiler/dxcompilerobj.cpp:1324
#490x00007effe83aedb1 in hlsl::DxcCompilerAdapter::Compile (this=0x7efff4099828, pSource=0x7f0043f0c4f0, pSourceName=0x7f0043f0bd20L"main.cs.hlsl", pEntryPoint=0x7f0042f35070L"main", pTargetProfile=0x7efff4025ec0L"cs_6_3", pArguments=0x7f0042ee7200, argCount=4,
pDefines=0x7f0043f0b550, defineCount=3, pIncludeHandler=0x7f0043e2db20, ppResult=0x7f0047a4ae78) at ../tools/clang/tools/dxcompiler/dxcompileradapter.h:69
This issue has now been fixed. The error message in the current release of dxc (Vulkan SDK 1.3.216.0) is:
test.hlsl:20:11: error: no matching function for call to 'ReadClock'
clock = vk::ReadClock();
^~~~~~~~~~~~~
test.hlsl:20:11: note: candidate function not viable: requires single argument 'scope', but no arguments were provided
Awesome to see
vk::ReadClock
introduced in d7bb9ee!However, I forgot to write the scope by accident (ie. using
uint64_t start = vk::ReadClock()
directly in code), but instead of getting a nice compiler error needing 1 argument, it crashes:And the backtrace:
CC @ehsannas
The text was updated successfully, but these errors were encountered: