Game: Camera reversal and combat cause repeatable FPS drops in Hyrule Field on RTX 4070 Ti #1720
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#1720
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reported on Discord
Longshot version
v3.0.0 (source 87cb36aa)
Channel
Release (stable)
What happened and steps
The reporter sees a major FPS drop whenever using a button to switch the camera to the opposite side (a turn greater than 180°). They also report major FPS drops when starting fights with monsters in Hyrule Field; this was already present on the previous RC7.
Where in the game
Hyrule Field, child map (
HyruleField_Childin the bug report).How often
Camera drops occur each time they switch sides; combat drops when engaging monsters.
Graphics card and driver version
NVIDIA GeForce RTX 4070 Ti, NVIDIA driver 617.42.
CPU, RAM and operating system
Intel Core i7-14700KF (28 threads), 32 GB RAM, Windows 11 build 26300 (26H2).
Graphics settings
1920×1080 output, Docked profile, Custom preset, NVIDIA DLSS, Auto (dynamic) render resolution; frame generation 2x, game frame-rate cap 90, Reflex On, fullscreen On, V-Sync On. See report for other settings.
Logs and measurements
The bug-report log is from v3.0.0 (source 87cb36aa). It records 78 FPS samples: minimum 47, median 90, maximum 91, with isolated samples at 47 and 59–62 FPS. The report lists
HOS_THREAD_TIMES=5andRX_VK_SLOW_LOG=50, but does not confirmRX_VK_PASS_TIMING=1; available frame summaries do not provide the complete profile captured during the reported actions. Please follow https://longshot.magicbean.dev/help/performance/ and send a profile while reproducing each symptom, noting which action/place corresponds to each drop.Still needed
Exact steps and location for the camera reversal and combat (including enemies involved), whether each happens on every repeat, and measured profile data while each symptom occurs. Please clarify whether “latest version” means v3.0.0 stable.
Related reports
Steps taken and expected result
The reporter plays in Hyrule Field, reverses camera direction using a button and engages monsters; expected behavior is that these actions do not cause major FPS drops.
Attachments
Video:
longshot-2026-11-19-07-49-04_Cv9z7GqX.mp4.The bug-report ZIP is not copied; its useful contents are
2026-11-19_08-03-08/report.txt,longshot_log.txt,longshot_log.1.txt,picture.png,graphics.pngandgraphics_bis.png.Files from the Discord report:
Claimed: I'm reproducing this on main on Windows 11 with an RTX 4070 and NVIDIA 616.56, using the report's settings (DLSS, Auto render resolution, frame generation 2x, cap 90, Reflex and V-Sync on). Each drop will be profiled (camera swung to the other side, then a fight starting) and compared with the same scene without frame generation. Prior work: none found. #1406 (direction changes, RTX 5060 Ti) and #1213 (enemy deaths, RTX 5080 Linux) may be the same cause; I'll say there if what I find covers them.
Reproduced on Windows 11 with an RTX 4070 and NVIDIA 616.56, on main
868f6be8with #1729. Adult Link in Hyrule Field, 2560x1440 output, DLSS, cap 90, Reflex and V-Sync on. A person played; the log hadRX_VK_PASS_TIMING=1,RX_VK_SLOW_LOG=50andHOS_THREAD_TIMES=5. The display is 240 Hz, and FIFO held at most 4 frames, so the refresh rate is not the limit.Camera reversals drop frames with frame generation on, not off. Each line is one 120-present window of the log.
Render resolution made no difference: Quality and Auto dropped the same way.
Where the time goes. Frame generation's copies and presents go to the game's own graphics queue, so they run in turns with the game's frames (
docs/design.mdsection 13, rule 5). In the pass timing, the GPU time between the game's own work within a frame rises from ~1.37 ms with frame generation off to 3.4-4.2 ms with it on, while the game's work stays at 6.2-8.6 ms. At a 90 cap (11.1 ms) the GPU is full even standing still. A reversal adds draws (2,000-2,500 against ~1,250) and replay work (8-11 ms), which takes it to the drops reported. The readback waits are too small to explain it (0.07 ms each, about 0.2 ms a frame).Fights drop frames even without frame generation: 63-67 fps at cap 90 with it off, and 46-50 at cap 60 with it off. Compute dispatches go from ~155 to 270-370 a frame and draws to ~3,500, both GPU (11-12 ms) and replay (9-13 ms) pass 90's budget, and the game's own limiter drops its nominal rate to 31-32 at times. In the same windows, the game's loading threads (
tera::FileResourceMgr,PreActorModelCompose,aglTextureDataMgr::Compaction) wait 50-115 ms for a virtual core, as in #1610 / #1646. Whether that delays frames or only loading is not established.Also seen: switching frame generation on freezes the game for one frame of 827 ms.
Next: an A/B of
RX_VK_PRESENT_QUEUE=1(presents on a compute queue, off by default since it lost the GPU on an RTX 5080 with 621.24) against the default, the same settings and place, on this RTX 4070, the reporter's generation. Results here.The A/B of
RX_VK_PRESENT_QUEUE=1: the same PC, settings and place as above (frame generation 2x, cap 90, Quality), with reversals played by hand. Each row is 120-present windows of the log.RX_VK_PRESENT_QUEUE=1(presents on compute family 2)It doesn't help: the extra GPU time on the game's queue stays. So it isn't the presents but frame generation's own GPU work (DLSS-G and its copies), about 3-4 ms a game frame on an RTX 4070 at 2560x1440. With frame generation on, about 4.6 ms a frame of the render thread's wait is on fences: it waits for those copies (design.md section 13, rule 4's frame slots).
What this means for the report: the camera-reversal drops are frame generation's GPU cost at a 90 cap. A 4070-class card can't make 90 game frames plus the generated ones, so the game sits near 78 standing, and a reversal's extra geometry takes it into the 60s. The FPS counter shows the game's frames, so it reads as a drop. Workarounds for now: frame generation with a 60 cap, or frame generation off at 90. Neither switch I tried removes the cost.
The fight drops are separate and happen without frame generation (above). I'm testing #1646 against them next, since the loading threads' core waits in those fights look like #1610.
For design.md section 13, rule 5:
RX_VK_PRESENT_QUEUE=1with frame generation 2x ran a whole session on an RTX 4070 (Ada) with NVIDIA 616.56 without losing the GPU, against the RTX 5080 with 621.24 that it is off for.Data from Linux, for whoever is on this (enum's claim stands): Fedora 45 (kernel 7.3.4), AMD Radeon RX 9070 XT (RADV GFX1201, Mesa 26.2.7), Ryzen 5 5600X (12 logical processors), 32 GB RAM, frame generation off, no frame cap. So this may be a different drop from the frame-generation one above.
On current main (
819a5967, after #1121) with #1667's and #1666's probes cherry-picked, a scripted route out of the Castle Town gate into Hyrule Field with a 180° camera turn every 10 s, 8 runs:RX_VK_CAPTURE_NT=1no run had a frame of 100 ms or more (worst 50-68 ms, against 313-1444 ms), and the 1% low was 27.7-30.1 fps against 9.6-19.2. Details: #1667 (comment).Every run is on record in #1749. Happy to run anything on Linux AMD.
Follow-up on the field-entry drops on Linux (RX 9070 XT, RADV GFX1201, Mesa 26.2.7, same setup and route as above). The longest ones look like the GPU's ASTC work at the gate: the GPU is at 100% for ~450 ms there, and skipping the BC3 re-encode takes about a third off. Not the whole story: the decode's share is inferred, and a few long waits around the same moment are slow captures instead (below).
How it was found, on main
819a5967(after #1121) with #1667's and #1666's probes, 2 runs a side unless stated:RX_VK_MIRROR_SPARSE=0), batched submits (RX_VK_BATCH=0) or the recorder thread (RX_VK_RECORDER=off, 1 run: the second was ended by the kernel's OOM killer, a memory jump I haven't looked into) changed nothing.gpu_busy_percent, every 50 ms) reads 100 for nearly every sample of the ~455 ms waits, against a median of 34-42% through play. The log's "GPU time" line (longest submission about 20 ms) doesn't show this work.RX_VK_ASTC_RGBA8=1(no BC3 re-encode)RX_VK_ASTC_CPU=1Measured: skipping the BC3 re-encode takes about 150 ms off the worst wait and removes the timeouts (2 runs a side, one PC). Not measured: what the GPU does in the remaining ~300 ms, still at 100%. The decode is the likely candidate, but no run took it off the GPU without moving it to the CPU, which is far worse here: that path is meant for iGPUs. Right after the worst wait, the upload budget still put off ~410 new ASTC textures to later frames (one run's log).
A guess at why the upload budget doesn't spread this out (from reading
upload_deferon main, not tested): it bounds the CPU time spent inupload()(12 ms a frame), not the GPU time of the decode and encode, and it never defers terrain textures (layer arrays, or over 1024x1024). Capping the ASTC decode/encode GPU time per frame, or at least counting it in the GPU time line, might be where a fix goes.A few other long waits have the GPU idle, and those are the capture again: about 2.5 s before the field's measured part, stepping out of the gate, the main thread sits 205-784 ms in
nvnQueueSubmitCommandson a slow capture copy (36-85 MB at about 110-180 MB/s, withRX_VK_CAPTURE_NT=1on), or waits on the Presentation Thread's. These copies have almost no minor faults (21-102) and spend half or more of their time off the CPU, so they aren't the page-fault cost NT fixed. My guess is the guest memory's pages being read back in (major faults, maybe from zram swap), but the capture probe counts only minor faults, so that's untested. I'm running that next.Every run is on record in #1749 (run20-run39). Happy to run a fix on this card.
@GrimVisage, thanks: the field-entry drop shows on NVIDIA too. This RTX 4070 (NVIDIA 616.56, Windows 11) also decodes ASTC on the GPU and keeps big textures as BC3. The log says
ASTC is decoded on the GPU (Eden's decoder, Switch 2 tiling)andbig ASTC textures are kept as BC3 (re-encoded on the GPU ...).From one run on main
868f6be8+ #1729, frame generation off, cap 90, adult Link in Hyrule Field. Each row is 120-present windows of the log:So this issue now holds three drops:
Your ASTC lead looks worth a fix of its own, with the decode and encode's GPU time counted in the upload budget, or at least in the GPU time line. I'm on the fights: an A/B of #1646 against main is under way, and I'll post it here. If you take the ASTC side, a run of it on this NVIDIA card is easy from here.
The fight drops are not the virtual-core waits. A child-at-night Hyrule Field A/B of #1646 against main (Stalchildren fights, cap 90, frame generation off, the same PC; details on #1646 (comment)) took the loading threads' waits over 50 ms from 17 to 0-1, and fight fps stayed the same: 68-69 median in all three runs. So in a fight the frames are lost to the render cost of the extra objects. Draws go from ~2,000 to ~2,300-3,500, and the replay's CPU work rises from ~7 to 9-13 ms a frame, about 3.5 us a draw. The GPU adds about 1.5-2 ms, spread over many small dispatches and barriers, with no single pass to blame. At a 90 cap that is past the 11.1 ms budget. Summary for this issue: camera reversals are frame generation's GPU cost (above), and fights are the replay's per-draw CPU cost plus GPU growth. Neither is a single fault I can fix in one change; the per-draw cost of the replay is the larger lever.
Summary, and the claim released. The drops are reproduced on an RTX 4070 / Ryzen 9 7900X on Windows (details in the comments above). They have three causes, none of them one bug to fix here:
RX_VK_PRESENT_QUEUE=1) doesn't change it.For now (to the reporter): keep frame generation with a 60 cap, or turn it off at 90. Fights will still dip a little until the replay gets cheaper. No more profiles are needed from you.
Where the fixes are: the per-draw cost is the replay and draw path of the renderer rework, #1493 (our numbers: #1493 (comment)), and the thread redesign in #1763. On this PC #1763 currently makes fights 4-5 fps slower, probably from removing the recorder thread (#1763 (comment)). Whether this issue stays open as a pointer to those or closes as explained is for the maintainers.
I'm releasing my claim: I won't build a fix in this issue.
A correction to my last comment: the slow capture copies with the GPU idle are not zram swap. The runs that showed them (the ones with the GPU's busy percent sampled) ran in a cgroup with swap off (
MemorySwapMax=0, its 20 GB cap never reached), so none of the game's memory could be swapped out; in the earlier runs, without that limit, swap use grew by at most 23 MB through a run (more only in the run the kernel's OOM killer ended). Two runs that counted the game's major faults didn't show those slow copies at all, so what they wait on is still open.@enum thanks for the RTX 4070 run, that it shows there too helps. I'll take the ASTC side. One thing I found looking at it: the upload budget (
upload_defer) can't spread all of it even with the GPU's time counted, because it never puts off textures over 1024x1024 or layer arrays (the ground flickered when they waited a frame, the comment there says). This log doesn't say how much of the entry frame's 70 GPU-decoded ASTC textures (155 MB) are of that kind, so the first step is counting it: the decode and re-encode's GPU time per frame, in the GPU time line, split by what the budget can and can't put off. Then the fix goes where that points. I'll post the PR here, and a run on your card would be welcome then.I've opened #1843 for this. ASTC mip levels of 1024 x 1024 or less now re-encode to BC eight layers a run, through a second, small scratch. The 2048 scratch and
RX_VK_BC_LAYERSare unchanged. On an RX 9070 XT (RADV), each of Hyrule Field's never-put-off terrain arrays now takes 16-17.5 ms of GPU time instead of ~50 ms. The first commit adds anastcspan toRX_VK_PASS_TIMING, which is how this was measured. There were no grid lines in 4 runs. Other hardware is listed in the PR's Still to test.From Discord:
Discord thread adds corroborating reports from other players: one says Hyrule Field then Death Mountain Trail drops from 60 to about 20 FPS while running back/forth, slashing and fighting (RTX 3070, Ryzen 5 5600X, stable v3.0.0, default settings; message 1572990936563196006); another reports the same on RX 6600/CachyOS (1573010980852596918); another reports it on RTX 5070 Ti (1573032413867544699). These are useful reports of similar gameplay drops, but they do not provide profiling data or establish that all share the same cause as this issue's camera reversal and fight symptoms.