File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -778,7 +778,8 @@ void SpirvEmitter::HandleTranslationUnit(ASTContext &context) {
778778 }
779779 } else {
780780 const bool isPrototype = !funcDecl->isThisDeclarationADefinition();
781- if (funcDecl->getName() == hlslEntryFunctionName && !isPrototype) {
781+ if (funcDecl->getIdentifier() &&
782+ funcDecl->getName() == hlslEntryFunctionName && !isPrototype) {
782783 addFunctionToWorkQueue(spvContext.getCurrentShaderModelKind(),
783784 funcDecl, /*isEntryFunction*/ true);
784785 numEntryPoints++;
Original file line number Diff line number Diff line change 1+ // RUN: %dxc -T cs_6_0 -E main -spirv -fcgl %s -spirv | FileCheck %s
2+
3+
4+ // CHECK: %src_main = OpFunction %void
5+ // CHECK: OpFunctionCall %void %S_operator_Call %s
6+ // CHECK: OpFunctionEnd
7+ // CHECK: %S_operator_Call = OpFunction %void None
8+ // CHECK-NEXT: OpFunctionParameter
9+ // CHECK-NEXT: OpLabel
10+ // CHECK-NEXT: OpReturn
11+ // CHECK-NEXT: OpFunctionEnd
12+
13+
14+ struct S
15+ {
16+ void operator ()();
17+ };
18+
19+ void S::operator ()()
20+ {
21+ }
22+
23+ [numthreads (8 ,8 ,1 )]
24+ void main (uint32_t3 gl_GlobalInvocationID : SV_DispatchThreadID )
25+ {
26+ S s;
27+ s ();
28+ }
29+
You can’t perform that action at this time.
0 commit comments