feat(vk): headless shots draw the mods' UI as a window does #2837
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2837
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:feat/shots-draw-mods-ui"
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?
Summary
Why. On the mod API branch (#2822) a headless run's screenshots (
RX_VK_SHOTS,RX_VK_SHOT_MENU=1) drew the mods' UI with a copy of the window's draw order of their own, without Colour vision, and laid the hosted debug page out at the window's size instead of the shot's. This makes the shot and the window draw the overlays through one function, so a headless shot shows what a window would: mods' HUDs, windows and world labels, then the Insert menu (the menu system mod) and its page.What changed
gpu/vk/vk_menu.cpp/.h:draw_overlaysdraws the mods' UI, then the menu and its hosted page;menu_record(the window) andmenu_record_image(a shot) both call it, and the shot takes the window's Colour vision mode.gpu/vk/vk_replay.cpp: the shot path passes Colour vision as the window does.gpu/vk/vk_ui.cpp: the hosted debug page is laid into the shot's size when headless.gpu/vk/switches.def:RX_VK_SHOT_MENU's row says what it draws (default off, unchanged).docs/dev/developing.md(screenshots on a timer), the guide images README.docs/dev/reference/control-bridge.md:menu_keyworks headless only withRX_VK_SHOT_MENU=1, which ticks the menu there.tests/test_fps_overlay_order.pyruns both record paths with stubs and checks they make the same draws and colour mode;tests/test_ui_renderer.pyfollowsdraw_overlays.Testing
Tested: Linux (CachyOS, Linux 7.3, RTX 3090, NVIDIA 620.70.06), on
bfa15b49(before the rebase onto mod-api4cc50ca1;f32312f8compiles and passes the changed checks), a headless run through the job queue with the sandbox on, 1920x1080 shots every 20 presents,RX_VK_MENU_SCRIPTopening the Insert menu and stepping through its tabs, and thelink-hudexample loaded throughLONGSHOT_DEV_MODS: the shots show the menu system mod's Graphics, Audio, Gameplay, Controls and NFC tabs as a window shows them, and link-hud's HUD (hearts and rupees, top left) and its label over Link with the menu closed.Still to test:
Measurements
Verdict: nothing to measure: the change is in a diagnostic switch's path (
RX_VK_SHOT_MENU, off by default); a window's present calls the same draws as before, in the same order.Risks
draw_overlays; the test checks the window and shot paths make the same draw sequence. No switch to turn it off: the window path's order is unchanged.Checklist
Ready for review
main; the title is a Conventional Commit. (On the mod API branch, the base of this PR.)mise run testpasses (any failure that also fails onmainis named). (The two checks this changes pass; the rest is the mod API branch's.)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
gpu/vk/switches.def.tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
🤖 Generated with Claude Code
Possibly related, for context:
Tested in the game on this PC (Linux CachyOS, RTX 3090, NVIDIA 620.70.06): a headless run with the sandbox on, 1920x1080 shots, the Insert menu opened and stepped through by RX_VK_MENU_SCRIPT, and the link-hud example loaded. The shots show the menu system mod's tabs and link-hud's HUD and world label as a window shows them. Not yet shown: a mod switched off in the Mods tab leaving no HUD in the shot.
856de33cc0f32312f8a1Rebased onto mod-api
4cc50ca1(main merged in), no conflicts; headf32312f8. The changed checks (overlay order, UI renderer, keyboard menu option, switch table, docs) pass, and the renderer and the game side compile.feat/shots-draw-mods-uito feat(vk): headless shots draw the mods' UI as a window does