Repository navigation
Conversation
…EAP_WORKER=1, off) The pass over textures picked by index asks what of each due texture is mapped, makes the host texture, makes a staging buffer and records the copy, on whichever thread of the title records the frame's first shader that picks textures by index. With a backlog that is up to 250 ms of a frame, and the threads waiting for that list wait with it. With VICTORY_HEAP_WORKER=1 (needs VICTORY_LATE_WAIT) the pass runs on a thread of its own and the recording thread only wakes it. Its uploads go into host lists of our own, which the next late submission runs ahead of the title's lists; a texture's host slot is given its view at that submission, not before; the title's texture and heap are held while the worker uses them; the uploads before the decoration bake stay on the recording thread. Off by default; the numbers go in the pull request. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
On WARP the second group's draws can win the budget; the test asserts what holds either way, that the record that is no draw runs empty. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Tested the worker commit ( |
|
Tested on an RTX 5080 16 GB (driver 621.14, Windows 11, Ryzen 7 9800X3D with 8 threads, Series X profile), in the prison opening. Build: release build of Two 600-second runs, one each, same switches (
Most of the gain here is in the slow stretches: the slowest quarter of the frame lines went from 2.3 to 4.4 fps. No errors and no device loss in either run. I haven't checked the picture with it yet, because these release builds didn't save frames. My next runs with it do save frames, and I'll add what they show. AI-assisted (Claude Code, Claude Opus 5.5). Counts only, nothing from the game attached. |
|
Picture follow-up to my numbers above: with In an earlier run without it (a diagnostics build of a similar tree), the noise was on his forearm in three saved frames of the corridor walk (world frames +768, +864 and +960). In two release runs with it today, 60 saved frames from the yard through the counselor's office, his arms and hands are clean in every frame where they're in view, including the corridor (+960, +1056, +1632, +1824). That fits "a slot shows a texture only once its upload is submitted": the noise looked like a fresh texture in memory another one had used, shown before its upload. The runs differ in more than this switch: release against diagnostics, and both of today's runs also have #1031, one of them with AI-assisted (Claude Code, Claude Opus 5.5). Descriptions only, nothing from the game attached. |
…x uploaded on a thread of their own (VICTORY_HEAP_WORKER=1, off) Conflicts: both list helpers kept (defer_texture_upload and refresh_textures_ahead); a staging texture keeps both its last change and its ahead read, hashed when either says so; this branch's indirect budget test, bench field and resource cfg kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # crates/victory-gpu/src/draw.rs # crates/victory-gpu/src/indirect.rs # crates/victory-gpu/src/resource.rs
|
Data from a profile, plus a small change that helped here. Setup: RTX 5060 Ti 8 GB, 16 GB RAM, Series S profile, opening cutscene. What the profile showed: the Change (local tree, about 15 lines): when the pass leaves slots due, meaning it stopped on bytes or time or was handed a full 4,096, the worker puts the same heap back in // worker(), after the pass and the make_way loop
if chain_on() && crate::draw::BACKLOG_LEFT.load(Relaxed) {
let mut next = lock(&job.heap);
if next.is_none() {
*next = Some(heap);
}
}Result:
Happy to open it as a PR stacked on this one if that is useful. 🤖 Generated with Claude Code |
…CTORY_HEAP_WORKER=1, off by default; fork pull request #1007, its worker commit 233a65f) The pass that uploads textures picked by index ran on whichever thread of the title recorded the frame's first shader that picks by index: here 62 ms a frame in the heavy area and 95 to 115 ms a frame on the earlier save (the frame line's heap pass figure, runs 301 and 306 to 308), with the threads waiting for that list waiting with it. With the switch the recording thread only wakes a worker; the worker records the uploads into lists of ours, which the next submission runs ahead of its own, and a slot is given its view at that submission, not before. Needs VICTORY_LATE_WAIT. The pull request's worker commit applied by a three-way merge; one more call site of ours (the marked heap pass) given the same change by hand. Its own test comes along. Clippy clean in both builds, 225 gpu tests pass one at a time. Not yet run in a game here; four testers ran it elsewhere (its thread), one on an NVIDIA card. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Follow-up to my profile above. Same setup: RTX 5060 Ti 8 GB, 16 GB of RAM, Series S profile, opening cutscene. After chaining the passes, the worker's largest remaining cost was I tried reading those textures on more threads. Every run below shows all faces checked in the cutscene close-ups:
The last variant is about 25 lines in Two things that also mattered for faces here:
The fps above is lower than earlier today in every variant, including the baseline. This machine has 16 GB of RAM and paging dominates, so treat the comparison between rows as the result, not the absolute numbers. 🤖 Generated with Claude Code |
|
AMD/Linux data point for the worker (ported onto avatarmanz/VIctory-7900XTX main Setup: RX 7900 XT, RADV, Wine 11.18 with the tree-index wineserver, vkd3d-proton, 32 GB, Series X profile.
No device removal or exceptions in either. The worker logged 0.8-1.4 ms a frame at work while standing. So on this card the gain shows only when there are textures to pass; it's smaller than your +40% at the boat, probably because "preparing" (~40 ms of copies/refresh) dominates our frame. No regressions seen. (AI-assisted with Claude Code; runs on my machine.) |
|
A port report from an RTX 3070 8 GB, and one case where a slot seems never to get its view with the worker on I hand-ported this worker (as it is on main, While porting, one path looked wrong to me, read at
If that reading is right, a texture picked by index that is placed render-target or depth memory would sample as zero with the worker on. I could not establish whether this title does that, so it may never show. What I did in the port: before One run, one machine. AI-assisted (Claude Code); the code path was read twice independently before posting. |
What comes from upstream (previous merge base 988aa41): - VICTORY_HEAP_WORKER=1 (off): textures picked by index uploaded by a thread of their own (fork pull request fxceless#1007); needs VICTORY_LATE_WAIT (stage > 0, which the relay sets by default). - VICTORY_TABLE_STAGES (off): a draw's stages share the tables they make afresh. - VICTORY_HEAP_LOCKS (off): made slots found without the slots' lock (atomic made_now), kept resources in 64 locks. - VICTORY_BAKE_SOURCES=count|1 (off): skin-bake draws' own textures (fxceless#1264 hand-ported onto the texture worker). - VICTORY_REAPER (off): host objects let go dropped by a thread of their own. - VICTORY_TILES_SMALL_WHEN_FULL_MB and VICTORY_RETIRE_LEAN (both off). - Legacy multiply-add as RDNA 2 runs it (pull request fxceless#1026). - Typed views of 32-bit integer formats made in the float format of the same width (pull request fxceless#684). - Remapping time split in the frame log (unmap, map, commit, our notes). - The corner box shows the machine's load beside the frame rate (VICTORY_FPS_COUNTER=fps: the rate alone; =0: off). - A report at a device removal; placed-slot census; constant buffer view of no bytes stays one (fxceless#1260, one copy kept); diagnostics runs 301-309. Conflicts: - README.md: ours kept as is; upstream's added as README.upstream.md. .github/workflows/ci.yml unchanged from ours. - crates/victory-gpu/src/descriptor/host.rs: both. Our SlotSet and slot flags beside upstream's KEPT_PIECES/heap_locks(); HostHeap::new takes the 64 kept pieces and kept_one, sized count + extra, with next/free sized by our per-heap dynamic count (extra), not DYNAMIC. The lock-free made_now lookup goes in mirror_inner, before the records' lock (our mirror_with_made is called with the lock held), returning (view, None); made_now stores added to our keep-views return and after our make/keep branches. - crates/victory-gpu/src/draw.rs: upstream's bake-sources/worker pass setup, with our TEXTURE_SHORT short_room/since_short in front of it; our ShortOfRoom guard kept before upstream's List/Ahead view lookup. - crates/victory-hle/src/modules/xmem.rs: our title_memory_view call (section.handle) plus upstream's RemapNotesUs timing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Another data point, on a different scene from the boat: RTX 5060 Ti 16 GB, Core Ultra 5 225F (6 P + 4 E cores), 32 GB, Windows 11. Fork
About +8 % here, with the preparing thread's median at 76-82 ms with the worker against 82-88 without. Much smaller than the +40 % at the boat, which fits a scene with far fewer heap-indexed textures to refresh. No device removal in any run. Two method notes for anyone repeating this: after building a commit that changes the translator, this walk needed two discarded runs before the cache was warm (the first two came out at 1.7-1.8 fps whatever the switch), and the off and on runs were alternated. On @tippythetaidum's picture note: we see the same multicoloured noise on the escort guard's forearm in that corridor on our builds, but our scripted camera rarely frames his arms, so I cannot confirm from these runs whether the worker removes it. Not tested: the boat mission, Series S, more than three runs per side. AI use: runs, numbers and this text were done with Claude Code. |
|
Measured the texture worker on Windows 11 with an i5-8400, RTX 3060 12 GB, driver 610.88, and 32 GB RAM. I backported the upstream worker commit d4a528b onto a local 988aa41-based Series S test build, then ran the same binary with VICTORY_HEAP_WORKER=0 and =1. Both runs started from separate copies of the same save and cache.
The sampled windows were within the first 100 seconds of 4,250–4,750 draws and less than 1 ms of pipeline waiting. FPS includes the long frames in those windows. The worker logged actual uploads when enabled. This single pair showed no FPS gain at this stationary checkpoint. The modest draw-count difference and the older backport limit the comparison. I did not test sustained movement or a streaming-heavy scene. AI-assisted test and write-up. |
Summary
Moves heap-indexed texture creation and upload work off the recording/submission critical path onto a dedicated background worker thread (heap_worker.rs), gated behind VICTORY_HEAP_WORKER=1 (off by default).
Also includes two small hygiene commits on top of 0b0074e so Windows clippy and unit tests pass cleanly:
(Happy to split those two commits out if you prefer.)
Measured Results (AMD Radeon RX 6800 16 GB, Adrenalin 26.11.2, Windows 11, Series X 1440p, full texture budget, 420 s warm runs)
Measured in ABBA order on a single build (worker ON vs OFF):
Verification