WIP: perf(build): optimize shared A64 helpers independently of cold chunks #756

Draft
siantm wants to merge 1 commit from siantm/Longshot:perf/shared-a64-helpers-o2 into main
First-time contributor

Type: perf · Risk: medium · Tested on: Windows 11, Python 3.12.10, game-free build/cache planning · Needs: interleaved same-scene gameplay A/B, compile timing, executable size, and Linux game-free suite

Why

Shared instruction and runtime helpers (a64_rt.c and a64_suyu.c) are small helper translation units rather than giant lifted game chunks, so they can be optimized at -O2 independently without imposing -O2 compile cost or memory spikes on cold code_*.c chunks (-O1) and without invalidating lifted C caches. Because current-main in-game frame-time/compile-time A/B benchmarks are still pending, this PR stays WIP: until isolated same-scene measurements confirm a benefit.

Searching the issue tracker and PR history (a64_rt, a64_suyu) found no matching performance issue; related build-flag/cache context appears in #980, #979, #911, #737, #177, #172, #62, and merged LONGSHOT_LIGHT_PASSES.

What changed

Optimize a64_rt.c and a64_suyu.c at -O2 by default in nx2/build.py (with RX_A64_RT_O2=0 restoring the cold-code -O1 level), keep RX_A64_RT_O2 compile-only in nx2/make_game.py so switching it does not retranslate the game, and add a real build-planner/object-key test reconciled with LONGSHOT_LIGHT_PASSES.

  • nx2/build.py: add a64_rt_flags(fl) reading RX_A64_RT_O2 (default on -> -O2, falsy -> - + OPT), route a64_rt.c and a64_suyu.c through a64_rt_fl via optional a64_rt_fl=None on source_flags(...) (preserving existing 7-arg callers such as tests/test_light_passes.py), log the chosen level in main(), and leave cold chunks (split_fl / LIGHT_FLAGS), code_hot*, and other files unchanged.
  • nx2/make_game.py: add "RX_A64_RT_O2" to COMPILE_ONLY_ENV so toggling it never invalidates lift_key.
  • tests/test_a64_helper_build_flags.py: drive real build.main() / plan_jobs() / object_key across --dll and LONGSHOT_LIGHT_PASSES variants, default vs falsy RX_A64_RT_O2 values, and RX_HOT_OPT / RX_PGO isolation (preserving -O1 and verifying LIGHT_FLAGS never leaks into a64_rt.c/a64_suyu.c), with --source override (LONGSHOT_BUILD_TEST_SOURCE) for before/after verification.
  • docs/development.md, docs/tested/2026-11-15-a64-helper-o2-siantm-check01.md: document RX_A64_RT_O2=0 (noting current-main A/B measurements remain pending) and keep the initial check01 run record.

Measurements

Verdict: game-free compiler job selection, fallback (RX_A64_RT_O2=0), LIGHT_FLAGS isolation, and object-key isolation are verified on main @ 71b1edd vs this branch (acd64056); current-main gameplay FPS, frame-time, compile-time, and binary-size A/B measurements remain pending (WIP:).

Hardware: Windows 11, Intel Core i7-9700, 31.8 GiB usable RAM, Python 3.12.10, MSYS2 UCRT64 Clang 23.1.4 (also initially checked on 9e6f231d with Python 3.14.7 in docs/tested/2026-11-15-a64-helper-o2-siantm-check01.md); no GPU used.
Scene: Game-free authored build-planning fixtures on Windows 11 (in-game scene A/B pending before pr ready).
Method: identical authored tests/test_a64_helper_build_flags.py planning/key checks against origin/main (71b1edd) and rebased commit acd64056, plus test_light_passes.py, test_lift_cache.py, test_build_hash_cache.py, test_build_times.py, test_kept_translation.py, and tests/run_all.py --changed origin/main. No compiler or game executable was launched by test_a64_helper_build_flags.py.
How to reproduce: compare origin/main:nx2/build.py (71b1edd) via LONGSHOT_BUILD_TEST_SOURCE against HEAD:nx2/build.py (acd64056) using python -I -B tests/test_a64_helper_build_flags.py, then run python -I -B tests/test_light_passes.py and python -I -B tests/test_lift_cache.py.

