D3D12.X: a split compute program keeps its console code, not its whole DXIL #3047
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3047"
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 Prime1997 on 2026-11-27T17:54:08Z.
A split compute chain now retains its smaller console shader source instead of an additional whole-program DXIL copy. When an indirect dispatch needs the whole form, it reconstructs it with the original wave mode and memory-window form. Part of #2688.
Rebased onto main (2026-11-28).
nvidia-devwas merged intomainby #3203, so this PR now targetsmainand its branch was rebased ontomain765b2c5bfff6754e8c9886a73e188a86aca3c64c: heade87bdba4e37aebbe4853d93ff9292da2efd694eb(was37802271a56db9201209b801cc15fe9fa09ab83b).mainhad added indirect split pipelines todispatch_chain.rssince (12 commits), so this is a hand port. The chain keeps the console program with its window and wave settings as before;buildstill receives the whole DXIL for the immediate cached-blob check; the indirect variant translates the whole form again when it is built. The README sentence moved undermain's rewritten preparation text. That port needs a review. The test run leaves out onemaintest that already fails alone on plainmain765b2c5bon this PC withadopted class. On the rebased head, on the same RTX 3060 Ti PC, debug profile:cargo check -p xcl --all-targetsexited 0, andcargo test -p xcl --lib -- --test-threads=4 dispatch_chain whole --skip failed_binding_keeps_indirect_commands_until_allocator_resetgave 63 passed, 0 failed, 1 ignored, anddispatch_chain_native_wave64_builds_wholeSKIPPED (no wave64). The whole suite and the paired title runs have not been rerun on this head; every other result below is from the earlier head. The rebase and its conflict resolution were done with Claude Code.What is in it
54225f5884a94cd23b7aab3f703a7c975070aa77, preserving the current persistent worker, panic recovery, title-thread accounting and submission guard.mem_windows()value alongside wave32 at the initial translation. The later worker usesconsole_to_dxil_inwith those saved settings; it does not recompute thread-local switch/heap selection.e429936cstill retainsChain::whole_code. #3091 covers shared SDK-derived bytecode; #827 covers async descriptor interning; #3103 covers cache admission accounting. Those are distinct allocation owners. This updates the existing PR, not a new competing implementation.Tested
cargo test --locked -p xcl --lib --target-dir <isolated-target> --no-run: both control and corrected binaries built.cargo test --locked -p xcl --lib --target-dir <isolated-target> hle::d3d12x::real::dispatch_chain::tests:: -- --nocapture --test-threads=1: 7 passed, 0 failed, 0 ignored, 1,801 filtered; no SKIPPED messages.the_whole_worker_preserves_each_programs_memory_windowswith--exactgave 0 passed, 1 failed, 0 ignored, 1,807 filtered; no skips. It reconstructed the wrong0x104memory-window form. This is a behavioral control, not a run of the untouched old PR head.Regression run
Pending new paired clean-head main/PR title runs for
37802271a56db9201209b801cc15fe9fa09ab83b. The old79aaead0smoke results are historical and do not validate this refresh.Not tested
AI use
The original retention change was written with Claude Code (Claude Opus 5.5), as recorded in the previous description. Codex (GPT-6) reviewed duplication and worker identity, refreshed the change, added and ran the focused control/tests, and updated this PR at Prime's request.
Optional temporary Discord for coordinating contributor work, testing and comparing results: https://discord.gg/6B4TykyC4W
Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-27T20:32:30Z.
I checked GPU output parity for the indirect whole-pipeline fallback on RTX 5070 / NVIDIA 616.92 at head
79aaead0f115aa74fdf9eda2b7df983b1a24391eusing a test-only native harness.The guarded console compute program went through the production
CreateComputePipelineStatehook and chain registry. With split threshold 20 and the per-instruction translator, it registered four pieces with no whole PSO initially; productionwhole_readybuilt and cached the whole fallback. A nativeExecuteIndirect(1,1,1)through the readback runner produced the independently computed values for all 32 lanes and left 32 guard words unchanged. With threshold 12500, the same program registered no chain,whole_readyreturned the ordinary PSO, and the 64-word output matched.I repeated both controls in fresh processes with the translated cache disabled and enabled: four focused passes, zero skips. Settings included
XCL_DIRECT_DXIL=1,XCL_DIRECT_COMPACT=0,XCL_PER_LANE=0, andXCL_PSO_DISK_CACHE=0.This validates the selected whole fallback and GPU results for this synthetic program. The harness does not execute the title's
bind_abior guest command wrapper, and it does not test the asynchronousLatepath, retail behavior, or latency.AI use: OpenAI Codex with GPT-6.2 Astra built and ran the fixture; Codex reviewed and prepared this report.
Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-27T20:51:59Z.
Thanks for running the parity check through the production hook and
whole_ready, with the translation cache both on and off. As you say, the asynchronousLatepath and a retail run aren't covered by it; the retail run in the description only showed whole forms being built from the second translation without a warning. No change from this review.AI use: Claude Code (Claude Opus 5.5) wrote this reply; Prime posted it.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-27T21:04:55Z.
Combined Windows check of #3047, #3048, #3049, and #3050. I applied exact heads
79aaead0,edc2b458,1d46e4b6, andd6d529c2to their commonnvidia-devparentd1be8103. The only integration conflict washost.rs; one shared ten-tick counter retained both RAM report lines. This is a local, uncommitted combination, not any PR's exact head.cargo build --locked --workspacepassed on the base and combination.cargo test --locked --workspace --no-fail-fast -- --test-threads=4on the RTX 3080 Ti gave:nvidia-devparentThe same nine test instances failed on both trees, including the shader-cache test; the combination added six passes and no new suite failure on this machine. I would not call the four drafts ready together yet: the two boundary failures below still need fixes. This test does not establish world-load RAM savings.
I found a correctness gap in #3047's deferred whole shader. If
with_switch_fallbackcreates a split chain in switch form after a driver refusal,WholeSource::code()later callsconsole_to_dxil_foron a worker or dispatch thread, where the thread-local switch scope has ended. It can regenerate heap-window DXIL for a chain whose pieces were made in switch form. A synthetic memory-store program made the variants distinguishable: the new isolated regression failed on the unchanged combined tree (0 passed / 1 failed), then passed (1 / 0) with the local change below. The existingthe_whole_form_is_made_again_from_the_console_programtest also passed (1 / 0). Capture the resolved window mode while constructing the chain and pass it toconsole_to_dxil_inwhen regenerating the whole form. This candidate has not had a full-suite or title run.Candidate #3047 fix and isolated regression
For #3048, a separate focused regression shows that the opt-in driver-cache switch can deny a title-owned lookalike path. The #3049 heap-counter self-attribution was already reported, and #3050 has existing upload-cap and readback coverage. I did not duplicate those tests.
I have not run a combined retail title, measured RAM or frame times, or produced clean-commit paired smoke blocks for these drafts. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti (621.35), rustc 1.99.1 MSVC, SDK DXC 1.8.2502.11. AI use: Codex (GPT-6.2 Sol) combined the drafts, resolved the local conflict, ran both suites and the focused regressions, and drafted this report; Codex (GPT-6.2 Astra) independently traced the #3047 and #3048 code paths.
Imported from ivall/xcl. Originally posted by pickles976 on 2026-11-27T21:23:54Z.
Wine corroboration of @thehollowedone's deferred-window finding above, on standalone #3047 head
79aaead0f115aa74fdf9eda2b7df983b1a24391erather than the four-PR combination.A local ignored/fresh-process CPU regression builds a real synthetic memory-store program inside
pso::in_switch_formwith effective windows=2, leaves that scope (ambient2 | HEAP_WINDOWS), and asksWholeSource::code()to rebuild it. The heap/switch control bytecodes are explicitly required to differ. Unmodified production: 0/1, delayed hash16982255943155419730 versus original switch hash16925848744296737581. Retaining the effective windows inWholeSourceand usingconsole_to_dxil_in, as your proposed fix does: 1/1, with full DXIL byte equality. No hardware dispatch or deliberate driver OOM is involved.Wine11/Linux6.17, Rust1.98.1 Windows-MSVC target, DXC/dxil1.9.2609.5. Original fresh build32.77s; corrected source was freshly compiled33.62s in the intervening fixture build, then this isolated check reused that same binary (0.05s Cargo /0.03s test). Local paths:
verify-xcl3047-window-mode-20261127T211814Z/verify-xcl3047-corrected-split-on-20261127T212035Z/(compile provenance only; its separate split-fixture admission failed, not a GPU pass)verify-xcl3047-window-mode-fixed-20261127T212201Z/This supports preserving the successful fallback choice/cache identity. It does not demonstrate a root-signature incompatibility—the source documents common bindings—or a retail crash, memory saving, Game-Init fence fix, or asynchronous Late-path correctness. Local production correction/test retained; no contribution PR. AI-assisted local verification.
Completed retained-source GPU follow-through (same local mode correction)
On
79aaead0f115aa74fdf9eda2b7df983b1a24391eplus the above retained-window correction and test-only probes, two fresh-process tests now pass on the physical RTX 4060 Laptop / Wine 11 / NVIDIA 590.48.1. This is the diagnostic relaxed-vkd3d2576c0b4adfae4a+stack, not stock certification.The earlier absent-chain fixture was misconfigured: it omitted the FSSM Wave32 header (
0xD4 = 0x20), causing logical-Wave64 split eligibility to force the effective split limit to zero. Opt-in planner diagnostics established that before any GPU creation; it was not an owner failure. The corrected bounded-loop kernel reports threshold20, 277 optimized instructions, 14 pieces. Through productiontranslated_compute_pso_once, the fixture seeds/hits the in-process translation cache, poisons and drops the caller's console bytes, drops its compiled handle, obtains the retained-source whole fallback, and dispatches that PSO. All32 varied lane words (0x30470000 + 24*lane) and32 untouched guard words pass.verify-xcl3047-wave32-retained-20261127T213056Z/console.log.XCL_TRANSLATED_CACHE=0): separate fresh process,1/1,0.88s, same verified executable;verify-xcl3047-wave32-retained-off-20261127T213141Z/console.log.Each process uses a distinct private disk-cache directory. The in-process translation cache remains enabled and its hit counts are asserted in both legs; this is not an all-caches-disabled test. No ExecuteIndirect, asynchronous
Whole::Late, actual driver-OOM fallback, retail title, memory-saving or startup-stall verdict. All resource guards unchanged. Local fixture and narrow mode correction retained; no code contribution pushed.Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-27T21:27:24Z.
I checked the previously untested asynchronous
Latepath on RTX 5070 / NVIDIA 616.92 at head79aaead0f115aa74fdf9eda2b7df983b1a24391e, using a test-only native fixture and stable window mode.With
XCL_CS_PSO_WAIT_MS=10000, the guarded console program registered four pieces and initially had no whole PSO. The first productionwhole_readycall returnedLate; after the worker completed, it returnedReady, and a subsequent lookup returned the same COM identity. NativeExecuteIndirectwith that PSO produced all 32 expected lane values and left 32 guard words unchanged. A fresh-process unsplit control returnedPlainand produced the same 64 words. Both focused runs passed without skips.The harness invokes
whole_readydirectly, then dispatches when ready. It does not verify guest draw skipping or catch-up, retail latency, or the separately reported switch-form-to-heap-form mismatch.AI use: OpenAI Codex with GPT-6.2 Astra built and ran the fixture; Codex reviewed and prepared this report.
Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-28T10:14:13Z.
Ran the split-chain reconstruction tests at
37802271on an NVIDIA Blackwell desktop part:Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 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.
All seven tests pass, including the retained-size/reconstruction case and the real-worker test that distinguishes root-UAV from descriptor-heap translations. They are CPU-side tests; I did not run a title with an indirect whole-form fallback. The thread has GPU-parity runs on RTX 5070 and other cards, but no desktop 5070 Ti.
Not tested: a retail indirect dispatch, a paired smoke run, the full workspace suite, release profile, AMD and Intel GPUs, native wave64 hosts, Wine, game 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 thehollowedone on 2026-11-28T16:02:14Z.
Independent Windows/NVIDIA check of #3047 head
37802271against its exactnvidia-devparent54225f58. Hardware: RTX 3080 Ti (driver 621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, DXC 1.8.2502.11.The unfiltered workspace run on the head terminated its
xcl --libbinary when a UMA restoration test could not restore the coherent window, as described in the PR. I then ran the same command on clean head and parent with only the three documented abortinguma_driver::testscases excluded:$env:XCL_ADAPTER='3080'; cargo test --offline --locked -j 4 --workspace --no-fail-fast --quiet -- --test-threads=4 --skip uma_driver::tests::a_refused_gpu_upload_segment_becomes_custom --skip uma_driver::tests::mixed_window_keeps_its_bytes_and_the_gpu_sees_every_segment --skip uma_driver::tests::failed_restore_stops_before_importing_an_unbacked_windowSKIPPEDnotices54225f5837802271The only failed test on both is
gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk(DXIL not compiled yet). The two additional head tests passed. The skips are not counted as GPU coverage.I also checked the revised source path: initial translation captures the wave and resolved window mode, and deferred reconstruction uses those same values. I found no new correctness blocker in that path. This is a source review, not a GPU output comparison of an indirect whole-form dispatch.
Not tested here: world-load behavior, indirect whole-form GPU output, retail RAM savings on this revision, AMD or Intel. The PR remains draft while its description and branch checks are outstanding.
Paired clean-head smoke follow-up: I built
cargo build --offline --locked -j 4 --release -p xclon clean currentmainand the clean PR head, then ranscripts/smoke.ps1 -Seconds 60 -StartupTimeoutSeconds 120withXCL_PREPARE=0, the same anonymous title and RTX 3080 Ti. These are the script's generated blocks:The head clears the numeric smoke gates (frames at least 80% of main; peak commit at most 125% of main), with zero removals and crashes. The script supplied no menu input, so this checks launch/menu stability, not world load or the indirect whole-form path. The author can paste these two blocks under Regression run in the PR description; the comment alone does not satisfy the description check.
AI use: Codex (GPT-6.2 Sol) ran the suites and paired smoke; Codex (GPT-6.2 Astra) independently traced the deferred shader path.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-29T03:50:12Z.
Independent current-head Windows/NVIDIA check of #3047 at
e87bdba4. RTX 3080 Ti / driver 621.35, Ryzen 7 9800X3D, Windows build 26300, Rust 1.99.1, DXC 1.8.2502.11.After
cargo build --workspacepassed,cargo test --workspace --no-fail-fast -- --test-threads=4completed with 2,593 passed, 3 failed, 49 ignored, and 26SKIPPEDnotices (mostly unavailable wave64). The failed cases were:console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk:DXIL not compiled yet. The exact case failed with the same error in isolation on current mainfa204595.two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs: the two-pass release assertion. The exact case failed with the same assertion in isolation on that main commit.a_preparation_worker_also_builds_a_split_programs_whole_form:no split programin the full run. The exact case passed 1/0/0 in a fresh isolated run on this PR head and also passed 1/0/0 on main. Its full-suite failure remains unexplained; I would not count it as a passing full suite.I found two source-level allocation paths worth correcting before the next head:
Chain::wholecallswhole_source.code()beforeWholeBuild::get_or_buildchecks the result, lock, and 10-second OOM cooldown. A rejected or contending request can still reconstruct and hold a full DXIL buffer. Resolve the source inside the gated build closure, preserving the translation error category and message in the cached outcome.build_indirectreconstructs the whole DXIL before the 64 MiB indirect-source admission check. Save its original byte length when the split chain is built, reserve the plan plus that length first, and holdIndirectChargethrough reconstruction so an error releases the reservation. Reconcile the charge if regenerated output has a different length.A focused regression should count source resolutions under concurrent whole requests, inside the OOM cooldown, and with the indirect budget already exhausted. The count should stay zero for requests rejected before a build. The existing whole-build tests only count driver-build closures, so they do not detect this work.
This is a review and a failed current-head suite, not a merge-ready verdict. I did not run paired smoke on this head. AI use: Codex (GPT-6.2 Sol) checked the source and ran the tests; Codex (GPT-6.2 Astra) independently reviewed the allocation paths.
Imported from ivall/xcl. Originally posted by vasanex on 2026-11-29T04:23:13Z.
How this was run: the suite ran once on the 11 of your PRs that build on this base, merged together (#3047 #3048 #3049 #3091 #3092 #3103 #3104 #3105 #3107 #3123 #3125; a local tree, only #3125 needed a resolution in README and the
sparse.rstest module); the base alone gave 2608 passed, 0 failed, 49 ignored with the same 27SKIPPEDlines (21 no wave64, 3 refused per-lane f16/f32 forms, 2 heap windows opt-in, 1 driver cache needs Developer Mode). This PR alone was merged onto the base, built (cargo build --workspace, then release), its modules' lib tests run (debug), and smoke-run once for 60 s (scripts/smoke.ps1, retail title, front end,XCL_PREPARE=0). The smoke numbers are for my local merged tree, not a clean-head block for the description. Load runs: 150 s, the save loaded with A presses,XCL_PREPARE=0, after one warm-up, one run per arm; on this 10 GB card main is over the video memory budget while loading, and presents stop after 94-125 s in every arm.AI use: Claude Code (Claude Opus 5.5 and Claude Fable 5.2) ran the builds, tests and title runs, reviewed the diff and wrote this; the code points cited were checked against the merged tree.
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-29T06:04:44Z.
Follow-up to my current-head finding on
e87bdba4: I tested a local, uncommitted candidate that moves whole-program translation inside the existing build-once/cooldown gate. During cooldown, repeated indirect dispatches no longer regenerate DXIL. A translation error remains retryable with its original message; driver errors retain the existing cache behavior, and an out-of-memory cooldown starts when the build fails.On Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, DXC 1.8.2502.11,
cargo build --offline --locked -j 4 --workspacepassed. The twowhole_preparation_tests passed (2/0/0), and the slow-preparation cooldown test passed (1/0/0). The candidate's fullcargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4had 2,597 passed, 2 failed, 49 ignored, 26 GPU SKIPPED notices. The untouched PR head, built and run with the same command in an isolated Cargo target directory, had 2,594 passed, 2 failed, 49 ignored, 26 GPU SKIPPED notices and the same two failures:console_mesh_caches_hlsl_compute_pass_in_memory_and_on_diskanda_preparation_worker_also_builds_a_split_programs_whole_form. An isolatedfailed_binding_keeps_indirect_commands_until_allocator_resetalso panicked withadopted classon both the candidate and untouched head. These results establish no additional observed suite failure, not a green suite.The separate
build_indirectpath still reconstructs whole DXIL before its variant-source reservation; this patch does not address that path. No clean-head paired smoke or memory/latency measurement was run, so the candidate is not merge-ready.Candidate gate change and focused regressions
AI use: Codex (GPT-6.2 Sol) wrote and ran the local candidate; Codex (GPT-6.2 Astra) reviewed the low-level gate design.
Second local candidate: admit indirect source before regeneration. The separate
build_indirectpath in the earlier report can also avoid translating a whole program when its existing 64 MiB source budget is full. This candidate records the initial whole DXIL length when the chain is created, reserves that length plus the piece lengths beforeWholeSource::code(), and adjusts the live charge if regeneration returns a different length. A failed growth or translation releases its own reservation without releasing a competing variant's charge. The successful variant holds the charge until its final owner drops it. This patch is separate from the whole-build/cooldown candidate above; I did not combine or smoke-test the two.At unchanged head
e87bdba4, Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, DXC 1.8.2502.11:cargo test --offline --locked -j 4 -p xcl --lib indirect_source_ -- --test-threads=1: 3 passed, 0 failed, 0 ignored. The tests verify zero translation calls on rejected admission, exact accounting across growth and shrink, a competing reservation, translation failure, and final-owner release.cargo build --offline --locked -j 4 --workspace: passed.cargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4: 2,597 passed, 2 failed, 49 ignored; 26 GPUSKIPPEDnotices. The two failures areconsole_mesh_caches_hlsl_compute_pass_in_memory_and_on_diskanda_preparation_worker_also_builds_a_split_programs_whole_form, the same two seen on this untouched head in the earlier comparison. This is not a green suite.The budget tracks admitted source lengths, not transient translator scratch. I did not measure frame time or memory savings, run an indirect whole-form GPU output comparison, or produce clean-commit paired smoke on this uncommitted candidate. The PR remains draft.
Candidate indirect-source reservation and regressions
AI use for this follow-up: Codex (GPT-6.2 Sol) wrote the candidate and tests, ran them, and drafted the report; Codex (GPT-6.2 Astra) independently reviewed reservation ownership and concurrency.
Combined-candidate check: I applied both collapsed diffs above, in order, to the unchanged #3047 head
e87bdba4. They applied without a conflict;git diff --checkwas clean. This is a local uncommitted combination, not a new PR revision.On the same RTX 3080 Ti / 621.35 Windows setup,
cargo build --offline --locked -j 4 --workspacepassed. Focused tests passed:whole_preparation_2/0/0,indirect_source_3/0/0, andwhole_oom_cooldown_begins_after_a_slow_preparation1/0/0. The fullcargo test --offline --locked -j 4 --workspace --no-fail-fast -- --test-threads=4reported 2,600 passed, 2 failed, 49 ignored, 26 GPU SKIPPED notices. The two failures have the same names as the untouched-head failures already documented above. No additional suite failure appeared when the fixes were combined.This checks build and test interaction. The combined candidate's indirect whole-form GPU output, memory or latency benefit, and clean-commit paired smoke remain untested. Prime can apply or adapt both changes on a new head, then run those gates. AI use: Codex (GPT-6.2 Sol) combined the patches and ran the checks; Codex (GPT-6.2 Astra) reviewed their interaction.
Exact-head GPU readback: I added a test-only fixture to unchanged #3047 head
e87bdba4. It creates a synthetic split compute program, requests the production indirect variant, executes its reconstructed whole PSO withExecuteIndirect(1,1,1), and reads back the output. Descriptor-heap windows point to the checked output buffer; root UAV windows point to a separate buffer, so a root-window translation cannot satisfy the assertion. All 32 lane results matched the independently calculated values and 32 guard words stayed unchanged. On the same RTX 3080 Ti / 621.35,cargo test -p xcl --lib reconstructed_indirect_whole_executes_and_reads_back -- --nocapturepassed 1/0/0, with zero GPU skips. The split threshold was set only in an isolated child process. This checks exact-head synthetic execution, not the two proposed fixes together, the title command path, AMD/Intel, or gameplay performance. AI use: Codex (GPT-6.2 Sol) wrote and ran the test and reviewed its readback scope.Imported from ivall/xcl. Originally posted by bmjask on 2026-11-29T22:45:58Z.
Review: COMMENTED
Critical review of current head
e87bdba4. Repeated indirect dispatch can defeat the intended memory/compile saving: when the whole-program DXIL is absent, its translation occurs before the existing build-once/cooldown gate. A failing or slow driver build can therefore make each retry regenerate the whole DXIL, including during cooldown. Move translation inside the same single-build gate and test repeated indirect submissions with slow/failing builds. The current-head Windows follow-up tested such a candidate locally. The source-retention change itself is sound, but this retry path needs fixing. No local Windows run.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:51:17Z.
Review (head
e87bdba4, diff read, not a merge-check; draft and conflicting, so not built or run):e8a36664) removedIndirectBuild,build_indirect,retain_indirect_planandindirect_blobs_present, so about half the diff edits code main no longer has. The change is still wanted: main keepsChain::whole_code(dispatch_chain.rs~176, ~303) forwhole_ready(bind.rs~3859).Chain::wholethe new translation (whole_source.code(), ~245) runs beforeget_or_build, outside its lock and before its out-of-memory retry check. With the default (XCL_CS_PSO_WAIT_MSunset, sowhole(true)runs on the title's thread), every ExecuteIndirect withinWHOLE_RETRYafter an out-of-memory error translates again (a copy, a disk read, or DXC when both caches miss) and then returns out-of-memory, exactly under the memory pressure this targets; concurrent callers also translate twice. Moving the translation into theget_or_buildclosure would fix both.WholeBuild, soqueue_wholetreats it as temporary and translates again on every later ExecuteIndirect.pipeline_library/warm_library) also failed on main that day.Fine: the memory-window form is captured at the first translation (tested), the console bytes are copied out of title memory, driver-cache names don't change when the new translation is identical (tested), and the GPU tests use
skip_test.AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
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.