Skip to content

D3D12.X: keep inline split pipeline pieces on the foreground path - #2424

Draft
razormontana wants to merge 1 commit into
xcl-dev:mainfrom
razormontana:d3d12x/inline-split-build-demand
Draft

razormontana wants to merge 1 commit into
xcl-dev:mainfrom
razormontana:d3d12x/inline-split-build-demand

Conversation

@razormontana

Copy link
Copy Markdown
Contributor

Part of #1269. Part of #2088 (workstream 4).

A title can build a lazy split compute pipeline inline at its first bind. Its helper jobs inherit the pending pipeline from the build thread. The inline path left that context empty, so a cold piece could wait for background commit headroom while the title was blocked on the build.

What is in it

  • Set bind demand before starting the inline job and reuse the pipeline's scoped build context. Split helpers use the existing foreground slot limit.
  • Add an_inline_bind_makes_split_pipeline_pieces_wanted. With only the test added to main, both pieces saw [0, 0]. On the PR they see [1, 1].

Tested

  • Windows 11 Pro build 22631, Core i7-10700K, 32 GB RAM, GeForce RTX 3070 8 GB (driver 617.42), Rust 1.100.0 MSVC, DXC/DXIL 1.9.2602.17.
  • cargo test --offline --locked -p xcl --lib hle::d3d12x::pso_async -- --test-threads=1 --show-output (debug): 12 passed, 0 failed, 0 ignored, zero GPU skip markers.
  • cargo build --release --offline --locked --workspace and cargo test --release --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output: 1,290 passed, 1 failed, 46 ignored. The pass count includes 26 runtime SKIPPED markers (21 native wave64, 3 unsupported per-lane forms, 1 heap-window capability, 1 reserved cube with mip levels).
  • The sole failure, a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, found 3 barriers with 1 expected. The focused debug test gave the same result on clean main 68a284a and on the PR. Tests: the bridged mask write checks for no barrier past the first branch #2379 covers that assertion.

Regression run

Both release builds ran the same retail title for 60 seconds in the Series S profile, with the same scripted inputs and networking disabled.

Main

xcl-smoke v1
commit: 68a284a596bd558b6bd9db6eedda6d6aa178c360
gpu: NVIDIA GeForce RTX 3070
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 556 (PresentX 557)
presents per 2 s (last 3): 8 0 0
device removals: 0
crashes: 0
peak commit: 15111 MB

PR head

xcl-smoke v1
commit: 89bbbb4995b4dc33cb5ff96a680885d7ff208198
gpu: NVIDIA GeForce RTX 3070
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 841 (PresentX 842)
presents per 2 s (last 3): 0 15 26
device removals: 0
crashes: 0
peak commit: 14775 MB

Not tested

  • The retail runs covered startup and reported zero split programs. World entry and cold NVIDIA driver timings remain unmeasured. The scheduler test exercises the demand propagation.

AI use

  • Codex (GPT-6.2) investigated, wrote the code and test, ran the checks, and drafted this description.

A lazy compute bind builds its pipeline inline when no worker has taken
it. Split-pipeline helpers inherit the pending build from thread-local
state, which the inline path left empty. Those helpers could wait for
background commit headroom while the title was blocked on their results.

Mark the bind as waiting before running the build. Reuse the pending
build context so split helpers use the existing foreground limits.

Assisted-by: Codex (GPT-6.2)
@FIJI1299

Copy link
Copy Markdown

Tested commit 89bbbb4 on Windows:

Environment

  • OS: Windows 11 (Build 26100)
  • CPU: AMD Ryzen 5 9600X 6-Core Processor
  • RAM: 32 GB
  • GPU: NVIDIA GeForce RTX 5070 (12 GB VRAM, driver 621.40, wave32)
  • DXC: 1.8.2502.11 (Windows SDK 10.0.26100.0)

Results

  • hle::d3d12x test suite (cargo test -p xcl --lib hle::d3d12x): 229 passed, 0 failed, 2 ignored (including all hle::d3d12x::pso_async tests).

gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 25, 2026
…#2404, xcl-dev#2405

Integrates VRAM top-mip pressure shedding (xcl-dev#2385), DXC wanted-compile
prioritization & worker headroom (xcl-dev#2423), inline split pipeline foreground
path (xcl-dev#2424), ExecuteIndirect split program dispatch (xcl-dev#2404), and hosted
view heap exhaustion null-pair fallback (xcl-dev#2405).

Assisted-by: Antigravity (Gemini 4 Neon)
@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: 1 real failure, deterministic (also fails --test-threads=1, 1219/1):
gpu::recomp::lower_dxil::tests::a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier
  assertion failed: group barriers in the program (lower_dxil.rs:1155)

The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge.

— Devin

@throny throny added the goal:world-load Bears on the retail title getting past world loading label Nov 25, 2026
gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 25, 2026
…#2404, xcl-dev#2405

Integrates VRAM top-mip pressure shedding (xcl-dev#2385), DXC wanted-compile
prioritization & worker headroom (xcl-dev#2423), inline split pipeline foreground
path (xcl-dev#2424), ExecuteIndirect split program dispatch (xcl-dev#2404), and hosted
view heap exhaustion null-pair fallback (xcl-dev#2405).

Assisted-by: Antigravity (Gemini 4 Neon)
@thehollowedone

Copy link
Copy Markdown

Independent Windows check of #2424 head 89bbbb4 on an RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC and DXC 1.8.2502.11.

Exact head: cargo build --offline --locked --workspace passed. cargo test --offline --locked -p xcl --lib hle::d3d12x::pso_async -- --test-threads=1 --nocapture passed 12/0/0, including an_inline_bind_makes_split_pipeline_pieces_wanted. cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 reported 1,290 passed, 1 failed, 46 ignored, 25 SKIPPED notices. The sole failure was a_bridged_mask_write_where_one_half_is_elsewhere_meets_no_barrier, also identified in the PR discussion; it is outside this diff.

Current-main integration: On clean main b49be18, that barrier test passed 1/0/0. I merged the exact PR head into a separate worktree without committing or resolving any conflict. There, the pso_async tests passed 15/0/0, the barrier test passed 1/0/0, and the same full workspace suite passed 1,436/0/47 with 25 SKIPPED notices. Both worktrees used separate Cargo targets. This suggests rebasing onto current main will remove the stale-base suite failure; the head and its required smoke block would still need to be rerun after a push.

Not tested: a retail title, the cold split-pipeline wait path, AMD/Intel, or a paired smoke run on this machine. These tests verify scheduler state propagation and integration, not a measured world-load speedup. AI-assisted: Codex (GPT-6.2 Sol) read the diff, ran the tests, compared current main and drafted this report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

goal:world-load Bears on the retail title getting past world loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants