Repository navigation
Diagnose MetalFX size transitions and bounded dispatch decisions - #1167
oliverames wants to merge 3 commits into
Conversation
|
@seedds, this small diagnostic comes from Switch 2 games running on iPhone, specifically checking DKB's 1676×943 scene → 2304×1296 MetalFX output on iPhone 17 Pro Max. It logs successful size-pair transitions, including a return to cached scaler dimensions that creation logs miss. Existing Mac MetalFX tests and docs pass; the line does not prove GPU completion or drawable size, and per-frame size changes can add logging overhead. Exact-head physical gameplay remains pending. It may help other titles using the same MetalFX path; no pacing or visual-quality improvement is claimed. |
|
@seedds Updated this Switch 2 / iPhone diagnostic to Verified locally: targeted renderer LLVM 23.1.4 ratchet has zero file/check pairs above or below the baseline; MetalFX fixture passes 74 checks with encoding thread off and 74 with it on, plus 5 game-path checks; 11 documentation tests and whitespace checks pass. New hosted CI is pending. A fresh combined DKB diagnostic run on iPhone 17 Pro Max retained 1676×943 scene → 2304×1296 MetalFX → 2346×1320 drawable. That app is an adapted combined baseline, not this exact PR head. Its raw AA capture incurred dropped/discarded frames, so it is not evidence of pacing improvement. Cached-size-return log behavior and exact-head phone gameplay remain verification gaps; keeping this draft. The log remains useful for correlating resolution transitions across titles without treating allocation pools as resolution controls. |
|
@seedds Head 1978d68 resolves the rendering-documentation conflict while preserving upstream's new MetalFX color handling. The size-transition diagnostic remains unchanged. The focused Mac tests pass: 91 MetalFX checks in each encoding mode, 12 game-path checks, and 11 documentation tests. This remains draft pending hosted checks and exact-head phone verification. The ongoing Switch 2 games running on iPhone investigation found a useful limit of these logs: the DKB iPhone 17 Pro Max run last logged 1676×943 to 2304×1296, but a later captured frame used 2304×1296 AA targets. A last-seen size log does not establish that scaling continued on every subsequent frame. I am investigating that render-path change before making a sustained-resolution claim. |
|
@seedds Head 4fcc352 adds bounded dispatch-path evidence for the Switch 2 games running on iPhone work. Review caught a real accounting race between presentation and replay; the counters now belong to submission replay, with explicit start/end frame labels and a boundary-crossing flag. Zero means no dispatch in that submission, not proof about a whole game frame. The focused Mac runs pass 95/95 MetalFX checks and 15 game-mode checks, plus 12 docs/environment tests. This remains draft: hosted CI, full production classifier coverage and exact-head iPhone testing are pending. No pacing or shimmer fix is claimed. The next DKB iPhone 17 Pro Max run will use this evidence to distinguish native-size rendering from scaler substitution or fallback. |
|
@seedds, new physical-phone evidence for Switch 2 games running on iPhone: DKB completed a 70-second gameplay route on the iPhone 17 Pro Max with this dispatch trace adapted onto the existing combined test build. The trace recorded MetalFX substitution in frames 4728–4730, with resolved 1676×943 input and 2304×1296 output. Both route drawable captures were 2346×1320. One recorded decision: Fresh log.txt and memstat.tsv were pulled after stopping the game. Executable SHA-256: This verifies a nonzero diagnostic path on the phone. It does not verify the exact PR head, sustained warm stability, a shimmer fix, or the later full-resolution render path. The PR remains draft. The dispatch decisions and refusal reasons may also help diagnose other titles that use the MetalFX substitution path. |
|
The clang-tidy (ratchet) failure on this head is not from this diff. It ran at 08:07 UTC against main 13da1c5, which had the same three I checked this head merged with current main (aafe01d) locally with clang-tidy 23.1.4: A fresh run will still fail for a reason on main: lint-c on main is red since 0b8e0dc (run 41819072419), with four file/check pairs above the baseline in files this PR does not touch ( |
4fcc352 to
1320c93
Compare
|
@seedds Flagging from my open-PR index of my 32 open PRs here: this one stays draft pending hosted CI and exact-head physical iPhone execution. The description above is still the full picture, nothing new from me. Happy to rebase, split or retitle whenever review suits. |
|
@seedds Marking this ready for review now, so it stops waiting in draft on me. The remaining item from the description is still open: hosted CI and exact-head physical iPhone execution. It can carry on alongside a review instead of ahead of it. The description stays the source of truth; happy to rebase, split or retitle whenever review suits. |
3535b79 to
dfc87b4
Compare
|
Rebased onto current main: one conflict in mtl_sub_begin (kept main's line without the removed g_rc_npend/g_rc_skip reset, plus mfx_trace_sub_begin). make GAME=040074A01BF12000 check_t_upscaler_mfx: 15 checks, 0 failed; test_docs.py OK. |
bc24ab0 to
30dcc25
Compare
30dcc25 to
64be2a6
Compare
Conflicts: dm/gfx/nvn/nvn_mtl.m (mtl_sub_begin and dispatch: both sides kept; the PR's const void *k replaced by main's cps_key k), docs/env_switches.tsv (both rows kept). No other adaptation.
What and why
DKB can change its rendering path after the last MetalFX size message. A scaler-creation log alone cannot show returns to cached sizes or establish whether later submissions still use MetalFX.
This adds successful size-transition logging and an opt-in
DM_NVN_MFX_TRACE=1diagnostic gated by selected passdump frames. The trace records named upscaler decisions, refusal reasons and dimensions from the exact resolved bindings, with at most 64 detailed records per submission. Submission-owned summaries include calls, named attempts, substitution decisions and early exits. They record observed start/end frames and flag boundary crossings. A zero count describes one submission, not a complete game frame; calls rejected before shader lookup cannot be classified by name.The diagnostic leaves the existing scaler decisions and pacing policy unchanged.
@seedds This supports the Switch 2 games running on iPhone investigation. The DKB iPhone 17 Pro Max evidence comes from an older combined build: one frame has 1676×943 AA targets, while a later frame has 2304×1296 geometry and AA attachments, with 2346×1320 drawable captures. Those observations do not establish why the path changed, continued MetalFX dispatch on every frame, a pacing improvement, or a fur-shimmer fix. The diagnostic may help other titles with named game upscalers, but that benefit has not been measured on those games.
Full production classifier coverage, hosted CI and exact-head physical iPhone execution remain outstanding.
Checked
0c23e0b59merged in (headaa10929c):check_t_upscaler_mfxin game mode passes its 15 checks, the encoding-thread variants weren't rerun;test_docs,test_env_switches,test_gfx_tests_makefileand the iOS compile check (263 files) pass. Before that, at head 64be2a6, the Mac fixture passes 95 checks with the encoding thread off, 95 with it on, and 15 in game mode. Coverage includes exact resolved dimensions/serials, an empty-submission summary, refusal classification, and a presentation boundary during an active submission. All 12 documentation/environment tests and diff whitespace checks pass. Full production classifier coverage and hosted CI are outstanding.scripts/regress.pyline: not stated.Front ends
None: no front end has to act on this.
Docs
docs/reference/rendering.mdentry (both are in the diff;docs/agents/04-graphics.mdanddocs/env_switches.tsvalso change). The description does not saypython3 dm/tools/docs_symptoms.pywas run, anddocs/agents/symptoms.mdis not in the diff, so the symptom index step is unconfirmed.dmsh_chain.py --headerwas run anddm/gfx/nvn/dmsh_chain.his part of the change. Not applicable: no chain tool changed.Rebased onto main ab41d6a (2026-11-10), and before that onto dbf8499 (2026-11-09); conflict resolved in dm/gfx/nvn/nvn_mtl.m, where main's
ndve_engine_dispatchearly return now runs before the traced MetalFX decision indispatch()and main's threadgroup spill block after it.