GPU: include translation options in shader cache key #3538

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

@⁠tharun-37 on GitHub · 2026-11-27 15:31 UTC · original
tharun-37:gpu/shader-cache-options-key → main · +32 −15 · 1 files · 1 commits · open

The shader cache key covers the translator identity, the entry encoding and the loop limit, but not the emit::Options value used for the translation. view_marks changes emitted DXIL and root-signature bindings; although it is currently always true, the key should name the settings that produced an entry.

This change makes one constant the source of truth for both the key and translate_with, and hashes its view_marks byte into the build key. Destructuring Options without .. means a new option will not compile until the key is updated.

No device or driver identity is added: adapter-specific pipeline libraries are already handled separately, and runtime-only capability probes do not change translated DXIL.

Verification:

  • cargo clippy --workspace --all-targets --locked -- -D warnings passes.
  • cargo test -p victory-gpu --features diagnostics shader_cache::tests: 4 passed, 0 failed.
  • cargo xtask policy: 191 files ok.
  • Full workspace tests still show the same 3 pre-existing victory-gpu failures.

Claim: #1633

AI-assisted (OpenCode).

**@⁠tharun-37** on GitHub · 2026-11-27 15:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/3538) `tharun-37:gpu/shader-cache-options-key` → `main` · +32 −15 · 1 files · 1 commits · open The shader cache key covers the translator identity, the entry encoding and the loop limit, but not the `emit::Options` value used for the translation. `view_marks` changes emitted DXIL and root-signature bindings; although it is currently always `true`, the key should name the settings that produced an entry. This change makes one constant the source of truth for both the key and `translate_with`, and hashes its `view_marks` byte into the build key. Destructuring `Options` without `..` means a new option will not compile until the key is updated. No device or driver identity is added: adapter-specific pipeline libraries are already handled separately, and runtime-only capability probes do not change translated DXIL. Verification: - `cargo clippy --workspace --all-targets --locked -- -D warnings` passes. - `cargo test -p victory-gpu --features diagnostics shader_cache::tests`: 4 passed, 0 failed. - `cargo xtask policy`: 191 files ok. - Full workspace tests still show the same 3 pre-existing `victory-gpu` failures. Claim: https://git.gtahub.st/github/Marvisak--VIctory/issues/1633 AI-assisted (OpenCode).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 15:32:29 +00:00
Author
Owner

@⁠andrewpozdnakov7-jpg on GitHub · 2026-11-27 16:09 UTC · original

#3538 df956cc and #2997 cda31d8 conflict in shader_cache.rs. Integration 5f482ab preserves both original histories. One option constructor feeds the key and the translator, and the key includes both view_marks and warp_permute. The cache test varies each option independently.

On Windows 10 with verified app-local Agility 1.620.2 and WARP 1.0.22, I cached a valid synthetic shader with ordinary settings, selected the WARP device, and queried it twice. The sequence was ordinary miss, WARP miss, WARP hit, ordinary hit. Each hit returned the DXIL written for its own option set.

All four cache tests and seven permutation tests passed. The app-local GPU library suite passed 246 tests with one ignored. The wider synthetic shader filter had the existing WARP gather comparison failure tracked in #3267. Strict Clippy in both feature configurations and the asset policy passed.

The next step is for the authors and reviewers to decide the integration order. Please retain both original Git authors if moving the changes, and use Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding my conflict resolution into another commit. AI-assisted with Codex.

**@⁠andrewpozdnakov7-jpg** on GitHub · 2026-11-27 16:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/3538#issuecomment-7222921545) #3538 `df956cc` and #2997 `cda31d8` conflict in `shader_cache.rs`. [Integration `5f482ab`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/5f482abdfc8d127086f48f60a07b06afb38edff4) preserves both original histories. One option constructor feeds the key and the translator, and the key includes both `view_marks` and `warp_permute`. The cache test varies each option independently. On Windows 10 with verified app-local Agility 1.620.2 and WARP 1.0.22, I cached a valid synthetic shader with ordinary settings, selected the WARP device, and queried it twice. The sequence was ordinary miss, WARP miss, WARP hit, ordinary hit. Each hit returned the DXIL written for its own option set. All four cache tests and seven permutation tests passed. The app-local GPU library suite passed 246 tests with one ignored. The wider synthetic shader filter had the existing WARP gather comparison failure tracked in #3267. Strict Clippy in both feature configurations and the asset policy passed. The next step is for the authors and reviewers to decide the integration order. Please retain both original Git authors if moving the changes, and use `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding my conflict resolution into another commit. AI-assisted with Codex.
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-27 20:58 UTC · original

Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head df956cc (on its base 63bcca4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 866 passed, 0 failed, 10 ignored.
  • No new #[test] functions in the diff.
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#2571), so without the skip the rest of that crate never reports; dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-27 20:58 UTC · [original](https://github.com/Marvisak/VIctory/pull/3538#issuecomment-7228016072) Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head `df956cc` (on its base `63bcca4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: **866 passed, 0 failed, 10 ignored**. - No new `#[test]` functions in the diff. - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#2571), so without the skip the rest of that crate never reports; `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
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/3538/head:github-bot/gh-3538'
git switch 'github-bot/gh-3538'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3538'
git switch 'github-bot/gh-3538'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3538'
git switch 'github-bot/gh-3538'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3538'
git switch 'main'
git merge --squash 'github-bot/gh-3538'
git switch 'main'
git merge --ff-only 'github-bot/gh-3538'
git switch 'main'
git merge 'github-bot/gh-3538'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!3538
No description provided.