MCPcopy Create free account
hub / github.com/baldurk/renderdoc / SetEventID

Method SetEventID

qrenderdoc/Code/CaptureContext.cpp:1597–1650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1595}
1596
1597void CaptureContext::SetEventID(const rdcarray<ICaptureViewer *> &exclude, uint32_t selectedEventID,
1598 uint32_t eventId, bool force)
1599{
1600 RENDERDOC_PROFILEFUNCTION();
1601
1602 if(!IsCaptureLoaded())
1603 return;
1604
1605 if(eventId > m_LastAction->eventId)
1606 {
1607 qCritical() << "Invalid EID being selected " << eventId;
1608 return;
1609 }
1610
1611 uint32_t prevSelectedEventID = m_SelectedEventID;
1612 m_SelectedEventID = selectedEventID;
1613 uint32_t prevEventID = m_EventID;
1614 m_EventID = eventId;
1615
1616 bool done = false;
1617
1618 QString tag = lit("replaySetEvent");
1619
1620 // we can't return until the event is selected, but a blocking invoke on the UI thread can cause
1621 // the UI to stall. We ideally want to have at least an interactive UI and a progress bar.
1622 m_Replay.AsyncInvoke(tag, [this, eventId, force, &done](IReplayController *r) {
1623 r->SetFrameEvent(eventId, force);
1624 m_CurD3D11PipelineState = r->GetD3D11PipelineState();
1625 m_CurD3D12PipelineState = r->GetD3D12PipelineState();
1626 m_CurGLPipelineState = r->GetGLPipelineState();
1627 m_CurVulkanPipelineState = r->GetVulkanPipelineState();
1628 m_CurPipelineState = &r->GetPipelineState();
1629
1630 done = true;
1631 });
1632
1633 // wait a short while before displaying the progress dialog (which won't show if we're already
1634 // done by the time we reach it).
1635 // Keep waiting if the current tag is a set event, we don't want to be popping up progress bars
1636 // when the user is browsing the frame if it's going slow. If that's the case we'll just block the
1637 // UI thread. Instead only pop up the progress bar if some other large task is blocking.
1638 for(int i = 0; !done && (i < 100 || m_Replay.GetCurrentProcessingTag().isEmpty() ||
1639 m_Replay.GetCurrentProcessingTag() == tag);
1640 i++)
1641 QThread::msleep(5);
1642
1643 ShowProgressDialog(m_MainWindow->Widget(), tr("Please wait, working..."),
1644 [&done]() { return done; });
1645
1646 bool updateSelectedEvent = force || prevSelectedEventID != selectedEventID;
1647 bool updateEvent = force || prevEventID != eventId;
1648
1649 RefreshUIStatus(exclude, updateSelectedEvent, updateEvent);
1650}
1651
1652void CaptureContext::ConnectToRemoteServer(RemoteHost host)
1653{

Callers 2

EventSelectedMethod · 0.45

Calls 11

ShowProgressDialogFunction · 0.85
GetD3D11PipelineStateMethod · 0.80
GetD3D12PipelineStateMethod · 0.80
GetGLPipelineStateMethod · 0.80
trFunction · 0.70
AsyncInvokeMethod · 0.45
SetFrameEventMethod · 0.45
isEmptyMethod · 0.45
WidgetMethod · 0.45

Tested by

no test coverage detected