Repository navigation
Capture bound NVN2 push constants for shader diagnostics - #1160
oliverames wants to merge 2 commits into
Conversation
|
@seedds, update on the AA investigation diagnostic for Switch 2 games running on iPhone: head ee418ef includes #1164's lint prerequisite, and the 28-check bound push-constant fixture passes with Metal validation on M2 Pro. The fixture verifies host argument bytes, not GPU readback. Earlier iPhone 17 Pro Max fixture evidence belongs to its recorded older source; actual DKB AA constants have not yet been captured. This stays draft and makes no shader-mismatch or fur-shimmer-fix claim. The capture is reusable for other titles' shader investigations. |
|
@seedds Reconciled the Switch 2 / iPhone push-constant diagnostic with current upstream and repaired #1164 at |
203e502 to
8f239ba
Compare
|
@seedds Flagging from my open-PR index of my 32 open PRs here: this one stays draft pending the real DKB capture, hosted CI, and #1164 landing so the prerequisite drops out. 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: the real DKB capture and hosted CI; the #1164 prerequisite drops out of the diff once #1164 lands. 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. |
d09c713 to
f8d4527
Compare
|
Rebased onto current main (f8d45274): kept both sides in dm/gfx/tests/Makefile, symptoms.md and shaders.md, regenerated the symptom index. make GAME=040074A01BF12000 check_t_push_capture: 28 checks, 0 failed; test_docs.py OK. |
79cb857 to
02b3ac4
Compare
02b3ac4 to
2c69ce7
Compare
Conflicts: dm/games/040074A01BF12000/README.md (both sides kept), dm/gfx/nvn/nvn_mtl.m (push-constant encode). Adaptation: main grew S.push[bank] to DMSH_PUSH_BLOCKS blocks (6 x 0x100 bytes), so the c24 capture, its PD line and t_push_capture use sizeof S.push[0] instead of DMSH_PUSH_SIZE; shaders.md says the whole block set is saved.
What and why
NVN2 shaders bind c24 from push constants, so the existing uniform-buffer dump omitted the values needed to replay those shaders. This extends
DM_NVN_CBDUMPto save the whole push block set copied into the argument arena (since main made itDMSH_PUSH_BLOCKSblocks of 0x100 bytes, 1,536 bytes; it was one 256-byte block when this PR was written), under the existing pass-dump gate and exact shader-key filter. Filenames include frame, pass, draw counter and stage. With diagnostics disabled, rendering behavior is unchanged.@seedds: this supports the Switch 2 games running on iPhone investigation, specifically Donkey Kong Bananza on iPhone 17 Pro Max. Its earlier spatial-AA replay assumed reciprocal-dimension c24 values. Other NVN2 titles using push constants may benefit from the same diagnostic. This is not a fur-shimmer or pacing fix.
The actual DKB capture and CI are not yet verified. The existing installed DKB binary has not been replaced. Earlier Newt fixture evidence and the prepared combined DKB game candidate describe their recorded source versions, not this updated head.
Checked
encode_args, resolves the pointer in the encoded argument buffer, and compares all captured bytes against the referenced arena. It covers graphics/compute bank selection, filtering, disabled capture and the first-encode gate. It passed 28 checks on the Mac and on a physical iPhone 17 Pro Max with Metal validation enabled. This verifies host argument data, not GPU readback. Documentation tests (11), the environment-table test and whitespace checks pass; the table check keeps its existing advisory about historicalDM_NVN_CUT_FIRSTprose. Reproduce withmake -C dm/gfx/tests GAME=040074A01BF12000 check_t_push_capture. For the CI prerequisite, targeted LLVM 23.1.4 analysis of the renderer and capture fixture has zero pairs above or below baseline, and the fixture passes 28 checks with Metal API validation on M2 Pro.d2bb79f6-1c75-4b06-85b1-3d2216e482b8on A19 Pro / iOS 27.2, a Debug build targeting iOS 26, on an iPhone 17 Pro Max. The Mac checks ran on an M2 Pro; the macOS version is not stated.scripts/regress.pyline: not stated. The description says only that no five-game gameplay regression was run.Front ends
None: no front end has to act on this.
Docs
docs/reference/shaders.mdentry (both are in the diff), anddocs/agents/symptoms.mdis updated in the diff. The original description does not saypython3 dm/tools/docs_symptoms.pywas run, but the symptom index change is part of the diff.dmsh_chain.py --headerwas run anddm/gfx/nvn/dmsh_chain.his part of the change. Not applicable: no chain tool changed.Nov 12: main
0c23e0b59merged in (head6dd2b93b). Main grewS.push[bank]toDMSH_PUSH_BLOCKSblocks, so the capture, its log line, its file andt_push_capturenow takesizeof S.push[0](1,536 bytes) instead ofDMSH_PUSH_SIZE;check_t_push_capturepasses its 28 checks on the Mac, and the iPhone run quoted above is from the old head. Earlier: rebased onto main6c676444on 2026-11-09 (head2c69ce75).t_push_capture's rules now sit aftercheck_t_present_cropindm/gfx/tests/Makefileinstead of at the end of the file, where every new test on main conflicted with them. After the rebasemake check_t_push_capturepasses 28 checks, andtest_docs.py(6 tests) andtest_env_switches.pypass; the symptom index is unchanged bydocs_symptoms.py.