mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:45:53 +01:00
[PR #2146] present: LEONIDA_PRESENT_DUMP_SLOW_MS also dumps every present that comes late (RT-PRESENT-DUMP-SLOW) #2151
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2151
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2146
Author: @thegalaxydev
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:rt-present-dump-slow📝 Commits (1)
b633039present: LEONIDA_PRESENT_DUMP_SLOW_MS also dumps every present that comes late (RT-PRESENT-DUMP-SLOW)📊 Changes
4 files changed (+69 additions, -5 deletions)
View changed files
📝
runtime/CMakeLists.txt(+3 -1)📝
runtime/README.md(+1 -0)📝
runtime/src/present_dump.h(+49 -2)📝
runtime/test/vk_present_dump_test.cpp(+16 -2)📄 Description
RT-PRESENT-DUMP-SLOW, claimed in #1608 as RT-PRESENT-DUMP-FROM. The claim named a first frame number; measuring showed that number is not stable (below), so the option is keyed on the gap between presents instead and renamed to say so.
What
LEONIDA_PRESENT_DUMP_SLOW_MS=<ms>: withLEONIDA_PRESENT_DUMP=DIR[,N], a present that comes at least<ms>after the one before it is dumped too, whateverNis.present_dump::parse_slow_gapreads the value: milliseconds over 0; unset or empty is off; anything else is refused with one log line and the dump goes on as before.PresentDump::due(index)measures the gap the first time a present asks and gives both of that present's questions (copy the swapchain image infinish_image, save it after the present) the same answer, so a frame is never copied without being saved or saved without being copied.runtime/README.mdhas the new row underLEONIDA_PRESENT_DUMP.Why
At a world start the loading screens are thousands of presents a few milliseconds apart, and the frames after them come seconds apart.
DIR,Nthen either misses the slow frames (largeN: of the first 8 world frames of one run,N=50kept 1) or writes thousands of loading frames first (smallN: 713 PNGs, about 10 GB at 2544x1401, before the first world frame of another run). A fixed first frame does not work either: on the same machine and title the world started at present 1,930 in one run and at 2,634 in the next, because the loading screens present faster when a submission costs less. The gap separates the two kinds of frame in every run.Tested
scripts/build_runtime.ps1, on main1bf5eeafd.vk_present_dump_testgains--slow(vk_present_dump_slow):N=60andLEONIDA_PRESENT_DUMP_SLOW_MS=1000, three presents with a 1.5 s pause before the third; exactly the first (an Nth one) and the third (a late one) are written and decoded, the second is not. The parser's cases run before the test asks for a device, so they run on a host without one.ctest -R present: 11/11 pass (vk_present_dump,_default,_invalid,_slow,xbox_present,xs_present_lazy,vk_presenter_capture_colour,present_window,xbox_present_readback_sizeand two more).scripts/check_no_game_data.pyon the changed files: clean.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.