D3D12.X: share dispatch-chain root signatures per device and key compute blobs on NodeMask #2713
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2723"
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 ZekkJJ on 2026-11-26T08:30:18Z.
Caches
dispatch_chainD3D12 root signatures per(device, static_samplers)instead of allocating a fresh root signature per split compute program, normalizes/isolates per-device ABI root signatures (including command-list fallbacks and static-sampler variants), and keysCOMPUTE_BLOBSplus persistent non-zeroNodeMaskdisk cache entries.Part of #2688 (Workstream 7) and relates to #2088. Based on
main(b49be183), updated at2d14195e83eb5b1505c8c06793d9425c15337f0b. Diff size (817 insertions, 40 deletionsacross 5 files) is predominantly the new review-requested unit, GPU, and two-device command-list tests alongside the focused runtime change, which keeps one cohesive per-device root-signature and cache-identity fix.What is in it
crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs:ID3D12RootSignaturehandles inSIGNATURESkeyed by(canonical_device_key, sampler_words)so split compute programs on the same device share one COM root signature (outside the lock duringCreateRootSignature, distinct across multiple D3D12 devices, and validated on hit viaGetDevice).ID3D12RootSignatureper distinct(device, static_sampler_set)) and verify D3D12 device-child lifetime insignature_retention_and_device_child_lifetime.>= 16 KBcs_6_0piece (or rebuilding released split PSOs) to reuse compiled driver blobs fromCOMPUTE_BLOBSviaCachedPSO, with panic-safe RAII fixture cleanup (FixtureCleanupDropguard retaining per-runnonceDXIL cache isolation).crates/xcl/src/hle/d3d12x/real.rs:canonical_device_keycasting toIUnknownwith readable / non-null vtable guards for synthetic unit mocks) and isolateABI_RS_DEV/ABI_RS_BY_DEVandABI_RS_SAMPLERSper canonical device.abi_rs_cached_for_list(&ID3D12GraphicsCommandList)resolving the list's owning device viaGetDevice(only falling back toabi_rs_cached()on synthetic mocks lacking vtable slot 7), so secondary devices never inherit the global device's ABI root signature.compute_blob_key_for(process-local in-memoryCOMPUTE_BLOBSonly) anddriver_cache::name_for_node/path_for_nodeon non-zeroNodeMask(-n{node_mask:x}suffix;NodeMask == 0retains the existing{fnv64:016x}-{len:x}-{flags:x}.{ext}filenames).abi_rs_raw,abi_rs_forwith static samplers,abi_root_signature()including zero-device fallback, anddriver_cache::tests.crates/xcl/src/hle/d3d12x/bind.rs&crates/xcl/src/hle/d3d12x/console_list.rs:bind::bind_abiandconsole_list::closefallback root-signature lookups from globalabi_rs_cached()toabi_rs_cached_for_list.two_device_command_list_fallback_isolates_bind_abi_and_console_listpassing owned.clone().into_raw()references toconsole_list::wrap_psoandconsole_list::create_with_allocator, verifyingabi_rs_cached_for_listacross distinct devices, null-slot-7 mock fallback, and both refusal (no XCL ABI root signature, never binding Device A's RS) and Device B RS binding acrossbind_abiandconsole_list::closewhen a GPU UMA window is available (skipping only UMA replay viarunner::skip_test("no GPU UMA window")whenuma_window_vas()has VA0on headless WARP runners).crates/xcl/tests/gpu_compute_e2e.rs:abi_root_signature_tracks_registered_backend_deviceverifyingabi_root_signature()/abi_rs_cached()ownership againstdevice_raw().Tested
32.0.31033.3) + Microsoft Basic Render Driver (WARP),rustc, DXC1.8.2502.11.cargo build --offline --locked --release -p xcl -j 2: passed (0errors;1pre-existing dead-code warning in untouchedvram.rs).cargo test --locked --workspace -j 2 -- --test-threads=4 --nocaptureon2d14195e(RTX 4060):1443 passed, 0 failed, 47 ignored(xcllib1316 passed; 27 ignored+127 passed; 20 ignoredacross 23 integration test targets, includinggpu_compute_e2eande2e).SKIPPEDGPU/host checks on RTX 4060 (wave32-only, Windows Developer Mode disabled, no heap windows):gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole(no wave64),gpu::recomp::lower::testswave64 checks,gpu::recomp::lower_dxil::testswave64 and wave32 per-lane #1426 checks (V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32),gpu::recomp::testswave64 checks,shaders::tests::pso_measurement_compiles_an_exact_synthetic_record(0x887A002D), andgpu_compute_e2e::heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).hle::d3d12x::bind::testson2d14195e(RTX 4060):9 passed; 0 failed; 0 ignored(1.47s).AMD Radeon 780M Graphics(XCL_ADAPTER=780M,2d14195esource):two_device_command_list_fallback_isolates_bind_abi_and_console_list:1 passed; 0 failed(0.52s, resolving0xc0000005double-Releasecrash).hle::d3d12x::bind::tests:9 passed; 0 failed; 0 ignored(1.05s).hle::d3d12x:::261 passed; 0 failed; 2 ignored(13.58s).gpu_compute_e2e:8 passed; 0 failed; 0 ignored(4.77s;SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows).XCL_ADAPTER=warp):two_device_command_list_fallback_isolates_bind_abi_and_console_list(1 passed; 0 failed,SKIPPED ...: no GPU UMA window),dispatch_chain::tests(5 passed; 0 failed),compute_blob_tests(5 passed; 0 failed),gpu_compute_e2e(8 passed; 0 failed).Regression run
Paired 60-second
scripts/smoke.ps1runs (same title9bb0e164on RTX 4060 Laptop GPU, releasetarget\release\xcl.exe,XCL_NETWORK=0):main:1265vs1478frames shown (85.6%, min80%),0device removals,0crashes,14060 MBvs14210 MBpeak commit (98.9%, max125%).Not tested
9bb0e164,compute splitstayed at0 programs split, 0 pieces built, 0 chained dispatches issued(split-compute RS reuse andCOMPUTE_BLOBShits are tested directly bydispatch_chain::testsandgpu_compute_e2e).AI use
Gemini); assisted with root-cause analysis, COM/D3D12 device-isolation and wrapper-ownership fixes, targeted NVIDIA/AMD/WARP tests, smoke validation, and PR preparation under author direction.Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T08:37:10Z.
Review: COMMENTED
At exact head
859da94on current mainb49be18, the new per-device ABI signature cache is not used by the command-list fallback for a second device. This is a source-derived review; I did not run a two-device title replay.abi_rs_raw(this)now correctly stores a signature for each device, butabi_rs_cached()chooses using the process-widedevice_raw()instead of the device that owns the list.console_list::closealready has the actual PC list, yet obtains its fallback signature from that global lookup;bind.rsuses the same fallback. If device A is global and a translated PSO/list belongs to device B, a B signature can exist inABI_RS_BY_DEVwhile the list receives A's signature, orclosecan reportno XCL ABI root signaturewhen A has none. The addedabi_rs_raw_isolates_distinct_devicestest checks cache creation and a B PSO, but never binds the fallback on B's command list.Could the fallback lookup accept the owning device (for example from the list's
GetDevice) and use that in both replay/bind paths? A two-device test with global A and a B list using a translated PSO with no own/static-sampler signature would exercise the new behavior end to end.AI assistance: GPT-6.2 Sol found the missing device context; GPT-6.2 Astra independently checked the exact-head call sites and wording.
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T08:43:57Z.
Independent focused Windows check of exact PR head
859da94ed2ba8300719bf9ec9027f2f7eba4d6a6in a clean detached checkout. Upstream main wasb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7.Tested
30.0.13002.13003), Rust 1.99.0 MSVC; debug build with an isolated Cargo target.XCL_ADAPTER=6800MandXCL_REQUIRE_GPU=1in the environment, rancargo test --locked -p xcl --lib abi_rs_raw_isolates_distinct_devices -j 1 -- --test-threads=1 --nocapture: 1 passed, 0 failed, 0 ignored, noSKIPPEDnotice, 1,338 filtered out. The test creates a default hardware device and a WARP device, verifies separate cached ABI signatures, and creates a PSO on the second device.Limitations
create_device(None)for its hardware device and does not print its adapter. The environment value alone does not prove that device was the RX 6800M. This check does not exercise the command-list fallback discussed in my review, the full workspace suite, or a retail title.AI use
Imported from ivall/xcl. Originally posted by Lum7nt on 2026-11-26T09:03:06Z.
Tested on \
859da94ed2\ (\859da94e, clean PR head):ustc 1.100.0\ (\x86_64-pc-windows-msvc), DXC \1.8.2502.11\ (Windows SDK \10.0.26100.0), debug profile, \XCL_ADAPTER=nvidia, Windows Developer Mode off.
ecorded_split_selects_cached_whole_or_pieces\ returned early without \XCL_SAMPLE_RUNTIME_COMPUTE).
Imported from ivall/xcl. Originally posted by ZekkJJ on 2026-11-26T09:04:58Z.
Updated PR head to
cfbaaace(cfbaaace9b2a0bffd433512b80163e2370a9c9b1) addressing all review items, including @luckyteagirl's multi-device command-list fallback finding:abi_rs_cached_for_list): Addedabi_rs_cached_for_list(&ID3D12GraphicsCommandList)incrates/xcl/src/hle/d3d12x/real.rsusinglist.GetDevice(&mut dev)(with readable and non-null vtable slot 7 guards for synthetic unit mocks) so real command lists use their owning device exclusively and never fall back to globaldevice_raw()/ABI_RS. Updated bothconsole_list::close(console_list.rs:743) andbind::bind_abi(bind.rs:1045) to callabi_rs_cached_for_list.hle::d3d12x::bind::tests::two_device_command_list_fallback_isolates_bind_abi_and_console_listincrates/xcl/src/hle/d3d12x/bind.rs, exercising global Device A + real Device B command lists and a translated compute PSO withoutPSO_RSacross both phases (None/"no XCL ABI root signature"refusal before Device B caches an ABI RS, and binding Device B'srs_bonto Device B's lists in bothbind_abiandconsole_list::close).NodeMask, and panic safety: Normalizedcanonical_device_keyacross interfaces (IUnknowncast with mock vtable guards), isolatedABI_RS_SAMPLERSper(dev_key, sampler_words), validatedSIGNATUREShits viaGetDevicewithsignature_retention_and_device_child_lifetime, addeddriver_cache::name_for_node/path_for_nodefor non-zeroNodeMaskincompute_container(keepingNodeMask == 0filenames unchanged), and replaced test fixture cleanup indispatch_chain.rswith RAIIFixtureCleanup.Remaining Draft blocker: PR #2723 remains Draft until paired
scripts/smoke.ps1runs onmain(b49be183) andcfbaaace9b2aon a host with an unpacked retail title.Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T09:18:45Z.
Independent Windows check of exact PR head
cfbaaace9b2a0bffd433512b80163e2370a9c9b1, clean detached checkout on mainb49be183. AMD Radeon RX 6800M, driver30.0.13002.13003, Ryzen 9 5980HX, Windows 11 Home build 26200, Rust 1.99.0 MSVC, debug.Tested
XCL_ADAPTER=6800M,XCL_WARPunset, and a dedicated Cargo target, rancargo test --locked -p xcl --lib two_device_command_list_fallback_isolates_bind_abi_and_console_list -j 1 -- --test-threads=1 --nocapture. Exit 101, 0 passed, 1 failed, 0 ignored, 1,342 filtered. The child loggedbackend 'real' – AMD Radeon RX 6800M (11987 MiB VRAM)and exited0xc0000005.XCL_ADAPTER=6800M,XCL_TEST_TWO_DEVICE_LIST_FALLBACK=1, andRUST_BACKTRACE=1, using--exact hle::d3d12x::bind::tests::two_device_command_list_fallback_isolates_bind_abi_and_console_list --test-threads=1 --nocapture. It logged the same adapter and exited0xc0000005again, before final harness counts. The fixture tries WARP for device B first and does not print which device it picked.Source review
Both production fallback callers now use the list’s owning device when
GetDevicesucceeds. Separately, the fixture passes borrowed PSO and list pointers to wrappers atbind.rs:1983–1984and:2008–2009. Both wrapper destructors release the underlying pointers. Useclone().into_raw()for each wrapper’s owned reference and retain the original list handles while their spies are active. The access violation’s exact site is unknown. I did not test this ownership change, run the full suite, or launch a title.AI use
OpenAI Codex (GPT-6.2 Sol) checked the live refs and source, ran both commands, and drafted this report.
Imported from ivall/xcl. Originally posted by ZekkJJ on 2026-11-26T09:58:10Z.
Updated PR head to
033df826(033df826125a5ae4050bdd9d4fcfc60e12789f28):two_device_command_list_fallback_isolates_bind_abi_and_console_list(crates/xcl/src/hle/d3d12x/bind.rs):open_umayields[0]when sparse VRAM reservation returns0x8007000Eon headless WARP runners, so the test now checksuma_window_vas().first().copied().unwrap_or(0) == 0(running non-UMAabi_rs_cached_for_listdevice-isolation checks and skipping only the UMA command-list replay viarunner::skip_test("no GPU UMA window")). Verified underXCL_ADAPTER=warp(1/1lib test +8/8gpu_compute_e2e) and on RTX 4060 (1443 passed, 0 failed, 47 ignoredacross--workspace).scripts/smoke.ps1regression validation (title9bb0e164, 60s, RTX 4060 Laptop GPU, release builds):main(b49be183)1478frames /14210 MBpeak commit /0removals /0crashes; PR (033df826)1568frames /14025 MBpeak commit /0removals /0crashes (description oklocally viascripts/pr_check.py --local). Note that the 60s startup smoke window did not entercompute split; split-compute reuse is verified bydispatch_chain::testsandgpu_compute_e2e.Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-26T10:11:24Z.
Ran the dispatch-chain and bind tests at
033df826on an NVIDIA host:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
Results
cargo test -p xcl --lib hle::d3d12x::real::dispatch_chain::tests -- --test-threads=4: 5 passed, 0 failed (exit 0), including the new root-signature reuse andCOMPUTE_BLOBStests.cargo test -p xcl --lib hle::d3d12x::bind::tests -- --test-threads=4: 8 passed, 1 failed (exit 101). The failure istwo_device_command_list_fallback_isolates_bind_abi_and_console_list: the spawned child test exits with0xc0000005after the real adapter and UMA window are set up.--test-threads=1also fails that one test (8/9), but running just that test with--exactpasses (1/1). So the failure is order-dependent within the module on this host, not a deterministic failure of the test in isolation.What this adds: the author ran the batch on an RTX 4060 Laptop GPU and the two-device test on headless WARP, where the UMA replay steps are skipped. Here the child process reaches the real RTX 5070 Ti and a GPU UMA window, and the module run fails. I did not check the same batch on unmodified
main, so I am not attributing this failure to the PR; it is a datapoint for the author to investigate.Not tested: the unmodified-
maincontrol, the full workspace suite, a paired 60 s smoke run, AMD and Intel GPUs, native wave64, Wine, release profile, title data.AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Imported from ivall/xcl. Originally posted by ZekkJJ on 2026-11-26T10:23:04Z.
Updated PR head to
2d14195e(2d14195e83eb5b1505c8c06793d9425c15337f0b) fixing the0xc0000005(STATUS_ACCESS_VIOLATION) reported by @luckyteagirl on AMD:0xc0000005exit locally onAMD Radeon 780M Graphics(XCL_ADAPTER=780M). Intwo_device_command_list_fallback_isolates_bind_abi_and_console_list(crates/xcl/src/hle/d3d12x/bind.rs), borrowed.as_raw()pointers were passed toconsole_list::wrap_psoandconsole_list::create_with_allocator, whoseReleasedestructors decrement and drop the underlyingID3D12PipelineState/ID3D12GraphicsCommandListwhile local Rust handles andListSetRsSpystill held references. Switched all four wrapper calls to pass.clone().into_raw()owned references.XCL_ADAPTER=780M,DriverVersion 32.0.31033.3):two_device_command_list_fallback_isolates_bind_abi_and_console_list(--exact --test-threads=1):1 passed; 0 failed(0.52s)hle::d3d12x::bind::tests:9 passed; 0 failed; 0 ignored(1.05s)hle::d3d12x:::261 passed; 0 failed; 2 ignored(13.58s)gpu_compute_e2e:8 passed; 0 failed; 0 ignored(4.77s;SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows)2d14195e):hle::d3d12x::bind::tests:9 passed; 0 failed; 0 ignored(1.47s)cargo build --offline --locked --release -p xcl -j 2: passed (0errors)Running the full
--workspacesuite and paired 60sscripts/smoke.ps1(title: 9bb0e164) on2d14195enext to refresh the PR description'sxcl-smokeblock.Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-26T10:30:35Z.
Independent amd-win test report for exact PR head
2d14195e83eb5b1505c8c06793d9425c15337f0b(clean detached checkout), withb49be183(the merge-base,mainat test time) as the control. I started on033df826, and the head moved to2d14195ewhile I was testing, so both are reported. Claim: https://github.com/xcl-dev/xcl/issues/1607#issuecomment-7189184817Result: on the RX 7800 XT,
2d14195epasses every test this PR adds or changes.033df826did not:two_device_command_list_fallback_isolates_bind_abi_and_console_listcrashed its child with0xc0000005every time, and2d14195efixes that. One lib test,fuzz_validate_and_gpu_1, fails on this adapter at the PR head and atmainalike.Tested
stable-x86_64-pc-windows-msvc; DXC dxcompiler/dxil 1.8.2502.11 (Windows SDK 10.0.26100.0).XCL_ADAPTER=7800 XCL_REQUIRE_GPU=1,cargo ... -j 4. Nothing else used the GPU during the runs reported here. At the start of one early run I saw a few cargo/rustc processes that were not mine; I discarded that run and, before every later one, waited until none were running.Head
2d14195e(allcargo test -p xcl --lib -j 4 <filter> -- --test-threads=1unless noted):two_device: 1 passed / 0 failed. It ran its UMA path to the end: noSKIPPEDline was printed.dispatch_chain: 13 / 0.compute_blob: 6 / 0 (includessplit_programs_sharing_large_piece_hit_compute_blobs_and_reuse_root_signature).abi_rs: 2 / 0.abi_root: 1 / 0.signature_: 6 / 0 (includessignature_for_reuses_root_signature_per_device_and_separates_devices_and_samplers,signature_retention_and_device_child_lifetime).d3d12x::bind: 9 / 0.d3d12x::(--test-threads=4): 261 passed, 0 failed, 2 ignored.cargo test -p xcl --lib -j 4 -- --test-threads=4): 1315 passed, 1 failed, 27 ignored. The failure isgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722: res[30] = 0x1, CPU 0x7fffffff). It is not touched by this PR and fails identically onmain(control below).cargo test -p xcl --test gpu_compute_e2e -j 4 -- --test-threads=1: 8 passed, 0 failed, 0 ignored (includes the PR'sabi_root_signature_tracks_registered_backend_device). SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows.lower_dxilf16/f32-conversion programs refused as unsupported (unrelated to this PR). Not counted as coverage.Earlier head
033df826(same machine and env):fuzz_validate_and_gpu_1failure above, andtwo_device_command_list_fallback_isolates_bind_abi_and_console_listwithchild test failed (exit code: 0xc0000005). Run directly, the child dies after theID3D12GraphicsCommandList10wrapper line on the real backend. It also failed withXCL_ADAPTERunset and passed withXCL_ADAPTER=warp. This machine opens the UMA window, so the test took thehas_umabranch.d3d12x::was 260 passed / 1 failed. The other targeted filters andgpu_compute_e2e(8/0) passed as above. The 4-linebind.rschange in2d14195eis what turns this from a crash into a pass here; I did not debug the crash itself.Control
b49be183(same machine, env and commands):fuzz_validate_and_gpu_1, seed 722), 27 ignored.dispatch_chain: 10 / 0.d3d12x::: 254 / 0 / 2 ignored.2d14195e.Not tested
scripts/smoke.ps1regression run on a title (no game files used);cargo test --workspace; release build.fuzz_validate_and_gpu_1fails on this adapter (it fails onmaintoo, so it is not from this PR).AI use
Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-26T10:39:29Z.
Re-ran the dispatch-chain and bind tests at
2d14195after the head moved (4 lines changed inbind.rs).Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
This resolves the datapoint from my earlier report at
033df826:two_device_command_list_fallback_isolates_bind_abi_and_console_listnow passes in the fullbindmodule run on this RTX 5070 Ti (previously the child process exited with0xc0000005in the module run, while passing alone). The change between the heads is confined tobind.rs. This is a new report following that one, not an edit.Not tested: an unmodified-
maincontrol, the full workspace suite, a paired 60 s smoke run, AMD and Intel GPUs, native wave64, Wine, release profile, title data.AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.
Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-26T11:49:52Z.
Review: COMMENTED
Read-through and GPU run of
2d14195e. An AI tool (Claude Code) helped with the reading and ran the tests; each point below was checked against the code at this head.Test results (RTX 3060 Ti 8 GB, NVIDIA 617.14 / 32.0.16.1714, i5-10400, Windows 11 26200.9974, rustc 1.100.0, DXC 1.9.2609.5, debug, isolated cache and data roots):
dispatch_chain: 5 passed, 0 failed.compute_blob_tests: 5 passed, 0 failed.gpu_compute_e2e: 8 passed, 0 failed.heap_window_out_of_memory_falls_back_to_the_switch_formreported SKIPPED (no heap windows on this setup).859da94ealso passed here (4 + 3 + 7).Two things I saw while reading the earlier head
859da94eare fixed in this one: the sampler ABI cache is now keyed by(usize, Vec<u32>)rather than the sampler list alone, andname_for_nodeputs the node mask in the disk name.Points for the author
split_programs_sharing_large_piece_hit_compute_blobs_and_reuse_root_signaturethe spy records only whetherCachedPSO.pCachedBlobis non-null (line 497), andcompute_containerfalls back to the disk blob when the in-memory lookup misses. So the two assertions that say the shared piece came fromCOMPUTE_BLOBS(lines 537 and 550) also pass on a disk hit. The root-signature equality and key-count assertions next to them do pin the sharing itself. Running the fixture withXCL_PSO_DISK_CACHE=0, or recording which cache answered, would make those two lines prove what they say.note_translation_erroreven though the whole-program fallback then succeeds. That will show up as an error in logs for a case that worked.No defect found at this head. Point 1 is about test precision, not a blocker.
Generated by Claude Code
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-26T11:23:34Z.
Under Wine + vkd3d-proton on an RTX 4070, this pull request's tests passed at head
2d14195e, except 4 new ones that need a second D3D12 device and skipped: DXVK's DXGI here has no WARP, and itsEnumWarpAdapterreturns the RTX 4070, so the second device is the first one again. One of the two whole-lib runs at2d14195elost the device partway through, after a copy-engine MMU fault; every other run here logged a different fault (a graphics read at the same address) and went on. I cannot yet say whether this comes from this pull request.Setup:
mainb49be18+ this pull request, release,cargo test --release -p xcl --target x86_64-pc-windows-gnu, Wine 11.21 Staging + vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch, DXVK 3.1.1 (DXGI), RTX 4070 12 GB, driver 615.71.09.--lib -- --test-threads=4--test gpu_compute_e2emainb49be18directed_reference_basics,f64_programs_on_the_gpu,gpu_promoted_uav_clear_values_pass_create_committed_resource), one run alsowrites_land_after_the_queue; 1306 passed, 27 ignored in the other 7033df8262d14195e0x887A0005); run 2: 1313 passed, the same 3 failedabi_root_signature_respects_device_identity_and_zero_fallback,abi_rs_for_with_samplers_isolates_distinct_devices,abi_rs_raw_isolates_distinct_devices(real::compute_blob_tests) andsignature_for_reuses_root_signature_per_device_and_separates_devices_and_samplers(real::dispatch_chain::tests), each withsecond distinct D3D12 device unavailable(they count as passed in the table). Their second device comes fromEnumWarpAdapter(real.rs:4906,real/dispatch_chain.rs:341); falling back toEnumAdapters1as the bind test does (bind.rs:1917) would run them here, where that test found a distinct second device.abi_root_signature_tracks_registered_backend_deviceingpu_compute_e2epassed in both runs.two_device_command_list_fallback_isolates_bind_abi_and_console_list, which2d14195echanges, passed in all 4 lib runs, at the earlier head033df826too, with a GPU UMA window open (noSKIPPEDline from its child).main, both at033df826, run 2 at2d14195e), the NVIDIA driver loggedXid 31 … MMU Fault: ENGINE GRAPHICS … GPCCLIENT_GCC faulted @ 0x0_04400000 … VIRT_READfrom agpu::dxil::comp…test thread, and the suite went on. In run 1 at2d14195eit loggedENGINE CE2 HUBCLIENT_CE0 faulted @ 0x0_04400000 … VIRT_WRITEinstead, and 29 more tests failed after it. One run in four is not enough to say whether that is this pull request's; I have not found which test faults.Not tested: title runs (in our 120 s title runs on this card no compute program was split); Windows; the 4 tests above.
AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment.
Posted without review by a person: the account owner was away and reads replies later.
Imported from ivall/xcl. Originally posted by CryingLaughing on 2026-11-26T13:44:19Z.
Paired native D3D12 check on RTX 4080 driver 621.01. For this fixture,
mainalready reused the live root signature and accepted the shared cached blob on the second build. The PR head matched that behavior.b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7CachedPSOaccepted2d14195e83eb5b1505c8c06793d9425c15337f0bCachedPSOacceptedEach run built two successful native chains with distinct tails and a shared 26,816-byte DXIL piece. Both chains stayed live while measured. There were exactly two native creates per chain and no retries. Each confirmed run was 1 passed, 0 failed, 0 ignored, 0 capability skips. The first control run failed my expectation that the second base build would be cold. A repeat confirmed the warm result.
Tested with the DXGI-verified RTX 4080, Core i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 x64 MSVC and DXC/DXIL 1.8.2502.11. I ran
hle::d3d12x::real::dispatch_chain::pr2723_native_cache::shared_piece_native_cached_pso --exact --test-threads=1 --nocapture --ignoredin separate fresh processes with private cache roots andXCL_PSO_DISK_CACHE=0.Not tested were dispatch output, compile-time savings, retail behavior, and other drivers. This comparison found no additional cache hit from the PR in this case.
Imported from ivall/xcl. Originally posted by ZekkJJ on 2026-11-26T14:31:55Z.
@CryingLaughing Thanks for the paired control. The per-device isolation and NodeMask identity fixes should be evaluated separately from incremental cache performance. Your fixture provides useful evidence for narrowing the performance claims.
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T22:33:48Z.
Independent desktop NVIDIA verification of PR #2723 at head
2d14195e83eb5b1505c8c06793d9425c15337f0b(1commit; exact parent & merge-base:b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, pre-#2555ancestor ofmain).Environment
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200(Developer Mode off)rustc 1.100.0 (0ef1bc386 2026-11-09)MSVC, DXC1.9.2609.5,--releaseTargeted release tests & build (
2d14195e)cargo test --release -p xcl --lib <each of the 7 targeted unit tests> -- --nocapture(two_device_command_list_fallback_isolates_bind_abi_and_console_list,abi_rs_raw_isolates_distinct_devices,abi_rs_for_with_samplers_isolates_distinct_devices,abi_root_signature_respects_device_identity_and_zero_fallback,a_list_recorded_after_another_goes_on_in_its_scratch,signature_for_reuses_root_signature_per_device_and_separates_devices_and_samplers,signature_retention_and_device_child_lifetime)1 passed; 0 failed; 0 ignored; 1342 filtered outeach (0.17s–0.42s)cargo test --release -p xcl --lib hle::d3d12x::real::dispatch_chain::(3 consecutive runs, incl.split_programs_sharing_large_piece_hit_compute_blobs_and_reuse_root_signature)5 passed; 0 failed; 0 ignored; 1338 filtered out× 3 (0.50s,0.50s,0.50s)cargo test --release -p xcl --lib hle::d3d12x::real::66 passed; 0 failed; 0 ignored; 1277 filtered out(0.51s)cargo test --release -p xcl --lib hle::d3d12x::bind::9 passed; 0 failed; 0 ignored; 1334 filtered out(0.43s)cargo test --release -p xcl --lib hle::d3d12x::console_list::7 passed; 0 failed; 0 ignored; 1336 filtered out(0.18s)cargo test --release -p xcl --test gpu_compute_e2e -- --test-threads=1 --nocapture(3 consecutive runs, on-GPU RTX 4060, incl.abi_root_signature_tracks_registered_backend_device)8 passed; 0 failed; 0 ignored; 0 filtered out× 3 (3.74s,3.68s,3.66s;heap_window_out_of_memory_falls_back_to_the_switch_formself-skipped as expected becauseXCL_HEAP_WINDOWSis opt-in)cargo build --release -p xcl --bin xcl1m 08slib +0.05sbin, exit0)Paired quiet 60 s retail smoke (
title: 29640639)Exact parent & merge-base (
b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, cached baseline on the same machine):PR #2723 (
2d14195e83eb5b1505c8c06793d9425c15337f0b):Runtime log observations (
xcl.log)9223log lines,0[ERROR]/ device-removal / panic lines.D3D12.X: 1 driver blobs kept on disk for the next run (this one: 1598 ms, 133 KB).19468 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample14035 MB committed by the process; video memory 6116 MB local, 4684 MB non-local.Limits of coverage
COMPUTE_BLOBScross-program reuse across split pieces, andgpu_compute_e2ebackend registration were verified directly on the RTX 4060 via all 9 new lib/E2E tests and 3×dispatch_chain::/gpu_compute_e2eruns (heap_window_out_of_memory_falls_back_to_the_switch_formself-skipped becauseXCL_HEAP_WINDOWSis opt-in).title: 29640639rather than measuring a cold-cache split-program compile-time or memory reduction (frame-count delta vs. cached parent smoke reflects normal single-run startup variance, not this PR).AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T00:39:50Z.
Tested: Clean
2d14195e83eb5b1505c8c06793d9425c15337f0b, Windows 11 build 26200.9974, Ryzen 7 3800X, Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC debug. Built withcargo test --locked -j 2 -p xcl --lib --test gpu_compute_e2e --no-run. Four exact tests reran with--test-threads=1 --nocapture:a_file_is_named_after_its_dxil_and_flags,a_blob_is_found_only_for_the_same_program_root_signature_and_flags_and_is_forgotten,split_programs_sharing_large_piece_hit_compute_blobs_and_reuse_root_signature, andabi_root_signature_tracks_registered_backend_device. Four passed, zero failed, ignored or skipped. The CPU tests checked NodeMask separation and mask-zero filenames. With disk caching disabled, the shared-piece fixture reused one root signature and the in-memory PSO blob. The integration fixture identified the real Arc backend and checked that the cached ABI root signature belonged to the registered device. The lower-level shared-piece fixture uses default D3D12 device selection.Not tested: Live non-zero NodeMask PSO creation, full workspace suite, and retail smoke.
AI use: T3 Code / Codex (
gpt-6.2-sol) ran and reran the fixtures and wrote the report.Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T12:20:02Z.
Tested
Clean
2d14195e83eb5b1505c8c06793d9425c15337f0bon Windows 11 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC, DXC/DXIL 1.9.2602.17. Built withcargo test --offline --locked -j 2 -p xcl --lib --no-run --message-format=jsonandCARGO_PROFILE_TEST_DEBUG=0. Ran each exact filter with--exact --test-threads=1 --nocaptureand a separate pinned Arc mutex acquisition.hle::d3d12x::real::dispatch_chain::tests::split_programs_sharing_large_piece_hit_compute_blobs_and_reuse_root_signaturepassed withXCL_PSO_DISK_CACHE=0. The first program built the 26,816-byte shared piece cold. The second program and rebuild supplied its RAMCachedPSOblob. The test observed one shared root signature.hle::d3d12x::real::dispatch_chain::tests::signature_for_reuses_root_signature_per_device_and_separates_devices_and_samplerspassed same-device reuse and separate-device/sampler controls. The second device is WARP.Two passed, zero failed, ignored, or skipped. A separate locked
D3D12CreateDevice(nullptr)probe resolved the Windows default device to Intel Arc A770, PCI 8086:56a0. The stock fixtures use that default-device API.Not tested
Full workspace, in-title behavior, other native GPUs and retail smoke.
AI use
T3 Code / Codex (
gpt-6.2-sol) built and reran the two fixtures, verified default adapter identity and wrote this report.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:48:49Z.
Triage (#1607) – head
2d14195Main already has the change in the title.
dispatch_chain::signature_forcaches root signatures inSIGNATURESby (device, sampler words) (7049cc3, which cites this PR).compute_blob_key_forhashes NodeMask and the disk names come fromdriver_cache::name_for_root_node(.., NodeMask)(fbcd70e).ABI_RS_BY_DEV/ABI_RS_SAMPLERSare kept per device (5cd0c4a).Two parts are not on main:
canonical_device_key(the IUnknown identity) andabi_rs_cached_for_list, whichbind_abiandconsole_list::closeuse to find the list's own device. They could go in a small PR rebased on main. As it stands this branch conflicts with the code it replaces.Recommendation: close (superseded by main commits
7049cc3,fbcd70eand5cd0c4a).AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.