Use line and column from node on DebugLexicalBlock.
* Fix bug in TestFixture.h, debug info gets enabled when nonsemantic debug info is requested.
This commit is contained in:
parent
48f63fe4b3
commit
f69d2768e5
21 changed files with 7746 additions and 6750 deletions
|
|
@ -2361,7 +2361,7 @@ Id Builder::makeDebugFunction([[maybe_unused]] Function* function, Id nameId, Id
|
|||
return funcId;
|
||||
}
|
||||
|
||||
Id Builder::makeDebugLexicalBlock(uint32_t line) {
|
||||
Id Builder::makeDebugLexicalBlock(uint32_t line, uint32_t column) {
|
||||
assert(!currentDebugScopeId.empty());
|
||||
|
||||
Id lexId = getUniqueId();
|
||||
|
|
@ -2371,7 +2371,7 @@ Id Builder::makeDebugLexicalBlock(uint32_t line) {
|
|||
lex->addImmediateOperand(NonSemanticShaderDebugInfo100DebugLexicalBlock);
|
||||
lex->addIdOperand(makeDebugSource(currentFileId));
|
||||
lex->addIdOperand(makeUintConstant(line));
|
||||
lex->addIdOperand(makeUintConstant(0)); // column
|
||||
lex->addIdOperand(makeUintConstant(column)); // column
|
||||
lex->addIdOperand(currentDebugScopeId.top()); // scope
|
||||
constantsTypesGlobals.push_back(std::unique_ptr<Instruction>(lex));
|
||||
module.mapInstruction(lex);
|
||||
|
|
@ -2404,10 +2404,14 @@ void Builder::makeReturn(bool implicit, Id retVal)
|
|||
}
|
||||
|
||||
// Comments in header
|
||||
void Builder::enterLexicalBlock(uint32_t line)
|
||||
void Builder::enterLexicalBlock(uint32_t line, uint32_t column)
|
||||
{
|
||||
if (!emitNonSemanticShaderDebugInfo) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Generate new lexical scope debug instruction
|
||||
Id lexId = makeDebugLexicalBlock(line);
|
||||
Id lexId = makeDebugLexicalBlock(line, column);
|
||||
currentDebugScopeId.push(lexId);
|
||||
dirtyScopeTracker = true;
|
||||
}
|
||||
|
|
@ -2415,6 +2419,10 @@ void Builder::enterLexicalBlock(uint32_t line)
|
|||
// Comments in header
|
||||
void Builder::leaveLexicalBlock()
|
||||
{
|
||||
if (!emitNonSemanticShaderDebugInfo) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Pop current scope from stack and clear current scope
|
||||
currentDebugScopeId.pop();
|
||||
dirtyScopeTracker = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue