Shaders: replay compatible two-pass mesh pipelines at startup #2828
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2828
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2828"
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?
@CryingLaughing on GitHub · 2026-11-26 15:36 UTC · original
CryingLaughing:perf/prewarm-two-pass-mesh→nvidia-dev· +398 −48 · 4 files · 1 commits · closed without mergingPart of #2760. Targets
nvidia-dev, where graphics startup history and its worker are available.Graphics startup can replay legacy descriptor records. This adds a typed record for compatible two-pass console mesh streams so first use can save the shader keys and fixed-function state, and startup can replay the stream with the runtime’s pipeline cache keys.
What is in it
Tested
Head
b04438c7533111277ab2b5b532335682c1989a82onnvidia-devaf2cecc40886a8682ecf3267f5328c6dc4b66ad7. RTX 4080 driver 621.01, i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 x64 MSVC and DXC 1.8.2502.11, debug.Four normal
xcl runlaunches exited 0 with no capability skips and unchanged synthetic title folders. The base saved no mesh history. The head’s first bind saved one record. On a fresh launch, the ordinary startup worker resolved its loose shader, made one pipeline, and saved two blobs before the bind. The guest reused 2/2 with zero rejections or cold retries. With the loose source missing, the guest built both passes cold. Normal launcher comparisonA separate direct worker check saved two blobs with one window, then verified both were accepted on a fresh launch. Moving the same console shader to the AS slot also produced the same cache paths and two accepted blobs.
On the unmodified head,
cargo build --workspace --locked -j 4passed. The locked four-thread workspace suite reported 1,748 passed, 5 failed, 48 ignored. The clean parent had the same five failing tests.The same full build and four-thread suites with identical test-only overlays from #2770, #2771 and #2788 reported 1,750 passed, 0 failed, 48 ignored on the base and 1,753 passed, 0 failed, 48 ignored on the head. Each included 30 capability skips across 40 harnesses. An earlier overlay run had one shared synthetic game-folder assertion failure. It did not recur in the final paired run.
The automatic merge of this head with
nvidia-devea0698d428f38f63fcc7638e50a86d186eb7e264built at tree69310a57126efe88afab2a3e3c204220387a577b. On the same RTX 4080 host, three syntheticxcl runlaunches exited 0 with Series X selected. The first launch wrote one type-3 mesh record. On a fresh launch the startup worker made one pipeline and saved two blobs. The guest accepted 2/2 with zero rejections or cold retries. With the loose shader absent, startup left the record out and the guest built both passes cold. The focused mesh and record selection passed 15 tests with 0 failures and 0 ignores, with no capability skips.Regression run
Independent retail smoke by MatyEjsr compared the exact original
nvidia-devparentaf2cecc40886a8682ecf3267f5328c6dc4b66ad7and headb04438c7533111277ab2b5b532335682c1989a82for 60 seconds each on an RTX 3090 with driver 617.42. Both exited 0 with zero crashes or device removals. The head showed 1,601 frames versus 1,590 on the parent and used 14,927 MB peak commit versus 15,591 MB (95.7%). Mesh history stayed at zero type-3 records, so the retail run covered startup stability and the synthetic launches covered mesh replay. The independent workspace suite found the same six failures on both revisions, and its focused graphics-record and shader-ownership checks passed 10/10.Not tested
@Anon64 on GitHub · 2026-11-26 15:56 UTC · original · edited 2026-11-26 16:08 UTC
Regression run of
b04438con a newer retail title: no device removal and no crash in three runs, but peak commit over the 125 % limit in two of them (about 7 GB above the base).Setup: RTX 3060 12 GB (NVIDIA 581.80), i9-14900KF, Windows 11 26200, release builds of this PR's base
b49be18and of its exact head, run back to back,scripts/smoke.ps1 -Game <title>for 60 s withXCL_NETWORK=0and A pressed every 4 s from 20 s.base:
this PR:
116 % of the base's frames, 80 % of its peak commit. One run each. Peak commit on this title has varied between 17.4 and 25 GB over the day on this machine, so one run cannot say whether the lower commit and the higher frame count come from this PR.
Update, second run of each (this PR first, then the base): this PR 1444 frames, peak commit 30,739 MB; base 1467 frames, 24,513 MB. That is 98 % of the frames and 125.4 % of the peak commit, just over the limit. This PR's two runs differ by 11.6 GB of peak commit (19,118 and 30,739 MB) against 23.9 and 24.5 GB for the base, so I cannot tell from these runs whether this PR lowers commit, raises it, or makes it vary more. The replay at startup may change how much the first 60 s build, which would explain a wider spread; more runs (or a peak-commit line from the replay itself) would settle it.
Update, third run of each (the base first this time): base 1416 frames, peak commit 24,064 MB; this PR 1494 frames, 31,550 MB, 131 % of the base.
The base stays within 0.7 GB across its three runs; this PR is about 7 GB higher in two of three. That looks like a real increase, perhaps from what the replay keeps alive at startup, with run 1 a case where it did not run or did less. Frames are 98–116 % of the base.
Not tested: the suite on this head; whether the title reaches the code this PR changes in its first 60 s; AMD.
AI use: Claude Code (Claude Opus 5.5) ran these runs on this machine and wrote this report.
@CryingLaughing on GitHub · 2026-11-26 16:21 UTC · original
Two of the reported retail pairs cross 125% peak commit. Their
b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7control is 371 commits behind the actualnvidia-devparentaf2cecc40886a8682ecf3267f5328c6dc4b66ad7. That comparison leaves the replay contribution to the difference unresolved.I isolated one recorded two-pass mesh stream on RTX 4080 driver 621.01, Core i5-13600K and Windows 11 25H2 build 26200.9974, Rust 1.100.0 x64 MSVC, DXC 1.8.2502.11, debug. Across three alternating
xcl runpairs at exact headb04438c7533111277ab2b5b532335682c1989a82, the Windows job-wide peak commit was 656.410 / 650.961, 651.328 / 649.211, and 649.227 / 649.805 MiB with graphics preparation on versus off. Three exact NVIDIA parent controls measured 650.383, 649.602, and 651.191 MiB. All nine launches passed. Each replay arm built one pipeline before guest entry and accepted both blobs at first bind. The off and parent arms each built both passes cold. This synthetic case measures one stream using WindowsPeakJobMemoryUsed. The retail smoke log reports a different counter.Could you repeat the 60-second retail smoke on the exact NVIDIA parent
af2cecc4and this head with equivalently primed caches and the same settings? If possible, keep the graphics preparation result and theXCL_PSO_TRACE=1lines for the mesh passes so we can tell whether the replay ran in each pair.@MatyEjsr on GitHub · 2026-11-26 17:03 UTC · original · edited 2026-11-26 21:42 UTC
Independent Windows / NVIDIA verification of PR #2828 at exact head
b04438c7533111277ab2b5b532335682c1989a82against its exactnvidia-devparentaf2cecc40886a8682ecf3267f5328c6dc4b66ad7(no local patches).Tested
rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC,dxcompiler.dll1.9.0.5512.cargo build --workspace -j 8: exited 0.cargo test --workspace -j 8 --no-fail-fast -- --test-threads=8 --nocapture(XCL_ADAPTER=NVIDIA): 1751 passed, 6 failed, 48 ignored across 44 harnesses, plus 29 GPU/capabilitySKIPPEDnotices (21no wave64, 3 wave32 per-lane unsupported, 2no heap windows, 3 missing D3D12 debug layer; skips not counted as coverage).b04438c7:cargo test -p xcl --lib gfx_records -- --nocapture: 9 passed, 0 failed, 0 ignored.cargo test -p xcl --lib a_graphics_record_is_built_only_with_its_own_shaders -- --nocapture: 1 passed, 0 failed, 0 ignored.af2cecc40886a8682ecf3267f5328c6dc4b66ad7: all 6 failing tests (pieces_hold_the_texels_of_their_levels,gpu_parts_of_a_texture_go_up_and_the_rest_stays,console_ms_in_as_slot_and_ms_with_as_are_refused_cleanly,async_compute_pso_registers_real_pso_and_not_standin, and bothtwo_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobsharnesses) fail identically onaf2cecc4. Zero regressions from PR #2828.Regression run
Paired 60-second retail startup smoke (
scripts/smoke.ps1,XCL_ADAPTER=NVIDIA, same title labelc1cc91a4) on exactnvidia-devparentaf2cecc4vs PR headb04438c7:nvidia-devparentaf2cecc4, no >125% peak-commit increase appeared.b04438c7completed in 0 s (4 made, 0 failed; driver blobs: 0 from disk, 4 kept,0 of 4 workers failed,1 of 5 graphics pipelines left out).used-graphics-pipelines.binstayed at 1109 bytes (tag1=5,tag3=0) before and after the run, so this 60 s startup window did not record or replay any tag-3 two-pass mesh entries.MERGEABLEagainstorigin/nvidia-dev(ea0698d4, 37 commits ahead ofaf2cecc4, no intervening edits togfx_records.rsorshaders.rs). Clean V1-compatibleMESH_PIPELINE(tag=3) encoding/validation with canonical varints (bounded_var), safe cold-build fallback (None) for unsupported subobjects, and matchingpso_async::releasecleanup. No duplicate or superseded PR found; shares 3 files (gfx_records.rs,real.rs,shaders.rs) with open PR#2829(also targetingnvidia-dev).Not tested
XCL_PSO_TRACE=1was not enabled).AI use
@SlopTart on GitHub · 2026-11-26 17:51 UTC · original
Linux (Wine) dual-lane run at head
b04438c7Same two hosts and suite as our earlier rows on this stack (#2815/#2816/#2817), run against today's
nvidia-devbase (af2cecc4) measured the same day:Suite:
cargo test --release --locked -p xcl --lib --target x86_64-pc-windows-gnu -- --test-threads=2 --skip gpu::.Results at
b04438c7:gfx_recordstests —a_mesh_entry_preserves_moved_shader_slot_order_and_state,mesh_entries_require_supported_unique_layout_and_exact_payload,legacy_pipeline_and_mesh_entries_share_version_one_history— all green on both lanes. Red sets byte-identical to base on both.Startup-replay note: this PR replays compatible two-pass mesh pipelines from
gfx_recordshistory at startup. Our lanes exercise the record/readback path under Wine where the two-pass family (#2815-17 stack) previously behaved fine on both vendors; the new record format compatibility tests pass without touching that behavior. No startup replay happens in the lib suite itself (no title cache present).Not tested: actual startup replay against a recorded title cache — needs
xcl runon a title, which we don't have.AI use: Hermes agent (local Qwen-class) ran the tests and drafted this; I checked it before posting.
@throny on GitHub · 2026-11-26 18:50 UTC · original
Test report: into the world on an RTX 4080 16 GB, together with #2831. Starts fine, replays 477 pipelines in 1 s, no growth in commit here; the world behaves as before.
Tested
git apply, both as they are) onnvidia-devaf2cecc4+ thirteen other open PRs (#684, #2697, #2750, #2749, #2729, #2794, #2817 stack, #2768, #2782, #2725, #2581, #2422, #2618),XCL_WATCH_HOT=0. The retail title of #505, Series X profile, three runs into the world.0x887a0005) in 3 of 3 after 110–150 s, as in about two thirds of this card's runs on this branch without the PR.Not tested
AI use: Claude Code (Claude Fable 5.2) ran this on the owner's machine and wrote the report.
@andrewDoing on GitHub · 2026-11-27 00:09 UTC · original
Independent optional-pixel-shader replay check on RTX 5070, driver 616.92; Ryzen 7 5700X3D; Windows build 26300.10075; Rust 1.100.0 MSVC; DXC/DXIL 1.8.2502.11, debug.
Using the clean worker executable from PR head
b04438c7533111277ab2b5b532335682c1989a82, with synthetic records from a separate test-only generator calling the capture/encoder path:These are synthetic worker runs, not normal title launches; GTA VI rendering, actual workload coverage and launch performance remain untested. The generator changes were not present in the worker binary.
AI use: OpenAI Codex with GPT-6.2 Astra constructed the synthetic inputs and ran the tests; Codex coordinated and prepared this report.
Pull request closed