Shaders: skip recipe walks for warm libraries #3057
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3057"
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?
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-27T18:25:09Z.
Stacked on #3055, #3054, #3053, #3051, #3046, #3045, and #2829. Only commit
e475c76fbelongs to this PR. A receipt hit should be independent of corpus size. The previous stack still enumerated and sorted every staged compute filename before checking the receipt; this separates constant-size corpus metadata from full discovery and defers the O(N) walk until a fast-path miss. What is in it - A metadata-only corpus summary containing the published counts, memory layout, semantic identity, and directory. - Receipt/library reuse is attempted from that summary before any graphics or compute recipe enumeration. - The existing full discovery and mandatory incomplete-corpus checks remain unchanged on a miss. - The synthetic warm test deletes its staged compute recipe and corruptsshaders.rpfbefore launch, proving the hit performs neither walk nor payload read. Tested Commite475c76f, 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 pso_corpus -- --test-threads=1 --nocapture: 1 passed, 0 failed, 0 ignored, 0 skipped. -cargo test -p xcl --test e2e incomplete_discovered_corpus_blocks_headless_title_entry -- --nocapture: 1 passed, 0 failed, 0 ignored, 0 skipped. -cargo build --workspacepassed;cargo test --workspace -- --test-threads=4passed 1,510 tests in 38 suites, with 0 failed, 47 ignored, and 26 explicitly reportedSKIPPEDcapability 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). AI use Codex, GPT-5 implemented and reviewed the change and ran the commands reported above.Imported from ivall/xcl. Originally posted by pickles976 on 2026-11-27T18:42:37Z.
Wine/RTX 4060 verification found a cold-library prerequisite, then confirmed the fresh-process fast path with that prerequisite repaired locally.
Production head
0159a946c9+ test-only fixture: four existing receipt/discovery/incomplete-publication tests passed, but the new cold→warm child-process fixture failed before publication:NativeLibrary::empty→open_shared→CreatePipelineLibrary(&serialized)returned E_INVALIDARG (0x80070057) for the empty Arc slice. Fresh intended-checkout compile 26.98 s; evidenceverify-xcl3057-fresh-native-library-20261127T183736Z/. No warm-path verdict from that failed leg.Same head + local null-blob prerequisite: I adapted the already Wine-verified VIctory #1722 bootstrap pattern: only when serialized bytes are empty, call the same COM method with a null blob pointer and zero length; nonempty libraries retain their owning Arc and existing path. This is a disclosed local integration, not an exact-head pass. The same fresh-process fixture now passes 1/1 (cold child 0.83 s, warm child 0.60 s, outer test 1.58 s; fresh 26.98 s compile).
Cold child creates a real native compute PSO, serializes/publishes the native library and receipt. Before warm child, the fixture deletes the staged recipe and makes shaders.rpf invalid. A genuinely new process then takes production
prepare_for_launch's metadata-only fast path and loads the exact productiondriver_cache::name_forcompute key throughpipeline_library::activate/load_compute; a missing key is refused. Missing/corrupt library, changed corpus identity and corrupt receipt all leave the fast path and reach the deliberately broken corpus instead. Both children require the physical NVIDIA device and native-library support; no silent skip.Limits: cold fixture builds the small PSO directly and uses production publication; this is not the complete cold preparation CLI, pso_async interception, graphics/mesh corpus, title loading, shader dispatch/readback, or a loading-stutter measurement. Native LoadComputePipeline can still invoke driver work internally. The captured warm log does show library reuse without needing the deleted recipe or parsing the invalid game pack.
Linux 6.17 / Wine 11 / RTX 4060 Laptop 8 GiB / NVIDIA 590.48.1 / 16 GiB RAM, vendor unmasked. Diagnostic-relaxed-vtable vkd3d 2576c0b4adfae4a+, not stock certification. All existing guards unchanged. Passing leg GPU peak 273 MiB, available RAM minimum 9580.8 MiB, disk minimum 11.463 GiB. Evidence
.compat-runtime/logs/verify-xcl3057-null-bootstrap-fresh-library-20261127T184054Z/; local fixture and compatibility edit retained.Suggested owner change: normalize zero-length native-library creation to a null blob pointer and retain this cold/fresh-warm/invalidation test. This clears a cache prerequisite on Wine; it does not fix the separate Game-Init producer-fence stall.
Updated owner head verified on Wine (2026-11-27 20:10 UTC)
Production
e475c76f80ed7cc7d3ec6a7e5352c200af63ac30now includes the empty/null bootstrap correction. Inxcl-pr3057-updated, production is unchanged; only the same fresh-process regression and fail-closed physical-NVIDIA assertions were added.shaders::warm_library::testspasses 5/5, zero ignored (2.22 s), including cold/warm children (0.83/0.57 s). Fresh intended-worktree compilation 27.26 s, guarded whole command 30.19 s. The warm child again loads the real native compute PSO after its recipe has been deleted and the game pack made invalid; missing/corrupt libraries, changed identity and corrupt receipt correctly fall back to discovery.Same hardware/Wine/diagnostic-vkd3d conditions and unchanged guards above. GPU peak 222 MiB; available RAM minimum 9468.3 MiB; disk minimum 11.949 GiB. Evidence
.compat-runtime/logs/verify-xcl3057-updated-fresh-process-20261127T201028Z/. This supersedes the old-head Wine bootstrap blocker, not the historical failure. No title loading, shader dispatch, complete cold corpus preparation or stutter measurement is claimed. AI-assisted verification/report: OpenAI GPT-6 Astra.Imported from ivall/xcl. Originally posted by bmjask on 2026-11-27T19:53:08Z.
The empty-library prerequisite is fixed in
b83c3f0dand propagated through the stack toe475c76f. Empty creation now passes a null blob pointer with length zero through the native COM call; non-empty libraries retain the owned Arc-backed path. I verified the corrected phase with cargo test -p xcl --lib pipeline_library -- --test-threads=1 --nocapture (4 passed, 0 failed, 0 ignored, 0 skipped), then verified the final stack with cargo test --workspace -- --test-threads=4 (1,510 passed across 38 suites, 0 failed, 47 ignored, 26 explicit capability SKIPPED reports). Hosted Windows CI also passes on every rewritten stack head. Wine was not rerun locally.