Repository navigation
D3D12.X: preserve replacement driver blobs after refusal - #2616
Closed
mokkamokacaffe wants to merge 1 commit into
Closed
mokkamokacaffe wants to merge 1 commit into
mokkamokacaffe wants to merge 1 commit into
Conversation
Keep the handle that supplied each on-disk PSO blob through the native creation call. A refusal now disposes that exact file object, so an older reader cannot remove a replacement published at the same path. Fixes xcl-dev#2601 Assisted-by: OpenAI Codex (GPT-6.2 Astra, Ultra reasoning)
Contributor
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! — Devin |
Author
|
Reopening after test from DavidM1911 |
Author
|
Superseded by #2614. Confirmed that its live history now preserves Thank you for preserving the durable attribution. |
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.
An older PSO-cache reader now retains the file handle that supplied its bytes and invalidates that exact file object after the driver refuses it. It can no longer remove a replacement published at the same pathname, including an identical-byte replacement from another process. Fixes #2601.
This does not change which HRESULTs count as a blob refusal; #2426 owns that policy and should pass the loaded-blob token through its refusal classifier when the changes are combined.
This is an alternative to #2614. It identifies a cache generation by the exact opened file object rather than content equality under a cooperative pathname lock, so identical-byte replacements and writers that do not use the same lock remain protected.
What is in it
crates/xcl/src/hle/d3d12x/real.rs: retain an on-disk blob's shared bytes and exact Windows file handle through compute, graphics and two-pass PSO creation; invalidate with handle-based POSIX disposition, avoid following final-component reparse points, and keep readable blobs usable when delete access is unavailable.crates/xcl/src/hle/d3d12x/real.rs: add synthetic regressions for unchanged-blob removal, an identical-byte cross-process replacement, overlapping writers and cache symlinks.crates/xcl/src/shaders.rs: use the same exact-generation invalidation for rejected offline blobs over the DXIL size cap.Tested
main;cargo test -p xcl --lib: all tests passed, 0 failed, 26 ignored. Currentmainis still the PR's base (b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). The report did not include the total passed count, GPU driver, CPU, Rust version or exact local merge commit. Test reportcargo check -p xcl --tests --target x86_64-pc-windows-msvc. The host lacks MSVClib.exe, so the check used a local archive shim; it did not link or execute Windows code.git diff --check: passed.Regression run
xcl-smokeblocks from a cleanmaincheckout and clean PR head06d08685e60b37a38728c6caf9b1f103995bf468, using the same title and duration.Not tested
AI use