Repository navigation
Conversation
Use the passthrough mesh shader output topology on both translated MS and GS streams. Exercise cached replay against a synthetic triangle PSO. Assisted-by: OpenAI Codex (GPT-6)
Hash the final driver inputs by value, with distinct compute and mesh domains and versioned ABI state. Exercise state sensitivity and padding independence without enabling persistence. Assisted-by: OpenAI Codex (GPT-6)
Keep NGG compute and passthrough mesh graphics driver blobs under independent canonical keys. Retry rejected entries under the existing cold-compile policy and validate fresh-process replay, per-pass corruption, and GPU output on synthetic inputs. Part of xcl-dev#1269. Related to xcl-dev#1836 and xcl-dev#902. Assisted-by: OpenAI Codex (GPT-6)
|
Independent check of The fixture verified five disk hits in a fresh process, recovery when either pass’s blobs were rejected, and the expected pixel readbacks for both translated mesh and geometry. This covers the published stack with synthetic input. Integration with current main, the title’s ExecuteIndirect path, and retail performance remain untested here. AI-assisted. Codex (GPT-6 family, exact variant unavailable) ran the tests and drafted this report. |
|
Code review on
What is needed before merge:
|
gefydev
left a comment
There was a problem hiding this comment.
Review of 024b2e2 (read against main bf9eebd; I did not build or run it).
This now overlaps #1836, which was merged. #1836 merged on 2026-11-25 00:04 UTC, after this PR was opened. That is why real.rs conflicts. On main, finish_two_pass already caches the compute pass blob in memory and on disk (compute_blob_key(&tp.cs, rs, 0), driver_cache::path(&tp.cs, 0)). #1836 also added GRAPHICS_BLOBS (256 MiB), graphics_path, graphics_blob_key (field-by-field state hashing, which avoids the padding problem) and read_pso_cached_blob. After a rebase, the compute half of this PR would be a second cache under a different key for the same blob. What is new is the mesh pass cache, which should go through GRAPHICS_BLOBS and graphics_blob_key rather than a separate hasher (two_pass_identity.rs in #1941), a second pso_cached_blob, and COMPUTE_BLOBS. #902 also keeps slow graphics pipeline blobs on disk.
No measured gain at this head. The fresh-process ranges overlap: 2.10–2.45 s with persistence off and 2.21–2.28 s with it on. The 34× figure is historical and includes warm DXIL and NVIDIA driver caches. A run on AMD, or on NVIDIA with the driver's shader cache cleared, would show whether this cache helps.
Code points:
- Shared RAM budget. Mesh blobs share the 512 MiB
COMPUTE_BLOBSbudget with ordinary compute blobs, and that cache has no eviction. Withkeep_ram = bytes >= COMPUTE_BLOB_MIN_DXIL || took >= min, nearly every MS+PS pair qualifies, so mesh blobs can crowd out the compute blobs the cache was made for. - Misleading
recordin the compile log.driver_compile_identifiedgets the two-pass identity hash asrecord. That field is documented as the console record's hash that matches[SHADER]lines, so the logged "record" will not match anything. - Removed diagnostic. The "two-pass … PSO gated: …, waited N ms" log is gone. The compile log now prints "huge, ungated here" for these builds and drops the slot wait time.
XCL_PSO_DISK_CACHE_MIN_MScovers only the two-pass path. Ordinary computekeep()still usesKEEP. The variable is not documented in the README.- Weakened assertion in an existing test.
compute_blob_testschanges the exactbefore - 3assertion to thetotal == suminvariant. This makes sense with the new concurrent test, but please say why in the description, or keep the exact check by giving that test its own key. - Duplicated test helpers and stale expectations. The e2e re-implements the synthetic container helpers (
fssm,xbch,dxil_part,mesh_psv) that already exist inshaders_e2e.rs,gpu/xbox.rsandgpu/recomp/mod.rs. Itstp-cs-*file and counter expectations change once the compute half is rebased onto #1836. - AI use. "Google Antigravity; its model is unrecorded" does not meet CONTRIBUTING's requirement to name the exact model.
What is good: build_two_pass_pso takes at most one cold slot per pair and none for blob attempts. Eviction with Arc::ptr_eq handles another thread's replacement correctly. Owning the partial ID3D12PipelineState on failure is cleaner than the manual Release it replaces. The cross-process replay and corrupt-blob e2e is a strong test.
Suggested path: rebase onto main, drop the compute pass half (or explain why two keys for one blob are wanted), cache the mesh pass through GRAPHICS_BLOBS and graphics_blob_key, and add a measurement where the driver's own cache is cold.
Review written with Claude Code (Claude Opus 5.5); I checked each point against the code.
PR #1942 GPU verificationD3D12.X: persist both PSOs for translated mesh and geometry
Tested
Failures Twenty library tests failed at
Four other library tests under
The Not tested
AI use
All 25 GPU SKIPPED entries |
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
Persist driver blobs for the NGG compute pass (executes first) and the passthrough mesh graphics pass (executes second) for translated MS and VS+GS. Rejected blobs are evicted and retried under the cold-compile gate. Part of #1269, with NGG compute and canonical hashing overlap in #1836 and shared graphics-hashing and disk transport overlap in #902.
Stacked on #1941. Only
024b2e2dc51924965df478fdb4f63fbcae9dc0b2belongs here.What is in it
crates/xcl/src/hle/d3d12x/real.rsintegrates both cache identities and uses the existing disk transport and RAM budget.crates/xcl/tests/gpu_two_pass_cache_e2e.rsexercises both console translation entry points, separate pass corruption, cross-process replay, disablement and actual GPU pixel output. The commit is 1,006 changed lines (350 runtime and unit-test lines, 656 GPU E2E lines). The synthetic console container, D3D12 dispatch and readback scaffolding make the test self-contained without a retail shader pack. The cache validation needs the runtime integration in the same review.Tested
cargo build --locked --release -p xcl --jobs 1succeeded on clean024b2e2dc51924965df478fdb4f63fbcae9dc0b2and baseline689f2db477c3c062cf162649781640ef8a977c18..\scripts\test.ps1(Cargo build jobs 1, test threads 4) on stack head024b2e2dc51924965df478fdb4f63fbcae9dc0b2reported 983 passed, 0 failed, 45 ignored across 21 targets. Explicit runtime SKIPPED markers (23) were 18 no native wave64, 3 refused wave32 per-lane operations, 1 Windows Developer Mode unavailable, 1 no heap windows. Optional sample-backed cases also returned early with their sample variables unset. GPU regressions for TRIANGLE replay and both-pass persistence ran without runtime skips.XCL_DIRECT_DXIL=1andXCL_HEAP_WINDOWS=1. Only the persistence threshold was at its default in the measured runs. The separate seed launch used a 0 ms threshold.scripts/smoke.ps1 -Game <retail-folder> -Seconds 60 -Title 'Retail workload A' -Xcl <matching-release-binary>on the same anonymized retail workload. NVIDIA selected withXCL_ADAPTER=nvidia.Regression run
main
PR
Not tested
AI use