Host textures of placed textures come out of 64 MiB heaps (VICTORY_PLACED_TEX=1, off by default) #903
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!903
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-903"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@TG0000 on GitHub · 2026-11-25 12:20 UTC · original
TG0000:gpu/placed-textures→main· +410 −4 · 5 files · 1 commits · openMaking 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
7b0f736with other changes of ours. Adapted tof85101b, 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, ona253706), Windows, RX 6800 and WARP, one thread: victory-gpu 170 passed, 1 failed; victory-shader 215 passed. The failure iswarp_budget_saturates_without_wraparound_and_preserves_draw_fields, which also failed 2 of 6 times on unchangedf85101bhere (#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 unchangeda253706.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
@wildheathen on GitHub · 2026-11-25 21:43 UTC · original
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
ca8829f, plus #868 and a couple of other streaming changes:D3D12_HEAP_FLAG_ALLOW_ONLY_NON_RT_DS_TEXTURESheaps;retire.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
CreateCommittedResourcefor host textures before the change. That is what this removes, and on this card it is mostly the long frames that go.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.
@Exopus-0x65f7ad0 on GitHub · 2026-11-26 07:23 UTC · original
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
mainplus a stack of open PRs: #1219, #1218, #1264, #1246, and the heap worker #1007 with passes chained. Opening cutscene, warm caches.Result:
ca03c64merged with two small conflicts.host_texture_asgains theplacedargument; our #1219 reserved-texture path passesfalse.VICTORY_PLACED_TEX=1: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
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.