The test let the real wave64_settings() probe the installed GPU, which returns keep_emulated=False on
native-wave64 RDNA2 under the AMD Windows driver, so the test failed there. It now patches
make_game.wave64_settings to (False, True).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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.
MoltenVK can't compile PerVertexKHR to MSL, so ps_interp_f16_high failed at
pipeline creation on every Mac. With --f16-interp-fallback every VS/mesh param
(and the --mesh-compute VS) also exports its two f16 halves decoded to f32,
low halves at location 29 - 2N and high halves at 30 - 2N, and a PS *_f16 read
takes them as ordinary smooth inputs. A producer skips halves that would land
on its own params; a PS whose half location is also an attribute is rejected.
The index records f16_halves on both sides.
tools/vk_subgroup_info.py reports per_vertex_inputs (false without
fragmentShaderBarycentric or on MoltenVK); make_game.py and run_gpu_tests.py
turn the flag on where it is false. Without the flag all 139 GPU-test modules
are byte-identical to main's, so NVIDIA/AMD keep the exact per-vertex path.
Apple A18 Pro, macOS 26.6.2, MoltenVK 1.4.2: ps_interp_f16_high passes, all
4096 pixels bit-exact; run_gpu_tests.py 84 pass/50 skip/1 fail -> 85/50/0
native, 112/22/1 -> 113/22/0 with wave64 emulation; ms_f16_pack passes through
--mesh-compute. Semantic suite 1194 -> 1203 OK.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI-assisted
- assets: awc_opus.py was started without --jobs, so with --jobs 1 the bank export still ran half the CPU count
of processes (audio_wav.py, the next step, did get it).
- runtime: with --runtime-build pointing at the output folder (a runtime build unpacked where the port goes),
shutil.copy2 raised SameFileError and the stage stopped before game_path.txt and the launcher were written.
A file that is already the destination is left as it is.
Tests: one in test_make_game_argparse.py and three in test_make_game_platform.py; one of each fails on the old
code.
- `translate()` takes `fallbacks` (the --no-float-controls/--bary-fallback/--texel-offset-fallback/--mesh-compute flags), keeps them in the shard plan, and passes them to every shard; shards finished under other flags restart.
- `shaders()` records the flags in spirv/translator_flags.txt like wave64_emulate.txt and re-translates when they change; `shader_outputs_reusable()` and `preflight()` count a folder with other flags as not reusable.
- New `--no-float-controls`, `--bary-fallback`, `--texel-offset-fallback` and `--mesh-compute` options; `fallback_flags()` maps them in a stable order.
- Tests: 13 new in tests/test_make_game_translator_flags.py (all 13 fail on main 426023a5 as the negative control); mocks in the resume/argparse suites take the new keyword.
Off Windows the runtime stage refused to run without --runtime-build. It now
cross-builds gta6rt.exe and gta6rt_tls_host.dll into runtime/build/windows
with runtime/cmake/clang-cl-xwin.cmake (XWIN_DIR, or ~/.local/share/xwin-sdk
as in docs/testing.md), then packages them with the Wine launcher as before.
Preflight lists what the cross-build lacks (cmake, the LLVM tools, clang-cl
older than 19, an xwin splat without VC/Tools/MSVC or Windows Kits um/x64)
and then configures it, so any toolchain error stops the run before the
shader stage. Without the tools the default stages still leave runtime out;
asking for it lists what is missing. The pipelines stage's vk_pipeline_check
is built natively into runtime/build/linux at the end of preflight, for the
same reason.
Keep the reserve for incomplete or stale outputs. Test a resumed build with 15 GiB free and check that translation mode and source changes still require space.
AI-assisted with Codex. Focused WSL tests: 161 passed, 1 skipped.
--runtime-build DIR takes a Windows build of runtime/ (gta6rt.exe and
gta6rt_tls_host.dll, e.g. the Runtime workflow's runtime-windows
artifact) instead of building it. Off Windows the runtime stage then
runs instead of failing: it copies both files into --out and writes
gta6rt.sh, which starts gta6rt.exe with wine (or $WINE). Without the
option nothing changes. Preflight checks the folder before any work.
README: Running the loader on Linux.
Cover empty, whitespace-only, comma-only, unknown and mixed stage selections. Assert no game discovery, checking, preflight or shader work occurs. AI-assisted (Codex). Validation: all 143 make_game tests passed on Windows; compileall and isolated --help passed. Synthetic tests only; no game files or GPU required.
pipelines() ran vk_pipeline_check without --jobs, so --stages pipelines --jobs N always compiled on half the hardware threads. main() now passes its --jobs; the default (half the CPU count) matches the checker's own, so a run without --jobs is unchanged.
#152 added rdna2spirv.py --wave64-emulate (wave64 compute and mesh shaders exact on any
subgroup size), but the build never passed it, so 32-wide GPUs (NVIDIA, Intel) got the
native translation.
- auto (default) reads the smallest maxSubgroupSize from vulkaninfo and turns emulation on
below 64, or when vulkaninfo is missing or tells nothing (the emulated output is exact
everywhere). on and off are taken as given.
- The mode used is written to spirv/wave64_emulate.txt; a change translates again. A folder
without the file counts as off, which is how it was made.
- translate() passes the flag to every shard.
- Tests: tests/test_make_game_wave64.py (new), resume and argparse tests extended.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- --jobs 0 (or a negative count) was accepted: translate() then started no
rdna2spirv.py shard, found no failed shard, and ran --merge over nothing,
so the translation step looked finished; shader_disasm.py's thread pool
raises on 0 workers. --jobs now takes a positive integer (the same check
as tools/manifest.py's positive_int); argparse exits 2 otherwise.
- The "--out and --work must be outside the game folder" check compared
paths with case, so on Windows `--out c:\games\gta6\out` passed for the
game folder C:\Games\GTA6. Both sides now go through os.path.normcase.
- tests: two new cases in test_make_game_argparse.py (the case test runs
on Windows only, where paths compare without case).
AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The audio steps had the same resume problem as the shader stage (#126):
- make_game.py: the Ogg Opus and XMA2 steps counted as done once their
folder existed, which a stopped run also leaves. They now count as done
by a marker (audio/ogg.done, audio/xma.done) written after the step
succeeds.
- make_game.py: XMA2 -> WAV with ffmpeg now runs on every assets run for
the streams that have no .wav yet, writes to a temporary name renamed on
success, and checks ffmpeg's exit code. A failed or stopped decode no
longer leaves a short .wav, and installing ffmpeg after the first run now
decodes the streams instead of never trying again.
- awc_opus.py: .ogg/.wav files are written under a temporary name and
renamed, so a stopped run or a full disk never leaves a truncated file.
A read/write error (OSError) now fails the run (exit 1) so the step is
retried; banks that do not parse are still skipped as before.
- tests: new tests/test_audio_stage_resume.py (10 tests, standard library
only); WavValidationTest updated to set up the new markers.
AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>