Check Before: main @ 71b1edd After: this PR @ acd64056
test_a64_helper_build_flags.py (3 planning tests) Fail (FAILED (failures=9): helpers stay -O1) Pass (Ran 3 tests in 1.579s, OK)
Default a64_rt.c / a64_suyu.c flags -O1 -O2 (with or without LONGSHOT_LIGHT_PASSES / --dll)
Rollback RX_A64_RT_O2=0 and cold/hot job isolation Helpers -O1 Helpers revert to -O1; only the 2 helper object keys change
Gameplay FPS / compile-time / binary-size A/B Not yet measured Pending before marking ready (WIP:)
Ran 3 tests in 1.579s -> OK
light passes: ok
ok: the lift key follows the game, the tools (the modules the lift imports), the hot list, the chunks and the settings
Ran 11 tests in 0.161s -> OK (test_build_hash_cache.py)
Ran 26 tests in 0.306s -> OK (test_build_times.py)
Ran 7 tests in 0.352s -> OK (test_kept_translation.py)

Flags and settings

Adds RX_A64_RT_O2 (default enabled, 0/false/off/no restores -O1) so shared A64 helpers optimize independently of cold lifted chunks while RX_A64_RT_O2=0 gives a clean one-variable A/B and rollback toggle.

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
RX_A64_RT_O2 Env var controlling optimization level (-O2 vs cold OPT) of a64_rt.c and a64_suyu.c (nx2/build.py) Helpers built at cold -O1 (switch absent) Enabled by default (-O2); =0 builds at -O1 (compile-only in COMPILE_ONLY_ENV) Changes only the 2 helper compile jobs and their object keys; cold chunks and code_hot* stay unchanged Untested on full build/in-game A/B on main; planning/key isolation verified game-free Provisional default while WIP:; confirm via same-scene A/B before pr ready, keep =0 for rollback

Testing

Tested: rebased commit acd64056 onto main @ 71b1edd under Windows 11 + Python 3.12.10 + MSYS2 UCRT64 Clang 23.1.4:

  • Before (main @ 71b1edd via LONGSHOT_BUILD_TEST_SOURCE): tests/test_a64_helper_build_flags.py fails 9 subtests because a64_rt.c and a64_suyu.c remain -O1.
  • After (acd64056): all 9 focused drivers pass (tests/test_a64_helper_build_flags.py 3 tests, tests/test_light_passes.py, tests/test_lift_cache.py, tests/test_build_hash_cache.py 11 tests, tests/test_build_times.py 26 tests, tests/test_kept_translation.py 7 tests, tests/test_doc_anchors.py, scripts/tested_configurations.py, scripts/check_third_party.py), and git diff --check origin/main..HEAD is clean.
  • python -I -B tests/run_all.py --changed origin/main: 90 passed, 13 failed, 7 skipped in 146 s — all 13 failures (tests/test_prepare_stall.py, tests/test_vk_occlusion_queries.py, tests/test_crash_dialog.py, tests/test_oot_state_tap.py, tests/test_make_game_cache.py, tests/test_linux_preflight.py, tests/test_job_queue.py, tests/test_fpx_sticky.py, tests/test_missing_nup.py, tests/test_walk_key.py, tests/test_failed_compile_keeps_objects.py, tests/test_portable_builder_startup.py, tests/test_audio_output_devices.py) are pre-existing in the verified 32-test main @ 71b1edd Windows baseline (alongside tests/test_pipeline_cache_file.py, tests/test_pipeline_play_cache.py, tests/test_bug_report_defaults.py, tests/test_run_all_changed.py, tests/test_fsr_uniform_ownership.py, tests/test_replay_write_order.py, tests/test_coverage_run.py, tests/test_dlss_feature_size.py, tests/test_import_reach.py, tests/test_spawn_emit.py, tests/test_portable_builder_home.py, tests/test_tested_configurations.py, tests/test_pending_guest_import.py, tests/test_guest_imported.py, tests/test_fastfp_fma.py, tests/test_pads_after_menu.py, tests/test_auto_handheld.py, tests/test_lift_lookups.py, tests/test_crt_options.py).

Not tested: end-to-end native compile timing, final executable size delta, in-game runtime stability and interleaved same-scene FPS/frame-time A/B (RX_A64_RT_O2=1 vs RX_A64_RT_O2=0 / main), and Linux full tests/run_all.py.

