Repository navigation
Conversation
Users building on macOS 26 got corrupted pictures (seedds#242): the shader chain is tested with the Metal compiler in dmsh_chain.lock (32023.921, Xcode 27.1), but own_compilers.py, through which the NSP script builds every NVN game's shaders, let any Metal compiler through with one note line, and the README named no Xcode version. - own_compilers.py: another Metal compiler (macOS or iOS) stops the build with a message naming the Xcode to install and the Metal toolchain download, unless DM_ALLOW_OTHER_METAL=1, which builds with it and says so in the note line. spirv-cross may still differ (a note, as before). A missing compiler or another translator fails as before. own_compilers.py is not one of the chain's fingerprinted files: the chain version does not change. - NSP script: check_metal runs own_compilers.py --check-metal before an NVN game's captures and shader split, so a Mac with another Xcode stops in seconds instead of after the split; ALLOW_OTHER_METAL / --allow-other-metal skips it and passes DM_ALLOW_OTHER_METAL to the shader step (modelled on ALLOW_SHADER_REGRESSIONS). Vulkan and OpenGL games do not use the lock and are not checked. - README: the build Mac needs macOS 26.6 or later with Xcode 27.1, and the Metal toolchain (xcodebuild -downloadComponent MetalToolchain). docs/development.md, dm/gfx/README.md and docs/env_switches.tsv describe the check and the override. - dm/tools/tests/test_own_compilers.py: the stop (macOS and iOS), the override, spirv-cross as a note, missing compiler and translator mismatches, --check-metal, and the NSP script's check, flag and environment.
test_xcode_workflow runs the NSP script's main for an NVN fixture with every step stubbed; check_metal ran the real own_compilers.py --check-metal, which stops on the CI runner's Xcode. Stub it like check_prereqs.
f85b568 to
cee9b90
Compare
Incorporate the tested Metal compiler requirement and reproducible universal SPIRV-Cross build from PRs #333 and #337. Credit v0lumehi for the compiler guard, bundled converter, build recipe, licences, tests and documentation. Require the pinned converter for NVN builds. Include actual compiler/SDK identities in shader and fetch-variant cache keys, stamp every library's compiler provenance, and reject foreign or unmarked libraries during prefill. Bump the Metal cache format to discard entries older prefill could misclassify. Fingerprint selected converter overrides in NSP and regression keys, and keep subgroup CI coverage on the bundled converter. Two independent converter rebuilds match the committed binary. Comparisons on Galaxy 2 and Balatro produce 3,830 identical MSL outputs. The 420-test Python suite, pinned lint, graphics suite, Mac host and Mac/iOS TACTICS shader build pass. The two-game shader regression report has no new failures or MSL changes; TACTICS variants differ only in provenance metadata. The full local game sweep remains incomplete. Issue #242's rendering cause is unconfirmed. Co-authored-by: v0lumehi <aljic.zijad@gmail.com>
|
Thanks, @v0lumehi. Incorporated this PR and #337 into The early tested-Metal check, installation guidance and explicit override are retained. I also fixed the shared cache paths that could otherwise restore libraries built by another compiler: shader and fetch-variant keys include the actual compiler/SDK identity, every prefilled library must carry matching compiler provenance, and the Metal cache format is bumped to reject previously misclassified entries. The bundled SPIRV-Cross must now match the lock even when another Metal compiler is explicitly allowed. This is general shader-build behavior, with no per-game rule. Validation after rebasing onto current main: all 53 Python test files pass (422 tests), pinned lint has no new findings, and the graphics suite passes. A complete TACTICS shader build passed for Mac and iOS, with compiler provenance checked on all 312 library reflections per platform. The report below covers shader builds for TACTICS and Super Mario Galaxy 2. TACTICS' sole CHANGED item is geometry reflection metadata ( Local shader regression reportregress.py check (full): CHANGEDBaseline
FINAL FANTASY TACTICS - The Ivalice Chronicles
|
Incorporate the tested Metal compiler requirement and reproducible universal SPIRV-Cross build from PRs seedds#333 and seedds#337. Credit v0lumehi for the compiler guard, bundled converter, build recipe, licences, tests and documentation. Require the pinned converter for NVN builds. Include actual compiler/SDK identities in shader and fetch-variant cache keys, stamp every library's compiler provenance, and reject foreign or unmarked libraries during prefill. Bump the Metal cache format to discard entries older prefill could misclassify. Fingerprint selected converter overrides in NSP and regression keys, and keep subgroup CI coverage on the bundled converter. Two independent converter rebuilds match the committed binary. Comparisons on Galaxy 2 and Balatro produce 3,830 identical MSL outputs. The 420-test Python suite, pinned lint, graphics suite, Mac host and Mac/iOS TACTICS shader build pass. The two-game shader regression report has no new failures or MSL changes; TACTICS variants differ only in provenance metadata. The full local game sweep remains incomplete. Issue seedds#242's rendering cause is unconfirmed. Co-authored-by: v0lumehi <aljic.zijad@gmail.com>
Require the Metal compiler the shaders were tested with
Part of #242.
Symptom. Players building on macOS 26 get corrupted pictures. The shader chain is tested with the Metal compiler in
dm/gfx/tools/dmsh_chain.lock(Apple metal version 32023.921, Xcode 27.1, which needs macOS 26.6 or later). The NSP script builds every NVN game's shaders throughown_compilers.py, which let any Metal compiler through with onenote:line, and the README named no Xcode version.Fix. The tested Metal compiler becomes a requirement; another one stops the build unless asked for.
dm/gfx/tools/own_compilers.py: a Metal compiler (macOS or iOS) other than the lock's stops the build with one[RED]line. The line names both versions, Xcode 27.1 / macOS 26.6,xcodebuild -downloadComponent MetalToolchainand the override.DM_ALLOW_OTHER_METAL=1builds with it anyway, and thenote:line then names the override. spirv-cross may still differ, with the note as before: Homebrew builds it from source on macOS 26, so its fingerprint never matches there even at the same version, and Pin spirv-cross with the translation chain #337 pins it with the chain. A missing compiler or another translator fails as before.scripts/build_ipa_from_nsp.py:check_metalrunsown_compilers.py --check-metalas soon as the graphics API is known, before an NVN game's captures and shader split. A Mac with another Xcode now stops in seconds, not after the split.ALLOW_OTHER_METAL = True/--allow-other-metalskips the check and passesDM_ALLOW_OTHER_METAL=1to the shader step, the same pattern asALLOW_SHADER_REGRESSIONS(b117c91). Vulkan and OpenGL games don't use the lock, so they are not checked.xcodebuild -downloadComponent MetalToolchain(since Xcode 26 the Metal toolchain is a separate download).docs/development.md,dm/gfx/README.mdanddocs/env_switches.tsvdescribe the check and the override.Not a chain bump.
own_compilers.pyis not one of the filesdmsh_chain.pyfingerprints, soDMSH_CHAINstaysa4e2088c2e69and existing libraries stay valid.dmsh_build.pyrun directly (the maintainer's path) keeps its strict check of every tool.iOS path. The lock has both
metal_macosxandmetal_iphoneos, and both are checked the same way, also in a Mac-only build (both come from the same Xcode).ios_metal.pyis unchanged.Checked
dm/tools/tests/test_own_compilers.py(new, 10 tests):--check-metalreports correctly;ALLOW_OTHER_METAL, parses the flag, and passesDM_ALLOW_OTHER_METALto the shader step.xcrunthat reports 32023.850:--check-metalexits 1 with the message, or 0 with the override.own_compilers.pystops before translating anything, and with the override it goes on and prints the note. With the real Xcode 27.1 (macOS 27.0, M-series),--check-metalexits 0 and the build passes the tool check.dm/ios/tests/test_xcode_workflow.pystubscheck_metallikecheck_prereqs(it runs main for an NVN fixture; the real check stops on the CI runner's Xcode).test_docs,test_env_switches,test_nsp_mac,test_nsp_chain,test_nsp_incremental,test_shader_regressions, andlint_python.pywith the pinned tools (the baseline losesown_compilers.py's three Optional-subscript findings).