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

Method ReplayLoop

renderdoc/replay/replay_controller.cpp:1843–1886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1841}
1842
1843void ReplayController::ReplayLoop(WindowingData window, ResourceId texid)
1844{
1845 CHECK_REPLAY_THREAD();
1846
1847 ReplayOutput *output = CreateOutput(window, ReplayOutputType::Texture);
1848
1849 TextureDisplay d;
1850 d.resourceId = texid;
1851 d.subresource = {0, 0, ~0U};
1852 d.overlay = DebugOverlay::NoOverlay;
1853 d.typeCast = CompType::Typeless;
1854 d.hdrMultiplier = -1.0f;
1855 d.linearDisplayAsGamma = true;
1856 d.flipY = false;
1857 d.rangeMin = 0.0f;
1858 d.rangeMax = 1.0f;
1859 d.scale = 1.0f;
1860 d.xOffset = 0.0f;
1861 d.yOffset = 0.0f;
1862 d.rawOutput = false;
1863 d.red = d.green = d.blue = true;
1864 d.alpha = false;
1865 output->SetTextureDisplay(d);
1866
1867 m_ReplayLoopCancel = 0;
1868 m_ReplayLoopFinished = 0;
1869
1870 while(Atomic::CmpExch32(&m_ReplayLoopCancel, 0, 0) == 0)
1871 {
1872 m_pDevice->ReplayLog(10000000, eReplay_Full);
1873 FatalErrorCheck();
1874
1875 output->Display();
1876 }
1877
1878 // restore back to where we were
1879 m_pDevice->ReplayLog(m_EventID, eReplay_Full);
1880 FatalErrorCheck();
1881
1882 ShutdownOutput(output);
1883
1884 // mark that the loop is finished
1885 Atomic::Inc32(&m_ReplayLoopFinished);
1886}
1887
1888void ReplayController::CancelReplayLoop()
1889{

Calls 5

SetTextureDisplayMethod · 0.80
DisplayMethod · 0.80
CmpExch32Function · 0.50
Inc32Function · 0.50
ReplayLogMethod · 0.45

Tested by

no test coverage detected