Skip to content

Commit 5539ea4

Browse files
Merge pull request #528 from HugoNVDA/NV-fix_FlipDelay-calculation
NVTraceConsumer: only apply flipDelay when vsync off
2 parents 4c15e86 + a025618 commit 5539ea4

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)