Must be tested:

  • Windows and Linux, full game build and same-scene gameplay A/B: build main and this branch (plus RX_A64_RT_O2=0) with the same dump/settings, run at least two interleaved same-scene pairs after warm-up (median FPS, 1% low, median/p99 frame time, binary size, helper compile time), plus python -I -B tests/run_all.py on Linux, expecting measurable or non-regressing gameplay performance with acceptable compile cost and clean suites (by hand on a local build, plus Test Farm: @Beanstalk linux).

Risks

What could break: optimizer-sensitive code paths in a64_rt.c or a64_suyu.c, slightly larger helper object/executable size, or added helper compile time without a net FPS gain.

Turning it off: set RX_A64_RT_O2=0 (keeps lifted C intact) or revert the commit.

Compatibility: only a64_rt.o and a64_suyu.o object keys change (and toggle retranslation stays skipped via COMPILE_ONLY_ENV); saves, longshot_options.ini, shader/pipeline caches, and renderer ABI are unchanged.

Issues

See #756

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value.
  • A file in docs/tested/ for each new measured run (format in docs/tested-configurations.md).
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Docs updated.
**Type:** perf · **Risk:** medium · **Tested on:** Windows 11, Python 3.12.10, game-free build/cache planning · **Needs:** interleaved same-scene gameplay A/B, compile timing, executable size, and Linux game-free suite ## Why Shared instruction and runtime helpers (`a64_rt.c` and `a64_suyu.c`) are small helper translation units rather than giant lifted game chunks, so they can be optimized at `-O2` independently without imposing `-O2` compile cost or memory spikes on cold `code_*.c` chunks (`-O1`) and without invalidating lifted C caches. Because current-main in-game frame-time/compile-time A/B benchmarks are still pending, this PR stays `WIP:` until isolated same-scene measurements confirm a benefit. Searching the issue tracker and PR history (`a64_rt`, `a64_suyu`) found no matching performance issue; related build-flag/cache context appears in `#980`, `#979`, `#911`, `#737`, `#177`, `#172`, `#62`, and merged `LONGSHOT_LIGHT_PASSES`. ## What changed Optimize `a64_rt.c` and `a64_suyu.c` at `-O2` by default in `nx2/build.py` (with `RX_A64_RT_O2=0` restoring the cold-code `-O1` level), keep `RX_A64_RT_O2` compile-only in `nx2/make_game.py` so switching it does not retranslate the game, and add a real build-planner/object-key test reconciled with `LONGSHOT_LIGHT_PASSES`. - `nx2/build.py`: add `a64_rt_flags(fl)` reading `RX_A64_RT_O2` (default on -> `-O2`, falsy -> `-` + `OPT`), route `a64_rt.c` and `a64_suyu.c` through `a64_rt_fl` via optional `a64_rt_fl=None` on `source_flags(...)` (preserving existing 7-arg callers such as `tests/test_light_passes.py`), log the chosen level in `main()`, and leave cold chunks (`split_fl` / `LIGHT_FLAGS`), `code_hot*`, and other files unchanged. - `nx2/make_game.py`: add `"RX_A64_RT_O2"` to `COMPILE_ONLY_ENV` so toggling it never invalidates `lift_key`. - `tests/test_a64_helper_build_flags.py`: drive real `build.main()` / `plan_jobs()` / `object_key` across `--dll` and `LONGSHOT_LIGHT_PASSES` variants, default vs falsy `RX_A64_RT_O2` values, and `RX_HOT_OPT` / `RX_PGO` isolation (preserving `-O1` and verifying `LIGHT_FLAGS` never leaks into `a64_rt.c`/`a64_suyu.c`), with `--source` override (`LONGSHOT_BUILD_TEST_SOURCE`) for before/after verification. - `docs/development.md`, `docs/tested/2026-11-15-a64-helper-o2-siantm-check01.md`: document `RX_A64_RT_O2=0` (noting current-main A/B measurements remain pending) and keep the initial `check01` run record. ## Measurements **Verdict:** game-free compiler job selection, fallback (`RX_A64_RT_O2=0`), `LIGHT_FLAGS` isolation, and object-key isolation are verified on `main @ 71b1edd` vs this branch (`acd64056`); current-main gameplay FPS, frame-time, compile-time, and binary-size A/B measurements remain pending (`WIP:`). Hardware: Windows 11, Intel Core i7-9700, 31.8 GiB usable RAM, Python 3.12.10, MSYS2 UCRT64 Clang 23.1.4 (also initially checked on `9e6f231d` with Python 3.14.7 in `docs/tested/2026-11-15-a64-helper-o2-siantm-check01.md`); no GPU used. Scene: Game-free authored build-planning fixtures on Windows 11 (in-game scene A/B pending before `pr ready`). Method: identical authored `tests/test_a64_helper_build_flags.py` planning/key checks against `origin/main` (`71b1edd`) and rebased commit `acd64056`, plus `test_light_passes.py`, `test_lift_cache.py`, `test_build_hash_cache.py`, `test_build_times.py`, `test_kept_translation.py`, and `tests/run_all.py --changed origin/main`. No compiler or game executable was launched by `test_a64_helper_build_flags.py`. How to reproduce: compare `origin/main:nx2/build.py` (`71b1edd`) via `LONGSHOT_BUILD_TEST_SOURCE` against `HEAD:nx2/build.py` (`acd64056`) using `python -I -B tests/test_a64_helper_build_flags.py`, then run `python -I -B tests/test_light_passes.py` and `python -I -B tests/test_lift_cache.py`. | Check | Before: main @ 71b1edd | After: this PR @ acd64056 | |---|---|---| | `test_a64_helper_build_flags.py` (3 planning tests) | Fail (`FAILED (failures=9)`: helpers stay `-O1`) | Pass (`Ran 3 tests in 1.579s`, `OK`) | | Default `a64_rt.c` / `a64_suyu.c` flags | `-O1` | `-O2` (with or without `LONGSHOT_LIGHT_PASSES` / `--dll`) | | Rollback `RX_A64_RT_O2=0` and cold/hot job isolation | Helpers `-O1` | Helpers revert to `-O1`; only the 2 helper object keys change | | Gameplay FPS / compile-time / binary-size A/B | Not yet measured | Pending before marking ready (`WIP:`) | ``` Ran 3 tests in 1.579s -> OK light passes: ok ok: the lift key follows the game, the tools (the modules the lift imports), the hot list, the chunks and the settings Ran 11 tests in 0.161s -> OK (test_build_hash_cache.py) Ran 26 tests in 0.306s -> OK (test_build_times.py) Ran 7 tests in 0.352s -> OK (test_kept_translation.py) ``` ### Flags and settings Adds `RX_A64_RT_O2` (default enabled, `0`/`false`/`off`/`no` restores `-O1`) so shared A64 helpers optimize independently of cold lifted chunks while `RX_A64_RT_O2=0` gives a clean one-variable A/B and rollback toggle. | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | `RX_A64_RT_O2` | Env var controlling optimization level (`-O2` vs cold `OPT`) of `a64_rt.c` and `a64_suyu.c` (`nx2/build.py`) | Helpers built at cold `-O1` (switch absent) | Enabled by default (`-O2`); `=0` builds at `-O1` (compile-only in `COMPILE_ONLY_ENV`) | Changes only the 2 helper compile jobs and their object keys; cold chunks and `code_hot*` stay unchanged | Untested on full build/in-game A/B on `main`; planning/key isolation verified game-free | Provisional default while `WIP:`; confirm via same-scene A/B before `pr ready`, keep `=0` for rollback | ## Testing **Tested:** rebased commit `acd64056` onto `main @ 71b1edd` under Windows 11 + Python 3.12.10 + MSYS2 UCRT64 Clang 23.1.4: - Before (`main @ 71b1edd` via `LONGSHOT_BUILD_TEST_SOURCE`): `tests/test_a64_helper_build_flags.py` fails 9 subtests because `a64_rt.c` and `a64_suyu.c` remain `-O1`. - After (`acd64056`): all 9 focused drivers pass (`tests/test_a64_helper_build_flags.py` 3 tests, `tests/test_light_passes.py`, `tests/test_lift_cache.py`, `tests/test_build_hash_cache.py` 11 tests, `tests/test_build_times.py` 26 tests, `tests/test_kept_translation.py` 7 tests, `tests/test_doc_anchors.py`, `scripts/tested_configurations.py`, `scripts/check_third_party.py`), and `git diff --check origin/main..HEAD` is clean. - `python -I -B tests/run_all.py --changed origin/main`: `90 passed, 13 failed, 7 skipped in 146 s` — all 13 failures (`tests/test_prepare_stall.py`, `tests/test_vk_occlusion_queries.py`, `tests/test_crash_dialog.py`, `tests/test_oot_state_tap.py`, `tests/test_make_game_cache.py`, `tests/test_linux_preflight.py`, `tests/test_job_queue.py`, `tests/test_fpx_sticky.py`, `tests/test_missing_nup.py`, `tests/test_walk_key.py`, `tests/test_failed_compile_keeps_objects.py`, `tests/test_portable_builder_startup.py`, `tests/test_audio_output_devices.py`) are pre-existing in the verified 32-test `main @ 71b1edd` Windows baseline (alongside `tests/test_pipeline_cache_file.py`, `tests/test_pipeline_play_cache.py`, `tests/test_bug_report_defaults.py`, `tests/test_run_all_changed.py`, `tests/test_fsr_uniform_ownership.py`, `tests/test_replay_write_order.py`, `tests/test_coverage_run.py`, `tests/test_dlss_feature_size.py`, `tests/test_import_reach.py`, `tests/test_spawn_emit.py`, `tests/test_portable_builder_home.py`, `tests/test_tested_configurations.py`, `tests/test_pending_guest_import.py`, `tests/test_guest_imported.py`, `tests/test_fastfp_fma.py`, `tests/test_pads_after_menu.py`, `tests/test_auto_handheld.py`, `tests/test_lift_lookups.py`, `tests/test_crt_options.py`). **Not tested:** end-to-end native compile timing, final executable size delta, in-game runtime stability and interleaved same-scene FPS/frame-time A/B (`RX_A64_RT_O2=1` vs `RX_A64_RT_O2=0` / `main`), and Linux full `tests/run_all.py`. **Must be tested:** - Windows and Linux, full game build and same-scene gameplay A/B: build `main` and this branch (plus `RX_A64_RT_O2=0`) with the same dump/settings, run at least two interleaved same-scene pairs after warm-up (median FPS, 1% low, median/p99 frame time, binary size, helper compile time), plus `python -I -B tests/run_all.py` on Linux, expecting measurable or non-regressing gameplay performance with acceptable compile cost and clean suites (by hand on a local build, plus Test Farm: `@Beanstalk` linux). ## Risks **What could break:** optimizer-sensitive code paths in `a64_rt.c` or `a64_suyu.c`, slightly larger helper object/executable size, or added helper compile time without a net FPS gain. **Turning it off:** set `RX_A64_RT_O2=0` (keeps lifted C intact) or revert the commit. **Compatibility:** only `a64_rt.o` and `a64_suyu.o` object keys change (and toggle retranslation stays skipped via `COMPILE_ONLY_ENV`); saves, `longshot_options.ini`, shader/pipeline caches, and renderer ABI are unchanged. ## Issues See #756 ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. - [x] A file in `docs/tested/` for each new measured run (format in `docs/tested-configurations.md`). - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Docs updated.
perf(build): optimize shared A64 helpers independently of cold chunks
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 16s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
a9269637ec
Focused extraction of local Longshot changes: 0b9680a3. Authored tests and verification limits included; no game-derived artifacts.

