Skip to content

Commit 397ea67

Browse files
committed
Handle the present call being within markers
1 parent 6e6c7ba commit 397ea67

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

renderdoccmd/renderdoccmd.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,17 @@ void DisplayRendererPreview(IReplayController *renderer, uint32_t width, uint32_
9494

9595
rdcarray<DrawcallDescription> draws = renderer->GetDrawcalls();
9696

97-
if(!draws.empty() && draws.back().flags & DrawFlags::Present)
97+
DrawcallDescription *last = NULL;
98+
99+
if(!draws.empty())
100+
last = &draws.back();
101+
102+
while(last && !last->children.empty())
103+
last = &last->children.back();
104+
105+
if(last && last->flags & DrawFlags::Present)
98106
{
99-
ResourceId id = draws.back().copyDestination;
107+
ResourceId id = last->copyDestination;
100108
if(id != ResourceId())
101109
d.resourceId = id;
102110
}

0 commit comments

Comments
 (0)