GPU: copy title textures to the host once per change, and check them on several threads #1499
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1500"
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?
Imported from Marvisak/VIctory. Originally posted by A6thGraderFr on 2026-11-24T18:33:04Z.
What
Two changes to how textures the title writes through memory reach the host GPU.
How
Copiesintexture.rs).Host::record_uploads). Unchanged textures are not copied and keep the state the lists left them in. Diagnostics markers and timestamps for the copies are kept.Batchwith the buffer refreshes and run at the same points (before a title-memory write, before a range goes to shaders, before the lists run), so each still reads memory as its step saw it. One thread per 4 MiB to hash, at most one per texture, per core and 8; write-watched memory counts as no work.Benchmark (synthetic)
cargo test --release -p victory-gpu -- --ignored --nocapture texture_hashing: 48 textures of 4 MiB hashed in about 42 ms on one thread and 14 ms on four (3.0x; 4-core VM, median of 7 runs). Gains in the world are not measured; the new "MB uploaded" figure and the "on the GPU" time in the frame-rate line should show them.Tests
cargo clippy --workspace --all-targets -- -D warnings, with and without--all-features(targetx86_64-pc-windows-msvc): clean.cargo xtask policy: ok. rustfmt: no new differences.resource::tests::title_textures_reach_the_host_once_per_change(end to end through the queue, lists andCopyResource, read back from the host GPU; it fails with the upload copy left out), andtexture::testsfor the copy bookkeeping and the thread split.cargo test -p victory-gpuunder Wine on software Vulkan, with a local, uncommitted fallback to feature level 11_0 (that stack refuses 12_0): 52 passed, 55 withdiagnostics.argument_clamp_buildsanda_rejected_blob_gives_an_empty_libraryfail the same way on unmodified main there.#230 attempts the first change too. This one tracks whether the host copy holds the latest contents (not only whether they were detiled in this submission), copes with a submission that names a list twice, and keeps the diagnostics notes.
No game data was used.
AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by BitWuehler on 2026-11-24T20:24:43Z.
First real-GPU / in-game A/B data point on Linux + Proton + NVIDIA RTX 5080 (
driver 620.73.04, CachyOS7.3.6-1-cachyos, Ryzen 7 9800X3D,GE-Proton11-14viaumu-run,VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains, retail1.0.2.1,--console series-x,diagbuild).Integration note:
#1500was merged cleanly alongside#1180,#585, and#1067on top of our previous#994 + #177 + #454 + #1260 + #1267+MIN_DYNAMIC = 1 << 18(#747) stack. Because#585 + #1067cleared 107 untranslated shaders, the new run executes ~47% more draws/frame, sotexturestime anduploadedMB below are measured under substantially heavier draw load:world >= 100 drawsintervals)n = 30)#1500(+#585/#1067/#1180,n = 28)415/2,076(max5,662)308/3,051(max8,073)texturestime (median / mean)94.4 ms/129.9 ms82.8 ms/120.1 ms(−12.3% despite +47% draws)tex_mbmed / mean)117.2 MB/113.7 MB122.2 MB/126.8 MBMB uploaded(#1500)14.7 MBmed /17.5 MBmean (~88% upload reduction)on the GPU(median)154.5 ms181.5 ms(likely higher draw count: 2,076 → 3,051)0/0/00/0/0(up toframe=1523)No regressions or texture glitches observed in the debug world view;
MB uploadedconfirms most checked staging textures are unchanged and skipped for GPU upload in-game.AI-assisted log analysis and write-up; built and run locally on my own retail copy, no game files or raw logs attached.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:41:35Z.
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #230. Same goal as #230 (copy a title texture once per change, not per list) with a second change on top (checking textures on several threads).
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed