diff --git a/renderdoc/driver/shaders/dxil/dxil_debug.cpp b/renderdoc/driver/shaders/dxil/dxil_debug.cpp index 353105668..075cbf6de 100644 --- a/renderdoc/driver/shaders/dxil/dxil_debug.cpp +++ b/renderdoc/driver/shaders/dxil/dxil_debug.cpp @@ -6621,6 +6621,9 @@ void Debugger::ParseDebugData() { const LocalMapping &mapping = s->localMappings[m]; + if(mapping.instIndex > instructionIndex) + continue; + // see if this mapping is superceded by a later mapping in this scope for this // instruction. This is a bit inefficient but simple. The alternative would be to do // record start and end points for each mapping and update the end points, but this is @@ -6633,6 +6636,9 @@ void Debugger::ParseDebugData() { const LocalMapping &laterMapping = s->localMappings[n]; + if(laterMapping.instIndex > instructionIndex) + continue; + // if this mapping will supercede and starts later if(laterMapping.isSourceSupersetOf(mapping) && laterMapping.instIndex > mapping.instIndex)