Repository navigation
Series X: room for a full-size 3840x2160 scene (DLAA, VICTORY_NATIVE_4K) - #1274
Open
Anorak-314 wants to merge 1 commit into
Open
Anorak-314 wants to merge 1 commit into
Anorak-314 wants to merge 1 commit into
Conversation
With the scene at the output's size the title stops at its out-of-memory break (+0x2219650): two of its budgets are constants of the image, sized for the console's 2560x1440 scene. - VICTORY_RT_HEAP_MB: the render-target heap (heap 2 of the Series X table, 2,199 MB) made that big, the table's total raised by as much. - VICTORY_SCENE_POOL_MB: the scene pool of 64 KiB units (710 MB) made that big; its array of one entry per unit, sized for the stock count in the title's data, moves to a new zero-filled section and the four leas that take its address are pointed there. - VICTORY_NATIVE_4K=1 (DLSS off): the stock path's temporal scene scale from 2/3 to 1, so the title's own temporal pass resolves a 3840x2160 scene. Every place is checked against the stock image by hash first; another build is refused. Opt-in: without the switches nothing changes. 8,000 MB and 1,600 MB run on an RTX 5090. Co-Authored-By: Claude Fable 5.2 <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.
What this does
Makes a full-size scene run on the Series X profile at the 3840x2160 output:
VICTORY_DLSS_MODE=dlaa, and a newVICTORY_NATIVE_4K=1for the title's own temporal anti-aliasing at 3840x2160 with no upscaler at all. Everything is opt-in; without the switches nothing changes.Today such a start stops a few seconds in at the title's out-of-memory break (
victory-image+0x2219650; #747 describes the same stop on Series X at the 2160p output and turns DLAA off there). The cause is two memory budgets of the title that are sized for its 2560x1440 scene. Both are constants of the image, so telling the title of more memory changes nothing.The two budgets (
apps/victory/src/heap_budget.rs)VICTORY_RT_HEAP_MB=<MB>. The title makes nine heaps at start from a table of sizes in its read-only data (+0x6186250, the second table is the Series X's: 13,312 MB in all). Heap 2 of it, 2,199 MB, holds the scene's render targets. At 2.25 times the pixels they do not fit. The switch sets heap 2's size and raises the total by as much. On this card 6,000 MB still ran out, 8,000 MB runs, and 12,000 MB upset the title's allocator.VICTORY_SCENE_POOL_MB=<MB>. A second pool of 64 KiB units (+0x1d488a0: 0x2c60 units, 710 MB). With heap 2 made bigger the next stop was this pool'sint3at +0x2473e88, asking 1,357 MB of it. Raising the count alone was not enough: the pool's array of one 8-byte entry per unit lies in the title's data, sized for the stock count, and more units ran past it over a lookup table's count (an access violation at +0x5524010 a moment later). So the array moves to a new zero-filled section appended to the image, and the fourleas that take its address are pointed there. 1,600 MB runs.Every place is checked against the stock image first, by BLAKE3 hash as
native_1440p.rsdoes (no bytes of the title are added), and another build is refused. Each patched image goes to a folder of its own (...-rtheap8000-scenepool1600). Series S has its own table and count and is left alone.Native 4K without an upscaler (
VICTORY_NATIVE_4K=1)With DLSS off the stock Series X path draws the scene at 2/3 of the output and its own temporal pass resolves it to 3840x2160.
prepare_native_scenesets that pass's scene scale to 1 and touches nothing else, so the title draws 3840x2160 and its own temporal pass anti-aliases it. It needs the two budgets above.How to use it
I left the launchers and the F1 menu alone: whether DLAA should set the two sizes itself is your call (the heap is committed at once, 5.8 GB more than stock).
Testing
One PC: RTX 5090 (32 GB, driver 621.24), Ryzen 9 9950X3D, 64 GB, Windows 11, Series X profile, 3840x2160 output.
victory-image+0x2219650, asmaindoes.VICTORY_RT_HEAP_MB=8000andVICTORY_SCENE_POOL_MB=1600: DLAA runs the opening cutscenes for the 150 s of the test, and so doesVICTORY_NATIVE_4K=1with DLSS off (25.7 fps). The log names the patches (render-target heap 8000 MB (stock 2199 MB),scene pool 1600 MB (stock 710 MB), its array of units in a new section at +0xb06d000).heap_budget.rsandnative_1440p.rs, run against the retail executable throughVICTORY_DISPLAY_PROFILE_TEST_IMAGEas the existing ones are: the sizes, the fourleas, the new section, a second patch refused.cargo test --workspace --lockedpasses (1,130 tests, with the retail executable named), and so doesrepository_passes_policy.cargo clippy --workspace --all-targets --locked -- -D warningsstops here onmainitself (manual_is_multiple_of,let_and_returnin files this does not touch); it reports nothing in the three files changed.On an NVIDIA card a full-size scene also shows streaks and blocks across faces. That is a separate fault with its own fix, #1273: with both, 12 frames through the opening cutscenes are clean.
🤖 Generated with Claude Code