NVIDIA 8 GB: faster view copies, fix mouths and skin artifacts, collected upstream fixes #611

Open
github-bot wants to merge 1 commit from github-bot/gh-611 into a-publier AGit
Owner

@⁠tmart06 on GitHub · 2026-11-27 13:55 UTC · original
tmart06:nvidia/view-copy-lock → a-publier · +3059 −192 · 29 files · 1 commits · draft

Work to make this tree run better on an 8 GB NVIDIA card. It mixes one original change with
ports of other people's work, so it is a draft and is probably best split before review.

What changed

Original here:

  • shadow.rs: the per-view copy is made without holding the EXACT lock, the sweep of kept
    copies runs only every so often, and dropped copies are released after the lock.
    VICTORY_VIEW_COPY_ASIDE=0 restores the old way. Matters with VICTORY_VIEW_BYTES=1.
  • lifecycle.rs: under --cfg pgo_record, writes the LLVM profile before the process ends
    with TerminateProcess. Compiles to nothing otherwise.

Ported (credit to the authors):

  • robtacconelli/VIctory-IOptimized, commit 0240106: texture pool block sizing, resource room
    rules, dirty list for card copies, related memory changes.
  • PR #578 (port of fxceless/victory-fork#927): 16-bit buffer accesses keep their bits.
    Characters' mouths move on NVIDIA. This PR is already open here.
  • PR #577: one more compute program runs on 32-lane hosts. This PR is already open here.
  • avatarmanz/VIctory-7900XTX#431: v_nop-family decoding and the size of format 191.
  • fxceless/victory-fork#1264: a skin decoration bake draw's own textures are uploaded before
    it. Merged by hand onto this tree's early texture pass.

TRANSLATOR_VERSION is 5, so shaders are translated again.

Testing

Windows 11, RTX 4060 Ti 8 GB, Ryzen 5 7600X.

  • victory-gpu library tests: 411 passed, 34 ignored (after the last GPU change).
  • victory-formats library tests: 41 passed, 5 ignored. gfx10 decoder tests: 8 passed.
  • victory-hle: 162 passed before the lifecycle.rs change; not rerun since.
  • victory-shader: many tests crash or fail on this machine both before and after these
    changes; compared one test per process, no test differed at the time of the #578 port. Not
    rerun after #431. Two of #578's own tests are among the crashes.
  • cargo xtask policy: no findings in the sources (only an untracked local build folder).
  • Clippy and rustfmt were not run on the final tree.

In game:

  • View copy lock: median frame 358 ms to 232 ms (diagnostics build, view copies on).
  • Mouths move (#578).
  • Multicolor skin on arms is gone after the #1264 port, together with the settings
    VICTORY_TEXTURE_NO_WAIT=0 and VICTORY_CARD_STEPS=1; arms stayed right with
    CARD_STEPS=2.
  • A larger local gain (to about 55 ms) came with several changes at once, including settings
    (VICTORY_VIEW_BYTES=0 and the 8 GB profile) and a native-CPU build that are not part of
    this change. How much each gave is not known.

Known problems

  • Broken, stretched or black shapes are still drawn at times; lighting is sometimes blocky.
  • Six wave64 compute programs are still refused by the driver.
  • The bake log's sampled_wrong_so_far was not zero in one run; not looked into.
  • The profile-guided build's speed is not measured yet.

🤖 Generated with Claude Code

**@⁠tmart06** on GitHub · 2026-11-27 13:55 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/pull/611) `tmart06:nvidia/view-copy-lock` → `a-publier` · +3059 −192 · 29 files · 1 commits · draft Work to make this tree run better on an 8 GB NVIDIA card. It mixes one original change with ports of other people's work, so it is a draft and is probably best split before review. ## What changed Original here: - `shadow.rs`: the per-view copy is made without holding the `EXACT` lock, the sweep of kept copies runs only every so often, and dropped copies are released after the lock. `VICTORY_VIEW_COPY_ASIDE=0` restores the old way. Matters with `VICTORY_VIEW_BYTES=1`. - `lifecycle.rs`: under `--cfg pgo_record`, writes the LLVM profile before the process ends with `TerminateProcess`. Compiles to nothing otherwise. Ported (credit to the authors): - robtacconelli/VIctory-IOptimized, commit 0240106: texture pool block sizing, resource room rules, dirty list for card copies, related memory changes. - PR #578 (port of fxceless/victory-fork#927): 16-bit buffer accesses keep their bits. Characters' mouths move on NVIDIA. This PR is already open here. - PR #577: one more compute program runs on 32-lane hosts. This PR is already open here. - avatarmanz/VIctory-7900XTX#431: v_nop-family decoding and the size of format 191. - fxceless/victory-fork#1264: a skin decoration bake draw's own textures are uploaded before it. Merged by hand onto this tree's early texture pass. `TRANSLATOR_VERSION` is 5, so shaders are translated again. ## Testing Windows 11, RTX 4060 Ti 8 GB, Ryzen 5 7600X. - `victory-gpu` library tests: 411 passed, 34 ignored (after the last GPU change). - `victory-formats` library tests: 41 passed, 5 ignored. `gfx10` decoder tests: 8 passed. - `victory-hle`: 162 passed before the `lifecycle.rs` change; not rerun since. - `victory-shader`: many tests crash or fail on this machine both before and after these changes; compared one test per process, no test differed at the time of the #578 port. Not rerun after #431. Two of #578's own tests are among the crashes. - `cargo xtask policy`: no findings in the sources (only an untracked local build folder). - Clippy and rustfmt were not run on the final tree. In game: - View copy lock: median frame 358 ms to 232 ms (diagnostics build, view copies on). - Mouths move (#578). - Multicolor skin on arms is gone after the #1264 port, together with the settings `VICTORY_TEXTURE_NO_WAIT=0` and `VICTORY_CARD_STEPS=1`; arms stayed right with `CARD_STEPS=2`. - A larger local gain (to about 55 ms) came with several changes at once, including settings (`VICTORY_VIEW_BYTES=0` and the 8 GB profile) and a native-CPU build that are not part of this change. How much each gave is not known. ## Known problems - Broken, stretched or black shapes are still drawn at times; lighting is sometimes blocky. - Six wave64 compute programs are still refused by the driver. - The bake log's `sampled_wrong_so_far` was not zero in one run; not looked into. - The profile-guided build's speed is not measured yet. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Original:
- Make per-view buffer copies without holding shadow::EXACT, sweep them
  only every so often and release dropped ones after the lock
  (VICTORY_VIEW_COPY_ASIDE=0: as before).
- Under --cfg pgo_record, write the LLVM profile before the process ends
  with TerminateProcess.

Ported from others:
- robtacconelli/VIctory-IOptimized 0240106: texture pool blocks, resource
  room rules, card-dirty list and related memory changes.
- PR #578 (port of fxceless/victory-fork#927): 16-bit buffer accesses
  keep their bits, so characters' mouths move.
- PR #577: another compute program runs on 32-lane hosts.
- avatarmanz/VIctory-7900XTX#431: v_nop-family decoding, format 191 size.
- fxceless/victory-fork#1264: upload a decoration bake draw's own
  textures before it, merged by hand onto the early texture pass.

TRANSLATOR_VERSION is 5.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 14:00:43 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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