Fill correct file name to OpDebugFunction and add line info for parameters' OpDebugDeclare
This commit is contained in:
parent
8a5086efb0
commit
85262fb20e
14 changed files with 2877 additions and 2873 deletions
|
|
@ -5518,12 +5518,16 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF
|
|||
glslang::TIntermAggregate* glslFunction = glslFunctions[f]->getAsAggregate();
|
||||
if (! glslFunction || glslFunction->getOp() != glslang::EOpFunction)
|
||||
continue;
|
||||
|
||||
builder.setDebugSourceLocation(glslFunction->getLoc().line, glslFunction->getLoc().getFilename());
|
||||
|
||||
if (isShaderEntryPoint(glslFunction)) {
|
||||
// For HLSL, the entry function is actually a compiler generated function to resolve the difference of
|
||||
// entry function signature between HLSL and SPIR-V. So we don't emit debug information for that.
|
||||
if (glslangIntermediate->getSource() != glslang::EShSourceHlsl) {
|
||||
builder.setupDebugFunctionEntry(shaderEntry, glslangIntermediate->getEntryPointMangledName().c_str(),
|
||||
glslFunction->getLoc().line,
|
||||
std::vector<spv::Id>(), // main function has no param
|
||||
std::vector<char const*>());
|
||||
builder.setupFunctionDebugInfo(shaderEntry, glslangIntermediate->getEntryPointMangledName().c_str(),
|
||||
std::vector<spv::Id>(), // main function has no param
|
||||
std::vector<char const*>());
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
@ -5576,8 +5580,7 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF
|
|||
TranslatePrecisionDecoration(glslFunction->getType()), convertGlslangToSpvType(glslFunction->getType()),
|
||||
glslFunction->getName().c_str(), convertGlslangLinkageToSpv(glslFunction->getLinkType()), paramTypes,
|
||||
paramDecorations, &functionBlock);
|
||||
builder.setupDebugFunctionEntry(function, glslFunction->getName().c_str(), glslFunction->getLoc().line,
|
||||
paramTypes, paramNames);
|
||||
builder.setupFunctionDebugInfo(function, glslFunction->getName().c_str(), paramTypes, paramNames);
|
||||
if (implicitThis)
|
||||
function->setImplicitThis();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue