Skip to content

Series X: room for a full-size 3840x2160 scene (DLAA, VICTORY_NATIVE_4K) - #1274

Open
Anorak-314 wants to merge 1 commit into
trustno1-coder:mainfrom
Anorak-314:native-4k-series-x
Open

Anorak-314 wants to merge 1 commit into
trustno1-coder:mainfrom
Anorak-314:native-4k-series-x

Conversation

@Anorak-314

Copy link
Copy Markdown

What this does

Makes a full-size scene run on the Series X profile at the 3840x2160 output: VICTORY_DLSS_MODE=dlaa, and a new VICTORY_NATIVE_4K=1 for 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)

  1. The render-target heap, 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.
  2. The scene pool, 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's int3 at +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 four leas 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.rs does (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_scene sets 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

set VICTORY_RT_HEAP_MB=8000
set VICTORY_SCENE_POOL_MB=1600
set VICTORY_DLSS_MODE=dlaa          (with DLSS on)
        or
set VICTORY_DLSS=0
set VICTORY_NATIVE_4K=1             (no upscaler)

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.

  • This branch at DLAA without the two switches: stops 21 s in at victory-image+0x2219650, as main does.
  • With VICTORY_RT_HEAP_MB=8000 and VICTORY_SCENE_POOL_MB=1600: DLAA runs the opening cutscenes for the 150 s of the test, and so does VICTORY_NATIVE_4K=1 with 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).
  • New tests in heap_budget.rs and native_1440p.rs, run against the retail executable through VICTORY_DISPLAY_PROFILE_TEST_IMAGE as the existing ones are: the sizes, the four leas, the new section, a second patch refused.
  • cargo test --workspace --locked passes (1,130 tests, with the retail executable named), and so does repository_passes_policy.
  • cargo clippy --workspace --all-targets --locked -- -D warnings stops here on main itself (manual_is_multiple_of, let_and_return in 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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant