Repository navigation
Conversation
|
Tested The installed Windows SDK DXC (1.8.2502.11) took the private-heap path on Compile batch wall times overlapped on this workload: 365 and 372 ms on main, 371 and 368 ms with private heaps. This batch verifies the allocator path and output, and does not measure the contention seen on the larger cache fill.
Not tested Retail cache filling, driver pipeline warming, allocator fallback, and the full workspace suite. AI use Codex with GPT-6.2 Sol wrote the scratch fixture, ran the tests, and drafted the report. |
|
Test run of Tested
Review: Each compiler gets a serialized private heap ( Not tested: no retail title or regression run (I have no unpacked game), no Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code. |
|
Tested on Windows 11 + NVIDIA GeForce RTX 3060 Ti (8 GB, wave32). Tested
Regression run ( main ( PR #688 ( Not tested: AI use: Antigravity ( |
|
Code/CI review only (not independently runtime-tested by me): clean merge with both checks green ( |
|
Measured on the newer retail title's own shader pack: filling the DXIL cache with all of its compute programs goes from under one busy core to about ten with this PR. Tested
Not tested
AI use: Claude Code (Claude Opus 5.5) ran the precompiles, sampled the CPU time and wrote this report. The runs were on the hardware above. |
|
Test report: Tested
It reports 26,503 shaders to go through, so a full fill here would take several hours. I didn't run one, or
Regression run (no presses, 60 s; the title folder is a neutrally named junction) main: PR merged onto main: Not tested
AI use: Claude Code (Claude Opus 5.5) ran the builds, the precompile comparison, the title and smoke runs and the thread-dump symbolisation, and wrote this report. |
|
Linux (Wine + vkd3d-proton) + NVIDIA test of Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch, Tested
In run 1 with this change a compute pipeline of the preload was being built from 11 s to 62 s, across the start of the burst, and the burst was still at full speed. Why Read
Not tested: past 100 s; AI use: Claude Code (Claude Fable 5.2) read the diff, built the tree, ran the title six times with |
DXC workers otherwise contend on the process heap during parallel cache fills. Give each thread-local compiler a serialized private heap through DxcCreateInstance2, with a compatibility fallback, and add a read-only wrapper for filling the DXIL cache. Measured on this machine: 19.3-19.5 effective compiler cores with private heaps versus about 2.3 with the shared process heap. Part of #156. Assisted-by: Codex (GPT-5)
0b82a3d to
760f742
Compare
|
Addressed the compatibility question in 760f742: any failed DxcCreateInstance2 private-allocator attempt now logs its HRESULT and falls back to DxcCreateInstance. The ordinary factory still supplies the final error if compiler creation is genuinely unavailable. Verified on Windows SDK DXC 1.9.2602.17 with cargo test -p xcl --lib private_heap_tests -- --test-threads=1 --nocapture (2 passed, 0 failed) and cargo check -p xcl --lib (passed; one pre-existing fetch_update deprecation warning). The fallback itself was not forced on this DXC build. |
|
@bmjask
} else if hr.0 == crate::util::E_INVALIDARG {
…
p = std::ptr::null_mut();
} else {
return Err(format!("DxcCreateInstance2: {hr:?}"));
}The numbers in my comment above therefore hold for AI use: Claude Code (Claude Fable 5.2) compared the two commits and wrote this. |
Empirical test report (760f742)Hardware / environment
Commands and results
Observed behavior
Not tested Full GPU workspace suite, whole-pack AOT runs, game smoke runs, direct execution of the new PowerShell wrapper, and fallback with older DXC builds. AI use Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr688-focused.log and published. |
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
Prime1997
left a comment
There was a problem hiding this comment.
Needs changes — keep the useful work. Checked head 760f742b42383a53b344d957217f4c4e4f93b2dd.
The private-heap compiler path still returns early when allocator creation fails, and falls back from DxcCreateInstance2 only for selected errors. A failure of this optional path can therefore prevent the ordinary compiler entry point from being tried. The local repair retries the ordinary entry point for allocator, factory and null-object failures; injected factories exercise the decisions without loading DXC.
Local validation: head plus an uncommitted repair and regression fixtures: 3 passed, 0 failed, 0 ignored, 0 skipped. These are CPU checks of the local repair, not a claim that the unmodified PR passed them. Separate negative-control checks produced 1 passes and 2 expected failures.
Build command: cargo test --locked --offline -p xcl --lib --no-run --message-format=json --target-dir <isolated target> (only the private absolute target path is replaced here). Each selected test executable was then run separately as <test-exe> <exact-name> --exact --test-threads=1 --nocapture.
Selected exact tests
gpu::recomp::dxc::fallback_tests::private_creation_failures_try_process_heapgpu::recomp::dxc::fallback_tests::unavailable_private_heap_tries_process_heapgpu::recomp::dxc::fallback_tests::missing_private_entrypoint_uses_process_heap
Latest-main source comparison: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7; full-head merge-tree result: conflicts. This is a source compatibility check, not a tested integration build. Local repair patch SHA-256: 55d83bd0c87cfedeb27d5dae7b204674c4ed57736b681dacc2734cc6aaff4e62.
Windows 11 Pro build 26200, i5-10400, 32 GiB RAM, Rust 1.100.0 MSVC debug tests. RTX 3060 Ti / driver 32.0.16.1714 is present but was not exercised. No full-suite, GPU or title result is claimed; installed builds and game data were untouched.
AI use: Codex (GPT-6) reviewed the source, prepared the local repair/fixtures, ran the checks and drafted this report.
Optional temporary Discord for coordinating this contributor work, helping test and comparing results.
|
Since #2555, Setup: Fedora 44, Wine 11.21 Staging, Ryzen 9 9950X3D, no GPU used; release
Read: Prime1997's point holds at Not tested: the launch itself ( AI use: Claude Code (Claude Opus 5.5) ran the passes and wrote this comment. Posted without review by a person: the account owner was away and reads replies later. |
…roll `ballot_px_quad` took its quad's four members in an `[unroll]` loop. It is called in most translated pixel shaders, often hundreds of times, and DXC unrolls every inlined copy: on a 395 KB one with 84 calls, `-ftime-report` put 22 % of the compile in "Dxil Loop Unroll" and 9 % more in "Unroll loops" and LCSSA. The four members now come from `ballot_px_member`, so there is no loop left in the pixel prelude. On a retail pack, 282 pixel shaders compiled in-process on 8 threads took 74.9 s instead of 124.1 s on Windows (Ryzen 7 5700X3D). Under Wine, XCL's own pass over 980 of them took 60-69 s instead of 105-108 s with xcl-dev#688's private DXC heaps; without them it was slower, 435-463 s against 386-397 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…roll `ballot_px_quad` took its quad's four members in an `[unroll]` loop. It is called in most translated pixel shaders, often hundreds of times, and DXC unrolls every inlined copy: on a 395 KB one with 84 calls, `-ftime-report` put 22 % of its pass time in "Dxil Loop Unroll" and 9 % more in "Unroll loops" and LCSSA. The four members are now written out, in the form thehollowedone gave in review. On a retail pack, 282 pixel shaders compiled in-process on 8 threads took 72.1 s instead of 125.1 s on Windows (Ryzen 7 5700X3D). 980 of them through dxc.exe took 505 s instead of 854 s with DXC 1.9 and 575 s instead of 961 s with DXC 1.8. Under Wine, XCL's own pass over the 980 took 59 s instead of 116 s with xcl-dev#688's private DXC heaps; without them it was slower (428 s against 387 s). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…roll `ballot_px_quad` took its quad's four members in an `[unroll]` loop. It is called in most translated pixel shaders, often hundreds of times, and DXC unrolls every inlined copy: on a 395 KB one with 84 calls, `-ftime-report` put 22 % of its pass time in "Dxil Loop Unroll" and 9 % more in "Unroll loops" and LCSSA. The four members are now written out, in the form thehollowedone gave in review. On a retail pack, 282 pixel shaders compiled in-process on 8 threads took 72.1 s instead of 125.1 s on Windows (Ryzen 7 5700X3D). 980 of them through dxc.exe took 505 s instead of 854 s with DXC 1.9 and 575 s instead of 961 s with DXC 1.8. Under Wine, XCL's own pass over the 980 took 59 s instead of 116 s with xcl-dev#688's private DXC heaps; without them it was slower (428 s against 387 s). Co-authored-by: thehollowedone <36892342+thehollowedone@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…roll `ballot_px_quad` took its quad's four members in an `[unroll]` loop. It is called in most translated pixel shaders, often hundreds of times, and DXC unrolls every inlined copy: on a 395 KB one with 84 calls, `-ftime-report` put 22 % of its pass time in "Dxil Loop Unroll" and 9 % more in "Unroll loops" and LCSSA. The four members are now written out, in the form thehollowedone gave in review. On a retail pack, 282 pixel shaders compiled in-process on 8 threads took 72.1 s instead of 125.1 s on Windows (Ryzen 7 5700X3D). 980 of them through dxc.exe took 505 s instead of 854 s with DXC 1.9 and 575 s instead of 961 s with DXC 1.8. Under Wine, XCL's own pass over the 980 took 59 s instead of 116 s with xcl-dev#688's private DXC heaps; without them it was slower (428 s against 387 s). Co-authored-by: thehollowedone <36892342+thehollowedone@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
With
Not tested: the two together on Windows; the launch itself ( AI use: Claude Code (Claude Opus 5.5) ran the passes and wrote this comment. Posted without review by a person: the account owner was away and reads replies later. |
…port + IMalloc; README: both)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main gained 345 commits since 753e8b1, most of them bmjask's stack (xcl-dev#2959), plus xcl-dev#2872, xcl-dev#3085 and xcl-dev#3086 from this branch. Conflicts, per PR: - xcl-dev#2404 + xcl-dev#2633 (split chained ExecuteIndirect): main's xcl-dev#2959 took both over (ed98461, a05fbc4, 8626d5b: IndirectBuild/IndirectChain on a CBV root, one-command slicer, separate cache namespace). Main's side kept in dispatch_chain.rs, pso.rs (slicer, command signature, chain root), bind.rs (ExecuteIndirect path), device_x.rs (signature traits), pso_async.rs (no background whole build, so no build_waited_on), real.rs (ComputeBuild, driver_cache names) and shaders.rs (blob names). Dropped with them: slab_count, record_slicer, abi_signature_id names, the direct root-CBV constant blocks, list_x::predicated, the split.rs/runner.rs ExecuteIndirect test and the list_x chain-scratch test. Not in main: xcl-dev#2404 ran the pieces before any whole form was built; main runs the whole form (built on the title's thread) until the indirect set is ready. - xcl-dev#2707 (allocator reclaim): main has it (31930d8, 057f463, 8e7b566). alloc_pool.rs is main's, with xcl-dev#867's changes on top; bind.rs takes main's native_backing; xcl-dev#2707's tests and bind::push_uma_for_test go. - xcl-dev#867 + xcl-dev#2477 (Wine vtables and fences), adapted to main's new code: real.rs keeps the in-place patching, UnadoptGuard and FenceProxy beside main's native_queue_* helpers; guards in cl_reset, bind_pipeline_exact, clear_pipeline_exact, reset_pc_allocator, the title ExecuteCommandLists closure and native_queue_execute; Signal/Wait unwrap the title's fence (also in native_queue_signal/wait); list_x guards in reset_reserved_segment and KickoffX's submit closures; create_raw_fence for main's new internal fences in alloc_pool.rs (SubmissionGate), title_textures.rs, present.rs, vram.rs, sparse.rs, cpu_writes.rs; tests as xcl-dev#2477 had them; runner.rs is main's plus submit_list. - xcl-dev#1803 (heap addresses): kept, carried into main's PreparedSplit and PreparedAbiState (prepared_abi_io takes the heaps). - xcl-dev#1368 (NodeMask 0): kept in compute_container, before main's per-node blob names, so names and pipeline use node 0. - xcl-dev#1860, xcl-dev#2082 (cfg.rs, module/opt.rs): cfg.rs is 1567f72's version (xcl-dev#1860 on main's Succs); opt.rs is that plus xcl-dev#2082's arm and test. - xcl-dev#2229 (rodata): kept through main's kernel.rs entry points; translate_entry_rodata loses wave32_only as main dropped per-GPU tables (3cde0cc); pso.rs and coverage.rs call it with main's options (no_remap, split for graphics); recomp Options keeps rodata and no_remap. - xcl-dev#1975: kept in emit.rs and lower_valu.rs; its mesh barrier guard and its test dropped, main's wider guard (2ca9127) covers it; the now-unused lower::has_non_uniform_barrier goes. - xcl-dev#2070 (64 MB stacks): pso_async::WORKER_STACK on main's worker, helper and preload threads; shaders.rs's piece threads on worker_thread. - xcl-dev#2551 (whole forms prebuilt): split_whole_roots(false) is DirectChain, so the precompile builds every split program's whole form; main built it only for programs an earlier run used through ExecuteIndirect. - xcl-dev#688 (dxc.rs imports), xcl-dev#2762 (host.rs log line), xcl-dev#3090 (list_x tests), arch/window-title-commit (present.rs with_commit on main's compiling_text), README.md: both sides. - list_x.rs: main dropped title_textures::list_reset; main's side. - sparse.rs, vram.rs: main's quarantine_tiles_for and per-device retire state, with create_raw_fence. - xcl-dev#3090, xcl-dev#3092 tests: runner::device and Uma::block_len added from nvidia-dev (5 and 12 lines) so the lib tests compile. - xcl-dev#751: its commit is already in main (b84e037, via xcl-dev#2844); it leaves the README table with xcl-dev#2404, xcl-dev#2633, xcl-dev#2707, xcl-dev#2872, xcl-dev#3085 and xcl-dev#3086. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…roll `ballot_px_quad` took its quad's four members in an `[unroll]` loop. It is called in most translated pixel shaders, often hundreds of times, and DXC unrolls every inlined copy: on a 395 KB one with 84 calls, `-ftime-report` put 22 % of its pass time in "Dxil Loop Unroll" and 9 % more in "Unroll loops" and LCSSA. The four members are now written out, in the form thehollowedone gave in review. On a retail pack, 282 pixel shaders compiled in-process on 8 threads took 72.1 s instead of 125.1 s on Windows (Ryzen 7 5700X3D). 980 of them through dxc.exe took 505 s instead of 854 s with DXC 1.9 and 575 s instead of 961 s with DXC 1.8. Under Wine, XCL's own pass over the 980 took 59 s instead of 116 s with #688's private DXC heaps; without them it was slower (428 s against 387 s). Co-authored-by: thehollowedone <36892342+thehollowedone@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 2dad32e)
|
Current-main audit (2026-11-29): already implemented; please close this PR. Current There is no remaining change to merge from this head. Cache impact of the carried implementation is intended to be byte-identical DXIL/PSO identity. Review assisted by Codex; exact model name was not exposed in this session. |
main has merged nvidia-dev (xcl-dev#3203): its two-pass mesh, sparse and upload paths now submit through real::native_queue_execute / _signal / _wait. Those already carry xcl-dev#867's UnadoptGuard and unwrap_fence; the conflicts and the main-only submit paths were resolved as follows. Taken from main, the stack's version dropped (main does the same): - recomp/dxc.rs (3): xcl-dev#688's private DXC heaps; main's form (3842807) falls back on any failure and never destroys a heap. - device_x.rs (10): xcl-dev#3091 (cherry-pick 511a297); main's 7e24237 keeps interned shader copies for base pipelines. xcl-dev#3091's tests and its real.rs test counter (GRAPHICS_FALLBACK_ATTEMPTS) and README line go; xcl-dev#2753's console_bytes is re-applied on main's file. - bind.rs (16): the stack's only change there was xcl-dev#1803, merged in main. main's file, plus the xcl-dev#2816 feedback-copy UnadoptGuard in poll_two_pass_feedback (ed887d2, from linux/stack-nvidia-dev). - pso.rs: main has daae033 (multidimensional groups take direct DXIL, xcl-dev#3189's change), so the stack-only commit is in main; translate calls take main's translate_compute_rodata / translate_entry_rodata_rt32. - list_x.rs tests: xcl-dev#3090's barrier tests were in twice (cherry-pick and main's merge); the cherry-picked copy goes. - runner.rs device(), xbox.rs Fssm::rodata: added on both sides; one copy. - README.md: the precompile-wrapper paragraph was added on both sides; one copy. Both kept: - build.rs (2): TRANSLATION_GLUE_REVISION "pso-glue-v5-linux-multidimensional- direct" (main's v5 + the stack suffix); translator sources keep xcl-dev#2229's cfg.rs and code_loads.rs, drop dxc.rs as main does. - dxil/kernel.rs (6): TRANSLATOR_VERSION 13 (main 12; the stack's xcl-dev#2229 head output differs, as on linux/stack-nvidia-dev); main's rt32 entry points with xcl-dev#2229's code_loads. - dxil/lower.rs (4), lower_mem.rs (3), lower_window.rs (1), recomp/emit.rs (11), recomp/mod.rs (3), recomp/tests.rs (1), core_tests.rs: main has an earlier copy of xcl-dev#2229 (41f1a85); xcl-dev#2229's head (code_loads, xcl_cload / xcl_gload(hi, a)) is kept over it, as on linux/stack-nvidia-dev; main's loop_ids, IO slots, ps_mask_live_scc and rt32 mask kept beside it, and main's duplicate core_tests copy of the rodata test goes. lower_mem.rs keeps the stack's scratch_ptr insert-before-terminator line. - real.rs (6): the class scan keeps `own` with main's release_through_its_own_vtable; xcl-dev#2477's in-place patch after main's two-pass defer hooks; q_signal_pc / q_wait_pc beside main's page mappings; the title ExecuteCommandLists keeps xcl-dev#867's list guards inside main's watch::in_driver scope; test modules of both. - list_x.rs (1): xcl-dev#867's allocator / PSO guards with main's `on = pc_alloc`. - sparse.rs (1): main's new_state, with xcl-dev#867's raw fences for the sparse and readback fences and the async readback fence pairs (as on linux/stack-nvidia-dev); pc_execute (main's texture_upload submit path) unadopts its list for the submit. - title_textures.rs (1): main's early fence creation, as a raw fence. - dstorage.rs (4): xcl-dev#2864's unpack cache on main's Cow source and stage buffers. - xg.rs (2): main's copy_args (adccb7d) covers xcl-dev#684's argument fix; xcl-dev#684's destination guard kept. - present.rs (1), gpu_compute_e2e.rs (1), README.md (2): tests and text of both. linux/README.md: main line updated; xcl-dev#1599, xcl-dev#2082, xcl-dev#1803, xcl-dev#3090, xcl-dev#688, xcl-dev#3091 and the stack-only multidimensional row leave the table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Review (head 760f742, diff read, not a merge-check; it conflicts with main, so not built or run):
Recommendation: close as merged via 3842807 (follow-up fix in 6804673). AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point. |
|
Closing as superseded: this change is already on Two independent checks found this: Foniass's close list on #1607 and ours against current AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents. |
Part of #156. Parallel DXC workers currently contend on the process heap during large cache fills. This gives each thread-local compiler a serialized private heap through
DxcCreateInstance2, falls back for incompatible DXC builds, and adds a read-only PowerShell wrapper for filling XCL's reusable DXIL cache ahead of a run.What is in it
crates/xcl/src/gpu/recomp/dxc.rs: privateIMallocheap per compiler, compatibility fallback, and allocator/concurrency testsscripts/precompile-shaders.ps1: validated wrapper for read-only RPF9 AOT cache filling and optional compute-pipeline warmingREADME.md: generic AOT usageTested
cargo test -p xcl --lib private_heap_tests -- --test-threads=1 --nocapture: 2 passed, 0 failed, 0 ignoredcargo check -p xcl --lib: passedscripts/precompile-shaders.ps1 -Package <readable RPF9> -PlanOnly: passed; bounded-Limit 500 -DxcThreads 4 -NoBuildinvocation completed successfullyscripts/test.ps1: 694 passed, 0 failed, 41 ignored; 2 GPU tests skipped (no wave64)cargo build --release -p xcl: passedRegression run
Upstream
main:This PR:
Not tested
-Pipelinesdriver-cache warmingAI use