Repository navigation
Retire obsolete NVN chunks after whole-pool mapping - #1417
Open
givethesourceplox wants to merge 1 commit into
Open
givethesourceplox wants to merge 1 commit into
givethesourceplox wants to merge 1 commit into
Conversation
3 tasks done
fpedrolucas95
pushed a commit
to fpedrolucas95/nxnative
that referenced
this pull request
Nov 6, 2026
… whole-pool mapping # Conflicts: # dm/gfx/nvn/nvn_mtl.m # dm/gfx/tests/Makefile # docs/agents/symptoms.md # docs/reference/nvn-objects.md
fpedrolucas95
pushed a commit
to fpedrolucas95/nxnative
that referenced
this pull request
Nov 6, 2026
…mark the pools a buffer address was taken in seedds#1394's table lists only the pools the game took a buffer address in, so the tests that make pools for the raw table (t_pool_chunks's 5,000 pools, t_gmem_raw's, seedds#1417's t_pool_retire) mark them as nvnMemoryPoolGetBufferAddress would; seedds#1394's and seedds#1417's tests call gmem_map(), which replaced gmem_map_gpu() here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AnkMister
added a commit
to AnkMister/nxnative
that referenced
this pull request
Nov 6, 2026
Revised brief: keep only PR seedds#1434 (9eeacbb), seedds#1332 (7f5f2fc), seedds#1417 (1c1d453), and seedds#1428 (f537147). Remove all other prior ports and their follow-ups while preserving published history. Other glass and Mac agents own those items. Update the scoped report and references; exclude disabled SDK hooks from hit diagnostics. Python tools match the baseline failure set; 12 docs/environment checks pass. Portable SDK gate and diagnostic checks pass GCC ASan/UBSan. Mac and Metal checks remain open.
Aeonitis
pushed a commit
to Aeonitis/nxnative
that referenced
this pull request
Nov 6, 2026
…er and shader chain, the branch's host services, movie clock, packing and Ocarina of Time additions Upstream reached about 60 fps in Kokiri Forest with its own versions of most of the branch's merged PRs, so where both changed the same code upstream's is kept: - The shader chain is upstream's (translator, lock, dmsh tools, Ryujinx sources), plus the branch's bracket-depth flattening (dmsh_depth.py, test_dmsh_depth.py); chain c732699d4fdb. Not carried: the LDSM subgroup fence (seedds#1376, needs a translator rebuild; upstream's HMMA/LDSM rework reports clean movies) and the shared raw-memory lookups (seedds#1405, superseded by upstream's last-entry lookups). - The renderer (dm/gfx/nvn, dm/gfx/msl) and its tests are upstream's. Not carried: seedds#1390-seedds#1394, seedds#1404, seedds#1408, seedds#1409, seedds#1417, seedds#1418, seedds#1420, seedds#1427, seedds#1320, seedds#1331, seedds#1332, seedds#1368, seedds#1285 renderer parts, pool_skip_retired, and the branch's warning fixes and prewarm progress there. They stay on oot-integration. - Ocarina of Time's profile is upstream's, with the branch's 12 movie compute rows in pso_manifest.tsv, PLAN.md and PR-AUDIT.md. - shader_split.py is upstream's plus the BAHS record check (test_split_bahs_records.py). - Host: upstream's EventFd, PlayReport send, audio lock and vibration answers; the branch's service sessions (hle_sf, hle_prepo), sync waits, AV1 movie clock and parallel decode, diag_abort frame fix and focus control are kept. - Scripts: shader.noindex, tmp.noindex, notes outside the shader key, bench and regress changes. Checked: the Mac host builds (GAME=0400486024DEC000); host unit tests pass; the Python tool tests pass on Python 3.13 except test_dmsh_pool_arrays, test_nro_pack, test_nsp_dump and test_nsp_incremental, which fail on upstream main as well. Not run: the full shader build on this chain, gameplay.
3 tasks done
Contributor
|
Data from Ocarina of Time (Switch 2,
|
2 tasks done
cfryerdev
pushed a commit
to cfryerdev/nxnative
that referenced
this pull request
Nov 8, 2026
…ures (seedds#1404)" and "Retire obsolete NVN chunks after whole-pool mapping (seedds#1417)" They tank Ocarina of Time's submit thread: on the same route and save, the host with them ran 12.4 fps with the submit thread at 56-78 ms CPU (73-78 ms wall), and without them 58.6-59.1 fps with the GPU at 12 ms. seedds#1393's pool_skip_retired stays (it is not implicated, and it fixes the scene-change OOM); seedds#1394's bitmap stays reverted in favour of upstream's address table.
Contributor
|
On our tree (with this PR's code merged), Ocarina of Time in Hyrule Castle Town, with its large pools in chunks, hit it. id<MTLBuffer> ob = p->buf; [g_keep removeObject:ob]; defer_obj_release(ob); // strong first: p->buf is unretained, and g_keep may hold its last referenceThe same pattern is in the retire loop ( |
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Raw-address shaders require a contiguous mapping of each large NVN pool.
gmem_map_gpucreates that mapping but leaves older overlapping chunk buffers, plus their replaced versions, alive and resident until the parent pool is destroyed.After successful whole-map creation, remove the obsolete chunk entries and retire their buffers through the existing fence-deferred release. Repair swapped pool entries' indices and invalidate address caches. A failed whole-map allocation leaves existing chunks intact. The whole-pool mapping and its GPU addresses remain authoritative.
Reference finding. Found during Ocarina's scene-load investigation (#1299). This complements #1319's replacement-chunk retirement; it does not copy its threshold, reuse or raw-residency policies. The SDK-26 declaration shim matches #1404's build prerequisite for existing OS-27-guarded MetalFX setters.
Checked
Apple M1 Pro, macOS 26.5.2, Xcode 26.5:
t_pool_retire: 40 checks pass with Metal API validation. Covers two large pools, a separate small pool, lengthened chunks, whole-map consolidation, repaired swapped indices, shared-storage lookups, retirement only after the submitted fence, a GPU data copy from the surviving mapping, and parent teardown.git diff --checkpasses.The fixture proves buffer lifetime and mapping behavior, not an isolated game-memory, FPS or thermal saving. No standalone game or iPhone run is claimed for this branch. The local harness finds only DK, MKW and Ocarina, with no stored baselines and no DK/Ocarina smoke routes on this base; no five-game regression report is available.
Docs