Skip to content

Commit

Permalink
Iterate over the debug scopes downwards
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorro666 committed Dec 18, 2024
1 parent faaf12f commit aee9013
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions renderdoc/driver/shaders/dxil/dxil_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6611,12 +6611,13 @@ void Debugger::ParseDebugData()
}

// Iterate over the scopes downwards (parent->child)
for(const ScopedDebugData *s : scopes)
for(size_t s = 0; s < scopes.size(); ++s)
{
size_t countLocalMappings = s->localMappings.size();
scope = scopes[scopes.size() - 1 - s];
size_t countLocalMappings = scope->localMappings.size();
for(size_t m = 0; m < countLocalMappings; m++)
{
const LocalMapping &mapping = s->localMappings[m];
const LocalMapping &mapping = scope->localMappings[m];

// TODO: this should be using ExecutionPoint::IsAfter()
if(mapping.instIndex > instructionIndex)
Expand All @@ -6632,7 +6633,7 @@ void Debugger::ParseDebugData()
bool supercede = false;
for(size_t n = innerStart; n < countLocalMappings; n++)
{
const LocalMapping &laterMapping = s->localMappings[n];
const LocalMapping &laterMapping = scope->localMappings[n];

// TODO: this should be using ExecutionPoint::IsAfter()
if(laterMapping.instIndex > instructionIndex)
Expand Down

0 comments on commit aee9013

Please sign in to comment.