Skip to content

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

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

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

Conversation

@razormontana

@razormontana razormontana commented Nov 25, 2026 •

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, RTX 3070 8 GB (driver 617.42), Rust 1.100.0 MSVC.
  • All 15 hle::d3d12x::pso_async tests passed, including inline helper demand. The formerly failing DXIL barrier test passed with the merged Tests: check divergent block barriers in a_bridged_mask_write #2420 fix in the base.
  • Debug workspace build passed. On 6ada0232, cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output reported 1,443 passed, 0 failed and 47 ignored. The pass count includes 26 explicit GPU skip notices.
  • cargo build --offline --locked --release -p xcl succeeded.

Regression run

Both release builds ran the same retail title offline for 60 seconds on the RTX 3070. Both used the Series S profile, direct DXIL and copies of the same starting cache. This pair uses e120925, the preceding main commit. At 8b957be, smoke reached its startup deadline during #2555 shader preparation. The PR merges cleanly into 8b957be; the combined retail run remains unverified. The initial pair showed 703 frames on main and 391 on the PR. For this repeat, both started from copies of the cache left by the first main run, after builds completed.

Main

xcl-smoke v1
commit: e120925e3abc9956a8b9bae631969d32e8ccd43c
gpu: NVIDIA GeForce RTX 3070
title: 80ea98f7
seconds: 60
exit: 0x0
frames shown: 445 (PresentX 446)
presents per 2 s (last 3): 18 18 18
device removals: 0
crashes: 0
peak commit: 17596 MB

PR head

xcl-smoke v1
commit: 6ada0232306cf02b85fa4050e5d3345363a2f9e1
gpu: NVIDIA GeForce RTX 3070
title: 80ea98f7
seconds: 60
exit: 0x0
frames shown: 446 (PresentX 447)
presents per 2 s (last 3): 15 18 17
device removals: 0
crashes: 0
peak commit: 17594 MB

Not tested

The scheduler test covers demand propagation. The retail smoke checks startup and presents. Split program execution during world loading and cold NVIDIA driver timing remain unverified.

AI use

Codex GPT-6.2 wrote and reviewed the code and tests, rebased the branch, ran the checks, and updated this description.

@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
Contributor

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.

@Prime1997 Prime1997 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good within the targeted test scope; retain for integration. Propagates wanted status to split pipeline pieces when the bind itself builds the pipeline.

Reviewed PR head 89bbbb4995b4dc33cb5ff96a680885d7ff208198. Tested an isolated, uncommitted merge-tree integration with latest main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7, tree f267768bff4c15d608c2d9b14c5781c8fa8081d9; this is not a clean PR-head run. Integration source overlay SHA-256: 90208c5a585976d0bb542122972a8d875eae7f308bf1b46e683da4ae39d7771a.

Measured: 1 passed, 0 failed, 0 ignored, 0 skipped. Exact selected filters, each run in a fresh process:

  • hle::d3d12x::pso_async::used_tests::an_inline_bind_makes_split_pipeline_pieces_wanted

Build: cargo test --locked --offline -p xcl --lib --no-run --message-format=json --target-dir <isolated-target>. Run each: <test-exe> <exact-filter> --exact --test-threads=1 --nocapture. Private target/executable paths are placeholders. Windows 11 Pro 26200, i5-10400, 32 GiB, Rust 1.100.0 MSVC debug; private temporary/cache paths, two low-priority build jobs, 90-second per-test bound.

Scope: One finite fake-job CPU fixture covers wanted-status propagation. It does not invoke DXC or a driver, or measure foreground latency. No full suite, retail run, sustained memory pressure or performance benefit is established. Passing these fixtures is not merge certification.

AI use: Codex (GPT-6) inspected the changes and fixtures, ran the checks and verified raw receipts. Optional temporary Discord for coordinating contributor work, testing and comparing results.

@Prime1997 Prime1997 mentioned this pull request Nov 26, 2026
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)
@razormontana
razormontana force-pushed the d3d12x/inline-split-build-demand branch from 89bbbb4 to 6ada023 Compare November 26, 2026 17:42
@razormontana
razormontana marked this pull request as ready for review November 26, 2026 19:52
@thehollowedone

Copy link
Copy Markdown
Contributor

Independent Windows/NVIDIA recheck of #2424 head 6ada0232 on an RTX 3080 Ti (driver 621.35), Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC.

  • cargo test --offline --locked -p xcl --lib hle::d3d12x::pso_async -- --test-threads=4: 15 passed, 0 failed, 0 ignored, including the new inline-bind test.
  • cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4: 1,442 passed, 1 failed, 47 ignored across 38 test targets, with 25 GPU SKIPPED notices. Both existing split-compute integration tests passed. The sole failure was console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk: cached_only console_mesh hit: "DXIL not compiled yet".
  • I reran that failure alone on the PR head (0 passed, 1 failed) and on its parent e120925 (0 passed, 1 failed), with the same error. This failure predates the PR on this machine; it does not establish a D3D12.X: keep inline split pipeline pieces on the foreground path #2424 regression.

