Commit Graph

162 Commits

Author SHA1 Message Date
8a84bf5b58 Merge pull request #2815 from iurysf 2026-11-22 15:12:16 -05:00
2fa446e5ef Merge pull request #2802 from Leonardo Guimaraes 2026-11-22 15:12:10 -05:00
7b7971b5d8 Merge pull request #2790 from Leonardo Guimaraes 2026-11-22 15:12:00 -05:00
969fc633b4 Merge pull request #2194 from Matheus Gomes 2026-11-22 15:10:19 -05:00
aa780e3c7f Merge branch 'main' into perf/wave64-emulate-dead-scc-exec-fold 2026-11-22 16:04:21 -04:00
b80e1f8717 make_game: credit only finished asset steps, never links or junctions
Review of #2790: the discount counted every regular file under <work>/assets,
so unrelated files or a step that stopped before its marker could let a short
drive through, and an NTFS junction (is_dir(follow_symlinks=False) is true for
one) was walked and counted.

assets_bytes_on_disk() now counts only the output of steps assets() skips on a
rerun: an archive's models/textures folder with its manifest.json, a texture
pool whose manifest ttpf_manifest() accepts, the audio banks once
audio_manifest.json exists, and audio/ogg or audio/xma once their .done marker
is there. Symbolic links and junctions are skipped, including <work>/assets
itself.

On a real stopped export the credit drops from 319.0 to 294.6 GiB; the
difference is the audio bank step that stopped before its manifest.
2026-11-22 16:51:46 -03:00
f847748cc7 Merge origin/main (7 pull requests merged on GitHub)
# Conflicts:
#	docs/design.md
#	tools/psin_data.py
2026-11-22 14:46:26 -05:00
adf687993d Merge upstream main into the Windows pipeline checker fix
Keep the pipeline crash-recovery code and the upstream translated-shader preflight while resolving the checker path once per selected runtime build.
2026-11-22 16:27:33 -03:00
3a52b21f3d README, make_game.py: name skipped shaders; fix the docstring's cache claim
Review follow-ups on #2815 (RT-191):
- vk_pipeline_check reports shaders whose features or partner stubs are
  unavailable as skipped rather than failed (vk_pipeline_check.cpp:8-9),
  so the README now says the stage reports any it has to skip.
- make_game.py's module docstring still said the cache is saved "so the
  first boot doesn't compile", which contradicts the README; it now says
  the stage builds pipelines for every shader (not only compute), reports
  rejected and skipped ones, and that the runtime doesn't load the cache yet.

Written with AI assistance (Claude, via OpenBot).
Tested: python -I tests/test_docs_*.py, test_i18n_index.py,
test_text_write_line_endings.py and every tests/test_make_game_*.py pass;
compileall clean (Windows 11, Python 3.14; no GPU involved).

Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
2026-11-22 16:04:56 -03:00
355e67cbc4 Merge remote-tracking branch 'origin/main' into perf/wave64-emulate-dead-scc-exec-fold
# Conflicts:
#	make_game.py
2026-11-22 14:39:18 -04:00
81e0392f97 docs: document the low-disk run-only build and hint it in preflight 2026-11-22 18:32:05 +00:00
88475899c8 make_game: name a packaged XVC/XVD container instead of "not found"
The store keeps the game as one .xvc file, an XVD container whose contents
are encrypted. Pointed at it with --game, the build said "Game folder not
found"; pointed at a folder holding only that file it said "doesn't look
like a supported version"; --find skipped it silently.

Read the plain 4 KiB header (msft-xvd magic at 0x200, VolumeFlags,
ContentType, XvcDataLength, PackageVersion) and say what the file is and
that the build needs the folder holding MicrosoftGame.Config. Nothing is
decrypted and no key field is read. --find lists such files as "not
usable"; the not-found message, the pasted-folder prompt and --pick's
warning name the containers they saw.
2026-11-22 15:19:44 -03:00
d49b8e78e6 make_game: preflight counts an asset export that stopped part-way
#905 leaves the assets stage's 300 GB out of the space check only when the
export finished (xma.done). A run stopped after the models, textures and most
texture pools still asked for the full 330 GB, so a drive that already held
270 GB of that export and had 205 GB free refused to resume, although the
stage skips every finished step.

When the free space is short and the assets stage is selected, preflight now
subtracts the whole GB already under <work>/assets (capped at the 300 GB
estimate) and logs it. assets_bytes_on_disk() is one os.scandir walk that
does not follow links; it runs only in that short-on-space case. A fresh
folder still needs the full amount, and --wav still counts the whole
estimate, as in #905.
2026-11-22 15:17:11 -03:00
0ddeddc611 Merge pull request #2585 from Marco Luzzaro 2026-11-22 13:16:21 -05:00
fcac437afb Merge pull request #2561 from Vonsek 2026-11-22 13:16:11 -05:00
5d7d68ddf4 Merge pull request #2508 from whoalin1 2026-11-22 13:15:49 -05:00
500f38531f Merge pull request #2378 from skipper 2026-11-22 13:14:24 -05:00
ec8ec4c9a4 Fix what the round-40 merges broke
- docs: one row per topic again in design.md (59 topics merged sentence by sentence, keeping every
  number) and README.md (the current models/character rows); one Other languages line.
- docs/i18n: the two Spanish quickstarts had been concatenated; keep #1912's, drop #2277's row.
- make_game: the shader fingerprint covers spirv_asm.py and its tables; LF settings write.
- tools: pe_shader_containers, gamedata_maps and anim_rigs use report_paths.same_report_path (BUILD-589);
  stdout guard on five tools; LF text writes in three; user_sgpr_census tolerates an unreachable --json.
- tests: fspx stage fakes write real carve/unpack indexes (c7408a1f); typed f16 stores round toward zero
  (SHADER-358); test_ci_registration's helper is no longer collected as a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 12:55:07 -05:00
ca85d3e2a3 BUILD-667: repair empty disassembly listings
Treat zero-byte listings as missing during preflight and resume, matching the disassembler. AI-assisted.
2026-11-22 18:44:03 +01:00
bf6c37182f BUILD-667: validate completed disassembly inventory
Keep the expected output set through interrupted repairs and preserve valid listings.
2026-11-22 18:30:56 +01:00
32c0105514 fix(build): rebuild FSPX caches with missing modules
Matching build settings could hide an incomplete shader cache and leave missing runtime upscaler modules after a rerun.
2026-11-22 18:29:17 +01:00
6b783318b3 BUILD-667: resume interrupted shader disassembly
Depends on: #2031. AI-assisted.
2026-11-22 18:24:00 +01:00
542d028004 Merge remote-tracking branch 'origin/main' into perf/wave64-emulate-dead-scc-exec-fold
# Conflicts:
#	docs/design.md
#	tools/rdna2spirv.py
2026-11-22 13:23:16 -04:00
1064a48b09 make_game: expose maxPushConstantsSize and auto-enable --pc-tail-ubo
Read VkPhysicalDeviceProperties.limits.maxPushConstantsSize (offset 328 on
64-bit) in tools/vk_subgroup_info.py and expose it as max_push_constants_size.

Add --pc-tail-ubo to make_game.py's forwarded translator fallback flags (so it
reaches translate(), fspx_shaders(), preflight(), and spirv/translator_flags.txt)
and enable it automatically for the shaders stage when the GPU the runtime would
use reports maxPushConstantsSize below what the shaders need (144 bytes, or 152
with --mesh-compute).

Co-Authored-By: Gemini 4 Neon <noreply@google.com>
2026-11-22 19:17:34 +02:00
d811bde9fa fix: use native wave64 on AMD Windows RDNA1 (BUILD-629) 2026-11-22 18:45:41 +02:00
b75eef50f5 Merge pull request #2142 from Samu3k 2026-11-22 11:42:11 -05:00
c97e961387 Merge pull request #2111 from Thatters 2026-11-22 11:41:53 -05:00
25b26262a8 Merge pull request #2110 from markankamaransheogarat-sys 2026-11-22 11:41:53 -05:00
1c8122056e Merge pull request #2055 from FreddyxS 2026-11-22 11:41:17 -05:00
8e8ab7f457 Merge pull request #2031 from CryingLaughing 2026-11-22 11:41:03 -05:00
2a1bd0399d vk_pipeline_check: a module is in flight from vkCreateShaderModule on, tagged module or pipeline
Review of #2111 (@Pipodi): the in-flight table got its entry only just before vkCreateComputePipelines /
vkCreateGraphicsPipelines, so a thread busy in vkCreateShaderModule (or a large module there, alone behind
compile_gate) was invisible: the watchdog never named it, and --inflight-file couldn't name a module that died there.

- The entry is made once the worker holds compile_gate, before vkCreateShaderModule, with phase "module"; it becomes
  "pipeline" when the pipeline is created, and is removed on every path out of the loop (a pipeline, a skip, a failed
  module). A module over --large-module-bytes writes the file when it enters the driver, not only at its pipeline.
- --inflight-file lines are "name<TAB>phase"; make_game.py reads the name.
- The watchdog says "still creating the shader module of X" or "still compiling X".

Waiting on compile_gate is not in the table: that thread isn't in the driver.

