D3D12.X: skip queued builds of released pipelines #972

Closed
nova-aryan wants to merge 1 commit from upstream-pr/978 into main
nova-aryan commented 2026-11-24 09:49:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nova-aryan on 2026-11-24T09:49:58Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:6579070326 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/978). Originally posted by [nova-aryan](https://github.com/nova-aryan) on 2026-11-24T09:49:58Z. --- 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.
DavidM1911 commented 2026-11-24 13:03:34 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T12:21:16Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7131320766 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/978#issuecomment-7131320766). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T12:21:16Z. --- 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 commented 2026-11-24 13:03:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-24T12:28:41Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7131494792 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/978#issuecomment-7131494792). Originally posted by [thehollowedone](https://github.com/thehollowedone) on 2026-11-24T12:28:41Z. --- Independent Windows check on [`da491ee`](https://github.com/ivall/xcl/commit/da491ee5a64c2e13f94ed37397de819841f28c6c). 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 commented 2026-11-25 04:10:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Toons29 on 2026-11-25T03:09:30Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7151646055 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/978#issuecomment-7151646055). Originally posted by [Toons29](https://github.com/Toons29) on 2026-11-25T03:09:30Z. --- 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.
upstream-sync closed this pull request 2026-11-26 01:04:35 +00:00
Prime1997 commented 2026-11-26 01:05:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-26T00:52:44Z.


Closing because main already has this behaviour, from b4d74821 ("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 da491ee5 against main 08db802. Reviewed with Claude Code (Claude Opus 5.5); I checked the comparison before closing.

<!-- greyfinch-sync:ivall/xcl:comment:7179204827 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/978#issuecomment-7179204827). Originally posted by [Prime1997](https://github.com/Prime1997) on 2026-11-26T00:52:44Z. --- Closing because main already has this behaviour, from b4d74821 ("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 da491ee5 against main 08db802. Reviewed with Claude Code (Claude Opus 5.5); I checked the comparison before closing.
DavidM1911 commented 2026-11-26 04:07:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:23:35Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7181678801 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/978#issuecomment-7181678801). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T03:23:35Z. --- 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.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!972
No description provided.