GPU: cache shader resource metadata with DXIL #1931
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!1931
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1931/head"
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?
@nicolasveilleux on GitHub · 2026-11-25 01:09 UTC · original
nicolasveilleux:upstream/shader-resource-cache→main· +147 −60 · 4 files · 3 commits · closed without mergingStore the native program’s resource ranges alongside its translated DXIL so pipeline creation no longer parses the original container on cache hits. The tests cover round-trips, invalid entries and resource metadata on a synthetic shader.
Validation: all 3 shader-cache tests passed on Windows 11. The RTX 2070 Super integration branch also passed 478 workspace tests (0 failed, 7 ignored). No game files or gameplay measurements. Claimed in #1633.
ccfb02996e' into upstream/shader-resource-cache 696278cd3f@Marvisak on GitHub · 2026-11-25 02:18 UTC · original · edited 2026-11-25 03:24 UTC
Automated triage for the maintainers.
Merge candidate. On a cache hit, pipeline creation no longer re-parses the console container for its resource ranges.
translate_with_resourcesreturnsnative.usedfrom the same programtranslate_withpicks (the first Vs/Ps/Cs/Ms in the DXIL or ACCC part), which is whatpipeline.rs::with_resourcesused to find. The cache entry format moves toVSH2, and the key already hashesshader_cache.rs, so old entries become misses.decoderejects bad kinds, root codes, reserved bytes and counts, and the new tests cover the round trip, damaged entries and the resource metadata of a synthetic shader. A minor point: the doc comment ontranslate_withand the pointer tocrate::shadow::copy_back_markswere reworded or dropped without need; restoring them would be nice. This PR editshost_shader's options next to #1563, so whichever merges second needs a small rebase. CI (check) passes.Generated by Claude Code
@StExpeditus on GitHub · 2026-11-25 09:10 UTC · original
Test report: RTX 5060 Ti (Blackwell), Windows 11 Pro 26200, driver 621.24. Branch at
3845de8.cargo test --workspace --locked --no-fail-fast-> 696 passed, 5 failed, 10 ignored. The failures are the same 5 pre-existing NVIDIA 1M-view-heap-cap failures (also on main; see my reports on #2030 and #1940). Nothing introduced by this PR fails on this machine.@sinan-cmyk on GitHub · 2026-11-25 11:24 UTC · original
Offline measurement on a retail dump
Result: no count change against
main.I merged head
3845de8eontomain940d32f(clean merge) and ranvictory translate --validate --listonshaders.rpf(1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result withmainprogram by program (25,889 programs). Validated: 23,918 onmain, 23,918 with this PR.No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.
No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 22:04 UTC · original
Automated triage for the maintainers, second look (a review against current
main, with builds and tests where they could change the verdict).Closing because it buys nothing measurable and has a cost. In a title run the 2,787 shader-cache hits took 0 ms in 2,543 cases and 1 ms in 229, once per shader per process, on the pipeline workers; the PR offers no measurement. Against that it changes the cache format and the shader crate's public API, both of which invalidate every user's shader cache and pre-built pipeline list, and it collides with #2055.
If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.
Pull request closed