feat(vk): trace effective presentation geometry on changes #1457
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1457
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/presentation-geometry-trace"
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?
The current upscale diagnostic reports only its first dispatch, so a later resize does not show the crop, fitted destination or whether filtering actually returned an image. Frame timing CSV and image-readback capture serve different purposes.
Add opt-in
RX_VK_PRESENT_LOG=1geometry-change diagnostics: source/crop/content/output/destination, observed host aspect, sampled-view availability and selected direct/scaled/clear route. Filter/sharpness/frame-generation values are labeled requests. Deduplicate separately for game, interpolated and startup frames; normalize invalid aspects and cap output at256 changes plus one suppression notice. Unset/0 stays disabled. No rendering/settings policy or image-readback changes.Validation:
Based on main
a37ab47, whose advance from9a2e80echanges only readme.md. Earlier runtime/integration manifests retain their actual source hashes; production/test source contents are unchanged by that rebase. Six source/test/doc files only, no game data or private logs. F01 integration needs keeping its aspect calculation and this adjacent route declaration; both consumer tests pass in the combined checkout. #1352 merges cleanly at the fetched head; #1025's capture plumbing is a different capability.Updated at
1331051on mainb2e1c5ato address review and the newly merged presentation paths:PresentAspectsnapshot used for fitting; the host callback is sampled once. Empty-source presentation does not query it.Validation: focused Windows LLVM and Linux GCC tests pass, including GCC ASan/UBSan. The official standalone backend and integrated host/backend builds pass. Native API11 run reached the copied Kokiri checkpoint, recorded separate game/made geometry, resized from1720x720 to3440x1369 (destination85,0 3270x1369 at43:18) and restored; normal exit0. Original checkpoint hashes unchanged. Guest translation was generated officially on8240446, then reused only after verifying main's sole intervening change is merged1496's duplicate menu formatter removal. No generated C was edited or published. HDR route behavior is CPU-tested; this run does not claim a physical HDR test. Shared source-suite repairs are tracked in1498.
Current-head validation
Current head
6b3b2b7, based on main7d1562d. Earlier local/runtime results describe their recorded source hashes.The standalone contribution patch is unchanged after the audited main refresh; exact-head build/source checks are refreshed below. Earlier runtime evidence remains tied to its recorded hash.
Fork runs are separate from upstream Actions approval; no maintainer approval gate is bypassed.
Looks good to me. Opt-in, bounded, and cheap: with
RX_VK_PRESENT_LOGunset the present path pays one static bool check, and when it's on it's a ~100-byte compare per present withlogfonly on change. The statics are only touched underpresent_image_mu(all callers go throughpresent_image, and the early returns are before the trace), so thread-safety is fine. Readingoptswithout a lock is the same asframegen_scalealready does. Test is registered in run_all.py, and the fork's Linux/Windows builds are green.A few small things, all nits:
preserve_stretch/present_rectlines right above the newtrace_routeline, so whichever lands second will probably hit a small textual conflict. Easy to fix, and the test already handles thePresentAspect aspect{marker. Once #1339 is in, it'd be nicer for the trace to log the aspect that was actually passed topresent_rect(which #1339 zeroes when there's nosrc) than to callhost->aspect_ratio()a second time. With #1448,blit_crop_to_rectclears instead of blitting when the crop is invalid, and that will still be logged asroute=direct.present_imagebetweenconst bool preserve_stretch =/const PresentAspect aspect{andif (src && framelog_on()), then compiles that slice against fakes. That checks the real code, but any rewording there breaks it. Fine for now, just worth knowing.Nit: #1339 replaces the two lines just above, so expect a small merge conflict here. Also, once #1448 lands,
blit_crop_to_rectcan clear instead of blit on an invalid crop, and that case would still be traced asdirect.Nit: since the requests are in the dedupe key, a sharpness slider drag gives one line per value (x2 with FG) out of the shared 256 budget. Consider dropping them from the key, or only logging them along with a geometry/route change.