Repository navigation
Conversation
When a title binds many uncompiled compute pipelines in a single frame (e.g. during world load), a per-pipeline wait budget (XCL_PSO_WAIT_MS) still multiplies across every pending pipeline in that frame. Add an opt-in XCL_PSO_FRAME_WAIT_MS=<ms> setting (off by default) that caps the total time spent waiting on pending pipelines across a frame and refills on PresentX. Pipelines skipped because the frame budget was exhausted are not marked permanently late so they can still wait on subsequent frames if needed.
…xcl-dev#1931) When a title binds many uncompiled compute pipelines in a single frame (e.g. during world load), a per-pipeline wait budget (XCL_PSO_WAIT_MS) still multiplies across every pending pipeline in that frame. Add an opt-in XCL_PSO_FRAME_WAIT_MS=<ms> setting (off by default) that caps the total time spent waiting on pending pipelines across a frame and refills on PresentX. Pipelines skipped because the frame budget was exhausted are not marked permanently late so they can still wait on subsequent frames if needed.
|
Code review on \e870dd2:\n\n- \XCL_PSO_FRAME_WAIT_MS\ in \pso_async.rs\ and \present.rs\ cleanly shares a microsecond per-frame budget across |
|
Test report: #1931 on the retail title's world load I tested head Setup
Results
Findings
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Native Windows comparison of the runtime hunks from
The enabled run had only a few later presents. The last sampled image remained loading artwork, and I did not verify any rendered gameplay. The final queue timeouts included a producer whose fence had been submitted but was still one value short of the requested completion. This directly shows the PSO wait signal dropping and queue timeouts appearing in this pair, without establishing that the timeouts caused the crash.
|
|
Test report for Builds: local merges, never pushed. This PR conflicts with
Tested
Not tested
AI use: Claude Code. A Claude Sonnet 5.5 session made the local merges, ran the title runs and collected the counts; Claude Opus 5.5 wrote this report. |
Adds an opt-in shared per-frame wait budget (
XCL_PSO_FRAME_WAIT_MS=<ms>, off by default) forpso_async::resolve_wait. When a title binds dozens of uncompiled compute pipelines in a single frame, a per-pipeline timeout (XCL_PSO_WAIT_MS) multiplies across each pending pipeline and can stall a frame for seconds; sharing one budget across the frame caps total stall time and refills onPresentX.What is in it
crates/xcl/src/hle/d3d12x/pso_async.rs: parseXCL_PSO_FRAME_WAIT_MS, track remaining microsecond wait budget for the current frame, cap eachresolve_waitbymin(XCL_PSO_WAIT_MS, frame_remaining), deduct elapsed wait time, and exposebegin_frame()to refill the budget. Pipelines skipped solely because the frame budget ran out are not marked permanentlylate, so they can still be waited for on the next frame if not finished by a worker yet.crates/xcl/src/hle/d3d12x/present.rs: callsuper::pso_async::begin_frame()inpresent_x_frame.README.md: documentXCL_PSO_FRAME_WAIT_MS.shared_frame_budget_caps_multiple_slow_pipelines_and_refills_on_next_frameverifying that a second pending pipeline returns immediately once the shared frame budget is spent and resolves after refill.Tested
rustc 1.98.1, debug test build cross-compiled tox86_64-pc-windows-msvccargo test --target x86_64-pc-windows-msvc -p xcl --lib -- pso_async::: 7 passed, 0 failed, 0 ignoredRegression run
main:
PR:
Not tested
cargo test --workspace -- --test-threads=4scripts/smoke.ps1regression run on main and this PR (required before leaving draft)AI use
pso_async::unit tests under Wine, and drafted this PR description.