Probe GPU capabilities before warming the shader cache #812

Open
gmankab wants to merge 1 commit from upstream-pr/813 into main
gmankab commented 2026-11-25 08:32:39 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by gmankab on 2026-11-25T08:32:39Z.


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

<!-- greyfinch-sync:fxceless/victory-fork:issue:6600425284 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/813). Originally posted by [gmankab](https://github.com/gmankab) on 2026-11-25T08:32:39Z. --- `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
maritzaloas96-ship-it commented 2026-11-25 10:11:09 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by maritzaloas96-ship-it on 2026-11-25T09:09:43Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7157956679 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/813#issuecomment-7157956679). Originally posted by [maritzaloas96-ship-it](https://github.com/maritzaloas96-ship-it) on 2026-11-25T09:09:43Z. --- 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 cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/813:upstream-pr/813'
git switch 'upstream-pr/813'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/813'
git switch 'upstream-pr/813'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/813'
git switch 'upstream-pr/813'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/813'
git switch 'main'
git merge --squash 'upstream-pr/813'
git switch 'main'
git merge --ff-only 'upstream-pr/813'
git switch 'main'
git merge 'upstream-pr/813'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!812
No description provided.