Shaders: trust complete native pipeline libraries #3053

Merged
bmjask merged 22 commits from upstream-pr/3053 into main 2026-11-28 01:13:19 +00:00
bmjask commented 2026-11-27 18:08:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-27T18:08:53Z.


Stacked on #3051, #3046, #3045, and #2829. ## What and why A completed AOT pass must be authoritative on later launches. This publishes the driver-native graphics and compute libraries with a semantic receipt, then validates that receipt and the library bytes before bypassing title shader parsing and PSO preparation. What is in it - A receipt keyed by corpus SHA-256, pipeline-layout identity, translation identity, warm settings, memory-window configuration, adapter, and driver. - Atomic publication of validated graphics and compute libraries, with the receipt written last. - An unchanged-corpus fast path that opens both libraries and marks preparation complete without parsing title shader inputs. - Conservative fallback for missing, stale, truncated, corrupt, interrupted, or unsupported artifacts. - Shared ownership of serialized bytes so D3D12 can retain the backing memory without an extra full-size copy. Tested Commit 498963e1, Windows 11, NVIDIA RTX 4090: - cargo test -p xcl --lib warm_library -- --test-threads=1 --nocapture: 4 passed, 0 failed, 0 ignored, 0 skipped. - cargo test -p xcl --lib pipeline_library -- --test-threads=1 --nocapture: 5 passed, 0 failed, 0 ignored, 0 skipped. - cargo test -p xcl --lib warm_settings_ignore_worker_identity_but_keep_backend_changes -- --test-threads=1 --nocapture: 1 passed, 0 failed, 0 ignored, 0 skipped. The synthetic warm-launch test deliberately replaces shaders.rpf with invalid bytes and verifies the validated native-library path completes without reading it. - Full-stack head e475c76f, Windows 11, NVIDIA RTX 4090: cargo build --workspace passed; cargo test --workspace -- --test-threads=4 passed 1,510 tests in 38 suites, with 0 failed, 47 ignored, and 26 explicitly reported SKIPPED capability tests. Regression run Not run. Repository policy requires a real-title smoke pair here, while this task explicitly prohibited launching a retail title. No smoke block or result has been invented. Not tested - A real-title regression smoke pair or a full real corpus (explicitly prohibited for this task). This remains a draft until the complete stack is validated. AI use Codex, GPT-5 implemented and reviewed the change and ran the commands reported above.

<!-- greyfinch-sync:ivall/xcl:issue:5531149916 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3053). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-27T18:08:53Z. --- Stacked on #3051, #3046, #3045, and #2829. ## What and why A completed AOT pass must be authoritative on later launches. This publishes the driver-native graphics and compute libraries with a semantic receipt, then validates that receipt and the library bytes before bypassing title shader parsing and PSO preparation. **What is in it** - A receipt keyed by corpus SHA-256, pipeline-layout identity, translation identity, warm settings, memory-window configuration, adapter, and driver. - Atomic publication of validated graphics and compute libraries, with the receipt written last. - An unchanged-corpus fast path that opens both libraries and marks preparation complete without parsing title shader inputs. - Conservative fallback for missing, stale, truncated, corrupt, interrupted, or unsupported artifacts. - Shared ownership of serialized bytes so D3D12 can retain the backing memory without an extra full-size copy. **Tested** Commit `498963e1`, Windows 11, NVIDIA RTX 4090: - `cargo test -p xcl --lib warm_library -- --test-threads=1 --nocapture`: 4 passed, 0 failed, 0 ignored, 0 skipped. - `cargo test -p xcl --lib pipeline_library -- --test-threads=1 --nocapture`: 5 passed, 0 failed, 0 ignored, 0 skipped. - `cargo test -p xcl --lib warm_settings_ignore_worker_identity_but_keep_backend_changes -- --test-threads=1 --nocapture`: 1 passed, 0 failed, 0 ignored, 0 skipped. The synthetic warm-launch test deliberately replaces `shaders.rpf` with invalid bytes and verifies the validated native-library path completes without reading it. - Full-stack head `e475c76f`, Windows 11, NVIDIA RTX 4090: `cargo build --workspace` passed; `cargo test --workspace -- --test-threads=4` passed 1,510 tests in 38 suites, with 0 failed, 47 ignored, and 26 explicitly reported `SKIPPED` capability tests. **Regression run** Not run. Repository policy requires a real-title smoke pair here, while this task explicitly prohibited launching a retail title. No smoke block or result has been invented. **Not tested** - A real-title regression smoke pair or a full real corpus (explicitly prohibited for this task). This remains a draft until the complete stack is validated. **AI use** Codex, GPT-5 implemented and reviewed the change and ran the commands reported above.
Sign in to join this conversation.
No reviewers
No labels
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.

Reference
xcl-dev/xcl!3053
No description provided.