@@ -1462,7 +1462,7 @@ void SpirvEmitter::doFunctionDecl(const FunctionDecl *decl) {
1462
1462
isEntry = true;
1463
1463
funcName = "src." + funcName;
1464
1464
// Create wrapper for the entry function
1465
- if (!emitEntryFunctionWrapper(decl, func, debugFunction ))
1465
+ if (!emitEntryFunctionWrapper(decl, func))
1466
1466
return;
1467
1467
// Generate DebugEntryPoint if function definition
1468
1468
if (spirvOptions.debugInfoVulkan && debugFunction) {
@@ -1531,8 +1531,7 @@ void SpirvEmitter::doFunctionDecl(const FunctionDecl *decl) {
1531
1531
1532
1532
// Add DebugFunctionDefinition if we are emitting
1533
1533
// 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)
1536
1535
spvBuilder.createDebugFunctionDef(debugFunction, func);
1537
1536
1538
1537
// Process all statments in the body.
@@ -13017,19 +13016,11 @@ bool SpirvEmitter::processTessellationShaderAttributes(
13017
13016
}
13018
13017
13019
13018
bool SpirvEmitter::emitEntryFunctionWrapperForRayTracing(
13020
- const FunctionDecl *decl, SpirvFunction *entryFuncInstr,
13021
- SpirvDebugFunction *debugFunction) {
13019
+ const FunctionDecl *decl, SpirvFunction *entryFuncInstr) {
13022
13020
// The entry basic block.
13023
13021
auto *entryLabel = spvBuilder.createBasicBlock();
13024
13022
spvBuilder.setInsertPoint(entryLabel);
13025
13023
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
-
13033
13024
// Initialize all global variables at the beginning of the wrapper
13034
13025
for (const VarDecl *varDecl : toInitGloalVars) {
13035
13026
const auto varInfo =
@@ -13293,8 +13284,7 @@ bool SpirvEmitter::processMeshOrAmplificationShaderAttributes(
13293
13284
}
13294
13285
13295
13286
bool SpirvEmitter::emitEntryFunctionWrapper(const FunctionDecl *decl,
13296
- SpirvFunction *entryFuncInstr,
13297
- SpirvDebugFunction *debugFunction) {
13287
+ SpirvFunction *entryFuncInstr) {
13298
13288
// HS specific attributes
13299
13289
uint32_t numOutputControlPoints = 0;
13300
13290
SpirvInstruction *outputControlPointIdVal =
@@ -13329,8 +13319,7 @@ bool SpirvEmitter::emitEntryFunctionWrapper(const FunctionDecl *decl,
13329
13319
entryInfo->entryFunction = entryFunction;
13330
13320
13331
13321
if (spvContext.isRay()) {
13332
- return emitEntryFunctionWrapperForRayTracing(decl, entryFuncInstr,
13333
- debugFunction);
13322
+ return emitEntryFunctionWrapperForRayTracing(decl, entryFuncInstr);
13334
13323
}
13335
13324
// Handle attributes specific to each shader stage
13336
13325
if (spvContext.isPS()) {
@@ -13411,13 +13400,6 @@ bool SpirvEmitter::emitEntryFunctionWrapper(const FunctionDecl *decl,
13411
13400
// after the basic block is created and insert point is set.
13412
13401
processInlineSpirvAttributes(decl);
13413
13402
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
-
13421
13403
// Initialize all global variables at the beginning of the wrapper
13422
13404
for (const VarDecl *varDecl : toInitGloalVars) {
13423
13405
// SPIR-V does not have string variables
0 commit comments