Skip to content

GPU: texture refreshes no longer wait for title memory remapping by default - #270

Open
fffluffy-dev wants to merge 1 commit into
fxceless:mainfrom
fffluffy-dev:gpu/texture-no-wait-default
Open

fffluffy-dev wants to merge 1 commit into
fxceless:mainfrom
fffluffy-dev:gpu/texture-no-wait-default

Conversation

@fffluffy-dev

Copy link
Copy Markdown

Texture refreshes that find the runtime remapping title memory now read through the kernel instead of waiting (the earlier opt-in VICTORY_TEXTURE_NO_WAIT=1; #178 showed the texture lane spent almost entirely waiting for that lock). VICTORY_TEXTURE_NO_WAIT=0 restores the blocking read. A kernel read now counts as done only if it read every byte, so a partly unmapped range is retried on the next refresh; new test a_kernel_texture_read_requires_every_page_while_remapping.

Validation (cargo-xwin, x86_64-pc-windows-msvc, tests under Wine): victory-gpu 111 passed, 1 ignored; victory-formats 24-25 passed; cargo clippy --workspace --all-targets -D warnings clean with and without --all-features; cargo xtask policy ok. Not measured on a real frame.

AI use: written with Codex and Claude Code (Claude Opus 5.5); reviewed and posted with my approval. No game files were used.

…efault

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ryotdev

ryotdev commented Nov 24, 2026

Copy link
Copy Markdown

Tested 2b1c205 on an RTX 5070 (Windows x64, Ryzen 7 7800X3D). I used the same release executable for both runs, first with VICTORY_TEXTURE_NO_WAIT=0, then with the variable unset. Each started from the same private checkpoint and its own copy of the same pipeline-cache seed. This was an integration build on an earlier main with #63, a compute-shader fix, scripted input, and a local fix that records changed textures on the unlocked path. Both runs used all of those changes.

Across 90 seconds after the same world-draw threshold, the 90th percentile of reported texture-refresh time (summed across workers per frame) fell from 171.6 to 33.5 ms, with a maximum of 1679 to 50.5 ms. The default path reported successful kernel reads in 53 of 77 windows and deferred reads in 37. In the last 30 seconds, the window title reported 230.7 → 209.5 ms/frame median (4.33 → 4.77 FPS) and 304.5 → 215.3 ms/frame at p90, at essentially the same load (4965 → 4973 median draws/frame). Across the full 90 seconds, title p90 was similar, 708.2 → 714.9 ms/frame.

One pair on one machine. These are periodic reported frame-time averages, and this run did not assess texture fidelity. The new two-page regression also passed natively on Windows. AI-assisted testing.

@Filip722

Copy link
Copy Markdown

On an RTX 5060 Laptop GPU under Proton, the nonblocking branch ran during Series S loading. With it enabled, all 74 texture-refresh reports measured 0.0 ms/frame waiting for title-memory remapping at the log's precision. The fallback reported up to 13.5 successful kernel reads/frame and, in a separate interval, up to 7.0 refreshes/frame deferred.

The blocking control measured remapping waits above 300 ms/frame in 3 of 25 reports, peaking at 2,649.9 ms/frame. Both started from independent clones of the same offline profile and warm caches and used the same thermal policy, one dropped mip and retained-range CPU refresh. The control needed an additional account-picker input. The runs reached different loading stages and ended at the CPU temperature cutoff after 239.7 and 246.1 seconds. These runs verify that the fallback did useful work; they do not establish a frame-rate or world-entry improvement. Both stayed within the memory limits and used no process-group swap.

I tested the complete-read check and its exact two-page regression from 2b1c205c8d83fb20e2e07f0fd6d0c9544a3634a4 on the private integration, enabling the existing switch explicitly. The Windows test passed both before and after that check on this Proton build: an incompletely committed range was rejected, and the full read succeeded after both pages were committed.

Bazzite 44, kernel 7.2.9-ogc2.1.fc44.x86_64, NVIDIA 615.78.08, Proton Experimental 11.0-20261112, vkd3d-proton 3.2.0 (ec20719452e916b), Rust 1.98.1 Windows MSVC target. Codex (GPT-6.2-Sol, high reasoning) assisted with testing and this report.

oceansde012 pushed a commit to oceansde012/victory-gta6 that referenced this pull request Nov 25, 2026
…s-iunknown

GPU: every object answers for IUnknown
(cherry picked from commit 38011a0)
PiloteCode added a commit to PiloteCode/victory-fork that referenced this pull request Nov 25, 2026
…ull requests and the host FidelityFX on our layer; our translator, title memory and copy-back kept

319 commits past ffe310e, merged onto wave4. Most of its runtime pull
requests were here already, picked one by one (fxceless#653 and fxceless#716,
prhle, offpr): where a change arrived both ways, the copy this branch had
is kept (net, audio, xg, runtime, lifecycle with its one stand-in window
(#1677), files, kernel, xasync, xgamesave, xmem, gameinput, the loader's
crash, clzero and publish code, the pipeline cache, #1658's staging clamp).
The rest is the resolution first made on wave2 (offm-on-wave2, ab1d525),
carried over:

- crates/victory-shader: ours (every conflict --ours). Kept from theirs
  only what landed whole: fxceless#661 SP3 text operands, fxceless#1021 s_atc_probe's
  immediate, #1636 FLAT offsets. Reverted where half landed: fxceless#1180, range.rs,
  fxceless#617's bench, #1337's sampler, ACCC, SOURCE_HASH, and new test files whose
  mod lines are in conflicted files. The rest is to be ported on its own.
- victory-gpu: ours plus the official units taken, each from its own
  diff: host.rs (fxceless#615 switch=0 is off, fxceless#1082 TDR log, #1626 swap-chain
  retries throttled), descriptor/host.rs (fxceless#974, its walk no longer cut at
  2^18 steps by ours), descriptor.rs (fxceless#52: a mirror holds the heaps' lock
  while it uses the heap, a read lock on this branch's RwLock, and so does
  our re-mirror of waiting slots), resource.rs (fxceless#52, fxceless#504 depth/stencil
  footprints, #1390 A8), pipeline/host.rs (fxceless#618), pipeline.rs (a stream
  subobject past its end not read), capture.rs (fxceless#615, fxceless#1146, a D24 depth
  plane dumped as depth), frame.rs (fxceless#174, with our late-wait shortcut inside
  the tick reservation), device.rs (fxceless#928, feature queries 7/8/23), list.rs
  (#1446, fxceless#52), external.rs (host FidelityFX, VICTORY_FIDELITYFX_DIR, off
  unless set), switch.rs, tdr.rs, and the small PRs (fxceless#553, #1562, fxceless#270,
  fxceless#153, #1453, #1204, fxceless#1173, #1206, fxceless#474).
- Not taken, ours kept: title memory at raw addresses (27c3dc9, 0f63757,
  6d021fe: their memory.rs and Upload), page marks (cd94d35, 940d32f: with
  our shaders every write through a view would be lost), bindless.rs and the
  change journal (c75fdba), root views and retirement at execute end
  (d71c388: unsafe with flights in the air), rectangle GS and table
  constants in place (683ad7a), twins and shared host textures (13bbd6f),
  heap copies (86a5ed6, bacb06a), the shader cache key, warm-up, pipeline
  queue and library (c47b529, 9c58a1c, fxceless#1000, #1660), #1510, #1635, #1246,
  fxceless#322, #1322, fxceless#669, fxceless#197 (turned down by prhle), #1726 (ours waits longer;
  its test added), the console upscaler's UAV clears. `translate --cache` is
  `--warm all` (with the adapter probe); the pipeline pre-build is not in.
- Also taken: the shader pack and the database's effects (shader-info), the
  startup archive check (fxceless#12, on this branch's KnownBuild with its patches),
  and the runtime PRs not here yet (FidelityFX's config and module).
- The title is not named in the merged-in comments (4e17478).

Details, the overlaps and what to watch: README, "The official
repository, merged".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants