GPU: include translation options in shader cache key #3538
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3538
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3538"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@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 · openThe shader cache key covers the translator identity, the entry encoding and the loop limit, but not the
emit::Optionsvalue used for the translation.view_markschanges emitted DXIL and root-signature bindings; although it is currently alwaystrue, 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 itsview_marksbyte into the build key. DestructuringOptionswithout..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 warningspasses.cargo test -p victory-gpu --features diagnostics shader_cache::tests: 4 passed, 0 failed.cargo xtask policy: 191 files ok.victory-gpufailures.Claim: #1633
AI-assisted (OpenCode).
@andrewpozdnakov7-jpg on GitHub · 2026-11-27 16:09 UTC · original
#3538
df956ccand #2997cda31d8conflict inshader_cache.rs. Integration5f482abpreserves both original histories. One option constructor feeds the key and the translator, and the key includes bothview_marksandwarp_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.@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 base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo 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.#[test]functions in the diff.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#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_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.