Add an opt-in assets-stage switch to skip audio extraction and conversion, preserve existing audio outputs, and account for the lower disk requirement. AI-assisted implementation; focused tests passed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
test_custom_jobs_forwarded_to_shaders asserts fallbacks=() but neutralises only four of the six
runtime_gpu_* probes the shaders stage consults. The two it misses answer False on hardware
tools/vk_subgroup_info.py documents: denorm_flush_to_zero_f32 on NVIDIA Vulkan drivers (VK_FALSE)
and integer_dot_product on a Vulkan 1.2 device such as MoltenVK's. Where a probe answers False,
make_game.py sets the fallback flag unconditionally instead of going through
keep_recorded_fallback(), so the assertion fails with fallbacks=('--no-ftz32',).
Add the two missing patches, the same six-probe list tests/test_make_game_translator_flags.py
already uses.
The assets test asserted the command line without the flag this branch adds,
so it failed as soon as the stage started passing it. The flag is the point of
the change: a stopped export leaves most of the Ogg files written and no
marker, and --skip-existing makes the restart keep the ones already done.
Written with an AI assistant.
MoltenVK 1.4.2 drops VkSamplerCreateInfo::mipLodBias from both explicit and
derivative-LOD samples, so ps_ssharp's S# LOD_BIAS cases fail on every Mac.
With the flag the translator adds the S# bias (word 2 [13:0], signed 5.8) to
explicit LODs and to _b biases, as a Bias operand on implicit samples, and as
a 2^bias scale of Grad derivatives. tools/vk_subgroup_info.py reports
explicit_lod_bias for MoltenVK's driver ID, and run_gpu_tests.py, build.py
and make_game.py turn the flag on from it. ps_ssharp gains +-0.3 cases, which
fail when the bias counts twice.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A build made with make_game.py on Windows had no input at all. The runtime
stage ran scripts/build_runtime.ps1 without -FetchSdl3, so on a machine without
an installed SDL3 the GameInput shim was not built. gta6rt then logged "served
without SDL3 (no devices)", and a connected DualSense or Xbox pad did nothing.
- make_game.py: the Windows runtime stage passes -FetchSdl3 (the pinned SDL3
3.4.20, SHA-256 checked by CMake). --no-sdl3 leaves the download out. The
docstring's "what it downloads" sentence names it.
- gameinput: LEONIDA_KEYBOARD_PAD defaults to the focused mode, so a player
without a pad still has the keyboard and mouse. Keys count only while the
game window has focus. "off" or "0" removes the pad.
- gameinput_test: the other cases set LEONIDA_KEYBOARD_PAD=off, as they count
only their own virtual pads. The keyboard pad case checks the new default.
- docs/gameinput.md: default and make_game behaviour.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A truncated or malformed shaders/spirv/index.json could let the shaders stage report success and then leave the pipeline stage asking for another full translation. Treat a readable but malformed index as recoverable from completed shards, keep accepting a UTF-8 BOM index, and still reject a real empty merge. Also account for shaders/assets overlap in preflight free-space checks when both stages run.
Carried from the source patch in Sigtryggur-Mani-Gudmundsson's graphics-runtime-patches collection:
33ab48d3ea/README.md (recovering-a-damaged-shader-index)
AI-assisted.
main() clamps --jobs to os.cpu_count(), and the GitHub Windows runners have
four, so --jobs 6 reached the shaders stage as 4 and --jobs 5 reached the
pipeline checker as 4 ('4' != '5'). Both cases pin cpu_count at 16 for the
call, as the merged --jobs 10 assets case does; the default case keeps
reading the real count.
main() clamps --jobs to the machine's hardware threads (leonida_tui.clamp_jobs, since #1797), so on a machine
with fewer than 10 the test's --jobs 10 reached assets() as the thread count and the assertion failed. The
test pins os.cpu_count to 16, so 10 is in range anywhere.
AI-assisted (Claude Code). Tested on macOS arm64 (6 hardware threads), Python 3.14.6: tests/test_make_game_argparse.py
fails 1 of 38 on main de4c37383 and passes with this change; compileall and make_game.py --help pass.
The assets stage skipped rpf9dump models|textures whenever a manifest.json existed, so a work folder kept the
old decoder's output after the rpf9-explorer pin or tools/rpf9dump changed. A digest of both is now written
beside each manifest; a folder with another digest or without the record is removed and exported again, as the
shaders stage does for the translator.
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.