Repository navigation
Host textures of placed textures come out of 64 MiB heaps (VICTORY_PLACED_TEX=1, off by default) - #903
Host textures of placed textures come out of 64 MiB heaps (VICTORY_PLACED_TEX=1, off by default)#903TG0000 wants to merge 1 commit into
Conversation
…VICTORY_PLACED_TEX=1) A committed resource is a kernel allocation of its own. Off by default. A range comes back with the last reference to its texture, behind the submissions running then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1bf20a7 to
ca03c64
Compare
…xceless#768) - fxceless#822: scale staging/shadow cache idle timeouts with commit limit as well as physical RAM - fxceless#903: add opt-in VICTORY_PLACED_TEX=1 64 MiB heap suballocator for placed host textures (default off; README untouched) - fxceless#886: let DirectStorage admit fitting reads from other queues into spare staging space - fxceless#768: add opt-in VICTORY_WIDE_TEXTURES=1 parallel texture refresh in Batch::flush (default off, preserving fxceless#141 in_flight guard)
|
An NVIDIA data point for the idea, with a caveat first: the numbers below are from my own implementation of the same idea, not from this PR's head. Machine: RTX 5080 16 GB (driver 621.24), Ryzen 7 9800X3D, Windows 11, Series X profile. What I ran: on
Results: A/B in one build with only the switch changed, two pairs, 480 s each, warm cache, DRED off. World = frame-rate lines with 500 or more draws.
A burst-window profile (62–92 s, the loading burst of up to 5,000 uploads a frame) had about 38 ms a frame on the recording threads in Memory and picture: the card's memory in use settled at 12.5–13.4 GB, against 11–13.2 GB without. Captured frames at 1,500–3,000 show correct textures (faces, cloth, labels) by eye. |
|
A data point from an 8 GB card, with a visible result. Setup: RTX 5060 Ti 8 GB, 16 GB of RAM, Windows 11, Series S profile. Our tree is fork Result:
My reading: with texture creation this cheap, the queue of textures picked by index keeps up at scene changes, so her slot no longer shows an older view while it waits. I measured this in one run; the earlier runs without the switch all showed the defect. 🤖 Generated with Claude Code |
Making a host texture for one of the title's placed textures is a committed resource, a kernel allocation of its own. With
VICTORY_PLACED_TEX=1(off by default) those textures come out of 64 MiB heaps: only textures without target, depth or unordered access flags, up to 32 MiB, whose contents are uploaded whole. Others, and textures with levels on demand (tiles), are made as before.How it works (
placed.rs):host::retire);New log line, also with the switch off: how many were made and the time each took.
Measured on an RX 6800 16 GB, Ryzen 5900X, Windows 11, one launch, both ways in the same launch in ABBA order (18 blocks, warm cache):
0 of 32,349 textures had to be committed instead. Two whole launches, one each way and not matched: median 417 and 369 ms, the card's memory 10.1 and 10.9 GB (about 1.2 GB of it free inside heaps).
Not the same code base: those numbers are from a build on 7b0f736 with other changes of ours. Adapted to f85101b, the switch was on in three launches of 420 s of a combined build with no device removal; that build has more than this PR, so it says nothing about the gain. This head has not been run in a game.
Limits: no aliasing barrier between two textures that have a range one after the other (the first has finished, and the second is uploaded whole before it is read); the other readers of the card's memory budget count the heaps' free bytes as used; NVIDIA and Intel not tested; pictures compared by eye only, no new kind of fault seen.
Tests on this head (ca03c64, on a253706), Windows, RX 6800 and WARP, one thread: victory-gpu 170 passed, 1 failed; victory-shader 215 passed. The failure is
warp_budget_saturates_without_wraparound_and_preserves_draw_fields, which also failed 2 of 6 times on unchanged f85101b here (#847 and #849 are about it). Two of the tests are new.cargo clippy -D warningsfor the Windows target, with and without all features, with #841's patch on top: one error,shadow.rs(is_multiple_of), the same on unchanged a253706.Does it help elsewhere? The new log line with
VICTORY_PLACED_TEX=0and1on another card would tell.AI-assisted (Claude Code).
🤖 Generated with Claude Code