GPU: a skin bake's own sources are uploaded while the card's budget holds them, not only under the texture line #1422
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/fxceless--victory-fork!1422
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1422"
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?
@Granite900 on GitHub · 2026-11-27 01:46 UTC · original
Granite900:fix/bake-sources-budget→main· +42 −8 · 2 files · 1 commits · openWith
VICTORY_BAKE_SOURCES=1, a skin-bake draw's own sources are uploaded only whileresource::room()says yes.room()counts the room kept for buffer copies and render targets not made yet (up to 4.3 GB while a world loads) as used, and stops at 90 % of the budget. The bakes run while the world loads, so on a card far under its budget nearly every one of those uploads was refused, and the faces they bake came out black or blotched for the run.There were two gates:
bake_sources_passasksroom()before the upload: 106 skipped with the card at 6.7 GB of a 15.4 GB budget.room()itself, at its start and every 32 MiB. With gate 1 opened, 309 of 336 waiting sources were still not made, and none of them were counted as skipped.Change: both gates ask a new
resource::within_budget(bytes)instead: what is in use, plus the draw's ownVICTORY_BAKE_SOURCES_MB, under 95 % of the budget, the margin Dawn's D3D12 residency keeps. Nothing kept for copies not made yet is counted.=full,=countand every other texture upload are unchanged. 42 lines indraw.rsandresource.rs.Measured on an RX 9070 XT (16 GB, driver 32.0.32029.2010), the café scene of the opening, diagnostics build, the test switch set plus
VICTORY_TILES_SMALL_WHEN_FULL_MB=512andVICTORY_TEXTURE_ROOM_PERCENT=96:=1before=1with gate 1 only=1with this changeThe card peaked at 12.7 GB of 13.9 GB. There was no device loss. The black-shirt case reported in #1264 was with
=fulland a 1 GB cap, and did not appear here.What this does not fix: faces that stay black because their ordinary textures are never made for lack of room. With the change, one person in the café still had a black face, and 29,059 title textures had no host copy at the end of that run (14.0 GB). Black skin of that kind goes away with more room (
VICTORY_CARD_WINDOWS_MB=512), at a cost in frame time and churn on this card.Not measured: the frame-time cost. There is one run each way and the scenes differ, but the uploads are small (98 MB over the whole load).
Checks:
cargo clippy -p victory-gpu -p victory --all-targets --locked -- -D warningsis clean.cargo test -p victory-gpu -- --test-threads=1gives 237 passed withtiles::tests::card_wrote_failure_does_not_poison_card_maskskipped: it ends the process with an access violation onmainas well (reported in #1416).Builds on #1264 (UwUCammie).
AI-assisted (Claude Code); no game data.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.