Skip to content

Luigi's Mansion 3: declare depth_mode zero - #580

Closed
pyxl-dev wants to merge 1 commit into
seedds:mainfrom
pyxl-dev:lm3-depth-mode
Closed

pyxl-dev wants to merge 1 commit into
seedds:mainfrom
pyxl-dev:lm3-depth-mode

Conversation

@pyxl-dev

Copy link
Copy Markdown
Contributor

What and why

Luigi's Mansion 3 (0100DCA0064A6000) sets nvnDeviceSetDepthMode near = 0, but its profile did not declare depth_mode. The NSP script's Mac prebuild therefore made near = -w pipeline bases, and at every start the host refused the bundled archive (pipeline archive bundled with the app: made for … depth near=-w …, this run needs … depth near=0) and rebuilt 3,852 pipeline pairs before the first frame (16 s).

The profile now declares depth_mode zero. The finding is in the game's note (dm/games/0100DCA0064A6000/README.md, Rendering), and dm/games/README.md lists the game among those that set zero.

Checked

  • Tests: dm/tools/tests/test_docs.py passes.
  • Games run, with title ID and version: Luigi's Mansion 3 (0100DCA0064A6000) v0 + update 1.4.0 (v327680) + Multiplayer Packs 1 and 2, Mac app built with scripts/build_ipa_from_nsp.py --platform mac-app. After the change the log shows the bundled archive accepted ("holds the bases of every shader pair", 16 of 16 probed bases found), no pipeline prebuild line, >>> nnMain and frames presented, no [RED] or Break#. Only the start and the first frames were checked, not gameplay.
  • Devices and OS: Apple M5, macOS 27.0.1. Not checked on iPhone.

Docs

  • The finding is in its game note or its docs/reference/<subsystem>.md entry, and python3 dm/tools/docs_symptoms.py was run (the symptom index)
  • A chain tool changed: dmsh_chain.py --header was run and dm/gfx/nvn/dmsh_chain.h is part of the change
  • No game files, keys or data extracted from a game in the change or the attachments

🤖 Generated with Claude Code

The game sets nvnDeviceSetDepthMode near = 0. Without the key the
offline pipeline archive was made for near = -w, the host refused it at
every start and rebuilt 3,852 pipeline pairs before the first frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
pyxl-dev added a commit to pyxl-dev/NX2Apple that referenced this pull request Oct 28, 2026
@seedds seedds closed this Oct 29, 2026
@seedds seedds reopened this Oct 29, 2026
seedds added a commit that referenced this pull request Oct 29, 2026
The game sets nvnDeviceSetDepthMode near = 0, but the profile left the
default near = -w, so the pipeline archive made offline held main0 vertex
entries: the device refused the bundled archive and built its own 3,852
bases before the first frame (16 s) on a first start. With depth_mode
zero the archive holds the main0_z entries, as for the other zero-depth
profiles. From PR #580 by pyxl-dev; profile and notes only, no game run.
@seedds

