Skip to content

D3D12.X: skip queued builds of released pipelines - #978

Closed
nova-aryan wants to merge 1 commit into
xcl-dev:mainfrom
nova-aryan:contrib/pso-cancel-released-builds
Closed

nova-aryan wants to merge 1 commit into
xcl-dev:mainfrom
nova-aryan:contrib/pso-cancel-released-builds

Conversation

@nova-aryan

Copy link
Copy Markdown
Contributor

Normal PSO workers still compiled a queued pipeline after its stand-in was released. released() sets Pending::orphan, but only the preload worker checked it. Obsolete jobs can consume DXC/driver time while active jobs wait. Fixes #972.

What is in it

  • Check orphan before taking a job on the regular worker queue, matching preload.
  • Add a deterministic regression that gates all regular workers, queues and releases a stand-in, then verifies its compiler closure is discarded.
  • Document the queued-build behavior in README.

Tested
All runs below happened before the user asked to stop local execution.

  • Intel Core Ultra 7 265K, NVIDIA RTX 5060 (driver 621.24), Windows 11 Pro build 26200. Rust 1.100.0, debug; Windows MSVC-target executables cross-built from WSL with cargo-xwin and Clang 21.1.8, executed natively on Windows. DXC 1.9.2609.5.
  • Before the fix on main 6bac4b4 plus the regression: 0 passed, 1 failed with "released job reached the compiler".
  • After the fix: native test executable filtered to pso_async, --test-threads=1 --nocapture: 3 passed, 0 failed, 0 ignored.
  • All 14 integration/test-title executables completed: 41 passed, 0 failed, 20 ignored. Synthetic test title only.
  • The first full library attempt had 677 passed, 2 failed, 21 ignored. Both failures were cross-build fixture paths; after correcting the local harness paths, both tests passed individually. A later full library run was stopped at the user's request before completion. It is not reported as a passing full suite.
  • git diff --check passed.

Regression run
Pending main/head retail title smoke runs.

Not tested
Retail title behavior, AMD/Intel GPUs, a completed full workspace test run, and a native MSVC compiler build. Full library GPU tests reported two no-wave64 skips. Cross-build fixture-path adjustments and the /FIstring.h workaround for libudis86 are confined to the local build setup.
This change is not established as a fix for the world-loading watchdog. No retail performance measurement is available. A release racing with a job that has already started can still complete through the existing orphan cleanup.
Local game/build/test execution has been stopped at the user's request. This PR remains a public draft for CI and independent validation.

AI use
Codex with GPT-6.1-sol investigated the issue, wrote the fix and regression, ran the checks above and drafted this description.

Regular PSO workers ignored the orphan flag already honored by preload workers. Avoid compiler and driver work for stand-ins released before their queued job starts. A gate-based Windows test reproduces the obsolete build before this check. Fixes xcl-dev#972.
@DavidM1911

Copy link
Copy Markdown
Contributor

Independent verification, merged onto current main 384f7f7 locally (clean merge).

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.

  • cargo test -p xcl --lib pso_async: 4 passed, 0 failed — includes the new released_queued_pipelines_are_not_built, which verifies a queued build is skipped once the title releases the pipeline.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

@thehollowedone

Copy link
Copy Markdown
Contributor

Independent Windows check on da491ee. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, debug.

Tested. cargo test --offline --locked -p xcl --lib pso_async -- --test-threads=1 passed 3/3. In a scratch extension of the queue test, I released a stand-in while every compiler worker was occupied, then queued a replacement at the same synthetic address. The old job was discarded without running. The replacement ran, completed, and remained registered until explicitly released. The same-address case passed 3/3 isolated runs with the same command and the filter scratch_reused_stand_in_keeps_the_new_job_live.

Not tested. Native GPU pipeline creation, performance, or retail behavior. Both synthetic jobs returned zero.

AI-assisted. Codex (GPT-6, exact variant unavailable) wrote and ran the scratch test and drafted this report.

@Toons29

Toons29 commented Nov 25, 2026

Copy link
Copy Markdown

Regression run of da491ee5 on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: da491ee5a64c2e13f94ed37397de819841f28c6c
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1613 (PresentX 1613)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14812 MB

Against the limits in CONTRIBUTING.md: 100 % 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; I checked the blocks before posting.

@Prime1997

Copy link
Copy Markdown
Collaborator

Closing because main already has this behaviour, from b4d7482 ("D3D12.X: skip orphaned queued builds in normal PSO workers", Fixes #972). On main, the queue workers call build_queued(), which checks p.orphan and drops an unstarted job through drop_unstarted_job(). That is the same skip of released stand-ins that this PR adds. Only the one-line README note here is not on main.

Compared at head da491ee against main 08db802. Reviewed with Claude Code (Claude Opus 5.5); I checked the comparison before closing.

@Prime1997 Prime1997 closed this Nov 26, 2026
@DavidM1911

Copy link
Copy Markdown
Contributor

Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

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.

D3D12.X: normal PSO workers compile queued pipelines after release

6 participants