@@ -1462,7 +1462,7 @@ void SpirvEmitter::doFunctionDecl(const FunctionDecl *decl) {
14621462 isEntry = true;
14631463 funcName = "src." + funcName;
14641464 // Create wrapper for the entry function
1465- if (!emitEntryFunctionWrapper(decl, func, debugFunction ))
1465+ if (!emitEntryFunctionWrapper(decl, func))
14661466 return;
14671467 // Generate DebugEntryPoint if function definition
14681468 if (spirvOptions.debugInfoVulkan && debugFunction) {
@@ -1531,8 +1531,7 @@ void SpirvEmitter::doFunctionDecl(const FunctionDecl *decl) {
15311531
15321532 // Add DebugFunctionDefinition if we are emitting
15331533 // NonSemantic.Shader.DebugInfo.100 debug info
1534- // and we haven't already added it to the wrapper.
1535- if (!isEntry && spirvOptions.debugInfoVulkan && debugFunction)
1534+ if (spirvOptions.debugInfoVulkan && debugFunction)
15361535 spvBuilder.createDebugFunctionDef(debugFunction, func);
15371536
15381537 // Process all statments in the body.
@@ -13017,19 +13016,11 @@ bool SpirvEmitter::processTessellationShaderAttributes(
1301713016}
1301813017
1301913018bool SpirvEmitter::emitEntryFunctionWrapperForRayTracing(
13020- const FunctionDecl *decl, SpirvFunction *entryFuncInstr,
13021- SpirvDebugFunction *debugFunction) {
13019+ const FunctionDecl *decl, SpirvFunction *entryFuncInstr) {
1302213020 // The entry basic block.
1302313021 auto *entryLabel = spvBuilder.createBasicBlock();
1302413022 spvBuilder.setInsertPoint(entryLabel);
1302513023
13026- // Add DebugFunctionDefinition if we are emitting
13027- // NonSemantic.Shader.DebugInfo.100 debug info.
13028- // We will emit it in the wrapper rather than the
13029- // user function.
13030- if (spirvOptions.debugInfoVulkan && debugFunction)
13031- spvBuilder.createDebugFunctionDef(debugFunction, entryFunction);
13032-
1303313024 // Initialize all global variables at the beginning of the wrapper
1303413025 for (const VarDecl *varDecl : toInitGloalVars) {
1303513026 const auto varInfo =
@@ -13293,8 +13284,7 @@ bool SpirvEmitter::processMeshOrAmplificationShaderAttributes(
1329313284}
1329413285
1329513286bool SpirvEmitter::emitEntryFunctionWrapper(const FunctionDecl *decl,
13296- SpirvFunction *entryFuncInstr,
13297- SpirvDebugFunction *debugFunction) {
13287+ SpirvFunction *entryFuncInstr) {
1329813288 // HS specific attributes
1329913289 uint32_t numOutputControlPoints = 0;
1330013290 SpirvInstruction *outputControlPointIdVal =
@@ -13329,8 +13319,7 @@ bool SpirvEmitter::emitEntryFunctionWrapper(const FunctionDecl *decl,
1332913319 entryInfo->entryFunction = entryFunction;
1333013320
1333113321 if (spvContext.isRay()) {
13332- return emitEntryFunctionWrapperForRayTracing(decl, entryFuncInstr,
13333- debugFunction);
13322+ return emitEntryFunctionWrapperForRayTracing(decl, entryFuncInstr);
1333413323 }
1333513324 // Handle attributes specific to each shader stage
1333613325 if (spvContext.isPS()) {
@@ -13411,13 +13400,6 @@ bool SpirvEmitter::emitEntryFunctionWrapper(const FunctionDecl *decl,
1341113400 // after the basic block is created and insert point is set.
1341213401 processInlineSpirvAttributes(decl);
1341313402
13414- // Add DebugFunctionDefinition if we are emitting
13415- // NonSemantic.Shader.DebugInfo.100 debug info.
13416- // We will emit it in the wrapper rather than the
13417- // user function.
13418- if (spirvOptions.debugInfoVulkan && debugFunction)
13419- spvBuilder.createDebugFunctionDef(debugFunction, entryFunction);
13420-
1342113403 // Initialize all global variables at the beginning of the wrapper
1342213404 for (const VarDecl *varDecl : toInitGloalVars) {
1342313405 // SPIR-V does not have string variables
0 commit comments