Tested on Windows 11 Pro 25H2, MSVC 14.51 + Ninja, RTX 5070 Ti / 621.24: the crash end-to-end through
make_game.pipelines on 62 real compute modules (skipped, the other 61 checked); the in-flight file at a simulated
crash reads "<module>\tpipeline" and is empty after a clean pass (62/62). tests/test_make_game_pipelines.py writes the
tab format; all 14 test_make_game*.py files pass. No new warnings. No game data. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:34:50 -05:00
49475796c2 Fix tests the round-39 merges broke
- test_translate: #1904 caps structured depth at 16, so the #1993 dispatch-loop test lowers MAX_STRUCTURED_DEPTH.
- test_ctest_registration: skip-code scan ignores conditional returns.
- test_d3d12_stubs_generation: INCLUDE uses os.pathsep.
- docs/README.md: one Other languages line.
- first_light.py, make_game.py: LF text writes; stdout guard on three tools.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:31:20 -05:00
0c45e9a569 Pipelines stage: use the new checker options only when the build has them; the checker rejects unknown options
Review of #2111 (@matheuskshn): a vk_pipeline_check built before this PR takes any argument it doesn't know as the
cache path. Run with --inflight-file F, it would write the Vulkan pipeline cache into F and exit 0; make_game.py would
then delete F and report success, with no pipeline_cache.bin. That happens with a reused runtime build or a supplied
Windows build (#2194).

- make_game.py asks the checker first: run without arguments it prints its usage before touching Vulkan, and only a
  build that lists --inflight-file and --skip-file gets them and the crash retry. An older build runs exactly as before
  (one call, a crash stops the stage), with a log line saying to rebuild the runtime stage for crash recovery.
- vk_pipeline_check: an unknown --option or a second positional argument is now a usage error (exit 2) instead of
  silently becoming the cache path, so the next new option can't be swallowed the same way.

Tested on Windows 11 Pro 25H2, MSVC 14.51 + Ninja, RTX 5070 Ti / 621.24:
- checker_supports: True for this build, False for a 6a6704df build (before this PR).
- the new checker: --no-such-option and a second cache path exit 2 with a message.
- make_game.pipelines on 62 real compute modules: with this build and a simulated crash, the module is skipped and
  the other 61 checked, as before; with the 6a6704df build, one call without the new flags, exit 0, and the cache in
  pipeline_cache.bin (6.7 MB), nothing written to pipeline_inflight.txt.
- tests/test_make_game_pipelines.py: 11 tests, 2 new (an older checker gets the old invocation and isn't retried;
  support is read from the usage line). All 14 test_make_game*.py files pass.
No game data. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 11:25:07 -05:00
a00b5f3fc5 build: reuse the supplied Windows Vulkan pipeline checker
Resolve the optional checker beside the supplied Windows runtime files before looking in the local build, and use the same choice during preflight and the pipeline stage. Preserve native Linux checker selection.

AI-assisted.
2026-11-22 13:14:02 -03:00
b2497541e6 Merge remote-tracking branch 'origin/main' into perf/wave64-emulate-dead-scc-exec-fold
# Conflicts:
#	docs/design.md
2026-11-22 12:11:36 -04:00
4eb09bf611 Check shader input before building the Vulkan pipeline checker
When pipelines is selected without shaders, require the translated shader index during preflight. A combined build can still generate the index in its shader stage.

AI-assisted with Codex. CPU-only synthetic validation: 294 focused tests passed in WSL (2 skipped), and 14 pipeline preflight tests passed on Windows.
2026-11-22 17:01:57 +01:00
5c65621230 make_game: terminate and reap shard processes on translate() abort 2026-11-22 15:58:45 +00:00
05686f15a4 Pipelines stage: a module that takes vk_pipeline_check down is skipped and the rest is still checked
Since dcd8ecf the two #881/#884 giants pass spirv-val and are back in the corpus. On NVIDIA the larger one runs the
driver's compiler out of memory (LLVM ERROR: out of memory, exit 0x80000003), vk_pipeline_check dies with it, and the
pipelines stage stops: on @VeTkN's RTX 5070 (#884, c603b8f) about 5,750 pipelines after it were never checked or
cached, and make_game.py exited 1.

vk_pipeline_check:
- --inflight-file F keeps the names of the modules being compiled in F. It is rewritten when a module over
  --large-module-bytes starts or finishes (those compile alone, #903, so F then names exactly that module), by the 5 s
  watchdog for the others, and emptied at the end of the pass.
- --skip-file F: modules named in F are not compiled; each is reported as `MODULE CRASH <name> (<stage>, killed the
  driver in an earlier run; not retried)` and counted as a failed pipeline, as --isolate does on POSIX. --isolate
  passes it on to its children. A missing F is a usage error (exit 2).

make_game.py, pipelines stage:
- runs the checker with --inflight-file. When it exits other than 0, 1 or 2 (a crash, not Ctrl+C), the modules in
  the in-flight file are added to pipeline_crashes.txt and the checker runs again with --skip-file; what was already
  compiled comes back from pipeline_cache.bin (checkpointed every 10 minutes). If several modules were compiling, each
  is tried alone (--start/--count in the checker's name-sorted index) and only those that crash alone are skipped.
- a crash no module can be named for is not retried, nor is Ctrl+C, and there are at most 5 restarts.
- the stage still fails when anything failed, now after checking everything else, and names the modules that took
  the driver down. pipeline_crashes.txt is cleared at the start of each pipelines stage, so a module gets a fresh
  chance after a translator change.
- run() takes check=False and returns the exit code.

The --isolate child-process mode stays POSIX-only; with a multi-GB pipeline cache per child it is too heavy for the
default path. A memory cap for the checker on Windows, so the OOM doesn't take other programs down, is a follow-up.

Tested on Windows 11 Pro 25H2, MSVC 14.51 + Ninja, RTX 5070 Ti / 621.24:
- tests/test_make_game_pipelines.py: 6 new cases (a named crasher is skipped and the rest checked; several in flight
  are tried alone and only the crasher is skipped; no suspect or Ctrl+C is not retried; the retry limit; a clean run is
  one call and an old skip list is dropped). All 14 test_make_game*.py files pass.
- end to end on 62 real compute modules from my own copy's work folder (2 over 4 MiB), through make_game.pipelines:
  with VK_PIPELINE_CHECK_SIMULATE_CRASH on one large module, the first run died (exit 3), the in-flight file named
  that module, the second run checked the other 61 (all ok) and saved the cache, and the stage failed naming it.
  Without the hook: one call, 62/62, exit 0. The in-flight file is empty after a clean pass.
No game data. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:58:37 -05:00
27259ecf86 make_game: include wave64_emulate_opt.py in TRANSLATION_SOURCES 2026-11-22 11:54:18 -04:00
f7300f21fc fix(build): preserve the resolved LLVM_MC executable path 2026-11-22 16:44:13 +01:00
1354612b91 Merge pull request #1927 from Tayar 2026-11-22 10:39:30 -05:00
c7408a1f7e Keep stale shader files out of resumed builds
Select each stage's inputs from its producer index and refresh downstream
stages when a saved cache contains obsolete shader names.
2026-11-22 23:35:45 +08:00
d9f7ec4162 Merge upstream main
# Conflicts:
#	tools/fspx_unpack.py
2026-11-22 10:28:36 -05:00
6a16ac1436 FSPX lookup: a kind-0 state key next to the code key; ambiguous programs are refused (RT-99 review)
Review on #1911: two containers with the same kind-6 program and different kind-0 entries (32x1x1 and 64x1x1)
translate to different modules but got the same fspx_code_sha256, so both resolved to the same pipeline.

- tools/fspx_unpack.py writes the kind-0 entry as fspx/<name>.state; tools/shader_meta.py records its SHA-256 as
  fspx_state_sha256 next to fspx_code_sha256.
- make_game.py: entries with the same code and state keys must have identical modules, otherwise the FSPX step fails
  naming both programs and drops the index. The same code key with other state keys is allowed.
- runtime: a container or bare payload (kinds 0 and 6 present) matches the code key and then the state key; no match
  is E_INVALIDARG. A bare kind-6 program (slot 67, no kind 0) takes the code key's entries when their modules are
  identical, and is refused with E_INVALIDARG and an "ambiguous" log line when they differ.
- Tests: the review case in tests/test_fspx_shaders_stage.py, shader_library_test and d3d12_fspx_compute_test.
- docs/fspx.md: the two keys and the ambiguous case.

On 1.0.2.1 the 29 kind-6 programs are distinct, so nothing resolved wrongly before: 17 translated entries, 17
distinct code keys, 17 distinct (code, state) pairs, all 17 found from the container and from the bare program.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 10:28:07 -05:00
d625f4fd12 make_game: check the RDNA2 wave64 guard before vulkaninfo 2026-11-22 12:22:18 -03:00
2538803660 make_game: reject cached wave64 emulation on AMD Windows RDNA2 2026-11-22 12:05:19 -03:00
7886972a6b Merge upstream main
# Conflicts:
#	docs/d3d12_command_objects.md
2026-11-22 09:48:41 -05:00
754c9f9d25 Merge pull request #1804 from liang-kai-shui 2026-11-22 09:48:20 -05:00
b189efea55 Merge pull request #1758 from sovljanskii 2026-11-22 09:48:10 -05:00
00452cfaa3 Merge pull request #1615 from Ewann 2026-11-22 09:48:04 -05:00