Repository navigation
chain/build: bound first-build preparation and shader scheduling - #896
thehobbit85 wants to merge 1 commit into
Conversation
|
Verification on a second machine. Base What reproduces
The one that does notExtraction,
So on this machine the parallel extraction is 2.4× faster on a 500 MB image and 2× slower on a 3.5 GB one, and Given your note that the timings predate the publication rebase, I suspect the re-open-per-worker path added there Regression coverage you listed as missing
No regressions across six games and 15,878 shader slots. (Strikers' three missing shaders are Next Level Games TestsYour five new tests fail on Two harness notes (not your PR)Filling in for the No game files or keys are included in this report; all artifacts stay local. |
|
Addressed in The parallel extraction change is withdrawn. The original serial Fresh post-rebase Z-A runs still favored parallel extraction on this Mac but showed increased system CPU time and wide timing variation. Worker-stack setup took only 0.017 s in the instrumented run, and healthy input never enters the reopen-after-damage path. That does not identify the cause of your large-image regression, so the extraction speedup is removed from the PR's claims rather than presented as fixed. The restored serial path produces the same 5,989,103,860-byte image and SHA-256 as both tested revisions. Your six-game results are now credited with their exact base/head and unsupported-compiler setting, separately from the later scheduling changes. The development guide now explains The follow-up preserves the scheduling work published in The integrated Python suite passes 1,083 tests with 13 optional skips across 124 suites; pinned lint has no new or stale findings. The independent code and integration reviews found no actionable issues. The native graphics suite also passes on the integrated revision with the installed compiler. The supported-compiler game regression limitation above remains. |
|
CI follow-up is green: all eight checks pass on The host and sanitizer failures came from two test fixtures that still expected every guest-memory release to use Both failures were reproduced before the fixes. Focused tests pass against the old and new release implementations; the full host and ASan/UBSan suites also pass locally against upstream with both fixes. The PR description now includes this follow-up and the current CI results. |
b22df46 to
c93bd19
Compare
dc779d9 to
45e9164
Compare
9c74ff2 to
09bcd4a
Compare
077d7a3 to
8164ef4
Compare
693ef17 to
69d3c99
Compare
Overlap executable/archive/loose-file discovery without changing source precedence or losing captured NRO and CRA inputs. Share one translation/compilation budget, bound NSO and offline-archive preparation, select Vulkan/OpenGL targets explicitly, and preserve upstream grouped-archive defaults and cache fingerprints. Keep RomFS extraction serial and report both raw and wrapped integrity failures. The reviewed large-image extraction regression was withdrawn, not claimed fixed.
69d3c99 to
d56bd72
Compare
|
Closing without merging. The SARC root-cause fix already landed in dac4a433. The remaining 43-file pipeline/budget bundle lacks a current end-to-end benefit, and the 3.5 GB parallel extraction change was withdrawn after being twice as slow. Keep the measured SARC diagnosis, but we should not land this stale broad stack. |
First builds overlap discovery and bound rewrite, shader and archive preparation. Main still lacks the dependency-ready shared-budget scheduler and bounded preparation mechanisms, so this PR remains relevant. RomFS extraction stays serial; the independent review's large-image slowdown remains unresolved and parallel extraction stays withdrawn. Both raw and wrapped integrity failures retain strict/allow-damaged behavior.
Rebased
69d3c993c3b759b65db0ed2240c90a30fe05d812ontode2018e0100e75e782464a830250800bdfebb219, producingd56bd72022934f2b33bacc5e321dff77fdfef3d8. Only the generated shader-chain header conflicted; it was regenerated from the combined sources as 302f165cf901. Main's cache-full staging rollback, forked worker/parent SQLite service, tessellation capture, bit0-mask/per-vertex/native float-add rewrites, current archive readers and content-based PSO keys remain. Core builder functions (including commit, fin/fin_worker, job_for, finish and geometry_finish) match main exactly. The current area/component subject replaces the old subject; all substantive original commit-body/context is preserved below.Fresh exact-tree checks: 368 tests ran, 367 passed and one tessellation GPU test skipped (requires DM_TEST_TESS/t_tess). Native Python 3.14.6, Xcode 27.2 (27B52), supported Metal 32023.922.4, J=2, current locked native translator, DMSH_TEST_METAL=1. The selected suite covers scheduling/discovery, current shader rewrites with supported compiler controls, cache-full/staged publication, code/chain fingerprints, archive specialization/isolation, rewrite analysis/budgets, incremental packing, IPA compression, regression/impact tooling, environment/usage catalogues and docs. No assertions, baselines or toolchain locks were relaxed.
Actual builder CLI: four authored keyed compute shaders in each of J1 threads, J2 threads, J2 processes and warm J2 process cache. All 16 shader builds succeed, with byte-identical MSL/reflection/metallib payloads across configurations. This is a synthetic scheduling/cache check, not a performance or game-equivalence claim. Pinned Ruff/Pyright lint passed 321/321, zero new/stale. Generated header/symptoms, full main/range diff, test-tree identity, ancestry and whitespace checks passed.
The serial extractor source, native executable, synthetic extraction test and its fixture are byte-identical to the prior published head; the executable still embeds source cee30e1549db7083. The prior raw/wrapped C# extraction evidence remains historical. No production extractor or game extraction was rebuilt on this pass.
Impact remains broad across rewriting/packing/NVN chains. Intended game controls are BotW/TotK (driver constants and large profiles), Scarlet (driver reads), Hades (Vulkan targets) and Balatro (OpenGL targets). No current real-game regression, full native graphics/host campaign, gameplay, device test or first-build benchmark was run for this candidate. Those titles and game-sized peak disk/performance remain unchecked. Historical six-game results used the named older revisions and unsupported .620, as preserved below; they are not current supported-toolchain game evidence. No CI status is inferred from local checks.
Earlier published description and validation (historical)
First builds overlap discovery and bound rewrite, shader and archive preparation. RomFS extraction remains serial; both raw and wrapped integrity failures retain strict and allow-damaged behavior.
Current integration:
693ef171770a08087577adb6fa117a7122b9c1aarebased onto90b7cefd1d572ab05859c73930b436c4040cd25c, producing69d3c993c3b759b65db0ed2240c90a30fe05d812. Main's forked finishing workers, parent SQLite service, pre-fork PCH creation, current shader-image stamps, tessellation transformations and all new archive readers remain present. Translation and finishing share J active slots: process-backed finishing holds its slot until output publication, then only its dependent vertices become ready. Worker counters/results are collected in key order. The Mac/iOS target helper uses main's current deployment and math flags. Offline preparation retains main's function-constant specialization, compute groups, failing-pipeline isolation and content-based archive keys.The changed extractor source also requires a refreshed universal NativeAOT executable. Both arm64 and x86_64 report source
cee30e1549db7083; SHA25638ca9e51872ee901616d676f3fcac139b8279299469aa2822dfb8b2b8dbe39c8. No translator binary or compiler lock was changed.Fresh final-head verification on
69d3c993c3b759b65db0ed2240c90a30fe05d812: 121 tests passed for overlapping discovery/scheduling, main's new base/DLC duplicate-shader merge semantics, incremental input/profile invalidation, SARC names, generated chain and docs. Main's newmerge_keysfunction is retained exactly; base-game row attribution, pair union and the unequal-code duplicate error all remain. The production builder/scheduler, PSO preparation, rewriter, extractor, supported toolchain and generated chain are byte-identical to the broader tested integration below; only main's new discovery merge and incremental fixture paths require these additional checks. Final pinned lint321/321, zero new/stale; final range/main diff, ancestry and whitespace checks pass. An initial exact-head command omitted required DM_GAME and stopped before tests; the recorded successful run explicitly sets it.On tested integration
2bf7017b23117d80f287899c7ef7832af98152eaagainst main48dca7a4ad146afc05a01cbd200387d8854ebea7, 353 tests ran, 352 passed and one GPU tessellation test skipped. The 337-test suite covers bounded scheduling, overlapping discovery and new archive-reader ordering, source-driven streamed output/worker callbacks, PSO specialization/isolation and compute groups, cache fingerprints, serial LibHac synthetic-image extraction, function analysis/budgets, Mac/IPA packing, chain, regression harness and docs. Another 16 code-fingerprint, usage and environment checks passed. Native Python 3.14.6, Xcode27.2(27B52), supported Metal32023.922.4. The skipped tessellation GPU case requires t_tess; its two source/layout tests passed. No GPU tessellation claim follows.The actual builder CLI translated four authored keyed compute shaders in each of J1 threads, J2 threads, J2 process workers and warm J2 process cache. All16 shader builds succeeded; their MSL, reflection and metallib payload bytes were identical. Current combined chain:
a9482a3165eb. The universal extractor built successfully for both Mac architectures. Its fixture verifies normal multi-block and empty images, raw/wrapped strict failure preserving the old image, allow-damaged output and non-integrity read failures. No assertion, suppression, baseline or toolchain lock was relaxed.Pinned lint passed: 321 baseline findings, zero new/stale. Generated header/symptoms, exact-range impact, range-diff, full remaining diff, ancestry and whitespace checks passed. Source review proves main's fin/fin_worker, job_for/finish (including tessellation), all rewrite/reflection/entry/tess helpers and translator/lock unchanged. A prior 350-test run on
2a4645c66a1dde6f28b786f5749416ee3d389bd1passed, including supported Mac/iOS PCH/compiler checks; those PCH test/recipe/compiler inputs are byte-identical to final. Earlier integration fixture/import/type issues were corrected before this result; an initial private synthetic setup lacked two required empty/folder inputs, corrected without production workarounds.Impact: this tool path reaches NVN shader builds and rewriting broadly; BotW/TotK exercise driver constants and large profiles, Scarlet driver reads, Hades Vulkan selection and Balatro OpenGL selection. The fresh checks use generated inputs only. Real-game shader comparisons, complete host/GPU coverage, gameplay, measured first-build improvements and game-sized peak disk remain unavailable for this integration. Earlier large-image extraction and hardware limitations remain open. No game extraction/cache rebuild, signing, installation or benchmark was performed. Remote CI belongs to its separate cycle; local tests do not establish a fresh CI pass.
Historical validation and review resolutions
First builds overlap discovery and bound shader, rewrite and archive work. RomFS extraction stays serial after the reported large-image slowdown. Raw and wrapped integrity failures retain strict and allow-damaged handling.
Current rebase
693ef171770a08087577adb6fa117a7122b9c1aarebasesdc3751f0cde5f28813c0dde4524811724c486ce9onto mainbbea4c90f136f478e25228bc3d4ab33c77420f2ewith the original feature commit and message. The scheduler keeps main's HMMA imports and keyed package lookup. The overlapping scan uses main's escaped boot-NRO paths. Bounded PSO readers uselayer_outfrom reflection, with exact main pair-selection logic and content-based archive keys. Combined chain0eb19efddc62.python3 -B -m unittest -vwithDM_GAME=010015100B514000,J=2,DOTNET_ROOT=/usr/local/share/dotnetandDMSH_TEST_XLATEset to the bundled apphost:The six
IntegerPassThrougherrors reproduce with pinned main's function source and unchanged fixture. The fixture omitsdmsh_fetchfrom its extracted globals. Providing the real dependency in an isolated diagnostic passed all six. No fixture repair is included.dm.tools.tests.test_dmsh_layer_out). Actual keyed synthetic builds used 12 authored shaders atJ=1,J=2and warmJ=2on Mac and iOS. All 72 target libraries were present and payloads matched. Tool lock, generated docs and diff checks passed.5e1c1aec, whose Python/lint inputs are unchanged on this pin.Static impact shows three direct matches, one broad and 149 profiles without manifests. BotW and TotK cover NVN constants, Scarlet driver reads, Hades Vulkan and Balatro OpenGL. Current real-game comparisons, full native graphics validation and new performance measurements remain outstanding.
Earlier
dc3751f0on413e8808passed 424 tests and 72-library synthetic equality, with inherited lint 339/336.136e8613on62f6a52cpreserved both Unity and rewrite scheduling fingerprints, passed 211 tests and matched inherited lint 376/371. Both suites had zero skips.Earlier rebase and validation on
9e3fa000— 2026-11-08Candidate
9e3fa000cf553f46ed3bbe66151d59d759e601d7rebasesf5d2098a50d6c6bdeb31884b06336627a005d23eonto main555122a9069235441d5a88955105397ec6d53686with its original feature commit and message. The one conflict was the generated shader-chain header, nowd8b8c0fa644e. Review found the same 41 feature paths, unchanged feature patch lines outside that header, and all 83 upstream-only paths preserved. Main's per-component pixel output map, handle-table read changes, function-matched frame-step stubs, and updated Unreal fixed-rate matching are included. Its 2,000-capture flush policy and plain-compiler fallback are byte-identical to main. Render input preparation still uses--input-jobs, and main's--jobsstill controls compute archive workers. The archive key covers canonical configuration and referenced library bytes.Historical validation and limits
Native arm64 Python 3.14.6, macOS 26.6, Xcode 27.2 (27B52) and pinned Metal 32023.922.4 for Mac and iOS.
git diff --checkpassed.J=1,J=2, and warmJ=2on both targets. All 36 shader builds completed, the 72 target libraries were present, packaged payload bytes matched across all three runs, and progress and scratch files cleared.test_patches.pyand no stale entries. An isolated exact-main run reproduced the same diagnostic text and totals. The fixture and itsload_patchescode match main. This PR leaves the fixture and lint baseline intact.The exact-range impact report identifies three direct matches, one broad match and 149 profiles without usage manifests. The game comparison targets are Breath of the Wild and Tears of the Kingdom for NVN and driver-constant paths, Pokémon Scarlet for driver reads, Hades for Vulkan, and Balatro for OpenGL. Real-game shader comparisons, full graphics coverage, gameplay, and fresh first-build measurements remain outstanding for this chain. The earlier 785-test run belongs to
f5d2098a50d6c6bdeb31884b06336627a005d23e. The large-image extraction slowdown remains unresolved. RePOP gameplay remained stopped.Historical context: Validation commands for 9e3fa000
Distinct intermediate historical checks (all apply only to the named revisions):
f5d2098a50d6c6bdeb31884b06336627a005d23eon main01abf27977aa4a7366c4a14bc58d9eae75f1d8e6: 785 tests passed, zero skips; twelve authored compute shaders built Mac/iOS at J1, J2 and warm J2 with equal payload bytes. Preserved keyed packages, encrypted Unreal executable paths, accepted exclusive-window addresses, fixed-rate rewrite invalidation, compute archive workers and content-based keys. Pinned lint371/371. Game comparisons and new gameplay/performance remained unavailable.7fed17e186d7ee174439bc381dc3c1db66901410onb2d46b86d03f4b03afe11ea61c67cdf00d7a5345: 581 tests ran, 580 passed and one unmodified main Watcher fixture errored; the broad suite was not green. A separate inherited pairing fixture lacked the staged reader; supplying that real reader privately passed all five assertions. Both repairs were kept out of that feature refresh. Pinned lint371/371, 24 fingerprint/PCH/compiler checks and 28 chain/docs checks passed. The twelve-shader Mac/iOS three-run comparison used25e677066e2f84103c1bb6c2ab2064a3eddecb04, whose production/recipe inputs were identical to final (only Watcher-test restoration differed). No full-game equivalence, peak-disk or speedup claim follows.8164ef40a37ce9c66ee415ae6260119f8a96d904on865cc35fad7034d17c2190f8ce349f61f5bcaba1: 659 tests passed without skips after correcting the scheduler fingerprint and callback capture. Packed-input planning first failed with plain Path and passed with romfs.Path; archive hits materialized nothing. Three excess unchanged test_nso_match index findings reproduced on exact main (377/374 versus main390/387; blob042bc4320b0d2a1c22bf296c9877ece03108fb51). No baseline change. Main's ue_ring and PR rewrite_jobs fingerprints both retained.077d7a396152c026bde551aefcd51f62af5757a1onf8a5618d5f505a4c0a0bcac7c413872d3a53c009: 488 tests passed without skips, lint376/376. Captured NROs stayed with the first executable; CRA ranges, AppleDouble filtering and current cache tar behavior were retained. Then-available builds did not include the intended five game controls.These runs used native Python3.14 and supported Metal.922 where stated. Historical six-game results below used unsupported .620 and remain historical. Parallel RomFS extraction stayed withdrawn throughout; the large-image slowdown remains unresolved. No intermediate refresh established a new real-game speedup or gameplay result. Historical CI statements below belong only to their stated heads.
Original implementation, measurements, attribution and commit context (historical)
Integration and behavior
Fresh validation and current limits
432 affected tests pass with zero skips/failures/errors on correction revision 0ffb7b259ac5ca2f61c9b4b424cf22b05d19ac95; final ae39f94eac6b084edb89f86b8a9772a7b62317d6 has the identical tree. The suite covers scheduling overlap/order/errors, captured NRO and CRA preservation, worker allocation, NSO analysis, real serial LibHac image writing and raw/wrapped damage recovery on synthetic inputs, SARC bounded names, Vulkan/OpenGL targets, parallel packing, partial/seen builds and progress, grouped archive/key reuse, cache fingerprints, current containers, PCH compilation, combined pixel side libraries, chain and docs. Synthetic compiler probes use supported system Metal 32023.922.4 for both macOS and iOS. The production nx_extract project also builds in Release with .NET 10.0.402: zero warnings/errors. No game files or keys are used by those synthetic extraction fixtures.
The initial 432-test integration run exposed two failures and two errors: mocked archive plans bypassed required input preparation, an older batch test expected a one-base merge contrary to upstream's grouping boundary, and the new scheduler was missing from the shader-key fingerprint. The correction prepares real library metadata before synthetic plans, tests actual two-group prefetch reuse while retaining the boundary assertions, and adds scheduler fingerprint coverage. The corrected broad run above passes; the original failures are retained in private evidence.
Pinned Python lint against 975bb4c still fails only on main's unchanged dm/games/settings.py:115 ruff B023 (loop variable n in callback): 377 findings against 376 baseline, one new and zero stale. No unrelated repair, suppression or baseline change was made for that finding. Remote CI on this exact consolidated candidate is pending Agent 3 verification; local passing tests do not establish a current-head CI pass.
No new game benchmark, full game shader comparison or gameplay is claimed. Selected coverage would include Z-A (the measured discovery/pipeline path), Three Houses (LINKDATA preparation), Mario Kart World (task/mesh scheduling), Super Mario Galaxy (Vulkan) and Balatro (OpenGL). Current read-only inventory finds no installed Mac builds; no default harness Tree/worktree/prune calls were run in this refresh. These games remain unchecked. No actual game extraction/cache rebuild, signing or installation occurred.
Historical measurements and unresolved extraction finding
SevenSpiders' independent report compared cd859c3 to 2a8ee2e on a 10-core/16 GB Mac: the former parallel extraction was about twice as slow for a 3.5 GB image, while a 0.5 GB image improved about 2.4 times. The large-image cause was not identified. Parallel extraction was withdrawn and the serial path restored; this is not a claim that the slowdown was fixed. Other SARC/rewriter/split improvements, deterministic output checks and six-game/15,878-slot comparisons in that report retain their exact historical revisions. Its Metal 32023.620 override means library bytes are not comparable with supported-toolchain runs. The supported .922 compiler is now available here, but no new game shader comparison or timing run was performed.
All earlier measured tables, validation and limitations from the published description are retained below as historical context. Their old test, CI and performance results do not become results for the consolidated commit.
Validation command: python3 -B -m unittest -v dm.gfx.tests.test_shader_discovery dm.gfx.tests.test_dmsh_schedule dm.tools.tests.test_sarc_names dm.tools.tests.test_layer_targets dm.tools.tests.test_extract_image dm.tools.tests.test_function_parallel dm.tools.tests.test_rewrite_jobs dm.tools.tests.test_rewrite_parallel dm.tools.tests.test_romfs_read dm.ios.tests.test_pack_parallel dm.tools.tests.test_nsp_incremental dm.tools.tests.test_nsp_mac dm.tools.tests.test_pso_offline dm.tools.tests.test_shader_toolchain_cache dm.tools.tests.test_regress dm.tools.tests.test_usage dm.tools.tests.test_dmsh_code_fp dm.tools.tests.test_split_narc dm.gfx.tests.test_cra dm.tools.tests.test_uepak_iostore dm.tools.tests.test_nsp_progress dm.tools.tests.test_nsp_nup dm.tools.tests.test_nsp_nsz dm.tools.tests.test_nsp_scan dm.tools.tests.test_shader_pch dm.tools.tests.test_docs dm.tools.tests.test_nsp_chain dm.gfx.tests.test_dmsh_side, with DM_GAME=0100F43008C44000, DMSH_TEST_METAL=1, DMSH_TEST_METAL_SDKS=macosx,iphoneos and the exact bundled DMSH_TEST_XLATE. Production build: dotnet build dm/tools/nx_extract/nx_extract.csproj -c Release --no-restore -p:NuGetAudit=false.
Historical context: Original commit context — historical messages and integration rationale
These messages keep their historical revisions and validation scope; intermediate frontend wording is preserved as context, not a new requirement.
1f6c20ce1cedc05271ca9d1f464609e549d76c25 — seedds <[email protected]> (original published)
b9117cba9ad5196dce152a84777ef6f35ed10ffb — seedds <[email protected]> (original published)
6ff5b96f7be116b57e8105ce9496fe16971d553e — seedds <[email protected]> (original published)
22489fe91d3148d6c6c1352f74675b37e5df4607 — seedds <[email protected]> (original published)
361aa570f7760f846bef96c8e373f6adabff3d17 — seedds <[email protected]> (original published)
da505eeb11e02c93aa66046ce444488785e90d29 — seedds <[email protected]> (original published)
2d441826d8372899beee9e191aa2a74c76e6923d — seedds <[email protected]> (original published)
7d26a4c83851d660997bc992d0ba88ae206f2fec — seedds <[email protected]> (original published)
dd6c982ee2df82143ee3b18b065a6edfab423c3b — seedds <[email protected]> (local integration correction/context)
773742222697ca3a40426a1013d2fa95adcee82f — seedds <[email protected]> (local integration correction/context)
0ffb7b259ac5ca2f61c9b4b424cf22b05d19ac95 — seedds <[email protected]> (local integration correction/context)
Consolidated commit message
Historical context: Previously published validation, measurements and limitations — historical 7d26a4c83851d660997bc992d0ba88ae206f2fec
The following is the prior published description at its recorded revisions, not fresh current-head evidence.
This change reduces repeated work when packing a game for the first time. It keeps discovery results in input order, budgets concurrent rewrite analysis and IPA compression, builds the requested Vulkan/OpenGL targets, and starts shader jobs when their dependencies are ready. PSO preparation reads each unique library once and shares its function metadata and digest across eligible pairs.
Parallel RomFS extraction was withdrawn. A reviewer measured a slowdown on a large image on a 16 GB Mac. Its cause remains open. The extractor still streams serially, recovers after repeated damaged reads, and recognizes both the raw and translated integrity errors. The performance tables below measure individual stages. End-to-end speed and game memory usage remain unmeasured. Independent extraction report
Current validation
Rebased candidate
7d26a4c83851d660997bc992d0ba88ae206f2fecincludes mainbd98317eecfe832b40d401219c15207a398e78ddand preserves the current published head1007ae953a0e34b2d311f49e2c497a31d4a83c23, including its collaborator main-merge resolution. The final tree exactly matches a clean merge of those two revisions. Upstream sequential PSO batching and the PR's parallel preparation/digest sharing remain integrated: batch keys consume the prepared digests; reflections are released before compilation. The CI event-base prerequisite remains separate because main still lacks it. The two renderer-baseline update commits are already on main and were omitted; the generated symptom refresh is incorporated without losing entries. Serial extraction remains restored and the unresolved large-image slowdown finding is retained.bd98317eecfe832b40d401219c15207a398e78dd.git diff --check, full main-diff review and generated symptom/header checks pass. Chain42f0e14b3e2aand the tool lock are unchanged. PSO preparation/batching ASTs match the published integration; compiler invocation, descriptor streaming and archive-key encoding match main. The C-lint baseline equals main; no unrelated analyzer repair is included.regress.py impact bd98317eecfe832b40d401219c15207a398e78dd..7d26a4c83851d660997bc992d0ba88ae206f2fecidentifies Hades, Breath of the Wild, Pokémon Scarlet and Tears of the Kingdom through broad rules and 130 profiles with unknown coverage. Intended regression targets remain Pokopia/Three Houses (archive discovery), Splatoon Raiders/Bananza (different shader paths) and Z-A (large package/rewrite/PSO inputs). Only Z-A is installed locally and lacks a smoke route. Locked macOS/iOS Metal 32023.922.4 is missing under selected Xcode 27.2 (27B52), so current-chain rebuilds, real archive compilation, GPU validation, five-game comparison and gameplay remain incomplete. No compiler override/cache reuse or CI monitoring was used. Prior results below remain historical and are not relabeled as current validation.The final diff retains canonical build/archive-key documentation, durable findings and game reference links; it contains no agent plans or execution journals. Commands:
DM_GAME=010015100B514000 DOTNET_ROOT=/usr/local/share/dotnet python3 -m unittest -vacross the scheduler/discovery/PSO/pack/rewrite/NSP/docs/regression/Unity/GLSLC/Xcode modules; pinnedlint_python.py --against bd98317eecfe832b40d401219c15207a398e78dd;dmsh_chain.py;docs_symptoms.py;regress.py impact;tool_lock.py --check-tools(blocked only by missing Metal).Historical context: Earlier description and historical validation/feedback
This change reduces repeated work when packing a game for the first time. It keeps discovery results in input order, budgets concurrent rewrite analysis and IPA compression, builds the requested Vulkan/OpenGL targets, and starts shader jobs when their dependencies are ready. PSO preparation reads each unique library once and shares its function metadata and digest across eligible pairs.
Parallel RomFS extraction was withdrawn. A reviewer measured a slowdown on a large image on a 16 GB Mac. Its cause remains open. The extractor still streams serially, recovers after repeated damaged reads, and recognizes both the raw and translated integrity errors. The performance tables below measure individual stages. End-to-end speed and game memory usage remain unmeasured. Independent extraction report
Validation before the merge with main
Candidate
50974fcf2c206d13cd901940169a58d1c53c1364rebasesba9f1cc2fd1386df6c6e17c097109bca705b72adonto main50363b14ef9b19d0e8ade35d78812bdc8e7f8b96. First-build discovery, rewrite budgets, IPA compression, Vulkan/OpenGL target selection, dependency-ready shader scheduling and shared PSO input digests remain relevant: main does not implement those changes. The fixed main still scans executables serially. Its empty-GLSLC-capture explanation is preserved in the relocatedscan_mainsworker. The combined shader chain, regenerated from source, is42f0e14b3e2a.The separate CI prerequisite remains: lint workflows fetch
github.event.pull_request.base.sha, retaining the authored fix fromf07d8b24dc01f460d672ad99ebf0be4948aedf18. Main still fetches the moving base branch name. This prerequisite changes no production behavior or lint baseline rules. No feature commit was dropped. Range-diff retains all eight commits: six unchanged patches, one scan-diagnostic integration and the regenerated header. Source comparisons confirm upstream provisional-version selection, derived-profile handling and GLSLC capture/coverage functions match main, and every PSO function matches the previous feature head.After the first focused run, main advanced from
82246bd26444991e26ac3bbda2684d6e0219676ato50363b14ef9b19d0e8ade35d78812bdc8e7f8b96. The original PR still conflicted and the private candidate was rebased again. Its final tree exactly matches a clean merge of the testeddb5d77c1361352dc945c7d7c794eb5e4a8628274tree and the later main. All 41 feature-only paths remain byte-identical to that tested revision; all seven upstream-only paths are byte-identical to the later main. Their sole intersecting path is the generated symptom index, which regenerated without a change. This retains the new texture view, sparse-dirty tracking, bindless access and 3D dump work without modifying it. The existing 293-test evidence is retained on the basis of those input identities; it is labeled with its tested revision below.On arm64 macOS, native Python 3.14.6, .NET SDK 10.0.402 and Xcode 27.2 (27B52):
db5d77c1361352dc945c7d7c794eb5e4a8628274on main82246bd26444991e26ac3bbda2684d6e0219676a, the focused command below completed 293 tests: 292 passed and one skipped. The skip is the optional real iOS Metal-library compile because its compiler component is unavailable. Tests cover serial LibHac extraction and damage handling, discovery overlap/source order and context restoration, bounded shader scheduling, rewrite budgets, IPA compression, requested graphics targets, PSO metadata/digest sharing and archive reuse, chain headers, incremental/NUP packaging, regression selection, docs, upstream stripped Unity layouts/GLSLC extraction and Xcode staging. The five synthetic extraction tests build and run the real C# writer against LibHac 0.19.0; no game files are used.50974fcf2c206d13cd901940169a58d1c53c1364, the docs, chain, PSO, shader-discovery, incremental-packaging, Xcode-workflow and CI-toolchain modules completed 134 tests: 133 passed and the same optional Metal test skipped. The actual relocatedscan_mainswas also exercised with the explicit game profile, confirming main's empty-capture explanation and unchanged empty scan result.metal-ttor game RSS measurement.dm/tools/lint_python.py --against 50363b14ef9b19d0e8ade35d78812bdc8e7f8b96reports 378 baseline findings, zero new and zero stale.git diff --check, source/header checks and documentation tests pass. The final diff contains no agent planning or execution artifacts. Durable findings/reference links remain in their intended docs; unresolved extraction and end-to-end performance limitations are retained.tool_lock.py --check-toolsexits 1: translator/SPIRV-Cross match, but locked macOS and iOS Metal32023.922.4are missing from the selected Xcode. The lock is unchanged; no override or prior shader cache was used. Full current-chain Mac/iOS shader rebuilds, real archive compilation, GPU tests and runtime performance coverage remain incomplete. No gameplay or CI monitoring was performed in this pass. Earlier CI does not validate this candidate.Earlier focused command at
db5d77c1361352dc945c7d7c794eb5e4a8628274(22 modules; final subset listed above):Impacted games and available coverage. The fresh manifest scan (
regress.py impact 50363b14ef9b19d0e8ade35d78812bdc8e7f8b96..50974fcf2c206d13cd901940169a58d1c53c1364) identifies four broad profiles—Hades, Breath of the Wild, Pokémon Scarlet and Tears of the Kingdom—and 130 unknown profiles. Pokopia and Fire Emblem: Three Houses cover indexed archive discovery; Splatoon Raiders and Donkey Kong Bananza cover different shader paths; Legends: Z-A covers large RomFS, rewrite and PSO inputs. These are the five intended local-game regression targets. The read-only inventory finds only Z-A v393216, with no smoke route. Together with the missing locked compiler, this prevents a current five-game comparison. This pass claims no shader-output comparison, game timing or gameplay pass.Historical validation. At
09bcd4a9f9454000ef82afa2ea3c29745df412e1onad7af9cb34f5728bb0704c619ed12ebad9e6cf9a, 265/266 focused tests passed (one missing-compiler skip), the 55/56 final subset repeated that skip, the Release extractor build and five synthetic tests passed, and pinned Python lint had no new/stale findings. At9c74ff28, 185 focused tests passed and the queue-origin fixture passed 398 assertions per encoder mode with Metal validation. At7cfccbd1, 341 Python tests passed, the Mac host built, and a 32 MiB sparse package exercised 128 shader records with record-sized reads. These results and independent feedback below concern their stated earlier revisions.Historical measurements
Apple M2 Max, macOS 26.6, native ARM Python 3.14. These are individual stage timings, not a complete first-build or cold-disk speedup.
Historical scheduling measurements
Comparison: prior PR head
2a8ee2e5versus the earlier scheduling implementation. Alternating runs use separate fresh output directories. Shader/Metal caches start empty with no prefill; filesystem caches are not purged. Shaders use eight workers, rewrite uses the automatic budget, and PSO preparation uses eight readers.main+sdkrewrite stageShader and rewrite timings were noisy under filesystem event processing and Spotlight indexing. Shader ranges: baseline 113.822–160.096 s, candidate 113.126–136.036 s. Rewrite ranges: baseline 21.969–37.801 s, candidate 22.808–48.868 s. These medians do not establish precise gains, especially the 5.6% shader result. PSO runs were baseline 24.118, 9.400, 8.862, 7.959, 8.582 s and candidate 7.215, 7.093, 6.983, 6.525, 6.627 s; the median includes all five, including the first baseline outlier.
HASH. Of 2,851 libraries, 75 variant libraries in the first comparison differed only in those symbols/hashes: scheduling can select a different first source filename for shared identical MSL. All other bytes matched; raw outputs are retained. Scratch runs explicitly usedDM_ALLOW_OTHER_METAL=1with installed Metal32023.921.6, not pinned32023.922.4.build_src.sha256source fingerprint.metal-ttcompilation. Inputs were isolated fromb-b7cd656abd7c. An earlier empty-input attempt was discarded and is not included in the results.Earlier first-build improvements
These earlier stage benchmarks compare saved pre-change sources and were recorded before the publication rebase onto
cd859c38. They have not been rerun or relabeled as timings of the latest commit. They use fresh outputs and warm filesystem caches on the same machine. Their baseline differs from the scheduling measurements above; the percentage reductions cannot be added.mainNSO rewritemainPatched code and all six rewriter tables matched;
build_src.sha256intentionally changes with the source. All 16 shader packages/tables matched, covering 28,603 shaders. Shader timings were noisy: baseline 16.395–29.172 s, candidate 15.310–29.586 s, with system indexing active during slow rounds.SARC members and decompressed ZIP payload hashes matched. IPA sizes were unchanged for incompressible input, 151,683,065 → 151,632,138 bytes for mixed input, and 880,171 → 880,514 bytes for compressible input. A 4 GiB + 17 byte Zip64 fixture passed Python CRC and
/usr/bin/unzip -tchecks. Synthetic Vulkan/GL iOS libraries and tables were byte-identical; these runs used installed Xcode 27.0, not the pinned 27.2 toolchain.Independent coverage of the earlier published revision
SevenSpiders compared
cd859c38against2a8ee2e5on a 10-core / 16 GB Mac, macOS 26.1, Xcode 16.4 / Metal32023.620, withDM_ALLOW_OTHER_METAL=1. This is attributed external evidence for that earlier head, not validation of the later scheduler or the current review changes.Total: 15,878 successfully built shaders; Strikers' three other shaders failed identically on both sides. The reviewer also reproduced SARC, rewrite and discovery improvements, byte-identical outputs and damaged-file reporting. Runtime-root and derived-profile setup are now documented, including the distinction between the harness's automatic profile selection and direct shader-tool invocation.
Verification of the queued lint job
At
09bcd4a9, the full clang-tidy scan matched all 268 baseline findings, with zero file/check pairs above or below their counts. The job then compared that snapshot against a later main revision and reported false growth int_movie_vpx.c(1 to 2).This branch carries only the workflow and developer-guide commit
f07d8b24from #1060. Both lint jobs fetch the base SHA in the PR event. In a temporary Git repository with two successive base commits, running each workflow’s fetch command selected the event SHA after the branch advanced. Locally, the C comparison reproduced the reported failure againstfd14f3bcand passed against the tested basead7af9cb. Both C and Python rejected deliberately increased counts. All 40 tests inpython3 -m unittest dm.tools.tests.test_lint_c dm.tools.tests.test_lint_python dm.tools.tests.test_docspassed onba9f1cc2. This repair changes CI inputs and developer documentation only.Metal fixture lint baseline
The failed scan on
50974fcffound 265 warnings against a baseline of 267. The two obsolete RetainCount allowances were also present on the tested base50363b14. LLVM 23.1.4 stopped reporting them int_queue_origin.mandt_view_levels.mwhen upstream changed the texture serial cache at6fc34217. This branch carries the two fixture-row removals from #1141.At
6222229a, the full local 225-source scan (python3 dm/tools/lint_c.py tidy -j4 --against 50363b14, aftercompdb --game 010015100B514000) matched all 265 findings with zero new or stale file/check pairs. All 19 C lint tests passed. Restoring one fixture allowance in a negative control failed the baseline-growth check.git diff --checkpassed. The repair changes only the baseline. Existing game and frame-time validation in this description applies to the feature as previously tested.CI validation on
1007ae95The merge with main
6ddeda92preserves parallel shader input preparation, sequential PSO compilation batches and filtering of AppleDouble metadata. Both GLSLC capture and Unreal archive fixtures produced byte-identical outputs with one and three workers. Malformed real shader inputs still failed.The full C analyzer scan across 226 sources initially found three fewer warnings than the inherited renderer counts. This branch carries the measured reductions from #1141. LLVM 23.1.4 then matched all 262 baseline findings. The pinned Python linters matched all 378 findings. Both comparisons used the integrated main revision.
The focused suite ran 329 tests with one optional skip. The final revision also passed the patch registry, C lint, documentation, PSO and external shader tests, with one optional skip among 85 tests. The five-game regression command stopped because only Legends Z-A had a local Mac build. The locked Mac and iOS Metal compilers were unavailable, so these results cover synthetic inputs and exclude gameplay and real archive compilation.
Historical context: Preserved published commit message
Original published
ae39f94eac6b084edb89f86b8a9772a7b62317d6; its rebased candidate retains the same authorship and exact message. Any results named here belong to their original revisions.