Probe GPU capabilities before warming the shader cache #813

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

@⁠gmankab on GitHub · 2026-11-25 08:32 UTC · original
gmankab:contrib/probe-warm-device → main · +15 −1 · 3 files · 1 commits · open

translate --warm can derive cache keys with default host settings even though the runtime uses the GPU's detected wave size and view heap limit. The runtime then misses those entries.

Initialize the host capabilities before the warm-up and apply explicit overrides afterward. The warm-up now detects the RX 6800's maximum wave size of 64. On five sample shaders a fresh run generated five entries, a second run reused all five, and an explicit wave32 override generated five separate entries.

Tested-on: AMD Radeon RX 6800, Fedora Linux 45 (Wine/vkd3d-proton)
Assisted-by: gpt-6.2-sol

**@⁠gmankab** on GitHub · 2026-11-25 08:32 UTC · [original](https://github.com/fxceless/victory-fork/pull/813) `gmankab:contrib/probe-warm-device` → `main` · +15 −1 · 3 files · 1 commits · open `translate --warm` can derive cache keys with default host settings even though the runtime uses the GPU's detected wave size and view heap limit. The runtime then misses those entries. Initialize the host capabilities before the warm-up and apply explicit overrides afterward. The warm-up now detects the RX 6800's maximum wave size of 64. On five sample shaders a fresh run generated five entries, a second run reused all five, and an explicit wave32 override generated five separate entries. Tested-on: AMD Radeon RX 6800, Fedora Linux 45 (Wine/vkd3d-proton) Assisted-by: gpt-6.2-sol
The runtime includes the host wave size and view heap limit in its
shader cache keys. Standalone translate --warm can run before either
capability is probed, which produces entries the runtime cannot reuse
unless the caller supplies matching environment overrides.

Probe those capabilities before looking up or translating shaders for
the warm-up. Apply explicit overrides afterward so warm-up still works
for a different target GPU. Plain translate keeps its existing behavior.

Tested-on: AMD Radeon RX 6800, Fedora Linux 45 (Wine/vkd3d-proton)
Assisted-by: gpt-6.2-sol
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:51:41 +00:00
Author
Owner

@⁠KomanderDG88 on GitHub · 2026-11-25 09:09 UTC · original

Independent Windows/NVIDIA cache validation of PR #813 (2026-11-25), performed with Codex assistance.

Environment: Windows 11 Pro build 26300, Intel i7-8700K, 32 GB RAM, RTX 4060 Ti 8 GB (nvidia-smi: 8188 MiB), NVIDIA driver 617.42, Rust 1.98.1 x86_64-pc-windows-msvc.
Base: 9376fd60c0
PR: e0eea9d176
Both clean checkouts built with: cargo build --release -p victory --locked
Both builds emitted the same existing dead-code warning for placed_filler_twins. No local source changes.

Input: 52 shader containers found in the locally supplied XboxBvhBuilder.dll. No executable code from that DLL or the game was run.
Command: victory.exe translate /XboxBvhBuilder.dll --warm all --jobs 4
All VICTORY_* variables were cleared in the child environment except configuration/cache paths and the explicit overrides listed below. All runs used the same initially empty, isolated cache. All commands exited 0.

Results, in run order:

Build/settings                           New translations   Cache hits   Failures
main, no host overrides                         52               0          0
main, HOST_WAVE=32 / VIEW_LIMIT=999999            49               0          3
PR, automatic detection                          0              49          3
PR, HOST_WAVE=64 / VIEW_LIMIT=0                  52               0          0
PR, same explicit overrides repeated             0              52          0

The override variable names above are VICTORY_HOST_WAVE and VICTORY_VIEW_LIMIT. Main's initial host settings are wave size 0 (unknown) and view limit 0, not a detected GPU configuration.

The PR logs detected min=32/max=32 host wave lanes and a 1,000,000-view heap. Automatic warming reused all 49 entries produced by manually matching those host capabilities on main; it added no cache files. The explicit wave64/view-limit-0 run generated a separate set of 52 entries, and the repeat reused all 52, confirming that overrides still take effect after probing.

The three failures under wave32 also occur on main with matching overrides; they are not introduced by this PR. The result supports cache-key alignment with detected NVIDIA capabilities. This did not test in-game cache consumption, pipeline creation, gameplay, FPS, or every shader in the full shader pack. No performance gain is claimed, and a full test-suite run was not performed for this validation. No game assets or translated shader binaries are attached.

**@⁠KomanderDG88** on GitHub · 2026-11-25 09:09 UTC · [original](https://github.com/fxceless/victory-fork/pull/813#issuecomment-7157956679) Independent Windows/NVIDIA cache validation of PR #813 (2026-11-25), performed with Codex assistance. Environment: Windows 11 Pro build 26300, Intel i7-8700K, 32 GB RAM, RTX 4060 Ti 8 GB (nvidia-smi: 8188 MiB), NVIDIA driver 617.42, Rust 1.98.1 x86_64-pc-windows-msvc. Base: 9376fd60c0ba0e76a74c39b49b1407dbac0a64c7 PR: e0eea9d176b777527262f36bc2fe8bd404b10dc2 Both clean checkouts built with: cargo build --release -p victory --locked Both builds emitted the same existing dead-code warning for placed_filler_twins. No local source changes. Input: 52 shader containers found in the locally supplied XboxBvhBuilder.dll. No executable code from that DLL or the game was run. Command: victory.exe translate <local-path>/XboxBvhBuilder.dll --warm all --jobs 4 All VICTORY_* variables were cleared in the child environment except configuration/cache paths and the explicit overrides listed below. All runs used the same initially empty, isolated cache. All commands exited 0. Results, in run order: ```text Build/settings New translations Cache hits Failures main, no host overrides 52 0 0 main, HOST_WAVE=32 / VIEW_LIMIT=999999 49 0 3 PR, automatic detection 0 49 3 PR, HOST_WAVE=64 / VIEW_LIMIT=0 52 0 0 PR, same explicit overrides repeated 0 52 0 ``` The override variable names above are VICTORY_HOST_WAVE and VICTORY_VIEW_LIMIT. Main's initial host settings are wave size 0 (unknown) and view limit 0, not a detected GPU configuration. The PR logs detected min=32/max=32 host wave lanes and a 1,000,000-view heap. Automatic warming reused all 49 entries produced by manually matching those host capabilities on main; it added no cache files. The explicit wave64/view-limit-0 run generated a separate set of 52 entries, and the repeat reused all 52, confirming that overrides still take effect after probing. The three failures under wave32 also occur on main with matching overrides; they are not introduced by this PR. The result supports cache-key alignment with detected NVIDIA capabilities. This did not test in-game cache consumption, pipeline creation, gameplay, FPS, or every shader in the full shader pack. No performance gain is claimed, and a full test-suite run was not performed for this validation. No game assets or translated shader binaries are attached.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/813/head:github-bot/gh-813'
git switch 'github-bot/gh-813'

Merge

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