Commit Graph

58 Commits

Author SHA1 Message Date
fe0fb68460 ASSET-AUDIO-SKIP: allow skipping audio export
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>
2026-12-01 12:49:31 -05:00
8497337b4e Merge pull request #2145 from fiestorra/awc-skip-existing
tools: skip Ogg Opus outputs that already exist, so a stopped audio export resumes
2026-12-01 12:53:42 +01:00
a726736ec2 Merge pull request #1774 from Tauwni/fix/explicit-lod-bias-moltenvk
rdna2spirv: --explicit-lod-bias applies the S# LOD bias where MoltenVK drops the sampler's; ps_ssharp passes on Macs (SHADER-EXPLICIT-LOD-BIAS-MVK)
2026-12-01 12:45:24 +01:00
872d2e7534 tests/test_make_game_argparse: the shaders stage probes two more GPUs than the test mocks
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.
2026-12-01 09:20:26 +08:00
90cf6be69b tests: expect --skip-existing on the ogg opus call
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.
2026-11-30 14:54:46 +01:00
bf458bbcb3 Merge remote-tracking branch 'origin/main' into lb
# Conflicts:
#	docs/design.md
2026-11-29 04:52:45 +01:00
ab95ff8427 Merge upstream main into PR #1528 2026-11-28 13:59:13 +00:00
3a7dc6126b Merge remote-tracking branch 'origin/main' into fix/explicit-lod-bias-moltenvk
# Conflicts:
#	.github/workflows/runtime.yml
2026-11-28 13:34:11 +01:00
48a56aa93e Merge pull request #494 from bobcatchris/shader-index-recovery
SHADER-INDEX-RECOVERY: rebuild damaged translation indexes from shards
2026-11-28 11:56:25 +01:00
b145659304 Merge remote-tracking branch 'origin/main' into fix/explicit-lod-bias-moltenvk
# Conflicts:
#	tools/vk_subgroup_info.py
2026-11-25 23:54:57 +01:00
53ab2c9666 Merge upstream main into input-out-of-the-box 2026-11-25 21:56:35 +00:00
1d19671ebd rdna2spirv: --explicit-lod-bias applies the S# LOD bias in the shader where MoltenVK drops the sampler's (SHADER-EXPLICIT-LOD-BIAS-MVK)
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>
2026-11-25 12:16:05 +01:00
d4d969a1fd make_game, gameinput: controller, keyboard and mouse input out of the box (INPUT-OUT-OF-THE-BOX)
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>
2026-11-25 08:31:50 +05:00
8a5be5ce77 make_game: rebuild damaged translation indexes from shards
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.
2026-11-24 17:37:41 -06:00
cb09db363a make_game: honor --jobs when verifying package hashes 2026-11-24 13:09:13 +08:00
67cbdf11fa tests: pin the hardware threads where --jobs is asserted
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.
2026-11-24 04:28:23 +02:00
63c5ece18c test_make_game_argparse: the --jobs 10 case no longer needs 10 hardware threads
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.
2026-11-23 19:32:20 -05:00
5a186e9b2e make_game: an empty --game/--out/--work/--runtime-build is a usage error, not 'use the default'
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 20:56:13 +01:00
6dda0630bd make_game: --mesh-compute on by itself on Intel's Windows Vulkan driver, whose mesh draws crash (BUILD-2202) (#6789)
Squash-merged after diff review of PR #6789
2026-11-23 12:33:00 -06:00
86a7807dd4 Barycentric fallback on by itself on AMD's Windows driver for gfx90c (#5933) (#6828)
Squash-merged after diff review of PR #6828
2026-11-23 10:42:42 -06:00
c646bf8367 Speed up make_game by overlapping stages and showing progress. (#1797)
Squash-merged after diff review of PR #1797
2026-11-23 09:32:22 -06:00
2ee08d7dbf Round 44 test clashes: make_game's runtime gets work= (argparse), a bare {} index is translated again (dry run), and the exported-asset credit tests use #3974's 370 GiB
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 04:27:52 -05:00
b96d8309d8 docs: assets stage needs about 370 GB (400 GB full build), update README, quickstarts and preflight (PROC-196) 2026-11-22 23:44:54 +01:00
9f5d0f7c66 Merge pull request #3209 from Jadiac 2026-11-22 15:15:43 -05:00
969fc633b4 Merge pull request #2194 from Matheus Gomes 2026-11-22 15:10:19 -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
aee179fdaa make_game: export models and textures again when the decoder changed (BUILD-866)
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.
2026-11-22 20:27:01 +01:00
f6399808db Merge pull request #2564 from nonverifiedperson 2026-11-22 13:16:13 -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
d305286b1b TEST-461: test_stage_sequencing_preserves_canonical_order no longer depends on the GPU
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>
2026-11-22 18:30:49 +01: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
1c8122056e Merge pull request #2055 from FreddyxS 2026-11-22 11:41:17 -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
7adca9f3a0 test(build): use executable lookups in CLI preflight fixtures 2026-11-22 16:44:53 +01:00
2538803660 make_game: reject cached wave64 emulation on AMD Windows RDNA2 2026-11-22 12:05:19 -03:00
1681f3dc1e Translator: --f16-interp-fallback reads f16 halves without PerVertexKHR (SHADER-196)
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
2026-11-22 14:32:28 +03:00
204989e9e7 make_game: --jobs reaches the Ogg Opus step; --runtime-build may be the output folder
- 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.
2026-11-22 10:00:48 +00:00
c91b571031 Merge origin/main into build/make-game-translator-flags
Keep both sides: preflight/main() take fallbacks and jobs; argparse mock
asserts fallbacks=() and jobs=6 together.
2026-11-22 01:23:07 -08:00
f5a073213f make_game: forward the translator's fallback flags and record them beside the translation
- `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.
2026-11-22 01:19:27 -08:00
273886db50 make_game.py: build the runtime stage on Linux with clang-cl and xwin
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.
2026-11-22 01:36:05 -07:00
d7560e202f Skip shader disk reserve when outputs can be reused
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.
2026-11-22 07:38:50 +01:00
6eaf8b6fa8 make_game: runtime stage on Linux with --runtime-build and a Wine launcher
--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.
2026-11-22 02:39:10 +00:00
29c2426cdc Merge pull request #692 from kovaaper 2026-11-21 21:08:42 -05:00
ed19ed4919 Test: reject invalid stage selections before game access
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.
2026-11-22 04:46:44 +03:00
8686b6989b make_game.py: --jobs reaches vk_pipeline_check in the pipelines stage
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.
2026-11-21 20:26:58 -05:00
8119d8deed Merge pull request #433 from SombraSoft 2026-11-21 19:14:03 -05:00
f74528bc64 Honor explicitly requested build stages on Linux 2026-11-21 20:43:13 -03:00
ad0e4d143b Build: require Python 3.12+ to match CI 2026-11-21 20:32:33 -03:00