Serialise timestamps and durations as tick counts, and convert on replay

* When we're capturing programs with high-frequency enough API calls, the
  overhead of the math & extra function calls over Timing::GetTick() is
  measurable. Removing it and serialising pure tick based durations/timestamps
  and then converting on replay gives us identical results and saves time while
  background capturing.
This commit is contained in:
baldurk
2020-08-26 19:27:42 +01:00
parent 9fd7f447d2
commit 55c62dd307
11 changed files with 127 additions and 46 deletions
+6
View File
@@ -352,8 +352,14 @@ void RenderDoc::Initialise()
m_RemoteIdent = 0;
m_RemoteThread = 0;
m_TimeBase = 0;
m_TimeFrequency = 1.0;
if(!IsReplayApp())
{
m_TimeBase = Timing::GetTick();
m_TimeFrequency = Timing::GetTickFrequency() / 1000.0;
Process::ApplyEnvironmentModification();
uint32_t port = RenderDoc_FirstTargetControlPort;