Repository navigation
Built-in benchmark, first version: scenes from a scratch save at the 30 fps cap - #278
Merged
Merged
Conversation
…eport LARECOMP_BENCHMARK=<scene file> (off by default; 1.9.0 only, other versions stop with "unsupported version"). The runtime copies the player's save to a scratch folder, edits position, time, Blood Moon and hearts in the copy, reboots in place, presses Continue, holds time (TimeMgr) and weather (world::Manager) from rt_vfr_update, turns the camera with the stick using the camera's own angles, warms up, measures at the 30 fps cap and writes report.json, report.csv and frames.csv. No change in tools/patches.py, so GAMELIB_ID stays. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The warm-up now lasts until calm_s (20 s by default) pass without a compile or a skipped draw, up to warmup_max_s (180 s). A window that still had some gets the status cache_cold, with its numbers; the summary gives the median and spread for clean repeats and for all measured ones. report.csv has the thermal status at the window's start and end. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A scene file inside the save's folder is refused: the output would have gone into the save. The run ends with exit(), so the pipeline cache is kept. Yaw, pitch and position are range-checked, long paths refused. A window with no frames, or an unreadable camera at its end, is a harness_error. The frame after a long one has no GPU time: the pacer's has both frames in it. plugged is -1 until the first report. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…goes in the passport A window's status no longer depends on the shader cache: each keeps its numbers, skipped_building (draws skipped because their pipeline is still compiling) and shader_compiles, with no verdict. The warm-up waits on those two only. shader_cache_at_start in the passport is cold when the SPIR-V cache missed before the first window, else warm. The commit in the report is asked of git on every build, with -dirty for changes in the sources, unknown where git can't say. It was set at configure time and went stale. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Propinbo
added a commit
to Propinbo/BOTWRecompAndroid
that referenced
this pull request
Nov 5, 2026
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #214.
What it does
Each scene runs from a scratch copy of the player's save, with position, time, Blood Moon and hearts edited in the copy. The runtime reboots in place, presses Continue, holds time and weather, turns the camera with the stick to the scene's angles, warms up, measures, and writes a report. It exits after the last scene. The original save and settings are only read.
The warm-up lasts until 20 s pass without a compile or a draw skipped for one (at most 180 s), so the measurement window starts after a cold cache's burst of compiles. GPU p50 in the lab's first window from a cold cache was 26.78 to 27.06 ms, against 26.43 to 27.24 ms warm, apart from one warm 28.49. Frame pacing doesn't always match: 4 of 8 windows in cold-cache runs had 1294 to 1345 frames instead of 1351 (1% low 24.2 to 26.6 fps), while all 39 warm windows had 1351 (1% low at least 29.08 fps). The two cold-cache runs that started at thermal status 0 had none of these, the two that started at 2 had all four, and I don't know the cause.
1.9.0 only; other versions stop with
unsupported version. No change intools/patches.py, soGAMELIB_IDstays and nobody rebuilds. Without the variable each hook is oneboolcheck.How to turn it on
The report goes to
<scene file>.out/. It needs a save past the Great Plateau, on the main field. Without adb there is no way in the app:LARECOMP_*come only from the launch intent'senvextra, and the settings file doesn't set them. Another app that can send that intent should work, but I haven't tried it.Formats
Scene file (
tools/benchmark-scenes.txt,scene_format1):report.json(report_format1), one result, shortened.report.csvhas one row per scene and repeat,frames.csvevery frame. A scene getsok, orharness_errorwith the step and the reason.{"scene": "hateno-lab", "repeat": 0, "status": "ok", "load_s": 19.5, "warmup_s": 33.7, "frames": 1351, "fps": 30.0, "low_1pct_fps": 29.38, "low_01pct_fps": 29.26, "over_50ms": 0, "frame_ms": {"p50": 33.331, "p95": 33.777, "p99": 33.973}, "gpu_ms": {"p50": 27.136, "p95": 33.026, "p99": 34.519}, "cpu_ms": {"p50": 17.268, "p95": 20.343, "p99": 22.318}, "skipped_building": 91, "shader_compiles": 2, "display_hz_end": 120.0, "power_start": {"thermal": 0, "plugged": 2}, "power_end": {"thermal": 0, "plugged": 2}}The passport has GPU, driver, Android, model, SoC, APK version, commit (
-dirtywith uncommitted source changes,unknownwhere git can't say), Native or Recompiled, settings, shader cache size and power, with no serial numbers.shader_cache_at_startiscoldif the SPIR-V cache missed during the first scene's load and warm-up, elsewarm.How it was checked
SM-X730, Mali-G925, 1.9.0, 120 Hz, on USB. Three scenes × 3 repeats, one launch per mode, about 17 min each. 30.00 fps, 1351 frames per window, no frame over 50 ms, no
harness_error. The report's numbers match a recomputation fromframes.csv. These full runs are from the commit before the last one, which changes the report's statuses and fields, and has the warm-up wait on compile-related skips only. The last commit got the short runs below.GPU p50 in ms:
From a cold shader cache, lab in Recompiled, 3 repeats, run twice:
The 28.4-28.7 values are not a shader cache effect: the second run's window had no compile and no skipped draw. In these windows and one warm one, GPU time reaches about 31 ms for 15-25 s, and I don't know why. At this cap DVFS lowers clocks until the frame fits, so these numbers show repeatability and aren't a measure of GPU power.
shader_cache_at_starton the last commit, one lab window each: an empty cache in Recompiled gavecold, a warm cache in Recompiled and in Native gavewarm. The commit field read6a808ef920e6-dirtywhen built with changes and08fb8f58dd80when built from that commit.Without the flag, against a stock
v0.3.1-betabuild, one 100 s run each, last 900 frames (this build is the commit before the last one):No extra files and no benchmark log lines.
Failure paths seen on the device: unreachable pitch, far position, event in the window and missing save each give
harness_errorat their step; a bad scene file and a scene file inside the save's folder stop with a message; a throwaway build with the version check flipped showsunsupported versionand exits after OK. Hashes of the source save and of the player's save and settings were unchanged after the runs that used them.Not tested: a real game version other than 1.9.0, a save in a shrine, several save slots, inverted camera options, a crash during a run, other devices and refresh rates. Hearts were checked on screenshots only.
Not in this version
fps_mode=4and other passes without the cap:cap30only.tools/patches.py, no calls into game functions.Merge Danger
Door: two-way
Revert removes it. No save format, settings format or game code changes. A run updates the shader cache, like a normal session.
Blast Radius: small
With the flag off the new code is
boolchecks inrt_vfr_update,input_frameandvk_pace_frame, plus counters beside the existing ones inexec.candshaders.c, and a git call on every build. ThenativeDeviceStatsJNI signature changes on both sides. With the flag on it writes to game memory at 1.9.0 addresses, on the scratch save's run.