Skip to content

DM_RT60=1 (opt-in, not yet measured): the scheduler declaration keeps the base vsync period when the game flips its present interval - #1700

Closed
oliverames wants to merge 1 commit into
seedds:mainfrom
oliverames:rt60-period
Closed

oliverames wants to merge 1 commit into
seedds:mainfrom
oliverames:rt60-period

Conversation

@oliverames

@oliverames oliverames commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Not fully tested; opt-in. The runs so far show no effect; it is filed for review, and the maintainer may prefer to wait for a measurement.

What and why

Mario Kart World 1.8.0 (#1383's build) on a physical iPhone flips its present interval between 1 and 2 about 350 times in 20 s after late frames (96 flips in one 600-frame window, 258 in the next); cheemu21/plumber-racer-2 notes the game sets interval 2 after a late frame. Each flip re-declares 16.7 or 33.3 ms to the scheduler (set_time_constraint). In one run the process left the performance cores in that window (mean clock 3.5 to 1.6 GHz, 56% to 8% on performance cores, thermal fair); the frame-step comment above rt_period_ns describes the same demotion for a longer hold.

DM_RT60=1 keeps the declared period at the base vsync period (1 / g_hz) whatever the game's interval does. Off by default: with the variable unset the code runs as before.

Checked

  • Tests: hle_nvn.c compiles on this base with a generated profile header (clang syntax-only); dm/tools/tests/test_docs.py passes; the new switch is in docs/env_switches.tsv with its meaning (env_switches.py --check still reports DM_NVN_BC_ALIAS, which is missing from the table on main too).
  • Games run, with title ID and version: Mario Kart World (0400C3F00006E000) 1.8.0, built from WIP: Mario Kart World 1.8.0 on iOS - rendering, memory and presentation #1383's tree, on the phone: three HDR-off runs of 1,800 to 15,000 frames with and without it.
  • Devices and OS: iPhone 19,4 (2 Performance + 4 Efficiency cores), iOS 27.3; Apple-silicon Mac, macOS 27.3
  • scripts/regress.py check --games: not run: off by default, so every game runs as before without the variable.
  • Measurements before and after: no measurable difference so far: with and without it the CPU stayed healthy in the HDR-off runs and the GPU-time plateau seen in all of them was the same.
  • Not checked: whether it prevents the CPU demotion (it did not in an HDR-on run where the demotion appeared with it set). No unit test: the declaration is a scheduler hint with no observable output on the Mac. No Mac run.

Front ends

None: no front end has to act on this.

Docs

  • The mechanism is in docs/development.md and the switch in docs/env_switches.tsv
  • A chain tool changed: dmsh_chain.py --header was run and dm/gfx/nvn/dmsh_chain.h is part of the change. Not applicable: no chain tool changed.
  • No game files, keys or data extracted from a game in the change or the attachments

@github-actions github-actions Bot added nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests) docs Documentation labels Nov 7, 2026
…riod when the game flips its present interval

Off by default and not yet measured. Mario Kart World on an iPhone flips its present interval 1 and 2 about 350
times in 20 s after a late frame, re-declaring 16.7 / 33.3 ms to the scheduler each time, and around those flips the
process left the performance cores (mean clock 3.5 to 1.6 GHz, thermal fair).
@oliverames

Copy link
Copy Markdown
Contributor Author

Combined into #1713 with the other two pacing switches; same commit, same tests. Closing this one.

@oliverames oliverames closed this Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation nvn NVN on Metal and its tests (dm/gfx/nvn, dm/gfx/tests)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant