shadow: by_address limits the card bytes alive, not all ever placed #109
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/lobomfz--VIctory-xmem!109
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-109"
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?
@Bushyon on GitHub · 2026-12-01 20:38 UTC · original
Bushyon:by-address-card-budget→main· +49 −9 · 1 files · 1 commits · closed without mergingThe bug
two_sided(used byshadow::by_address) counts the bytes it puts on the card's own memory in a function-localstatic USEDthat only grows: a copy that goes is never taken off. After 4 GiB has passed through it over a session (not 4 GiB alive at once), every later copy goes to the PC's memory, however much room the card has. A long-session slowdown, ray tracing only.The fix
CARD_RESERVED.reserve_cardreserves a copy's bytes and undoes the reservation when the limit would be passed or the buffer isn't made.Shadow::dropgives the bytes back for copies that were on the card.Tests
the_count_is_of_copies_alive(limit, refused, not made, room back after a drop). It compiles but I could not run it: the test exe under wine printed nothing here../build.sh buildok. In the game (run.sh play,VICTORY_BVH_BUILDER=1, 5 min, 64 MB limit via a temporary switch not in this PR) old and new counting placed copies the same way and nothing crashed. No copies were freed in that time, which is the only case where they differ, so this is not shown in the game.AI-assisted.
@Frtuchinno on GitHub · 2026-12-01 20:52 UTC · original
Ran the tests you couldn't run, on an RX 7800 XT (RDNA3), CachyOS,
proton-cachyos-slr, this PR merged on37bb30f:The ignored one is
merge_tests::runs_of_equal_pages, marked#[ignore]in the tree already.Why the test exe printed nothing: it imports
d3d12.dll, and without the DLL overridesrun.shsets, Wine/Proton loads its builtind3d12→wined3d, which isn't there, so the process exits during import (statusc0000135, exit code 53) before the harness prints anything. With the same overrides asrun.shit runs:(Running the whole
victory-gpusuite in one go still dies part-way with exit status 5 on unmodifiedmainhere, so a filter is the way to check one module.build.shappends its own flags after its arguments, so a test filter can't go through it; hence running the exe directly.)@goldfishdev on GitHub · 2026-12-02 01:54 UTC · original
Merged to main as cherry-picked commit
7df1fdd. Thanks!Pull request closed