WIP: fix(fps): Havok cloth keeps the clock above a 60 fps cap, solved at most 60 times a second (HOS_FPS_CLOTH_60=1, off by default) (#1485) #1628

Draft
enum wants to merge 7 commits from enum/Longshot:perf/cloth-above-60 into main
Contributor

Type: fix · Risk: low · Tested on: Windows 11, RTX 4070 · Needs: Linux, AMD, Steam Deck (a look at cloth above a 60 cap)

Stacked on #1384 (its head e418c77a): review the last three commits only. It builds on #1384's patch_cloth_time and leaves its below-60 behaviour as it is.

TL;DR

Above a 60 fps cap, the cloth in the game (King Zora's robe, Link's cap, people's clothes) was simulated once every frame, each time as if a 60th of a second had passed, so at 240 fps it moved four times too fast and cost four times the work. With HOS_FPS_CLOTH_60=1 it is simulated at most 60 times a second and holds its pose in between. A new game-free test fails without the fix (240 solves in 240 frames at 240 fps) and passes with it (60); in the game the cloth looked right with it on, and the frame rate was the same within the spread. Off by default for now.

Breakdown

  • Who it helps: anyone who plays above a 60 fps cap: cloth moves at the right speed instead of fps / 60 times too fast.
  • What was wrong: the cloth's solve job ran every frame and stepped the cloth a 60th each time, whatever the frame's length.
  • What changes: with HOS_FPS_CLOTH_60=1, a frame shorter than a 60th solves only when the game clock has crossed a whole 60th; otherwise the job returns at once and the cloth keeps its last pose.
  • What does not change: the default (the switch is off), 60 fps and below (#1384's case), a cap of 60, saves, caches and the renderer.
  • How it was checked: a game-free test that fails without the fix; the patch applied once in a real lift; in the game on an RTX 4070 the cloth looked right with it on; three interleaved timed pairs show no fps change.
  • What is still open: a look on Linux, AMD and the Steam Deck; whether it should be on by default (by 2026-12-02).
  • Risk: low: off by default; when on, a cloth held between solves could trail its body by a few milliseconds.

Why

Issue #1485 is a frame-rate drop near King Zora in Zora's Domain. A profile there (comments on #1485) put the Havok cloth solve at 45.7 % of the game's job workers' time, about 10.5 ms of CPU a frame against about 2 ms on the path below, and #1384's reading of the cloth's timing says why it runs every frame above 60: each solve is a 60th of a second, so above a 60 cap the cloth both runs too fast and costs one solve a frame. #1384 left that case open on purpose; dukenheimer agreed this should take it (#1384 (comment) and the reply after it).

This PR fixes the speed. It does not fix #1485's frame rate on its own: at the stairs behind King Zora the frame is already slower than 60 on a 7900X (a frame step of about 1.1), so each frame solves at most once and there is nothing for the gate to skip. What lifted that spot in my runs was compiling the cloth's code at -O2, which is a separate proposal.

See #1485.

How to reproduce

Seen on: Windows 11, RTX 4070 (NVIDIA 616.56), Ryzen 9 7900X
Settings and switches: a cap above 60 (HOS_FPS_MAX=240), HOS_FPS_LOG=1
Steps: play anywhere with cloth near the camera (Zora's Domain, child) and read the log.
Expected: the cloth solved about 60 times a second.
Actual: every solve job runs every frame. With this PR and HOS_FPS_CLOTH_60=1, the log's oot: cloth solved N of the last 600 solve jobs line says how many ran (396 of 600 at the Zora's Domain arrival at a step of 0.65).

What changed

The cloth's solve job is gated through the host: on a frame shorter than a 60th, it runs only when the game clock has crossed a whole 60th since the frame before; every job of one frame makes the same choice.

  • host: oot_cloth_gate() in host/oot_high_fps.h (the rule, and why, in the header's comment); hos_oot_cloth_solve() in host/oot_high_fps.c reads the game clock (hos_step_probe + 0xd58, as nn_vi.c's log does) and the frame step, under a lock, and counts the solves for HOS_FPS_LOG.
  • lift: patch_cloth_solve() in nx2/oot_patches.py puts the gate at the head of f_81b47080, the cloth's solve job, before its first line; a held frame returns the job's own result, 0. The report warns when the site is not found once.
  • What the solve job calls, read from the lift: the cloth's own code, timer scopes (nn::os::GetSystemTick), thread-local lookups and a scratch buffer; no indirect call, no job started or signalled, nothing the setup allocated freed. Returning early leaves the job runner what a solve leaves it.
  • docs: the switch's row in docs/development.md; gpu/vk/switches.def gets its row.
  • tests: tests/test_oot_cloth_60.py (new).

Measurements

Verdict: no change in frame rate (within the spread at all three spots); the cloth is solved about 60 times a second above the cap, as intended.

Hardware: Windows 11 Pro (26300), RTX 4070 12 GB (NVIDIA 616.56), Ryzen 9 7900X, 64 GB
Scene: teleport arrivals: Market (child), Hyrule Field (adult), Zora's Domain (child); output 2560x1440 in a 1280x720 window, Quality preset Auto (tier 4, the game's own upscaler), frame generation off, cap 240
Method: one game folder (this branch at 8aadf550 over a 310e7c9d base, lifted chunks at -O1 as a player's build has them), HOS_FPS_CLOTH_60 unset against =1; each spot settled 12 s, then 20 s by the game's frame counter, hands off; one session a run in the job queue's timing mode, interleaved a1 b1 a2 b2 a3 b3; the median of three. The PC was busy outside the game (1.8-4.3 cores), so small differences are not resolvable here.
How to reproduce: the switch and HOS_FPS_LOG=1 as above; any save; the control bridge's teleport to the three destinations.
Baseline: the before column is this branch with the switch unset, which runs the cloth as main does (the gate stands aside).

fps Before: switch unset @ 8aadf550 After: HOS_FPS_CLOTH_60=1 @ 8aadf550
Market (child) 68.1, 67.8, 68.7 (median 68.1) 67.7, 68.7, 69.5 (median 68.7)
Hyrule Field (adult) 91.5, 94.1, 95.6 (median 94.1) 93.9, 95.3, 95.4 (median 95.3)
Zora's Domain (child) 85.8, 89.6, 90.4 (median 89.6) 89.8, 89.9, 89.6 (median 89.8)
oot: cloth solved 396 of the last 600 solve jobs (step 0.650, HOS_FPS_CLOTH_60; 43200 jobs)     (Zora's Domain arrival, switch on)
oot: cloth solved 600 of the last 600 solve jobs (step 1.111, HOS_FPS_CLOTH_60; 198000 jobs)    (the stairs behind King Zora: slower than 60, nothing to skip)

The game-free test, before the fix (fc86e2ab) and after (0663d20f):

fc86e2ab: 240 fps, HOS_FPS_CLOTH_60 1: the cloth solved in 240 of 240 frames, 60 expected (at most 60 a second)   (5 cases wrong)
0663d20f: Ran 2 tests ... OK

Flags and settings

One new switch, off by default.

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
HOS_FPS_CLOTH_60 the cloth solved at most 60 times a second above a 60 cap (none) unset: off on: the cloth moves at the right speed above 60, fewer solves helps the cloth's speed; no fps change measured on a 7900X; untested on Linux, AMD, the Steam Deck off until it has been looked at on more PCs; decide its default, or remove it, by 2026-12-02

Testing

Tested: Windows 11, RTX 4070, NVIDIA 616.56: with the switch on at a 240 cap, Zora's Domain (child), from the arrival to the stairs behind King Zora: King Zora's robe and Link's cap looked right, nothing trailing or held that I saw, and the log counted the solves as above. The three timed pairs above. tests/test_oot_cloth_60.py fails at fc86e2ab (240 of 240 frames solve at 240 fps) and passes here, and fails again with the gate's key line or the patch's call to it broken by hand. #1384's test_oot_cloth_time passes as it is. The pack's lift reported oot_patches: the cloth's solves above 60 fps in code_024.c (found once, no warning). python -I -B tests/run_all.py on Windows: 685 passed, 49 failed, 48 skipped; every one of the 49 also fails at #1384's head (e418c77a).

Not tested: Linux (the host code is the same, the lock is SRWLOCK as the sound gate's next to it), AMD, Intel and the Steam Deck; frame generation; cutscenes with cloth.

Must be tested:

  • linux, amd, steamdeck: start with HOS_FPS_CLOTH_60=1 HOS_FPS_LOG=1 at a cap above 60, go to Zora's Domain as a child and look at King Zora's robe and Link's cap, expecting them to move as at 60 and the log to count fewer solves than jobs (Test Farm: @Beanstalk linux, amd and the Steam Deck: Zora's Domain as a child with HOS_FPS_CLOTH_60=1 at a cap of 240; check the log for "oot: cloth solved")

Risks

What could break: with the switch on, a cloth's pinned points could trail its body for up to three frames at 240 fps between solves (not seen on this PC). With it off, nothing changes.

Turning it off: leave HOS_FPS_CLOTH_60 unset (the default).

Compatibility: the game is translated again with the patch (a lift change), as any change to nx2/oot_patches.py does; saves, options and the shader and pipeline caches are unchanged.

Issues

See #1485

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).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why.
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main. (Stacked on #1384's head, on main 430eef4f; it rebases when #1384 merges.)
  • 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.
  • Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
  • 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 game-free test added for the fix, failing on main and passing here.
  • Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (Built on Windows in the pack; Linux not built yet: a Must be tested item.)
  • Docs updated.

🤖 Generated with Claude Code

**Type:** fix · **Risk:** low · **Tested on:** Windows 11, RTX 4070 · **Needs:** Linux, AMD, Steam Deck (a look at cloth above a 60 cap) **Stacked on #1384** (its head `e418c77a`): review the last three commits only. It builds on #1384's `patch_cloth_time` and leaves its below-60 behaviour as it is. ## TL;DR Above a 60 fps cap, the cloth in the game (King Zora's robe, Link's cap, people's clothes) was simulated once every frame, each time as if a 60th of a second had passed, so at 240 fps it moved four times too fast and cost four times the work. With `HOS_FPS_CLOTH_60=1` it is simulated at most 60 times a second and holds its pose in between. A new game-free test fails without the fix (240 solves in 240 frames at 240 fps) and passes with it (60); in the game the cloth looked right with it on, and the frame rate was the same within the spread. Off by default for now. ## Breakdown - **Who it helps:** anyone who plays above a 60 fps cap: cloth moves at the right speed instead of fps / 60 times too fast. - **What was wrong:** the cloth's solve job ran every frame and stepped the cloth a 60th each time, whatever the frame's length. - **What changes:** with `HOS_FPS_CLOTH_60=1`, a frame shorter than a 60th solves only when the game clock has crossed a whole 60th; otherwise the job returns at once and the cloth keeps its last pose. - **What does not change:** the default (the switch is off), 60 fps and below (#1384's case), a cap of 60, saves, caches and the renderer. - **How it was checked:** a game-free test that fails without the fix; the patch applied once in a real lift; in the game on an RTX 4070 the cloth looked right with it on; three interleaved timed pairs show no fps change. - **What is still open:** a look on Linux, AMD and the Steam Deck; whether it should be on by default (by 2026-12-02). - **Risk:** low: off by default; when on, a cloth held between solves could trail its body by a few milliseconds. ## Why Issue #1485 is a frame-rate drop near King Zora in Zora's Domain. A profile there (comments on #1485) put the Havok cloth solve at 45.7 % of the game's job workers' time, about 10.5 ms of CPU a frame against about 2 ms on the path below, and #1384's reading of the cloth's timing says why it runs every frame above 60: each solve is a 60th of a second, so above a 60 cap the cloth both runs too fast and costs one solve a frame. #1384 left that case open on purpose; dukenheimer agreed this should take it (https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1384#issuecomment-48962 and the reply after it). This PR fixes the speed. It does not fix #1485's frame rate on its own: at the stairs behind King Zora the frame is already slower than 60 on a 7900X (a frame step of about 1.1), so each frame solves at most once and there is nothing for the gate to skip. What lifted that spot in my runs was compiling the cloth's code at `-O2`, which is a separate proposal. See #1485. ## How to reproduce **Seen on:** Windows 11, RTX 4070 (NVIDIA 616.56), Ryzen 9 7900X **Settings and switches:** a cap above 60 (`HOS_FPS_MAX=240`), `HOS_FPS_LOG=1` **Steps:** play anywhere with cloth near the camera (Zora's Domain, child) and read the log. **Expected:** the cloth solved about 60 times a second. **Actual:** every solve job runs every frame. With this PR and `HOS_FPS_CLOTH_60=1`, the log's `oot: cloth solved N of the last 600 solve jobs` line says how many ran (396 of 600 at the Zora's Domain arrival at a step of 0.65). ## What changed The cloth's solve job is gated through the host: on a frame shorter than a 60th, it runs only when the game clock has crossed a whole 60th since the frame before; every job of one frame makes the same choice. - host: `oot_cloth_gate()` in `host/oot_high_fps.h` (the rule, and why, in the header's comment); `hos_oot_cloth_solve()` in `host/oot_high_fps.c` reads the game clock (`hos_step_probe + 0xd58`, as `nn_vi.c`'s log does) and the frame step, under a lock, and counts the solves for `HOS_FPS_LOG`. - lift: `patch_cloth_solve()` in `nx2/oot_patches.py` puts the gate at the head of `f_81b47080`, the cloth's solve job, before its first line; a held frame returns the job's own result, 0. The report warns when the site is not found once. - What the solve job calls, read from the lift: the cloth's own code, timer scopes (`nn::os::GetSystemTick`), thread-local lookups and a scratch buffer; no indirect call, no job started or signalled, nothing the setup allocated freed. Returning early leaves the job runner what a solve leaves it. - docs: the switch's row in `docs/development.md`; `gpu/vk/switches.def` gets its row. - tests: `tests/test_oot_cloth_60.py` (new). ## Measurements **Verdict:** no change in frame rate (within the spread at all three spots); the cloth is solved about 60 times a second above the cap, as intended. Hardware: Windows 11 Pro (26300), RTX 4070 12 GB (NVIDIA 616.56), Ryzen 9 7900X, 64 GB Scene: teleport arrivals: Market (child), Hyrule Field (adult), Zora's Domain (child); output 2560x1440 in a 1280x720 window, Quality preset Auto (tier 4, the game's own upscaler), frame generation off, cap 240 Method: one game folder (this branch at `8aadf550` over a 310e7c9d base, lifted chunks at `-O1` as a player's build has them), `HOS_FPS_CLOTH_60` unset against `=1`; each spot settled 12 s, then 20 s by the game's frame counter, hands off; one session a run in the job queue's timing mode, interleaved a1 b1 a2 b2 a3 b3; the median of three. The PC was busy outside the game (1.8-4.3 cores), so small differences are not resolvable here. How to reproduce: the switch and `HOS_FPS_LOG=1` as above; any save; the control bridge's `teleport` to the three destinations. Baseline: the before column is this branch with the switch unset, which runs the cloth as main does (the gate stands aside). | fps | Before: switch unset @ 8aadf550 | After: HOS_FPS_CLOTH_60=1 @ 8aadf550 | |---|---|---| | Market (child) | 68.1, 67.8, 68.7 (median 68.1) | 67.7, 68.7, 69.5 (median 68.7) | | Hyrule Field (adult) | 91.5, 94.1, 95.6 (median 94.1) | 93.9, 95.3, 95.4 (median 95.3) | | Zora's Domain (child) | 85.8, 89.6, 90.4 (median 89.6) | 89.8, 89.9, 89.6 (median 89.8) | ``` oot: cloth solved 396 of the last 600 solve jobs (step 0.650, HOS_FPS_CLOTH_60; 43200 jobs) (Zora's Domain arrival, switch on) oot: cloth solved 600 of the last 600 solve jobs (step 1.111, HOS_FPS_CLOTH_60; 198000 jobs) (the stairs behind King Zora: slower than 60, nothing to skip) ``` The game-free test, before the fix (`fc86e2ab`) and after (`0663d20f`): ``` fc86e2ab: 240 fps, HOS_FPS_CLOTH_60 1: the cloth solved in 240 of 240 frames, 60 expected (at most 60 a second) (5 cases wrong) 0663d20f: Ran 2 tests ... OK ``` ### Flags and settings One new switch, off by default. | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | `HOS_FPS_CLOTH_60` | the cloth solved at most 60 times a second above a 60 cap | (none) | unset: off | on: the cloth moves at the right speed above 60, fewer solves | helps the cloth's speed; no fps change measured on a 7900X; untested on Linux, AMD, the Steam Deck | off until it has been looked at on more PCs; decide its default, or remove it, by 2026-12-02 | ## Testing **Tested:** Windows 11, RTX 4070, NVIDIA 616.56: with the switch on at a 240 cap, Zora's Domain (child), from the arrival to the stairs behind King Zora: King Zora's robe and Link's cap looked right, nothing trailing or held that I saw, and the log counted the solves as above. The three timed pairs above. `tests/test_oot_cloth_60.py` fails at `fc86e2ab` (240 of 240 frames solve at 240 fps) and passes here, and fails again with the gate's key line or the patch's call to it broken by hand. #1384's `test_oot_cloth_time` passes as it is. The pack's lift reported `oot_patches: the cloth's solves above 60 fps in code_024.c` (found once, no warning). `python -I -B tests/run_all.py` on Windows: 685 passed, 49 failed, 48 skipped; every one of the 49 also fails at #1384's head (`e418c77a`). **Not tested:** Linux (the host code is the same, the lock is `SRWLOCK` as the sound gate's next to it), AMD, Intel and the Steam Deck; frame generation; cutscenes with cloth. **Must be tested:** - linux, amd, steamdeck: start with `HOS_FPS_CLOTH_60=1 HOS_FPS_LOG=1` at a cap above 60, go to Zora's Domain as a child and look at King Zora's robe and Link's cap, expecting them to move as at 60 and the log to count fewer solves than jobs (Test Farm: @Beanstalk linux, amd and the Steam Deck: Zora's Domain as a child with HOS_FPS_CLOTH_60=1 at a cap of 240; check the log for "oot: cloth solved") ## Risks **What could break:** with the switch on, a cloth's pinned points could trail its body for up to three frames at 240 fps between solves (not seen on this PC). With it off, nothing changes. **Turning it off:** leave `HOS_FPS_CLOTH_60` unset (the default). **Compatibility:** the game is translated again with the patch (a lift change), as any change to `nx2/oot_patches.py` does; saves, options and the shader and pipeline caches are unchanged. ## Issues See #1485 ## 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] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [ ] Rebased on current `main`. (Stacked on #1384's head, on main `430eef4f`; it rebases when #1384 merges.) - [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] Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported. - [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 game-free test added for the fix, failing on `main` and passing here. - [ ] Host code builds on both Windows (llvm-mingw) and Linux, with UTF-8 paths. (Built on Windows in the pack; Linux not built yet: a Must be tested item.) - [x] Docs updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Assisted-by: GitHub Copilot (Claude Opus 5.5)
Co-authored-by: Copilot App <[email protected]>
f_81b3aa48 takes the cloth's time from its step context, a 60th of a second whatever the frame (16.67 ms measured at 18 fps, ~45 setups a frame at 18 and 60 fps), so below 60 fps the cloth ran at fps/60 of the clock: Link's cap swung out and settled slowly. While the game's frame step (f_83b6ea90's float at 0x84d61fc8) is over 1, hos_oot_cloth_seconds multiplies that time by it: the same solves, the cloth on the clock. 60 fps and above unchanged. HOS_FPS_CLOTH=0 keeps the game's.

Assisted-by: GitHub Copilot (Claude Opus 5.5)
Co-authored-by: Copilot App <[email protected]>
Assisted-by: GitHub Copilot (Claude Opus 5.5)
Co-authored-by: Copilot App <[email protected]>
docs(tested): the cloth fix's CPU cost (three interleaved pairs) and other areas on the PC at 18 fps
Some checks failed
PR description / Description follows the template (pull_request_target) Successful in 5s
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
e418c77a6e
The older PC records said DLSS: these builds have none, and Auto picked tier 5 with the game's own upscaler.

Assisted-by: GitHub Copilot (Claude Opus 5.5)
Co-authored-by: Copilot App <[email protected]>
Above a cap of 60 the cloth's solve job (f_81b47080) runs every frame and steps the cloth a 60th each time: at 240 fps four
solves where the console makes one. Near King Zora that holds the frame at about 55 fps under a cap of 240 (#1485). The check
runs the job's head through patch_file and counts its solves over 240 frames of 3 jobs; on this commit, with
HOS_FPS_CLOTH_60=1, it solves in 240 of 240 frames at 240 fps where 60 is right.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Assisted-by: Claude Code (claude-opus-5-5)
Above a cap of 60 the cloth's solve job (f_81b47080) ran every frame, each solve a 60th: at 240 fps four solves where the console
makes one, the cloth four times too fast and four times the CPU. Near King Zora (his robe) that held the frame at about 55 fps
under a cap of 240, the main thread waiting for the job workers (#1485: the solve 45.7 % of the workers' game code there,
~10.5 ms of CPU a frame). With HOS_FPS_CLOTH_60=1, a frame whose step is under 1 solves only when the game clock has crossed
a whole 60th (oot_cloth_gate, host/oot_high_fps.h); a held frame returns from the job at once with its own result, 0, before it
saves anything. Every job that sees one clock value makes the same choice. At 60 fps and below (#1384's case), at a cap of 60,
for a step that is not a number and with the switch unset, every frame solves as before. HOS_FPS_LOG counts the solves. Documented in docs/development.md (a decision on its default by 2026-12-02) and
listed in gpu/vk/switches.def.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Assisted-by: Claude Code (claude-opus-5-5)
docs(tested): the cloth gate on and off in one -O1 game folder, three interleaved pairs (#1485)
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 / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 5s
beanstalk/approval waiting for a BigBean's 👍 on the request
06a0735dd9
RTX 4070, Ryzen 9 7900X, Windows 11, with 1.8-4.3 cores busy outside the game; teleport arrivals in the child Market, the
adult Hyrule Field and the child Zora's Domain, 20 s each by the game's frame counter. Medians of three, HOS_FPS_CLOTH_60
unset -> =1: Market 68.1 -> 68.7, Hyrule Field 94.1 -> 95.3, Zora's Domain 89.6 -> 89.8, all within the spread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Assisted-by: Claude Code (claude-opus-5-5)
Author
Contributor

Tested in game: Windows 11, RTX 4070, NVIDIA 616.56, Ryzen 9 7900X: HOS_FPS_CLOTH_60=1 at a 240 cap, Zora's Domain (child) from the arrival to the stairs behind King Zora: King Zora's robe and Link's cap looked right; the log counted 396 of 600 solve jobs at the arrival (step 0.65), all of them at the stairs (step 1.1, slower than 60).

Tested in game: Windows 11, RTX 4070, NVIDIA 616.56, Ryzen 9 7900X: HOS_FPS_CLOTH_60=1 at a 240 cap, Zora's Domain (child) from the arrival to the stairs behind King Zora: King Zora's robe and Link's cap looked right; the log counted 396 of 600 solve jobs at the arrival (step 0.65), all of them at the stairs (step 1.1, slower than 60).
Author
Contributor

@Beanstalk linux on AMD (RADV) and the Steam Deck. This PR changes how often the game's cloth is simulated above a 60 fps cap (a lift patch, off unless HOS_FPS_CLOTH_60=1). Build this PR and main; with HOS_FPS_CLOTH_60=1 and HOS_FPS_MAX=240, start the kokiri-start save, teleport to Zora's Domain as the child and stand there 30 s, take a picture there to compare with main's, and check the log for "oot: cloth solved" (expected: present, no crash).

@Beanstalk linux on AMD (RADV) and the Steam Deck. This PR changes how often the game's cloth is simulated above a 60 fps cap (a lift patch, off unless HOS_FPS_CLOTH_60=1). Build this PR and main; with HOS_FPS_CLOTH_60=1 and HOS_FPS_MAX=240, start the kokiri-start save, teleport to Zora's Domain as the child and stand there 30 s, take a picture there to compare with main's, and check the log for "oot: cloth solved" (expected: present, no crash).
Member

@enum only members of BigBeans can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.

@enum only members of `BigBeans` can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.
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 / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 5s
beanstalk/approval waiting for a BigBean's 👍 on the request
This pull request is marked as a work in progress.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'perf/cloth-above-60:enum-perf/cloth-above-60'
git switch 'enum-perf/cloth-above-60'
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!1628
No description provided.