Skip to content

HDR: the display's own peak by model, launcher rows for the peak and paper white, and the packed-conversion probe (stacked on seedds/nxnative#1176) - #9

Open
oliverames wants to merge 3 commits into
pr-1176-headfrom
hdr-calibration
Open

oliverames wants to merge 3 commits into
pr-1176-headfrom
hdr-calibration

Conversation

@oliverames

@oliverames oliverames commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

Not fully tested.

What and why

Stacked on seedds#1176 (maxdavidson:feat/switch2-hdr-output): main has no HDR presentation code, so this is meant to be merged into seedds#1176's branch, or rebased onto main when seedds#1176 lands. The base branch pr-1176-head is seedds#1176's head (69676b97).

  1. The game is told the display's own peak by model (front_hdr_device_peak, front_ios.m). vi::QueryDisplayHdrStatus answered a fixed 1,000 nits (DM_HDR_PEAK, no launcher setting) on a panel that reaches 1,600. Now: 1,600 for the iPhone 12 Pro and later and the M-series iPad XDR panels, 1,200 for the iPhone X to 11, else 1,000. DM_HDR_PEAK overrides and 0 is automatic. The Mac keeps 1,000.
  2. Launcher rows for the peak and the paper white, shown once HDR output is on (oliverames/anygame#27: highlights reported as "super bright" with no control). Both variables existed and are now player-facing.
  3. Add an opt-in packed HDR conversion measurement tool seedds/nxnative#1168's measurement tool (Add an opt-in packed HDR conversion measurement tool seedds/nxnative#1168), cherry-picked as is, with one NOT_RUN Makefile line merged; if this lands, Add an opt-in packed HDR conversion measurement tool seedds/nxnative#1168 is redundant.

Update after two more runs: with HDR on the owner saw flicker; with DM_HDR=0 it was mostly gone. So HDR output is probably part of the flicker; this PR does not fix it. The 1,600-nit peak was in effect in the flickering runs, so it is a candidate; a run with DM_HDR_PEAK=1000 would separate it and has not been done. The slow GPU state (26 to 39 ms against 11 to 13) also appeared with HDR off, so it is not an HDR problem.

Checked

  • Tests: t_present_hdr passes on this base (31 checks, four new: a known model's peak, the override, automatic, an unknown model); test_settings.py, test_launcher_settings.py, test_env_switches.py, test_docs.py and test_metal_conversion_probe.py pass; front_ios.m syntax-checks against the iPhoneOS SDK.
  • 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 seedds/nxnative#1383's tree, on the phone (the equivalent change, in WIP: Mario Kart World 1.8.0 on iOS - rendering, memory and presentation seedds/nxnative#1383's tree): the game told 1,600 nits, the owner reports the picture looks good; flicker with HDR on, mostly gone with it off.
  • 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: this is stacked on an unmerged HDR PR and only changes what a Switch 2 game is told when HDR output is on.
  • Not checked: this exact tree was not built into an app or run on a device; the launcher rows were not opened and no value other than Automatic was tried; no comparison against 1,000 nits, no nits measured, and a brightness or heat cost of the higher peak is unmeasured.

Front ends

Front-ends: interface: front_hdr_device_peak() in front.h, the display's peak in nits by hardware model (0 = unknown, answered 1,000); a front end that makes an HDR layer implements it, and a weak default answers 0.

Docs

  • The behaviour is in docs/settings.md, docs/env_switches.tsv and the Mario Kart World note; no new general mechanism
  • 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

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-07T17:56:53.722292Z
We couldn’t complete this review. Comment @codex review to try again.
dc67952 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

Oliver Ames added 3 commits November 7, 2026 14:24
…er sets the peak and the paper white

Symptom: a phone's highlights were reported as "super bright" and nothing in the launcher could change them; the game was
told a fixed 1,000 nits (DM_HDR_PEAK, no launcher setting) on a panel that reaches 1,600.
Fix: front_hdr_device_peak() (front_ios.m, by hardware model) supplies the default: 1,600 for the iPhone 12 Pro and later and
the M-series iPad XDR panels, 1,200 for the iPhone X to 11, else 1,000. DM_HDR_PEAK overrides and 0 is automatic. The launcher
gets HDR peak brightness and HDR paper white rows, shown once HDR output is on; both are untested at other values.
Checked: t_present_hdr (31 checks, four new), the settings, launcher, env-switch and docs tests, and front_ios.m against the
iPhoneOS SDK; the game told 1,600 nits ran on an iPhone 19,4 with Mario Kart World 1.8.0.

Front-ends: interface: front_hdr_device_peak() in front.h, the display's peak in nits by hardware model (0 = unknown, answered 1,000); a front end that makes an HDR layer implements it, and a weak default answers 0
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.

1 participant