Skip to content

Commit a4eda2f

Browse files
Adding in AFMF fixes
2 parents 283ca5a + 62d2785 commit a4eda2f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

IntelPresentMon/PresentMonMiddleware/ConcreteMiddleware.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,9 +529,9 @@ static void ReportMetricsHelper(
529529
size_t displayIndex = displayed && nextDisplayedPresent != nullptr ? displayCount - 1 : 0;
530530

531531
// Figure out what display index to attribute cpu work, gpu work, animation error, and input
532-
// latency to.
532+
// latency to. Start looking from the current display index.
533533
size_t appIndex = 0;
534-
for (size_t i = 0; i < displayCount; ++i) {
534+
for (size_t i = displayIndex; i < displayCount; ++i) {
535535
if (p->Displayed_FrameType[i] == FrameType::NotSet ||
536536
p->Displayed_FrameType[i] == FrameType::Application) {
537537
appIndex = i;

PresentData/PresentMonTraceConsumer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ void PMTraceConsumer::HandleDXGKEvent(EVENT_RECORD* pEventRecord)
12631263
// Apply any pending FlipFrameType events
12641264
auto ii = mPendingFlipFrameTypeEvents.find(vidPnLayerId);
12651265
if (ii != mPendingFlipFrameTypeEvents.end()) {
1266-
if (present != nullptr) {
1266+
if (present != nullptr && ii->second.PresentId == PresentId[i]) {
12671267
ApplyFlipFrameType(present, ii->second.Timestamp, ii->second.FrameType);
12681268
}
12691269
mPendingFlipFrameTypeEvents.erase(ii);

PresentMon/OutputThread.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,9 @@ static void ReportMetricsHelper(
331331
size_t displayIndex = displayed && nextDisplayedPresent != nullptr ? displayCount - 1 : 0;
332332

333333
// Figure out what display index to attribute cpu work, gpu work, animation error, and input
334-
// latency to.
334+
// latency to. Start looking from the current display index.
335335
size_t appIndex = 0;
336-
for (size_t i = 0; i < displayCount; ++i) {
336+
for (size_t i = displayIndex; i < displayCount; ++i) {
337337
if (p->Displayed[i].first == FrameType::NotSet ||
338338
p->Displayed[i].first == FrameType::Application) {
339339
appIndex = i;

0 commit comments

Comments
 (0)