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

Method LoadCaptureThreaded

qrenderdoc/Code/CaptureContext.cpp:945–1166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

943}
944
945void CaptureContext::LoadCaptureThreaded(const QString &captureFile, const ReplayOptions &opts,
946 const QString &origFilename, bool temporary, bool local)
947{
948 m_CaptureFile = origFilename;
949 m_RemoteFile = captureFile;
950
951 m_CaptureLocal = local;
952
953 Config().Save();
954
955 m_LoadProgress = 0.0f;
956 m_PostloadProgress = 0.0f;
957
958 // this function call will block until the capture is either loaded, or there's some failure
959 m_Replay.OpenCapture(captureFile, opts, [this](float p) { m_LoadProgress = p; });
960
961 QString filename = QFileInfo(origFilename).fileName();
962
963 // if the renderer isn't running, we hit a failure case so display an error message
964 if(!m_Replay.IsRunning())
965 {
966 RDDialog::critical(NULL, tr("Error opening capture"),
967 tr("Failed to open '%1' for replay\n\n%2")
968 .arg(filename)
969 .arg(m_Replay.GetCreateStatus().Message()));
970
971 m_LoadInProgress = false;
972 return;
973 }
974
975 if(!temporary)
976 {
977 AddRecentFile(Config().RecentCaptureFiles, origFilename);
978
979 Config().Save();
980 }
981
982 m_EventID = 0;
983
984 m_FirstAction = m_LastAction = NULL;
985
986 // fetch initial data like actions, textures and buffers
987 m_Replay.BlockInvoke([this](IReplayController *r) {
988 if(Config().EventBrowser_AddFake)
989 r->AddFakeMarkers();
990
991 m_FrameInfo = r->GetFrameInfo();
992
993 m_APIProps = r->GetAPIProperties();
994
995 m_CustomEncodings = r->GetCustomShaderEncodings();
996 m_CustomPrefixes = r->GetCustomShaderSourcePrefixes();
997 m_TargetEncodings = r->GetTargetShaderEncodings();
998
999 m_PostloadProgress = 0.2f;
1000
1001 m_Actions = &r->GetRootActions();
1002

Callers

nothing calls this directly

Calls 15

criticalFunction · 0.85
fileNameMethod · 0.80
IsRunningMethod · 0.80
GetCreateStatusMethod · 0.80
BlockInvokeMethod · 0.80
AddFakeMarkersMethod · 0.80
GetFrameInfoMethod · 0.80
GetD3D11PipelineStateMethod · 0.80
GetD3D12PipelineStateMethod · 0.80
GetGLPipelineStateMethod · 0.80

Tested by

no test coverage detected