Commit Graph

35 Commits

Author SHA1 Message Date
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
383156b0f5 Merge pull request #299 from AlxcBTW 2026-11-21 17:38:42 -05:00
ea76a12267 tests: preflight tests follow their faked PATH for #223's .NET SDK check (no real dotnet needed)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 17:32:33 -05:00
738192451a tests: keep_emulated follows auto only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:25:02 +01:00
6f6ffffa8d make_game.py: --wave64-emulate auto|on|off, on for GPUs without 64-wide subgroups (SHADER-11)
#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>
2026-11-22 08:24:30 +11:00
e149b42875 Merge pull request #153 from NWX10 2026-11-21 15:47:56 -05:00
b7db55a428 make_game.py: reject --jobs below 1, compare the game folder without case on Windows
- --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>
2026-11-21 23:32:11 +03:00
eb85039a58 Assets stage: resume stopped audio steps, keep no partial files, retry failed XMA decodes
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>
2026-11-21 23:17:32 +03:00
dd85598678 test(tools): add unit tests for make_game argument validation and stage flow 2026-11-21 19:00:15 +01:00