D3D12.X: the pieces of a split program read their slab from a root CBV #2633
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!2633
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2633"
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?
@Kalmarv on GitHub · 2026-11-26 03:30 UTC · original
Kalmarv:chain-indirect-cbv→main· +1320 −48 · 11 files · 15 commits · draftStacked on #2404; only the top commit (
19be659) belongs here.A chained
ExecuteIndirect(#2404) records, for each round and piece, a UAV barrier, the piece's pipeline and anExecuteIndirectwhose command signature sets the slab's eight root constants. On the RTX 5070 Ti such anExecuteIndirectafter the barrier takes 15.3 µs of GPU time, empty or not, so 32 rounds of 10 pieces cost 4.9 ms every time. With a Dispatch-only signature it takes 0.41 µs. The pieces read only the slab's size and origin, the same for every piece of a round, so the chain's root signature now gives them as a root CBV (b0, space2, the register the pieces already read) instead of root constants. The pieces' code does not change.What is in it
D3D12.X: the pieces of a split program read their slab from a root CBV(19be659), inpso.rs,runner.rs,dispatch_chain.rs,real.rsandshaders.rs, with unit tests:ExecuteIndirect: the slicer writes one 256-byte command a round (the slab's constants, its Dispatch 32 bytes in) instead of one 44-byte command per piece. The CPU points the CBV at the round's command, and the pieces'ExecuteIndirects use the Dispatch-only signature. The commands buffer for 32 rounds is 8 KiB, whatever the number of pieces.Dispatch: the CPU writes the slabs' constants into 64 KiB upload-heap blocks of the list's allocator, used again once it is reset. A list with no allocator runs the whole form, as without scratch. Only blocks of 64 KiB are kept for use again, up to 8 MiB of them; bigger blocks and those past it are released at the reset (keep_free_constants; review by @luckyteagirl).pso::abi_signature_id, indriver_cache::name_for; the precompile names it the same way). A blob built for #2404's root constants, or for other static samplers, is then not read and refused, and #2404's and this PR's files sit side by side in one cache (review by @KDenKC; the samplers after #2723).Tested
19be659(on #2404's head5b9d4ff), on the GPU (debug):cargo test --workspace --no-fail-fast -- --test-threads=4: 1450 passed, 0 failed, 47 ignored, the newa_piece_is_named_after_its_static_samplersandmain's precompile testsplit_compute_program_prebuilds_and_caches_chain_piecesamong them. 25 SKIPPED, as below.a_piece_is_named_after_its_static_samplers(two sampler sets, two names): with the id ofdb34184, which leaves the samplers out, failed; with this one, passed. Thedriver_cacheunit tests: 6 passed.db34184, this change before the static samplers were in the name (on5b9d4ff), on the GPU (debug):cargo test --workspace --no-fail-fast -- --test-threads=4: 1449 passed, 0 failed, 47 ignored, the newa_piece_is_named_after_the_root_signature_it_was_built_withamong them. 25 SKIPPED, as below.direct_dispatches_write_their_constants_in_blocks_used_again_after_the_allocator_reset, with the new assertions that no block bigger than 64 KiB is kept and the kept ones stay within 8 MiB: 1 passed. Withacba153's reset (every block kept): failed, "a block bigger than 65536 kept for use again".dispatch_chain,alloc_poolanddriver_cacheunit tests,--test-threads=1: 23 passed.dispatch_chain,split,execute_indirectandslabfilters with the debug layer and GPU-based validation,--nocapture, on the local build described below,--test-threads=1: 51 passed, 0 failed, 1 ignored. 1 SKIPPED:dispatch_chain_native_wave64_builds_whole(no wave64). During the tests: 1 error, 884, and 275 warnings (195 of 1328, 80 of 926), as on1202ac1below.a_piece_is_named_after_the_root_signature_it_was_built_withanda_file_is_named_after_its_dxil_and_flagsfailed with the piece's file named as before (no signature), and pass with it.acba153, this change before the two review fixes (on #2404's then head97a70a7):cargo test --workspace --no-fail-fast -- --test-threads=4: 1446 passed, 0 failed, 47 ignored, the newdirect_dispatches_write_their_constants_in_blocks_used_again_after_the_allocator_resetamong them. 25 SKIPPED: 21 for no native wave64 on this card, three per-lane FP16 forms the per-lane lowering refuses, and no heap windows.1202ac1are of the same change before its rebase onto97a70a7(on551a75e).1202ac1, thedispatch_chain,split,execute_indirectandslabfilters withXCL_D3D12_DEBUG=1,--test-threads=4: 48 passed, 0 failed, 1 ignored. 1 SKIPPED:dispatch_chain_native_wave64_builds_whole(no wave64). Thedispatch_chainunit tests,--test-threads=1: 7 passed.dispatch_chain_divergent_forward_edges_3d, three runs: 1 passed each.--nocapture, on a local build of the test runner that switches GPU-based validation on and prints every layer message (neither is an XCL option): 48 passed, 0 failed, 1 ignored. During the tests: 1 error, 884, frommain'ssplit_compute_program_prebuilds_and_caches_chain_pieces, which feeds the driver a deliberately invalid blob; and 275 warnings: 195 of 1328 (a buffer's initial state ignored) and 80 of 926 (a root view's address in a heap), as on #2404's head.1202ac1, on an RTX 2060 (NVIDIA 595.91) under Wine (wine-staging 11.21) + vkd3d-proton30b0eb9, a releasewindows-gnutest build,--test-threads=1, noXCL_D3D12_DEBUGor GPU-based validation set; correctness only: thedispatch_chainunit tests 7 passed; thedispatch_chain,split,execute_indirectandslabfilters 48 passed, 0 failed, 1 ignored, SKIPPEDdispatch_chain_native_wave64_builds_whole(no wave64);list_x41 passed;alloc_pool8 passed.acba153, AMD Radeon RX 6800M (driver 30.0.13002.13003), Windows 11 build 26200, debug (review):dispatch_chain_divergent_forward_edges_3dwithXCL_REQUIRE_GPU=wave64,--test-threads=1: 1 passed, 0 failed, no SKIPPED notice, both the 32- and 64-thread chains (3 pieces each). Not the whole suite.acba153: @pickles976, RTX 4060 Laptop GPU 8 GB (NVIDIA 590.48.1) under Wine 11.0 + vkd3d-proton 3.2.0, a local diagnostic build of it with relaxed checks (-Db_ndebug=trueand two localfrom_ifacerelaxations),x86_64-pc-windows-msvc, one test thread (review):direct_dispatches_write_their_constants_in_blocks_used_again_after_the_allocator_reset: 1 passed, on the NVIDIA device. Correctness only, with no timing or title run.db34184against #2404's97a70a7: @SzczepanGrela, RX 9070, RADV (Mesa 26.3.1) under Wine 11.0 + vkd3d-proton, releasewindows-gnutest builds (review).dispatch_chain9 passed,driver_cache5 passed,alloc_pool8 passed and 1 failed on both revisions:main'sa_recording_outlives_the_reset_of_the_titles_allocator, whose allocator vkd3d-proton refuses once XCL has adopted it (real::adoptreplaces its vtable).dispatch_chain_divergent_forward_edges_3daborted ind3d12core.dllon both revisions; it passed natively on the RX 6800M below and on our card. In a local GPU-timestamp test, 32 rounds × 10 pieces ofExecuteIndirecttook 533–738 µs against #2404's 1,801–2,543 µs. The direct control, 12 slabs × 10 pieces, took longer with this PR: 137.18 µs against 114.48 µs at 32 threads, in every pair, and 169.12 against 108.88 µs at 64.db34184against its base5b9d4ff: @KDenKC, RTX 5090 (NVIDIA 621.24), release, with #2551, each side precompiled from its own cache (227 split programs, 2,000 pieces, 0 refused), one run of the base and two of this PR (review). This PR's cache held only the new piece names, with no refusals. At 130 s: 2,768 and 3,139 chainedExecuteIndirects against 808, 8,939 and 7,564 slabs against 1,694, scratch peaks 613 and 537 MiB against 420. The base and the second run ended in #2403's removal (134.7 s, 131.7 s); the first run of this PR hung (0x887a0006) at 133.45 s. In four more runs withXCL_DRED=1(review), no hang: three of #2403's removals and one crash of #751's race, so this PR hung in 1 of 4 runs. Neither side skipped a call or ran one whole before 130 s (review). The hang does not separate this PR from more GPU work reaching the card; it is under investigation.db34184against5b9d4ff: @Royalflamejlh, RTX 4060 Ti 16 GB (NVIDIA 615.71.09), Linux, Wine 11.21 Staging + vkd3d-proton30b0eb9b(patched), onmainb49be18with #684, #751, #1599, #1860 and #2082, three runs a side (review). In the 20 s after each run's first world frame: 7,347–10,000 chainedExecuteIndirects and 18–22 presents against 2,406–2,849 and 6–7, so about as many per present (408–476 against 372–407); no call skipped or run whole. The world came 40–55 s sooner with this PR, from a warmer NVIDIA cache, so neither that nor the present rate is separated from the cache.f29910f, on809da30):ExecuteIndirect, root constants (before)ExecuteIndirect, root CBV, Dispatch-only signatureDispatch, root constants (before)Dispatch, root CBV in the upload heapdb34184, the same local test at the shape of @SzczepanGrela's direct control (12 slabs × 10 pieces, one group each), 5 alternating trials, two runs: #2404's root constants and this PR's root CBV both 73.66 µs at 32 and at 64 threads (trial medians 73.63–73.70 µs).Regression run
scripts/smoke.ps1 -Seconds 60, the same retail title,XCL_DIRECT_DXIL=1, a private XCL cache started from the sameused-pipelines.txt. From release builds of clean trees, on the machine under Tested, each in the queue's title lane beside other jobs (builds, suites or precompiles; no other title run or timing job runs at the same time there):main's in one job with this PR'sdb34184, this PR's19be659alone, beside 3 other jobs.mainb49be18:this PR,
19be659:compute splitcounter at the end of each run:main:compute split: 171 programs split, 1811 pieces built, 0 chained dispatches issued in 0 slabs; scratch 0 MiB (most 0, largest dispatch 0 in one slab)compute split: 66 programs split, 684 pieces built, 0 chained dispatches issued in 0 slabs; scratch 0 MiB (most 0, largest dispatch 0 in one slab); ExecuteIndirect: 0 chained (0 of them whole, 0 slabs lost), 0 wholeNot tested
DispatchorExecuteIndirecton either side, so it checks for regressions only; this PR's paths did not run in the title.Other branches
dispatch_chain.rs: both changeChain's fields and the read of its whole form inexecute_indirect, and #2629's test setsChain::signature, which this PR removes. Whichever lands second dropssignatureandbuild_wholethere and reads the whole form with.flatten(). With that, the merge builds (cargo check -p xcl --lib --tests).AI use
🤖 Generated with Claude Code
@luckyteagirl on GitHub · 2026-11-26 04:04 UTC · original
Focused RX 6800M check on clean PR head
acba153caf086ef0e0ebe4cda4e76b7216217fc3: Windows 11 Home build 26200, Ryzen 9 5980HX, Radeon RX 6800M driver30.0.13002.13003, Rust 1.99.0 MSVC, DXC 1.9.2609.5 (debug test build).Result: 1 passed, 0 failed, 0 ignored, 1,346 filtered, 0
SKIPPEDnotices. The guarded run exited 0 with no memory guard trigger. The test printedCHAIN_GPU=AMD Radeon RX 6800Mand completed both split-chain forms:This is the focused synthetic split
ExecuteIndirectfixture. I did not run the full workspace suite or reproduce a title-specific GPU fault on this PR head.AI use: OpenAI Codex (GPT-6; exact serving variant unavailable) and a Luna subagent selected and ran the test, verified the live head and adapter, and prepared this report.
@pickles976 on GitHub · 2026-11-26 05:00 UTC · original
Wine/NVIDIA cross-check of the new test — passes on the real adapter. Head
acba153caf086ef0e0ebe4cda4e76b7216217fc3(stacked on #2404's97a70a73c, as described), RTX 4060 Laptop GPU 8 GiB, Wine 11.0, vkd3d-proton 3.2.0 diagnostic-relaxed build (same provenance commit as the stock DLL,-Db_ndebug=true+ the two #175from_ifacerelaxations, local-only; this test is not behind the vtable wall but the stack is uniform here), NVIDIA 590.48.1,--locked --target x86_64-pc-windows-msvc, one test thread, freshCompiling xcl .../xcl-pr2633/...provenance.direct_dispatches_write_their_constants_in_blocks_used_again_after_the_allocator_reset— 1/1 pass (0.65 s), with the real NVIDIA device opened (DXVK logsFound device: NVIDIA GeForce RTX 4060 Laptop GPU): the Dispatch-form slab constants go into 64 KiB upload-heap blocks of the list's allocator and the blocks are reused after reset, as the test's assertions check.Scope: correctness fixture only — the 15.3 µs → 0.41 µs
ExecuteIndirectclaim remains the author's RTX 5070 Ti measurement; no perf numbers from this host, no title run. Log:.compat-xcl/logs/verify-pr2633-wine-cbv-slab-relaxed.log(local). AI-assisted verification and report (OpenAI Codex).@Kalmarv on GitHub · 2026-11-26 05:01 UTC · original
@pickles976 thank you for the Wine cross-check on
acba153(7183101906): the new test passing on the RTX 4060 Laptop's own device is the first run of it outside our machines. It is in the description under Tested, with your caveats: your local relaxed vkd3d-proton build, correctness only, no timing or title run.AI use: Claude Code with Claude Opus 5.5 read the report and wrote this reply.
@luckyteagirl on GitHub · 2026-11-26 05:57 UTC · original · reviewed
Could the free constants pool have a byte budget, or release oversized blocks on allocator reset? Every block removed from
CONSTANTSis retained in process-globalFREE_CONSTANTS; reuse requires the same device and sufficient capacity, and I could not find a trim or device-cleanup path. A temporary burst of large slab constants can therefore leave its committed upload resources mapped for the rest of the process, even after the recording allocators retire. The reuse fixture could also assert that excess blocks are released. Exact-head source review atacba153caf086ef0e0ebe4cda4e76b7216217fc3; no measured memory footprint or title run. AI-assisted review with Codex.@KDenKC on GitHub · 2026-11-26 06:25 UTC · original
Source review of
acba153c, no run yet. One thing for anyone A/B-ing this against #2404 on a warm cache:The pieces' DXIL doesn't change here, only their root signature does (parameter 7 goes from 8 root constants to a root CBV in
abi_signature). Butdriver_cache::name_for(real.rs:4506) keys a piece's blob only on the DXIL hash, its length and the flags. So a.chain.psowritten by #2404 (ormain) has the same file name under this head, and it was built against the old root signature. Expected effect: the driver refuses it ("a driver blob kept on disk was refused … compiled again"), so the first run after switching builds every piece cold. A comparison on a shared cache would then charge that to this PR. And if a driver ever did accept the mismatched blob, it would be running pieces against the wrong root signature. A different extension for the CBV layout (or a layout version folded intoname_for) would keep the two apart.When we run it, we'll give each side its own cache.
My 5090 and I await the root-CBV era.
AI use: Gemini (Antigravity) noticed the shared file name in a review; Claude Code (Claude Opus 5.5) checked
name_for, the piece DXIL and the refusal path atacba153cand wrote this.acba153caftodb34184fe8@Kalmarv on GitHub · 2026-11-26 07:39 UTC · original
@luckyteagirl thank you for the review (6069221831): right, nothing ever released a block once it was in
FREE_CONSTANTS. Indb34184an allocator's reset keeps only blocks of the usual 64 KiB for use again, up to 8 MiB of them (keep_free_constants); bigger blocks and those past it are released there. The reuse fixture now also asserts that no block bigger than 64 KiB is kept and that the kept ones stay within the 8 MiB. With the old reset it fails ("a block bigger than 65536 kept for use again").@KDenKC thank you (7184414003), that was a real gap: the pieces' DXIL is the same under this PR, so a
.chain.psobuilt for #2404's root constants had the same name. Indb34184a piece's file also names the chain's root signature, as a hash of it serialized (pso::abi_signature_id), so-<sig>.chain.psofiles of #2404/mainand of this PR sit side by side instead of being read and refused. Test:a_piece_is_named_after_the_root_signature_it_was_built_with(one DXIL, two root signatures, two names); with the old name it fails. On a shared cache each side's first run still builds its own pieces once, but switching no longer makes the driver refuse and drop the other side's files, and no blob of the other layout can be accepted. Separate caches per side remain the cleaner A/B.AI use: Claude Code with Claude Opus 5.5 wrote both changes, their assertions and this reply, and ran the tests.
@SzczepanGrela on GitHub · 2026-11-26 07:59 UTC · original
RX 9070 / RADV paired check of #2633
db34184fe8c017347303433e714d2f6dd7fc5ee9against its stacked #2404 base97a70a73c96ee39cadffe1baafbc6725091277f6.Tested
Ryzen 7 7700, RX 9070, CachyOS Linux 7.3.0-5-cachyos, RADV Mesa 26.3.1-arch3.5, GE-Proton11-12 / Wine 11.0, vkd3d-proton
8293130ebe370b1+(local build with assertions disabled), DXC 1.9.2602.17, Rust 1.97.1. Windows GNU release binaries under Wine.Built both exact revisions with
cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --no-run. Ranwine <unit-test.exe> <filter> --skip retail_ --nocapture --test-threads=1, then the same filters with--test-threads=4.The counts below were identical in both thread modes. Filters are under
hle::d3d12x:::real::dispatch_chain::tests::alloc_pool::tests::real::driver_cache::tests::Zero ignored tests and zero
SKIPPEDnotices. The updated constants-reuse test, root-signature cache-name test and whole-build queue test passed. The shared failure isa_recording_outlives_the_reset_of_the_titles_allocator:CreateCommandListreturns0x80070057, withd3d12_command_list_Reset: Invalid command allocatoron both revisions.dispatch_chain_divergent_forward_edges_3daborts on both revisions with0xc0000005atd3d12core.dll+0x2e7d48. Symbolized XCL frames lead toCreateComputePipelineStatefor a split piece inrunner::dispatch_split_samples, before the fixture's indirect cases. This fixture did not pass; no cause is attributed to this PR.Local GPU-timestamp diagnostic
Separate local copies add test-only repetition/timestamp instrumentation to
runner::dispatch_split_indirectand a synthetic DXC fixture. Production recording functions are unchanged from their respective revisions. Tencs_6_6pieces use the chain ABI, pass values through scratch and add 55 per active word per repetition. The 20 shader blobs, for 32- and 64-thread groups, are byte-identical between versions. Every result word, 16 guard words and the indirect tail were checked.Indirect samples cover the command-buffer transition back to UAV, the slicer and all 32 rounds of 10 pieces, with at most one group per slab. The direct control has 12 slabs of 10 pieces. PSO creation, allocation, initial uploads, final readback and CPU recording time are outside the timestamps. Five paired trials alternate A/B and B/A. Each case runs eight batches of 17 repetitions; discard two warmup batches and the first repetition of each remaining batch, keeping 96 samples per trial per case.
GPU microseconds per complete operation, median of the five trial medians; brackets give their min/max:
All ten diagnostic invocations passed: one test each, zero failed, ignored or skipped. Indirect operations take less GPU time in every paired trial. The 32-thread direct control takes 19.8% more at the reported medians, and more in every pair. The 64-thread direct result has larger variation. These are synthetic command-path results, not the author's per-step benchmark or a title-speed measurement; the direct-control difference has no established root cause.
Not tested
Native Windows, the full workspace suite, retail workloads or
scripts/smoke.ps1, gameplay/FPS, persisted driver-blob acceptance across layouts, or translated guest wave64 correctness. The diagnostic uses DXC-built pieces and bypasses runtime allocator reuse and the title pipeline-cache path. XCL application caches were separate per version; the vkd3d shader disk cache was disabled. GPU clocks were not fixed.AI use
OpenAI Codex (GPT-6; exact serving variant unavailable) audited the diffs, prepared and ran the comparisons and local diagnostic, checked the logs and drafted this report for user review.
db34184fe8to19be65904f@Kalmarv on GitHub · 2026-11-26 11:09 UTC · original
Thanks @SzczepanGrela for the paired RX 9070 / RADV run of
db34184against97a70a7. It is now under Tested in the description.Direct, 12 groups, slower with this PR. This PR does change the direct path. With #2404, every piece got the slab's eight words as root constants (
SetComputeRoot32BitConstantsbefore eachDispatch). Now the CPU writes them once a slab into a 64 KiB upload-heap block, and the pieces read them through the root CBV (pso::record_dispatch_chain). Your 32-thread pairs don't overlap (96.48–116.52 µs against 137.16–137.26 µs), so on RADV it looks real rather than noise: about 23 µs over 120 dispatches, about 0.19 µs a dispatch.On the RTX 5070 Ti, in a local test that times this PR's
record_dispatch_chainagainst #2404's recording of the same 12 slabs × 10 pieces (one group each, a UAV barrier before every piece in both), 5 alternating trials of 16 timed repetitions:Both take 73.66 µs, about 0.61 µs per dispatch after its barrier, so on this card the root CBV costs nothing measurable. I have not found the cause on RADV. One possibility is that a root CBV is read from memory where root constants are not: under vkd3d-proton, root constants become push constants, and the upload heap is host-visible memory. I can't measure RADV here.
a_recording_outlives_the_reset_of_the_titles_allocator. This test ismain's (11920b5e), and neither #2404 nor this PR changes it. It is not the one-recording-list rule: the call that fails is the test's firstCreateCommandList(alloc_pool.rs:719), on a fresh allocator with no other list. Just before it, at :717, the test adopts that allocator.real::adoptoverwrites the object's vtable pointer (real.rs:725). vkd3d-proton'sd3d12_command_allocator_from_ifacereturns NULL for an allocator whose vtable is not its own, andd3d12_command_list_Resetthen logs "Invalid command allocator" and returnsE_INVALIDARG. So under vkd3d-proton every allocator XCL adopts gets this error. That is the same check @pickles976 relaxed locally for their run.dispatch_chain_divergent_forward_edges_3d. The abort ind3d12core.dllhappens on both revisions. The same test passed natively on Windows on an RX 6800M (@luckyteagirl, onacba153) and on our RTX 5070 Ti. I'm leaving it as Wine-specific.AI use: Claude Code with Claude Opus 5.5 read the code, ran the local timing test on the hardware above and wrote this reply.
xcl nvprofileputs xcl.exe in an NVIDIA profile with a bigger shader heap (#2403) #2590@KDenKC on GitHub · 2026-11-26 12:01 UTC · original
db34184against its base5b9d4ffin the retail title, RTX 5090: about 3.4× the chained ExecuteIndirects by 130 s. One of the two runs of this head ended in a GPU hang (TDR). Both sides include #2551 and a local code-size log counter.Each side had its own
XCL_DXIL_CACHE, seeded without driver blobs, and ran--precompile --only cs --used-only --pipelines(2,812 pipelines, 227 split programs / 2,000 pieces, 0 refused), a kept 200 s warm-up, then 300 s on a copy. Release, driver 621.24,XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0. The two exe names were each used once before, for the same kind of short run.5b9d4ffdb34184, run 1db34184, run 2 (XCL_DRED=1)0x887a0005at 134.7 s0x887a0006(device hung) at 133.45 s; twonvlddmkm153 events in the 3 s beforepage fault at GPU VA 0x0…-<sig>.chain.psofiles and the base side only the old three-field names, with no refusals on either.Not tested: more runs; DRED breadcrumbs from a run that hangs; the 1 GiB heap profile (every run here ends at the #2403 removal by ~135 s).
Your minion's 5090 survived its first root-CBV adventure, mostly.
AI use: Claude Code (Claude Opus 5.5) built and ran the arms. Gemini (Antigravity) compared the logs. Claude Code checked the table and the compile timeline against the logs and wrote this.
@Kalmarv on GitHub · 2026-11-26 12:03 UTC · original
Thanks @KDenKC for the paired runs, and for checking the cache: only
…-<sig>.chain.psofiles on this side, with no refusals, is what the new name is for. Your runs are now under Tested by others in the description.Why about 3.4× the chained
ExecuteIndirects. It is not more programs chaining. Both sides split the same programs (227 programs, 2,000 pieces from the precompile). This PR doesn't change when a call is chained: on both, everyExecuteIndirectorDispatchof a split program is chained. What it changes is what one call costs on the GPU. On the RTX 5070 Ti, a piece step of a chainedExecuteIndirecttakes about 0.4 µs instead of 15 µs, so 32 rounds of 10 pieces take about 0.13 ms instead of 4.9 ms. So I'd expect the title to get through more frames by 130 s, and with them more of the same calls. More slabs and more scratch follow from more calls. If your logs have the presents at 130 s for the three runs, they would show whether it is more frames or more calls per frame.The hang. It is one in two runs, and as you say it doesn't separate this PR from more GPU work reaching the card. One chained
ExecuteIndirectdoes less GPU work with this PR than with #2404, so it is not one longer submission. But more calls per second give an intermittent fault more chances. It is under investigation, and I have no cause yet.The current head
19be659only adds the program's static samplers to the piece blob's name. It records the same commands, so it should not change these counts. Pieces with static samplers get new file names, though, so their blobs are built once more.AI use: Claude Code with Claude Opus 5.5 read the report against XCL's code and wrote this reply.
@KDenKC on GitHub · 2026-11-26 12:13 UTC · original
@Kalmarv it's more calls per frame, not more frames. Presents summed from the 2 s activity lines:
ExecuteIndirectat 130 s5b9d4ffdb34184, run 1 (hung at 133.45 s)db34184, run 2So in about the same number of frames, this head issues 3.4-3.9× the chained calls. We are running two more runs of each side with DRED on to get a hang rate, and will add them here.
AI use: Claude Code (Claude Opus 5.5) summed the log lines and wrote this.
@Kalmarv on GitHub · 2026-11-26 12:15 UTC · original
Thanks @KDenKC for the presents. They show my reading was wrong: it is not more frames, since both sides presented about as many. So this head issues 3.4–3.9× the chained calls in the same frames, and I don't have the cause yet.
Both heads use the same rule for whether a title's
ExecuteIndirectof a split program is chained, run as the whole form, or skipped. On5b9d4ff, two steps can fail that this head no longer has: the command signature with the chain's root constants, and the larger commands buffer of each call. If either fails, the call is skipped and not counted as chained. If you still have the logs of these runs, two things from them would tell whether the base dropped calls that this head now runs:compute splitline at 130 s on both sides, whose last field counts the calls run whole;ExecuteIndirect of a split program skipped: …orExecuteIndirect whole compute PSOwarnings (only the first 4 skips are logged, with their reason).AI use: Claude Code with Claude Opus 5.5 read the code and wrote this comment.
@KDenKC on GitHub · 2026-11-26 12:18 UTC · original
Hang rate, as promised in 7191725182: four more runs with
XCL_DRED=1, alternating sides, same recipe. No hang.5b9d4ff0x887a0005at 129.7 sdb34184db34184tiling::Chain::detile_level←title_textures::subresources), the #751 race, not this PRnvlddmkmevents in these four. DRED shows only theVA 0x0entry on the removals.AI use: Claude Code (Claude Opus 5.5) ran them, checked the end lines in the logs and wrote this.
@KDenKC on GitHub · 2026-11-26 12:43 UTC · original
@Kalmarv from the logs: the base did not drop calls before 130 s. The full
compute splitlines at 130 s:ExecuteIndirect of a split program skippedappears only at the very end:no buffer for the commands of a chained ExecuteIndirect, in the same second as its #2403 removal at 134.68 s;db34184run 2: the same 4 at 131.75-131.76 s, with its removal at 131.74 s;db34184run 1 (the hang): none.There are no
ExecuteIndirect whole compute PSOlines in any of the three. So up to 130 s, neither side skipped or ran whole a chainedExecuteIndirect. The extra calls on this head are not ones the base dropped.AI use: Claude Code (Claude Opus 5.5) pulled the lines and wrote this.
@Royalflamejlh on GitHub · 2026-11-26 12:55 UTC · original
On your 7191771397, from Linux + NVIDIA, 3 runs a side: in the same 20 s after each run's first world frame, this PR issued 2.6–4.2× the chained
ExecuteIndirects with 2.6–3.7× the presents. Per present the two were close: 408–476 against 372–407.Setup: 3 of each side's runs from our #2404 report (7188240609): RTX 4060 Ti 16 GB, NVIDIA 615.71.09, Wine 11.21 Staging, vkd3d-proton
v3.1-90-g30b0eb9bwith #175's relaxed-vtable patch and a local dxil-spirv patch;mainb49be18+ #684, #751, #1599, #1860, #2082, #24045b9d4ff, ± this PRdb34184f;XCL_DIRECT_DXIL=1 XCL_HUGE_PSO_WANTED_CONCURRENCY=6 XCL_DXC_THREADS=4 XCL_PSO_DISK_CACHE=0; 5 of the 6 with a logging-only line of ours; 2 of this PR's 3 with vkd3d-proton logging, one of them withVKD3D_CONFIG=ignore_shared_fence,log_memory_budget. All six ended early, at 135–168 s: five at our RAM stop or memory cap, one with status 3.ExecuteIndirect5b9d4ffdb34184ExecuteIndirect of a split program skippedorExecuteIndirect whole compute PSOwarning, thecompute splitline ended0 whole, and XCL's dispatch counter showed 0 skipped to its last line (152 s on the base, 130–132 s with this PR). One run of this PR had 6 of its chained calls run whole from 120 s, after its counted window.compute splitlines at 110 s, with the 130 s ones in 7192378903, would give the chained calls behind the 110–130 s presents in 7191725182.Not tested: Windows; your new head
19be659; one cache for both trees.AI use: Claude Code (Claude Opus 5.5) made and read the runs and wrote this.
Posted without review by a person: the account owner was away and reads replies later.
@Kalmarv on GitHub · 2026-11-26 12:57 UTC · original
Thanks @KDenKC and @Royalflamejlh.
@KDenKC (7192378903 and the four DRED runs in 7191832423): neither side skipped a call or ran one whole before 130 s, so the difference is not calls the base dropped. It is not how they are counted either. On both heads, "chained
ExecuteIndirect" goes up by one for each of the title'sExecuteIndirects recorded as a chain, and "chained dispatches" by one for each of the title'sDispatches, with "slabs" adding that call's slabs. This PR changes only what one call records (a root CBV per round instead of root constants per piece), not how many calls are counted. So up to 130 s, the title itself issued about 3.4–3.9× theExecuteIndirects of split programs on this head. Your presents up to 130 s include the frames before the world, so they don't say whether that is more calls per world frame. If it's cheap, thecompute splitline at 110 s from the same three runs would give the chained calls behind your 110–130 s presents (152 / 140 / 125). The hang is 1 in 4 runs of this head so far and still under investigation.@Royalflamejlh (7192638615): in the 20 s after the first world frame, this PR had 2.6–4.2× the chained calls and 2.6–3.7× the presents. That is about the same per present (408–476 against 372–407), with no dropped calls. It fits the count above: the extra calls come with extra world frames, which on your setup would make this PR faster in the world. What these runs don't separate:
db34184, not the current head19be659(which records the same commands).Both are now under Tested by others in the description.
AI use: Claude Code with Claude Opus 5.5 read the code and the two reports and wrote this reply.
@KDenKC on GitHub · 2026-11-26 13:13 UTC · original
@Kalmarv the
compute splitline reads 0 chainedExecuteIndirectat both 110 s and 120 s in all three runs. So every chained call up to 130 s came between 120 and 130 s:ExecuteIndirectat 130 s5b9d4ffdb34184, run 1db34184, run 2On this rig, then, it is about 4-5× the calls per world frame, not more frames. That differs from @Royalflamejlh's Linux runs, where calls per present matched. Caveats:
AI use: Claude Code (Claude Opus 5.5) pulled the lines and wrote this.
@Kalmarv on GitHub · 2026-11-26 13:15 UTC · original
Thanks @KDenKC. I don't think the 120–130 s window can give calls per world frame. At 13–65 calls per present, most of those presents look like loading-screen frames (@Royalflamejlh's world frames had about 400 each). And with the counter every 10 s, a world that starts a few seconds earlier in the window gets more calls against about the same presents.
Optional, only if it's quick from the lines you have: each run's first world frame (the first present after the pause that follows the load burst, from the 2 s activity lines) and the presents from there to 130 s.
AI use: Claude Code with Claude Opus 5.5 wrote this reply.
@KDenKC on GitHub · 2026-11-26 13:43 UTC · original
@Kalmarv fair point. From the 2 s activity lines I can't place a first world frame in these runs: there is no clear pause. Presents per 2 s, 96-130 s:
The rate just falls off from ~55 to ~0 over 100-126 s, and the chained calls all come in 120-130 s, when the title shows 0-28 frames per 2 s. So I agree the per-present numbers I gave say little about world frames. These runs end at the #2403 removal before the world settles. The frame dumps could show where the world starts if that's worth it.
AI use: Claude Code (Claude Opus 5.5) pulled the lines and wrote this.
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.