Skip to content

Updates for frame type deferral release code and lock file update - #706

Merged
planetchili merged 1 commit into
mainfrom
fix/frame-type-deferral-release
Oct 21, 2026
Merged

planetchili merged 1 commit into
mainfrom
fix/frame-type-deferral-release

Conversation

@markgalvan-intel

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Zero-limit handling can stall output, unrelated swapchains can interrupt data propagation, and Visual Studio test registration is missing.

3 open findings
What changed in this PR

Updates frame-type deferral release handling in the trace consumer and refreshes the auxiliary test-data pin.

Changes:

  • Releases waiting presents on later completions or timeout.
  • Adds seven regression tests and CMake registration.
  • Updates deferral documentation and pinned test data.
File Description
Tests/​aux-data.lock.json Updates the test-data commit.
PresentData/​PresentMonTraceConsumer.hpp Clarifies the waiting-state comment.
PresentData/​PresentMonTraceConsumer.cpp Revises release and propagation conditions.
IntelPresentMon/​UnitTests/​PresentFrameTypeDeferralTests.cpp Adds deferral regression tests.
IntelPresentMon/​UnitTests/​CMakeLists.txt Registers the new test source.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread PresentData/PresentMonTraceConsumer.cpp Outdated
Comment thread IntelPresentMon/UnitTests/CMakeLists.txt
Comment thread PresentData/PresentMonTraceConsumer.cpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Frame-release ordering and the updated auxiliary-data baseline still need Windows regression validation.

1 open issue
2 resolved since last review

Review effort: Balanced

Replace the WaitingForFrameId reset added to the stale-deferral block in
#702 with a deterministic release rule. That reset only ran when
mReadyCount was 0, so it depended on how fast the output thread dequeued
presents. This made ETL results vary between runs and could release a
generated frame before its partner merged the propagated data.

A present waiting for a PresentFrameType partner is now released when:
- a later-started present from the same process completes, whether or
  not it has a PresentFrameType (e.g., frame generation was turned off),
  or
- any present that started more than mDeferralTimeLimit later completes
  (e.g., the process stopped presenting). A limit of 0 releases on the
  next later-started present, matching the documented meaning of 0.

An earlier-started present that completes late does not release a
waiting present. Only a typed successor with the same FrameId takes the
propagated data from an Intel_XEFG present.

Add PresentFrameTypeDeferralTests to the CMake and Visual Studio unit
test projects. Update the AuxData lock to the regenerated gold CSVs for
test_case_7, 8, 9, 11 and 12 (default and _v2), which reflect the app
timing pruning from #702 and the new release rule.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Frame-release ordering and the updated auxiliary data need Windows unit and trace regression validation before approval.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

DevTechProfile added a commit to DevTechProfile/CXPresentMon that referenced this pull request Oct 18, 2026

@planetchili planetchili left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@planetchili
planetchili merged commit fb47bb8 into main Oct 21, 2026
1 check passed
@planetchili
planetchili deleted the fix/frame-type-deferral-release branch October 21, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants