GPU: copy title textures to the host once per change, and check them on several threads #1500
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1500
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1500/head"
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?
@A6thGraderFr on GitHub · 2026-11-24 18:33 UTC · original
A6thGraderFr:claude/jolly-pascal-e2l2rq→main· +652 −94 · 3 files · 2 commits · closed without mergingWhat
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).
@BitWuehler on GitHub · 2026-11-24 20:24 UTC · original
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.
@Marvisak on GitHub · 2026-11-25 00:41 UTC · original
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