mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 22:50:45 +00:00
Fix Sync timer for timedemo "twice" mode and remove unneeded timings in TimeRenderDemo()
This commit is contained in:
parent
4110dc1f05
commit
4f6f23e8ac
2 changed files with 2 additions and 4 deletions
|
@ -312,13 +312,11 @@ void idCommonLocal::TimeRenderDemo( const char* demoName, bool twice, bool quit
|
|||
while( readDemo )
|
||||
{
|
||||
BusyWait(); // SRS - BusyWait() calls UpdateScreen() which draws and renders out-of-sequence but still supports frame timing
|
||||
commonLocal.frameTiming.finishSyncTime_EndFrame = Sys_Microseconds();
|
||||
commonLocal.mainFrameTiming = commonLocal.frameTiming;
|
||||
// ** End of current logical frame **
|
||||
|
||||
// ** Start of next logical frame **
|
||||
commonLocal.frameTiming.startSyncTime = Sys_Microseconds();
|
||||
commonLocal.frameTiming.finishSyncTime = commonLocal.frameTiming.startSyncTime;
|
||||
commonLocal.frameTiming.finishSyncTime = Sys_Microseconds();
|
||||
commonLocal.frameTiming.startGameTime = commonLocal.frameTiming.finishSyncTime;
|
||||
|
||||
AdvanceRenderDemo( true ); // SRS - Advance demo commands to manually run the next game frame during first pass of the timedemo
|
||||
|
|
|
@ -437,10 +437,10 @@ void idCommonLocal::UpdateScreen( bool captureToImage, bool releaseMouse )
|
|||
}
|
||||
|
||||
// this should exit right after vsync, with the GPU idle and ready to draw
|
||||
frameTiming.startRenderTime = Sys_Microseconds(); // SRS - Added frame timing for out-of-sequence updates (e.g. used in timedemo "twice" mode)
|
||||
const emptyCommand_t* cmd = renderSystem->SwapCommandBuffers( &time_frontend, &time_backend, &time_shadows, &time_gpu, &stats_backend, &stats_frontend );
|
||||
|
||||
// get the GPU busy with new commands
|
||||
frameTiming.startRenderTime = Sys_Microseconds(); // SRS - Added frame timing for out-of-sequence updates (e.g. used in timedemo "twice" mode)
|
||||
renderSystem->RenderCommandBuffers( cmd );
|
||||
frameTiming.finishRenderTime = Sys_Microseconds(); // SRS - Added frame timing for out-of-sequence updates (e.g. used in timedemo "twice" mode)
|
||||
|
||||
|
|
Loading…
Reference in a new issue