d3d12x: cap cumulative PSO bind waits per PresentX frame #2104
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2114"
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 rdj415 on 2026-11-25T04:55:47Z.
Split
a4cb014c(XCL_HLSL_CS) out into #3060 (shaders-hlsl-cs-override) per the D95 triage review, leaving this PR cleanly merged withupstream/main(6089122a) and scoped strictly to per-frame PSO bind wait caps, graphics/mesh/compute lane isolation, andXCL_SKIP_DXIL.World capture
What is in it
crates/xcl/src/hle/d3d12x/present.rs: increment and exposeframe_generation()onPresentX.crates/xcl/src/hle/d3d12x/pso_async.rs: cumulative per-frameFrameBudget+timed_waiters/unbounded_wantedinDemand, isolatedgfx_queue/ms_queue/queuelanes preservingNEEDED(need_by_submit),drop_unstarted_job, andp.stand(pso)on exhausted frame budget, plus unit tests (removing a duplicateWORKER_SATURATION_LOCKlock ina_released_queued_pipeline_is_not_built_by_normal_workers).crates/xcl/src/hle/d3d12x/real.rs:XCL_SKIP_DXILcompute hash filtering beforewarmdispatch_chainlookup,OwnedDesc::has_mesh(), and lane-routedsubmit_lane/submit_lazy_lane.Tested
cargo xwin build --release --workspace+cargo xwin test --no-run --workspace,rustc 1.100.0 (0ef1bc386 2026-11-09)) ona9b17bf0: clean build, 0 errors.a9b17bf0(Linux Proton / NVIDIA RTX 5060 Ti620.70.06):pso_async(22 passed, 0 failed),hle::d3d12x::present(13 passed, 0 failed),shader_cache_tests(23 passed, 0 failed),owned_desc_mesh_tests(1 passed, 0 failed),big_compile_tests(11 passed, 0 failed),python3 scripts/test_pr_check.py(13 passed, 0 failed).a9b17bf01ffe3f1ae1ce55c0877cf1c2e1d5e003,cargo 1.98.0-nightly):.\scripts\test.ps1 -- --skip test_title_runs_and_game_folder_is_untouched --skip fuzz_validate_and_gpu-> 1470 passed, 0 failed, 47 ignored, 5 filtered out (27 GPU tests skipped on this adapter: 23no wave64, 3#1426f16/f32 semantics, 1Windows Developer Modedriver cache check).Regression run
Both runs executed with
XCL_NETWORK=0andXCL_PREPARE=0.main:
PR:
Not tested
fuzz_validate_and_gpu_0..3andtest_title_runs_and_game_folder_is_untouched(skipped intest.ps1).no wave64,#1426f16/f32 semantics, andWindows Developer Modedriver cache check).AI use
upstream/mainmerge conflicts inpso_async.rsandreal.rs, splitXCL_HLSL_CSout toshaders-hlsl-cs-override, mergedupstream/main(6089122a), and ran Linux Proton targeted checks plus native Windows 11test.ps1andsmoke.ps1ona9b17bf01ffe3f1ae1ce55c0877cf1c2e1d5e003.Imported from ivall/xcl. Originally posted by milesah3ad on 2026-11-25T05:14:40Z.
Test report and three review notes for
8044bed. The split came out well: 249 lines in two files, and the tests reset per frame as described.Tested
cargo test -p xcl --lib pso_async: 9 passed, 0 failed.cargo test --workspace --no-fail-fast -- --test-threads=4: 1,093 passed, 4 failed, 46 ignored. The 4 aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3(0x8007000E), the same as onmainhere, so not this PR. SKIPPED: the wave64-only tests.frame_budget) 20 times in a row with 14 busy threads loading the 16-thread CPU: 20 / 20 passed. The< 20 msand< 250 msbounds held under load.Review notes
main, withXCL_PSO_WAIT_MSunset, a bind waits until its pipeline is built. The module's own doc says why for compute: "a skipped dispatch would corrupt what it computes". With this PR, while a title runs, the unset default becomes 250 ms per pipeline and 2,000 ms per frame. So compute dispatches are skipped during compile bursts by default (your run: 46,227 skipped). That is what gets the title past its watchdog, and it is also a candidate for wrong output in those frames (cf. the flat grey intro shots on #505). Worth stating plainly in the description and README. It may also be worth asking @ivall whether the first step should be opt-in, as heap windows were.FRAME_BUDGETisthread_local!and theWaitCapsdoc says "per thread within onePresentXframe", but the description and thewait_capsdoc say "cumulative per frame". With several recording threads, the waits of one frame can add up to N × 2,000 ms if they happen one after another (they overlap when the threads wait at the same time). Either the docs could say per thread, or a process-wide atomic keyed onframe_generationwould make it per frame.resolve_caps:XCL_PSO_WAIT_MS=0("wait until built") together withXCL_PSO_FRAME_WAIT_MS=Ngivesper_pso = per_frame = N, so the 0 no longer means "until built". That may be intended (the frame cap wins), but the doc ofwait_capsdoesn't say so.Not tested: any title (no smoke pair here), AMD / Intel, release builds.
AI use: Claude Code (Claude Opus 5.5) ran the tests on the machine above, read the diff and wrote this. I checked the results.
Imported from ivall/xcl. Originally posted by throny on 2026-11-25T05:22:50Z.
Test of
8044bedmerged ontomain6020a33, on the retail title,XCL_DIRECT_DXIL=1, otherwise defaults. Caches were warm: every compute pipeline had been precompiled and the graphics pipelines built in earlier runs. No input after the menus.For comparison,
main177cd40with the same warm caches ends in a device removal (0x887a0005) at 92 – 100 s, in 4 of 4 runs (#1452). With this PR none of the three runs removed the device, and the longest kept presenting to 134 s. Whether it gets past the watchdog, as in your 694 s run, I can't tell here: this machine gives the process about 34 GB before my guard stops it, and the title passes that at 137 s.Tested: RTX 4080 16 GB (driver 610.88), i9-12900K, 64 GB RAM (commit limit 68 GB), Windows 11 26300, release.
Not tested: the suite on this head, runs past 137 s, AMD.
AI use: Claude Code (Claude Opus 5.5): ran the tests and wrote this.
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-25T05:42:26Z.
NVIDIA and AMD full-suite run, to go with the RTX 5080 and RTX 4080 reports above, since neither covers AMD. Tested exact head
8044bed(on its basebf9eebd).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1086 passed, 0 failed, 44 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.wait_caps_respect_env_and_title_boot_state,frame_budget_caps_cumulative_wait_and_resets_on_new_frame,a_frame_budget_caps_a_burst_of_slow_pipelines_and_resets_next_frame.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1096 passed, 0 failed, 46 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on main6020a33too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T06:02:49Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-25T06:12:15Z.
A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with
main(1411 here; 1368 and 1370 on the twomainruns). Noa pipeline still being built after … msline appears in the log, so the cap is not seen to act in this run; this is a regression run only.Tested
x86_64-pc-windows-gnu.378a077as it is (based on6020a33) andmain6e1e2be, no uncommitted changes. Retail title 1.0.2.1,scripts/linux/smoke.sh(#257) for 60 s, no input. Runs in order: main, this PR (with other PRs in between), main.Regression run
main (first run):
this PR:
The second
mainrun: 1370 frames,exit: 0x0, no device removal, no crash. Under Wine,peak commitreads 0 MB, so these blocks do not check memory.Not tested
XCL_PSO_WAIT_MSor similar), native Windows.AI use
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-25T07:13:23Z.
Independent Windows verification at 378a077. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, debug.
Tested
Clean head:
cargo build --offline --locked --workspace -j 3passed.cargo test --offline --locked --workspace --no-fail-fast -j 3 -- --nocapture --test-threads=4reported 1,158 passed, 0 failed, 46 ignored. Separately, 25 runtime skip notices (20 no native wave64, three unsupported per-lane forms, one driver cache disable probe, one no heap windows).Two additional synthetic cases in
cargo test --offline --locked -p xcl --lib pso_async -j 3 -- --nocapture --test-threads=1failed on the PR implementation (10 passed, 2 failed, 0 ignored, 0 runtime skips). Two pending binds started together in the same frame charged 501.7 ms in total against a 250 ms cap. In a separate test, frame 2 spent 40 ms of its 100 ms allowance. Recording a late completion from frame 1 gave frame 2 its full 100 ms back instead of leaving 60 ms.A local candidate reserved each capped wait while holding the budget mutex and settled it only against the frame that granted it. The same focused command then passed all 12 tests with 0 failures, ignores, or runtime skips. I have the patch if useful.
Follow-up on the local candidate applied to the same PR head: the workspace build and the full workspace test command above passed on the RTX 3080 Ti. The suite reported 1,160 passed, 0 failed, 46 ignored, and the same 25 runtime skip notices. Both added cases passed with four test threads.
Not tested
Retail load and frame pacing. The description check still asks for a smoke block from the current head.
AI use
Codex (GPT-6.2 Sol) wrote the synthetic cases and local candidate, ran the tests, and drafted this report.
Imported from ivall/xcl. Originally posted by iggyvilla on 2026-11-25T09:06:50Z.
Test report on
378a077merged as0640e29ontomain 568e7db, vsmain 568e7dbitself. RX 6650 XT 8 GB / Adrenalin 32.0.21045.29003 / Ryzen 7 5700X /32 GB (commit limit ~44 GB). Retail walk from a save (
-FromSave),PRELOAD=0,XCL_PSO_WAIT_MS=2000, local commit stop at 37.8 GB.Tested: main, 2 walks; #2114, 1 walk.
What was measured: main (both walks): 0 submits and 0 presents after 130 s,
13–17
a pipeline still being built after 2000 mswaits. #2114 (1 walk): 25per-frame pipeline wait budget (2000 ms) exhaustedwarnings, submits 16/28/6/35per 2 s at 132–140 s, 1 present at 140 s, 0 device removals, stopped by the
commit stop at ~143 s (world not reached). Note: with only one walk on the PR
this is a positive signal, not a verdict — the frame-budget mechanism fires and
submissions continue past main's 126 s halt, but the wall (commit stop) does not
move.
Review notes (each confirmed in the #2114 diff at
378a077; the rest of theXCL-130b review I did not re-verify and do not repeat):
PresentX(present.rs:145frame_generation()readsBOUNDARIES), and budget-exhausted binds returnthe stand-in without
late(pso_async.rs:901-912,if !truncated_by_frameat
:924). Once the title stops presenting, one 2 s window is spent and everylater compute bind in that frame skips silently — matching this walk (budget
exhausted 25×, presents 0 after the single 140 s frame).
record(frame, …)at:919settles against the wait-start frame, andrecordat:834-840zeroes
spenton a frame mismatch, so a wait ending in a later frame erasesthe new frame's spend;
remaining()at:900releases the mutex before thewait, so concurrent binds each get a full window. Both already reported
upstream at this head (thehollowedone, with reproductions); direction is
cap-loosening only.
XCL_PSO_FRAME_WAIT_MS=0withXCL_PSO_WAIT_MSunset (B3):resolve_caps(None, _) => None(:772-775) gives unbounded waits, contradicting the docat
:793-794("disables the per-frame cap while keepingXCL_PSO_WAIT_MS").Do not use this combination as a frame-cap-off control arm.
released (bounded by the wait budget, not correctness); the PR body says "3
deterministic unit tests" but the diff adds four;
resolve_caps(Some(p), None, …)raises the frame cap tomax(2000, p), so the knobs are notindependent.
Not tested: suite run on this tree; repeat walks (variance); NVIDIA/other
GPUs;
PRELOAD=1; world reached.AI use: Measured by an omp agent running DeepSeek v4.1 Flash; review
findings first drafted by DeepSeek v4.1 Flash and confirmed in the diff by Muse
Spark 1.3, which wrote this text; checked (including three of the cited lines at
378a077) and posted by Claude Code (Claude Opus5.5) on my behalf; I did not run the tests or write the text.
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T10:47:32Z.
Code review on
5cb6779:Demand::unbounded_wanted+TimedWantGuard(want_timed) cleanly restoreTHREAD_PRIORITY_LOWESTwhen bounded frame waits time out without letting them clear an active unboundedwant()wait.Remaining before merge: Fix
PR description,Build and testgreen, and dual-vendor verification on5cb6779.Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T11:21:43Z.
Regression run of
5cb67796on the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon568e7db7, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 104 % of
main's frames, 100 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; a script posted this right after the run, with both blocks exactly as printed.Imported from ivall/xcl. Originally posted by iggyvilla on 2026-11-25T12:56:35Z.
Follow-up to my test report above: the control arm, same box, same protocol (
378a077merged ontomain 568e7db,-FromSavewalk,PRELOAD=0,XCL_PSO_WAIT_MS=2000, commit stop at 37.8 GB), one walk withXCL_PSO_FRAME_WAIT_MS=0.FRAME_WAIT_MS=0With the per-frame cap off, the PR head behaves like main: submits stop at ~126 s and nothing is presented. So the extra submissions and the one present come from the per-frame cap, not from the build or cache warmth. The cost is the frozen-frame issue from my notes: 24 of the 25 exhaustion warnings are in frame 1907 and 1 is in frame 1909, the title presented 1910 frames in all, and the final "(4097 so far)" is the skip count of the frame it never left. All three walks still end at the commit stop (~141–143 s), so the world is not reached.
These walks are on
378a077.5cb6779(reservation across threads, cross-frame settlement,FRAME_WAIT_MS=0keeping the per-pipeline cap) does not change this part: the budget still resets only whenPresentXadvances the frame, so I expect the same skips once the title stops presenting. I have not re-run on5cb6779.AI use: the walks and log tables were run by an agent on DeepSeek V4.1 Flash (open-weight, measurement only). I checked the counts above against the three
xcl.logfiles with Claude Opus 5.5 (Anthropic), and it wrote this comment.Imported from ivall/xcl. Originally posted by rdj415 on 2026-11-25T14:43:37Z.
@iggyvilla @thehollowedone @raylitebull Thank you for the reviews and reproduction cases!
Merged
upstream/main(06c9f55) intod3d12x-pso-per-frame-wait-capate03690d(keeping#2176spared/image_only,#2178orphan drain,#1782pc_call, and#1988PresentRing), and fixed a 4-vCPU CI test deadlock we hit on5cb6779:FrameBudget::reserveonly advancesself.frameforward (frame > self.frame; stale frames< self.framereturn(ZERO, true)) andFrameBudget::settleonly reconciles whenself.frame == frame, so late wakeups from an earlier frame never roll back or wipe a newer frame's spent/reserved budget.FrameBudgettracksreserved: Durationunder the mutex beforecv.wait_timeout_whilewith RAIIFrameWaitGuard::dropcallingsettle(), so simultaneous binds on multiple threads split the shared frame cap without oversubscribing it.e03690d): updatedwait_caps()/resolve_within_in_frame()docs and tests (XCL_PSO_FRAME_WAIT_MS=0keepsXCL_PSO_WAIT_MSor 250 ms while booted), resolvedpso_async.rscleanly against06c9f55, and fixeda_frame_budget_caps_a_burst_of_slow_pipelines_and_resets_next_framesoreadybuilds beforep1..p4(submit_lazy+ 30 s safety timeout) — previously, submitting 4 blocking jobs beforereadysaturated all 3 workers on a 4-vCPU CI runner (compile_threads() == 3), timing outp1at 5 s beforeresolve_within_in_frameran.Re-verified on
e03690d:cargo test -p xcl --lib pso_async -- --nocapture: 15/15 passed (also 15/15 withXCL_DXC_THREADS=3 --test-threads=4and--test-threads=1)../scripts/test.ps1 --skip test_title_runs_and_game_folder_is_untouched --skip fuzz_validate_and_gpu:xcl --lib1197 passed, 0 failed, 26 ignored + all workspace test binaries passed.XCL_ADAPTER=warp cargo test -p xcl --lib -- --test-threads=4: 1201 passed, 0 failed, 26 ignored.scripts/smoke.ps1(06c9f55->e03690d):1418 -> 1492frames,0device removals,0crashes,10622 -> 10378 MBpeak commit.Imported from ivall/xcl. Originally posted by Gevroska on 2026-11-25T16:03:11Z.
I found a case on
e03690d5where a pending compute pipeline gets no wait time even though the cumulative frame cap is disabled and the per-pipeline cap is 250 ms.I reproduced it in a standalone CPU test using the PR’s
FrameBudget::reserveimplementation. Caller A samples frame generation 1. Before A acquires the budget mutex, caller B advances the budget to generation 2. When A callsreservewith its earlier sample, it gets(0 ns, true). With the cumulative cap disabled, I expected(250 ms, false). In the caller, that zero grant returns the stand-in before entering the wait.Three control cases passed. The stale-sample case was the only failure. In a separate fixture, returning the per-pipeline allowance before checking the generation when
per_frameisNonemade all four pass, including stale-generation rejection when the cumulative cap is enabled. I’d add this combination to the regression tests. I haven’t measured how often it occurs in a title run.I used Codex GPT-6.2 Sol for the fixture and a separate GPT-6.2 Sol agent for independent verification.
I reviewed and approved this comment before posting.
Imported from ivall/xcl. Originally posted by rdj415 on 2026-11-25T16:34:12Z.
@Gevroska @raylitebull Fixed the stale-sample case on
21c88bc:FrameBudget::reservenow returns(caps.per_pso, false)immediately whenper_frameisNonebefore checkingself.frame, so a stale frame generation sample no longer zeros out the per-pipeline wait when the cumulative per-frame cap is disabled, while stale-generation rejection is preserved whenper_frameisSome(_).Added regression unit test
frame_budget_stale_frame_sample_keeps_full_wait_when_per_frame_disabledand re-verified:cargo test -p xcl --lib pso_async -- --nocapture: 16 passed, 0 failedXCL_ADAPTER=warp cargo test -p xcl --lib -- --test-threads=4: 1202 passed, 0 failed, 26 ignoredscripts/smoke.ps1(21c88bcvs06c9f55,3c290c16): 1455 frames vs 1418,exit: 0x0, 0 device removals, 0 crashes, 10351 MB peak commit vs 10622 MB;pr_checkPROBLEMS: [].Imported from ivall/xcl. Originally posted by milesah3ad on 2026-11-25T18:26:02Z.
Re-check of
21c88bcon the RTX 5080 after the review fixes. The code holds up. The branch now conflicts withmainagain.Tested (RTX 5080 16 GB, driver 621.24; Ryzen 7 9800X3D; Windows 11 Pro 26300; rustc 1.100.0; DXC 1.9.2609.5; debug)
cargo test -p xcl --lib pso_async: 16 passed, 0 failed (including the new stale-sample and reservation cases).cargo test --workspace --no-fail-fast -- --test-threads=4: 1,267 passed, 4 failed, 46 ignored. The 4 aregpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0..3, the same as onmainhere.Conflict: against
main397ea96,git merge-treereports a content conflict incrates/xcl/src/hle/d3d12x/pso_async.rsonly (present.rsauto-merges). Since this branch's merge base,pso_async.rsonmainwas changed by #2296 (5b97e22"clamp PcCalls across frame boundaries and drop orphaned PSO jobs immediately") and625a0f3("stand-ins of pipelines not built yet share the driver's pipelines"). The first touches the same frame-boundary bookkeeping asFrameBudget.Not tested: a title run of
21c88bc, AMD.AI use: Claude Code (Claude Opus 5.5) ran the tests on the machine above and wrote this. I checked the results.
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T21:49:37Z.
Review: COMMENTED
P1 release blocker: new default 250ms/2000ms caps return unfinished stand-ins for arbitrary compute when budget exhausted; console decoder then skips the dispatch. This makes data-producing/culling/ExecuteIndirect-producer omission default-on, while image_only safety classification is only opt-in. Existing code/tests document skipped producer -> UAV barrier -> ExecuteIndirect can hang GPU. Retain unbounded default or restrict bypass to proven dependency-safe image-only work; add skipped-producer/consumer integration regression.
Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-25T22:29:40Z.
One thing to watch when this is rebased onto current main (
e1d84b7d): the budget-exhausted return hands the title's stand-in to the driver.Since
625a0f36a lazy pipeline's stand-in is usually astandin::shell, which is never a driver object, and main'sresolve_withinreturnsp.stand(pso)everywhere. In agit merge-treeof this head with main,resolve_withinmerges without a conflict marker and takes main'sp.stand(pso)for thebuiltandlatereturns, but the new early return atpso_async.rs:1285staysreturn pso;.Reset(alloc, pso)orClearStatewith a compute pipeline still being built.resolve_for_bindgets a zero grant and returns the shell.list_x::reset_pcpasses the shell to the PCResetas anID3D12PipelineState.The new tests use
submitwithoutshared, wherestand(pso) == pso, so they pass either way.Suggested change:
return p.stand(pso);there, and a test with asharedstand-in and an exhausted budget.Read-only review of head
21c88bc2against maine1d84b7d. I did not build or run it, and I have not seen what a shell does in a realReset.Read and written with Claude Code (Claude Fable 5.2 and Claude Opus 5.5).
Imported from ivall/xcl. Originally posted by throny on 2026-11-26T00:48:21Z.
Two contributors checked independently and found that #1652 #1931 solves the same problem (for #505) in a different way: #1607, group D95. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.
This is a hint from the community triage in #1607, not a maintainer decision.
AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Imported from ivall/xcl. Originally posted by rdj415 on 2026-11-26T01:21:30Z.
Quick update for @bmjask and @milesah3ad (thanks for the re-test and the rebase catch).
Still actively working on getting the first in-world 3D frame before pushing the review fixes here. Locally, the compile-pool and pre-caching work already got past the loading screen to rendered intro credits and cleared the 100s+ compile stalls and commit OOMs; currently running the next world capture to verify 3D rendering.
Once this capture finishes, I'll rebase #2114 onto
e1d84b7, switch the early budget-exhausted return top.stand(pso), restrict the stand-in bypass toimage_onlycompute by default, and add the skipped-producer/consumer regression tests.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T07:28:56Z.
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current
mainon the new head — needs another rebase before it can be tested.Imported from ivall/xcl. Originally posted by rdj415 on 2026-11-27T10:32:42Z.
Updated the branch (
a4cb014c) on top ofupstream/main(83b00818) — merge conflicts inpso_async.rsandreal.rsare resolved, and the PR description above has been updated with freshxcl-smoke v1numbers.Ping for anyone waiting on the conflict resolution to re-test (
@DavidM1911,@milesah3ad,@throny,@iggyvilla,@futurepro62,@Toons29):83b00818(by_submit/drop_unstarted_job/warmdispatch-chain preserved),@tiagonleal's catch (return p.stand(pso);on exhausted frame budget inresolve_within_in_frame), and added opt-inXCL_HLSL_CS=<hash,...>(pso.rs, off by default) alongsideXCL_SKIP_DXIL=<hash,...>(real.rs, off by default).@bmjask,@tiagonleal,@raylitebull): the P1 request to restrict default-on dispatch skipping toimage_onlycompute (or keep default unbounded/opt-in) plus the shared-standin exhausted-budget and skipped-producer/consumer regression tests are not implemented yet — planning to address those next.Imported from ivall/xcl. Originally posted by rdj415 on 2026-11-27T18:35:28Z.
Split
a4cb014c(XCL_HLSL_CSincrates/xcl/src/gpu/recomp/pso.rs) out into #3060 (shaders-hlsl-cs-override) per the D95 triage review.d3d12x-pso-per-frame-wait-capis now cleanly merged withupstream/main(6089122a) ata9b17bf0and scoped strictly to the per-PresentX-frame PSO bind wait cap, graphics/mesh/compute lane isolation, andXCL_SKIP_DXIL(present.rs,pso_async.rs,real.rs). The PR description has been updated with the verified build and targeted unit test results ona9b17bf0(native Windowsscripts/smoke.ps1and fullscripts/test.ps1will follow when back on Windows).Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:24:31Z.
Triage (#1607) – head
a9b17bf#1931 and #1652 also add a per-PresentX budget for PSO bind waits, but differently. #1931 is an opt-in atomic budget (
XCL_PSO_FRAME_WAIT_MS). #1652 bundles one into a 2.9k-line watchdog / command-list PR.This PR changes the default, which its description does not say: in
pso_async.rs:resolve_caps, withXCL_PSO_WAIT_MSandXCL_PSO_FRAME_WAIT_MSboth unset, a booted title now gets a 250 ms per-pipeline and 2 s per-frame cap, so slow pipelines bind the stand-in and their draws and dispatches are skipped. On main the default still waits until the pipeline is built.It also carries two unrelated changes:
XCL_SKIP_DXILin real.rs, and separate mesh/graphics worker lanes. It conflicts with main's reworked budget code (budget_for).Recommendation: keep open.
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.