Repository navigation
GPU: a skin bake's own sources are uploaded while the card's budget holds them, not only under the texture line - #1422
Open
Granite900 wants to merge 1 commit into
Open
Granite900 wants to merge 1 commit into
Granite900 wants to merge 1 commit into
Conversation
…olds them, not only under the texture line With VICTORY_BAKE_SOURCES=1 the upload before a skin-bake draw asked resource::room, which 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 nearly every such upload was refused on a card far under its budget (RX 9070 XT: 106 skipped at 6.7 GB of 15.4 GB), and the texture pass the upload runs asked room itself again (309 of 336 sources not made once the first gate was passed). A source missing at the bake is baked as nothing for the run: black or blotched faces. Both now ask resource::within_budget: what is in use plus the draw's own bytes (VICTORY_BAKE_SOURCES_MB) under 95 % of the budget. =full is unchanged. Measured on an RX 9070 XT (café scene of the opening): bake draws sampling a missing texture 101 -> 0, 98 MB uploaded ahead of 189 bake draws, card peak 12.7 of 13.9 GB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bihanikeshav
added a commit
to bihanikeshav/victory-fork
that referenced
this pull request
Nov 27, 2026
…y under the texture line With VICTORY_BAKE_SOURCES=1 a skin-bake draw's own sources were uploaded only while resource::room() said yes. room() counts the room kept for buffer copies and render targets not made yet as used, so while a world loads it refused most such uploads on a card well under its budget, and the faces baked from them came out black or blotched. Both gates (bake_sources_pass and the texture pass's room checks for a bake draw's own run) now ask a new resource::within_budget(bytes): what is in use plus the draw's VICTORY_BAKE_SOURCES_MB under 95% of the budget, not counting room kept for copies not made yet. =full, =count and all other texture uploads are unchanged. Source: fxceless/victory-fork pull request fxceless#1422 (GPL-3.0) fxceless#1422 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With
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