seedds commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Thanks! Landed on main as ac9598a (Luigi's Mansion 3: depth_mode zero). Small edits on the way in: the note says the device builds its own 3,852 bases on a first start and after each chain or pair-list change (its own archive persists between starts), the bullet joins the Rendering list, and the game.tsv comment uses the one-line form the other near = 0 profiles use.

@seedds seedds closed this Oct 29, 2026
jojo-papa added a commit to jojo-papa/nxnative that referenced this pull request Oct 29, 2026
The upstream's current main is ac9598a ("Luigi's Mansion 3: depth_mode zero
(PR seedds#580)").  This commit is the whole fork on top of it.

What the fork adds over the upstream:

  webui/            the build studio: a FastAPI web UI, the task queue, the
                    Windows iOS cross-compile and IPA packer, the macOS
                    wrapper, the launchers and the tool preparation
  webui/patches/    eight patches against the upstream's own files, applied
                    only to the staging tree that a build runs in
  webui/overlays/   four source files the upstream has no place for
  RULES.md          sixteen rules, their registry (webui/tools/rules.py) and
                    the gate (webui/tools/gate.py) that runs them
  webui/tools/      the staging tree, the patch queue, the daily rebuild
                    (daily_sync.py) and the patch rebase engine
                    (patch_rebase.py)

What the fork does to the upstream's own code, in full:

  0001  shader_split.py        POSIX paths in the shader split
  0002  gen_embed.py           POSIX paths and no_dead_strip sections
  0003  hle_count.c            TargetConditionals for the HLE counter
  0004  nx_extract/Program.cs  --catalog, so the extractor can list a whole
                                package directory
  0007  ios/Sources/main.m     the launch settings entry point
  0008  ios/tools/build_ipa.sh the separate-RomFS and launch-default switches
  0009  build_ipa_from_nsp.py  the webui entry point for the NSP packer
  0054  nvn/nvn_mtl.m          the upstream's own MetalFX scaler, read by the
                                performance HUD

Two things the fork had and no longer has: its own MetalFX Makefile link and
its own MetalFX spatial upscaling.  The upstream's Makefile links MetalFX
already, and the upstream ships its own spatial upscaling behind
DM_PRESENT_UPSCALE, so a second implementation would be the duplicate work
that R-02 and R-15 forbid.  0054 reads the upstream's scaler instead.  The
upstream's separate-RomFS deployment needs xcrun devicectl and only runs on
macOS, and its mac-app target produces a .app directory where the webui
contract wants a .app.zip, so the fork keeps its own mechanism there.

The gate runs five checks: the patch queue applies, the staging tree
rebuilds and verifies, the upstream's own files stay clean, the tests pass,
and every rule check is green.  webui/tests/test_rules.py fails when
RULES.md and the registry drift apart, so a rule cannot change without its
document changing with it.

Commit titles in this fork use [方向][简要概括]; the vocabulary is in
webui/docs/COMMITS.md.
@pyxl-dev

Copy link
Copy Markdown
Contributor Author

Thanks for landing it. Two things about ac9598a:

  • The commit message says "profile and notes only, no game run". The game was run: the PR's Checked section lists the Mac build (v0 + 1.4.0 + both Multiplayer Packs) and the log after the change (bundled archive accepted, 16 of 16 probed bases found, no pipeline prebuild, >>> nnMain, frames presented), on an Apple M5 with macOS 27.0.1. Only gameplay and the iPhone were not checked.
  • The commit carries no Co-authored-by: trailer, so GitHub does not count the change as mine, although the finding, the measurements and the three files come from this PR. Since main is not rewritten, could you add Co-authored-by: PYXL <[email protected]> (or merge the PR's commit) the next time you rework a contribution of mine?

QID-Rob added a commit to QID-Rob/nxnative that referenced this pull request Oct 29, 2026
… matches the game

The game calls nvnDeviceSetDepthMode with near = 0 (the log says "depth mode
near=0"), but its profile had no depth_mode key, so pso_offline.py built the
Mac app's bundled pipeline archive for the GL convention and the host rejected
it at every start ("the game's depth mode is not the one built for: the profile
key depth_mode"); the first start then compiled 365 of its 366 bases itself and
prebuilt all 2,914 pairs on the device. With depth_mode zero the archive holds
the main0_z vertex entries and the first run takes its bases from it.

Luigi's Mansion 3's identical change landed in PR seedds#580.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Know-It-All-Brother pushed a commit to Know-It-All-Brother/nxnative that referenced this pull request Nov 9, 2026
The game sets nvnDeviceSetDepthMode near = 0, but the profile left the
default near = -w, so the pipeline archive made offline held main0 vertex
entries: the device refused the bundled archive and built its own 3,852
bases before the first frame (16 s) on a first start. With depth_mode
zero the archive holds the main0_z entries, as for the other zero-depth
profiles. From PR seedds#580 by pyxl-dev; profile and notes only, no game run.
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.

2 participants