Repository navigation
present: stop repeated writes for unsupported display-link latency - #697
Closed
thehobbit85 wants to merge 1 commit into
Closed
thehobbit85 wants to merge 1 commit into
thehobbit85 wants to merge 1 commit into
Conversation
thehobbit85
force-pushed
the
codex/fix-display-link-latency
branch
14 times, most recently
from
November 1, 2026 04:14
1d882a0 to
3e18f0c
Compare
thehobbit85
force-pushed
the
codex/fix-display-link-latency
branch
from
November 1, 2026 06:22
3e18f0c to
e698f32
Compare
seedds
added a commit
that referenced
this pull request
Nov 1, 2026
CAMetalDisplayLink takes a preferred frame latency of 1 or 2 and reads back 2 after a larger request. link_sync compared that readback with the unbounded override, so DM_PRESENT_LATENCY=3 set the property again and logged "display link: frame latency" on every frame. link_latency now bounds a positive override to 2, so the requested, compared and logged values agree. The automatic window/fullscreen policy is unchanged. t_present_rescue's stand-in link reads back at most 2 and counts writes across frames (80 checks pass with the Metal debug layer). Issue #603, finding 2. Co-authored-by: Eliran Zach <4012041+thehobbit85@users.noreply.github.com>
Owner
|
Landed as f4bfc01, with you as co-author. The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An oversized positive
DM_PRESENT_LATENCYrequest makeslink_synccompare CAMetalDisplayLink's bounded readback with an unsupported value, repeatedly writing and logging every frame. Normalize the request to the supported maximum of 2 before creation and comparison. Valid overrides 1/2 and main's automatic policy—2 in variable-refresh fullscreen, 1 otherwise—remain intact.Addresses #603, finding 2. The separate ProMotion late-present and fixed-rate display-link delay findings remain open.
Current integration and validation
Rebased onto pinned main
c1df4ddaaedc3c18228065ea5b909688b79884e2; heade698f325f004290576a6d96a9ab8770cda480654. The same existing PR remote branch and its canonical local tracking branch are retained. All paginated issue comments, reviews and inline feedback were read; no new feedback was found.The independently reviewed override normalization, automatic variable-refresh policy and repeated-write regression cases are unchanged. Main's compact NVN command records do not replace the explicit-override bound.
t_present_rescue --metalpassed 80 checks withMTL_DEBUG_LAYER=1at1d882a01, including oversized 3/INT_MAX requests across both screen types and window/fullscreen states. Its presentation-policy/fixture sources are unchanged; the run predates the newer NVN command-record changes and is not a final-head native run. That build reported 52 existing graphics protocol warnings.Range-diff marks the feature patch unchanged, and the old-to-new tree delta exactly matches the upstream increment. Ancestry and
git diff --checkpass. The previous d138-based head3e18f0c3548da726ec24fa8fed85f7a25ff15c32completed all 7 CI checks successfully; that is historical evidence. CI for this new head is pending. Central shared validation passed on4820ba509adb90ee7cca8c5a65a51e0a4dc12e74withGAME=010015100B514000:t_fs(102 checks),t_fs_case(51),t_fs_commit_list(98),t_nfc(54),t_pad_hid(19), andt_system_event. Their production/fixture sources, host headers, profile inputs, build flags and target recipes were verified identical to this head. This is shared fixture coverage, not a full host build or full graphics run of this PR.Local native tools are Xcode 27.0/Metal 32023.921; supported Xcode 27.2/Metal 32023.922 verification belongs to the new CI run. No gameplay, physical-display timing or interactive HUD check, extraction rebuild, device installation, game shader rebuild, or fresh game shader/interface comparison was performed. Earlier full-suite/game evidence remains historical at its recorded revisions.