Skip to content

Commit a025618

Browse files
committed
NVTraceConsumer: only apply flipDelay when vsync off
Sometimes, when vsync is on, flipDelay could be non-zero even DLSS FrameGen is disabled. In this situation, flipDelay should not be considered. FlipDelay should only be applied if FlipEntryStatusAfterFlip is not FlipWaitVSync or FlipWaitHSync.
1 parent 3ba3785 commit a025618

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

PresentData/PresentMonTraceConsumer.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -965,9 +965,6 @@ void PMTraceConsumer::HandleDXGKEvent(EVENT_RECORD* pEventRecord)
965965
auto present = FindPresentBySubmitSequence(submitSequence);
966966
if (present != nullptr) {
967967

968-
// Apply Nvidia FlipDelay, if any, to the presentEvent
969-
mNvTraceConsumer.ApplyFlipDelay(present.get(), hdr.ThreadId);
970-
971968
// Complete the GPU tracking for this frame.
972969
//
973970
// For some present modes (e.g., Hardware_Legacy_Flip) this may be
@@ -991,6 +988,8 @@ void PMTraceConsumer::HandleDXGKEvent(EVENT_RECORD* pEventRecord)
991988
if (FlipEntryStatusAfterFlip != (uint32_t) Microsoft_Windows_DxgKrnl::FlipEntryStatus::FlipWaitHSync) {
992989

993990
SetScreenTime(present, hdr.TimeStamp.QuadPart + present->FlipDelay);
991+
// Apply Nvidia FlipDelay, if any, to the presentEvent
992+
mNvTraceConsumer.ApplyFlipDelay(present.get(), hdr.ThreadId);
994993

995994
if (present->PresentMode == PresentMode::Hardware_Legacy_Flip) {
996995
CompletePresent(present);

0 commit comments

Comments
 (0)