Repository navigation
GPU: verify successful and refused shader-cache entries - #1
Merged
yefan911 merged 1 commit intoNov 26, 2026
Conversation
This was referenced Nov 26, 2026
yefan911
merged commit Nov 26, 2026
359fab3
into
yefan911:fix/shader-refusal-cache-integrity
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to Marvisak/VIctory#3098, offered against its existing author branch. This preserves both of yefan911's commits and adds one commit addressing the triage request to cover successful entries too.
A same-length edit to a cached successful entry can still parse: flipping one byte in the synthetic DXIL returned the changed bytes as a cache hit; flipping byte 4 changed the stage from PS to VS. The refusal-only digest does not cover either case.
Append one BLAKE3 digest over the complete serialized entry, including its tag, DXIL, resource metadata, or refusal reason. Decode verifies this digest before interpreting fields; mismatches take the existing cache-miss/retranslation path. The format tags are VSH2 / VSF3. This stays in shader_cache's serialization layer because the generic Cache stores opaque converter bytes and returns paths to those raw bytes; no generic-cache API or publication changes are needed.
The existing build fingerprint includes shader_cache.rs, so this encoding change selects a fresh shader-cache namespace. Existing translated entries will be rebuilt once. Successful entries gain 32 bytes; each cache read verifies the full payload. This detects accidental corruption, not the source of the damage. No claim of in-game performance improvement.
Validation, native Linux x86-64 / Rust 1.100.0 / two build jobs:
cargo check --locked --offline --target x86_64-pc-windows-msvc -p victory-gpu --lib --tests --all-features --features blake3/purepasses. The official Rust 1.100 MSVC target std was verified against the installed toolchain manifest SHA-256. This is a compile check, not Windows execution; Rust 1.100 emits two unchanged Atomic::fetch_update deprecation warnings in object.rs.All fixtures are synthetic; no game files or GPU execution used. No dependencies or CI files changed. AI-assisted: OpenAI Codex.
Coordination claim.