Skip to content

Textures: fit streamed mip levels into the fullest suitable tile heap - #3299

Closed
Heldenkrieger01 wants to merge 1 commit into
trustno1-coder:mainfrom
Heldenkrieger01:perf/tile-heap-packing
Closed

Heldenkrieger01 wants to merge 1 commit into
trustno1-coder:mainfrom
Heldenkrieger01:perf/tile-heap-packing

Conversation

@Heldenkrieger01

@Heldenkrieger01 Heldenkrieger01 commented Nov 29, 2026 •

Copy link
Copy Markdown

A small mip level could use space in the first tile heap even when it fit exactly in another. This could force a new 64 MiB allocation for the next larger mip. The allocator now chooses the fullest heap that fits the request and keeps the free tile count alongside its ranges.

On a 10 GiB RTX 3080, the same sequence left 640 tiles available in one heap and 192 in another, then requested 192 and 640 tiles. Main allocated three heaps and added 192 MiB of DXGI local usage. This branch allocated two and added 128 MiB. Three fresh processes per build gave the same result. Savings depend on allocation order and apply when streamed levels use the tiled path.

The levels-on-demand regression exercised packing, tile reuse, copies and shader sampling on both WARP and the RTX 3080 with the D3D12 debug layer enabled. Both passed.

In-game A/B on a 10 GiB RTX 3080

The opening scene showed no repeatable tile-heap saving. Both patched runs held 256 MiB of tile heaps. The two baseline runs held 256 and 192 MiB. The change in whole-process local usage changed sign when run order was reversed.

Build and run order Rendered FPS p99 frame time Mean process-local VRAM Tile heap capacity
Baseline A1 10.89 178.2 ms 8,873 MiB 256 MiB
PR B1 11.00 175.5 ms 8,674 MiB 256 MiB
PR B2 10.78 213.8 ms 8,805 MiB 256 MiB
Baseline A2 11.55 178.4 ms 8,791 MiB 192 MiB

Serial runs from the same copied save used the Series S 720p scene profile, DLSS Quality, frame generation off, and VICTORY_LEVELS_ON_DEMAND=1 on both sides. The launcher normally disables tiled levels. Each run used the 45-second window starting 80 seconds after the first world interval with at least 500 draws/frame. FPS uses the mean logged interval between title presents. VRAM is the game's DXGI local-segment usage. All builds used the same diagnostics compilation fixes from #3086. Results cover this scene and adapter.

Created with GPT-6.2-Astra in the Codex harness.

@Heldenkrieger01
Heldenkrieger01 deleted the perf/tile-heap-packing branch November 29, 2026 22:14
OGShotz added a commit to OGShotz/VIctory-Turing that referenced this pull request Nov 29, 2026
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