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

Open
github-bot wants to merge 1 commit from github-bot/gh-270 into main AGit
Owner

@⁠fffluffy-dev on GitHub · 2026-11-24 23:06 UTC · original
fffluffy-dev:gpu/texture-no-wait-default → main · +44 −7 · 3 files · 1 commits · open

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.

**@⁠fffluffy-dev** on GitHub · 2026-11-24 23:06 UTC · [original](https://github.com/fxceless/victory-fork/pull/270) `fffluffy-dev:gpu/texture-no-wait-default` → `main` · +44 −7 · 3 files · 1 commits · open 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:39:34 +00:00
Author
Owner

@⁠ryotdev on GitHub · 2026-11-24 23:37 UTC · original

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.

**@⁠ryotdev** on GitHub · 2026-11-24 23:37 UTC · [original](https://github.com/fxceless/victory-fork/pull/270#issuecomment-7147605817) 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.
Author
Owner

@⁠Filip722 on GitHub · 2026-11-25 05:31 UTC · original

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.

**@⁠Filip722** on GitHub · 2026-11-25 05:31 UTC · [original](https://github.com/fxceless/victory-fork/pull/270#issuecomment-7153860088) 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.
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/texture.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/270/head:github-bot/gh-270'
git switch 'github-bot/gh-270'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-270'
git switch 'github-bot/gh-270'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-270'
git switch 'github-bot/gh-270'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-270'
git switch 'main'
git merge --squash 'github-bot/gh-270'
git switch 'main'
git merge --ff-only 'github-bot/gh-270'
git switch 'main'
git merge 'github-bot/gh-270'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.