Not tested: cold NVIDIA driver-gate timing, split-chain output on a first bind, a retail title, paired smoke, AMD or Intel. The passing tests establish scheduler state propagation and existing split-compute behavior, not a measured world-load improvement or merge readiness.

AI use: Codex (GPT-6.2 Sol) reviewed the exact diff, ran and checked these tests, and drafted this report.

@thehollowedone

Copy link
Copy Markdown
Contributor

Correction to my earlier #2424 report on the unchanged head 6ada0232: the mesh-cache failure was specific to the default DXIL cache location in this sandbox. console_mesh caches its compute pass in memory, but its pass-through mesh compile needs the DXC disk entry for a cached_only repeat; the default cache path is outside this worktree's writable area. The isolated mesh test passed 1/0/0 with XCL_DXIL_CACHE set to writable scratch.

I then reran the full suite with XCL_DXIL_CACHE set to a new writable directory under target:

cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4: 1,443 passed, 0 failed, 47 ignored across 38 targets; 25 GPU SKIPPED notices. RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC. This supersedes the earlier 1-failure count; no #2424 regression was found by this suite.

Still not tested: cold driver-gate timing, first-bind split-chain output, retail or paired smoke, AMD/Intel. AI use: Codex (GPT-6.2 Sol) traced the cache path, ran and checked the tests, and drafted this correction.

@Decodere

Copy link
Copy Markdown
Contributor

Independent desktop NVIDIA verification of PR #2424 at head 6ada0232306cf02b85fa4050e5d3345363a2f9e1 (1 commit; exact parent & merge-base: e120925e3abc9956a8b9bae631969d32e8ccd43c, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (6ada0232)

Command Result
cargo test --release -p xcl --lib an_inline_bind_makes_split_pipeline_pieces_wanted -- --nocapture 1 passed; 0 failed; 0 ignored; 1342 filtered out (0.00s)
cargo test --release -p xcl --lib hle::d3d12x::pso_async:: (3 consecutive runs) 15 passed; 0 failed; 0 ignored; 1328 filtered out × 3 (0.76s, 0.61s, 1.01s)
cargo test --release -p xcl --lib hle::d3d12x::real:: 63 passed; 0 failed; 0 ignored; 1280 filtered out (0.38s)
cargo test --release -p xcl --test gpu_compute_e2e split -- --test-threads=1 --nocapture 2 passed; 0 failed; 0 ignored; 5 filtered out (2.40s: offline_split_compute_pipeline_is_reused_by_a_second_process, split_compute_prefers_the_offline_whole_pipeline)
cargo build --release -p xcl --bin xcl Clean build (1m 14s lib build + 0.07s bin, exit 0)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (e120925e3abc9956a8b9bae631969d32e8ccd43c, cached baseline on the same machine):

xcl-smoke v1
commit: e120925e3abc9956a8b9bae631969d32e8ccd43c
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1602 (PresentX 1602)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13979 MB

PR #2424 (6ada0232306cf02b85fa4050e5d3345363a2f9e1):

xcl-smoke v1
commit: 6ada0232306cf02b85fa4050e5d3345363a2f9e1
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1605 (PresentX 1605)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14010 MB

Runtime log observations (xcl.log)

  • 9221 log lines, 0 [ERROR] / device-removal / panic lines.
  • Split compute telemetry during warm-cache smoke: compute split: 0 programs split, 0 pieces built, 0 chained dispatches issued in 0 slabs; scratch 0 MiB.
  • Final draw/memory telemetry in log: 19543 draws with translated pipelines (0 skipped, 0 with PC pipelines), 1024 dispatches (0 skipped); last memory sample 14010 MB committed by the process; video memory 6116 MB local, 4683 MB non-local.

Limits of coverage

  • The 60 s retail smoke ran with the existing warm shader cache and recorded 0 programs split, 0 pieces built, so it confirms clean runtime stability and zero regression on title: 29640639 rather than measuring a cold-cache world-load timing change under split-pipeline contention.
  • Inline foreground wanted propagation to split-pipeline helpers and split-compute E2E reuse were verified via an_inline_bind_makes_split_pipeline_pieces_wanted, 3× pso_async:: (15/0/0), real:: (63/0/0), and the 2 gpu_compute_e2e split tests (2/0/0).

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

@futurepro62

Copy link
Copy Markdown

NVIDIA and AMD full-suite run, to go with the reports above by Decodere, thehollowedone, since none of them covers AMD. Tested exact head 6ada0232 (on its base e120925).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --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: 1431 passed, 0 failed, 45 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, dispatch_chain_native_wave64_builds_whole, 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.
  • The new tests ran and passed: an_inline_bind_makes_split_pipeline_pieces_wanted.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1442 passed, 0 failed, 47 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #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 gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #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 gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #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 gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #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 gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main c2ee10e4 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (Tests: heap_window_out_of_memory_falls_back_to_the_switch_form fails under XCL_REQUIRE_GPU=mesh (opt-in skip counted as missing coverage) #1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.

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.

8 participants