Assisted-by: OpenAI Codex
HumanBean force-pushed perf/shared-a64-helpers-o2 from a9269637ec
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 16s
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
to 16ea5060cc
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 3s
CI / Conventional Commit title (pull_request) Successful in 3s
CI / Workflow lint (actionlint) (pull_request) Successful in 5s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 5s
Third-party parts / As their notes say (pull_request) Successful in 10s
Website / Website on Cloudflare (pull_request_target) Has been skipped
2026-11-15 18:45:05 +00:00
Compare
Author
First-time contributor

Rebased onto origin/main (71b1edd) as acd64056 and reconciled with main's LONGSHOT_LIGHT_PASSES / source_flags() refactor:

  • nx2/build.py: added a64_rt_flags(fl) and routed a64_rt.c / a64_suyu.c through optional a64_rt_fl in source_flags(...) (preserving 7-argument callers such as tests/test_light_passes.py), keeping split_fl / LIGHT_FLAGS and code_hot* flags unchanged.
  • nx2/make_game.py: kept "RX_A64_RT_O2" in COMPILE_ONLY_ENV.
  • tests/test_a64_helper_build_flags.py: reconciled planning fixture with LONGSHOT_LIGHT_PASSES and light_flags_work, verifying both enabled and disabled LONGSHOT_LIGHT_PASSES alongside --dll.
  • Verified (Windows 11, Python 3.12.10, MSYS2 UCRT64 Clang 23.1.4):
    • Before (origin/main @ 71b1edd via LONGSHOT_BUILD_TEST_SOURCE): tests/test_a64_helper_build_flags.py fails 9 subtests because helpers remain -O1.
    • After (acd64056): all 9 focused drivers pass (tests/test_a64_helper_build_flags.py 3 tests, tests/test_light_passes.py, tests/test_lift_cache.py, tests/test_build_hash_cache.py 11 tests, tests/test_build_times.py 26 tests, tests/test_kept_translation.py 7 tests, tests/test_doc_anchors.py, scripts/tested_configurations.py, scripts/check_third_party.py), and git diff --check origin/main..HEAD is clean.
    • python -I -B tests/run_all.py --changed origin/main: 90 passed, 13 failed, 7 skipped — all 13 failures are pre-existing on main @ 71b1edd.
  • Updated PR description to match .forgejo/pull_request_template.md cleanly (WIP: retained until interleaved same-scene gameplay/build A/B measurements and Linux verification are complete).
Rebased onto `origin/main` (`71b1edd`) as `acd64056` and reconciled with `main`'s `LONGSHOT_LIGHT_PASSES` / `source_flags()` refactor: - `nx2/build.py`: added `a64_rt_flags(fl)` and routed `a64_rt.c` / `a64_suyu.c` through optional `a64_rt_fl` in `source_flags(...)` (preserving 7-argument callers such as `tests/test_light_passes.py`), keeping `split_fl` / `LIGHT_FLAGS` and `code_hot*` flags unchanged. - `nx2/make_game.py`: kept `"RX_A64_RT_O2"` in `COMPILE_ONLY_ENV`. - `tests/test_a64_helper_build_flags.py`: reconciled planning fixture with `LONGSHOT_LIGHT_PASSES` and `light_flags_work`, verifying both enabled and disabled `LONGSHOT_LIGHT_PASSES` alongside `--dll`. - **Verified (Windows 11, Python 3.12.10, MSYS2 UCRT64 Clang 23.1.4)**: - Before (`origin/main @ 71b1edd` via `LONGSHOT_BUILD_TEST_SOURCE`): `tests/test_a64_helper_build_flags.py` fails 9 subtests because helpers remain `-O1`. - After (`acd64056`): all 9 focused drivers pass (`tests/test_a64_helper_build_flags.py` 3 tests, `tests/test_light_passes.py`, `tests/test_lift_cache.py`, `tests/test_build_hash_cache.py` 11 tests, `tests/test_build_times.py` 26 tests, `tests/test_kept_translation.py` 7 tests, `tests/test_doc_anchors.py`, `scripts/tested_configurations.py`, `scripts/check_third_party.py`), and `git diff --check origin/main..HEAD` is clean. - `python -I -B tests/run_all.py --changed origin/main`: `90 passed, 13 failed, 7 skipped` — all 13 failures are pre-existing on `main @ 71b1edd`. - Updated PR description to match `.forgejo/pull_request_template.md` cleanly (`WIP:` retained until interleaved same-scene gameplay/build A/B measurements and Linux verification are complete).
siantm force-pushed perf/shared-a64-helpers-o2 from 16ea5060cc
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 3s
CI / Conventional Commit title (pull_request) Successful in 3s
CI / Workflow lint (actionlint) (pull_request) Successful in 5s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 5s
Third-party parts / As their notes say (pull_request) Successful in 10s
Website / Website on Cloudflare (pull_request_target) Has been skipped
to acd640569d
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 4s
2026-11-16 15:34:26 +00:00
Compare
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
PR description / Description follows the template (pull_request_target) Successful in 4s
This pull request has changes conflicting with the target branch.
  • docs/development.md
  • nx2/build.py
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'perf/shared-a64-helpers-o2:siantm-perf/shared-a64-helpers-o2'
git switch 'siantm-perf/shared-a64-helpers-o2'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!756
No description provided.