Set the event for group marker selection to the last real drawcall

This commit is contained in:
baldurk
2014-08-17 15:22:11 +01:00
parent 1e240740c6
commit 8a5150297f
+14 -1
View File
@@ -283,7 +283,20 @@ namespace renderdocui.Windows
drawNode["Duration"] = Math.Max(0.0, (double)drawNode["Duration"]) + (double)drawNode.Nodes[i]["Duration"];
}
drawNode.Tag = drawNode.Nodes.LastNode.Tag;
bool found = false;
for (int i = drawcall.children.Length - 1; i >= 0; i--)
{
if ((drawcall.children[i].flags & DrawcallFlags.SetMarker) == 0)
{
drawNode.Tag = drawNode.Nodes[i].Tag;
found = true;
break;
}
}
if(!found)
drawNode.Tag = drawNode.Nodes.LastNode.Tag;
}
return drawNode;