D3D12.X: release replaced two-pass entries outside the lock on nvidia-dev #3132

Closed
Prime1997 wants to merge 1 commit from upstream-pr/3132 into main
Prime1997 commented 2026-11-28 12:37:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-28T12:37:43Z.


Backport #2882 by @crazymanjared, original commit 3e8e2c438ca7ec71bc402f90a0a9dac5cb7f80c6, onto nvidia-dev 54225f5884a94cd23b7aab3f703a7c975070aa77. Replacing a two-pass pipeline entry dropped the old entry while holding TWO_PASS. With immediate pipeline releases enabled, its destructor can reenter that mutex and deadlock. This is a NVIDIA port of the existing main PR.

What is in it

  • Bind the replaced entry and drop it after the map guard releases, preserving NVIDIA's current pipeline ownership and cache code.
  • Keep deferred release and its GPU-completion rules intact. Original author and cherry-pick provenance are preserved.

Tested

  • Current PR head: a8d5ddc13f52df4913595f196ecff73efc965997.
  • git diff --check: passed. Source review confirmed the immediate-release reentry path.
  • Windows 11 Pro 26200; Intel i5-10400; NVIDIA RTX 3060 Ti driver 32.0.16.1714; Rust 1.100.0; release profile.
  • Combined integration d50f6656fb50b7927a2279d4c78b24222be3da54: cargo build --locked --release -p xcl --target-dir <isolated-target> exited 0 in 228.576s, with 9 warnings. This includes the change but is not a standalone build/test of this PR head.
  • No native replacement-lock regression was run. Source review and the combined compilation are the only validation of this defensive change.

Regression run
Pending paired clean-head main/PR title runs. No smoke result is claimed. Draft while required validation remains incomplete.

Not tested

  • A deterministic replacement-lock regression, exact-head title run, full GPU workspace suite, AMD/Intel and Linux/Wine.
  • The observed world-load failure is not attributed to this bug: the default deferred-release mode avoids this particular immediate same-thread reentry. This is a defensive lock-lifetime correction, not a proven GPU-removal repair.

AI use
Codex (GPT-6) checked overlap, reviewed and ported the existing change, and prepared this description. Original contributor authorship remains intact.

Optional temporary Discord for coordinating contributor work, testing and comparing results: https://discord.gg/6B4TykyC4W

<!-- greyfinch-sync:ivall/xcl:issue:5540190999 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3132). Originally posted by [Prime1997](https://github.com/Prime1997) on 2026-11-28T12:37:43Z. --- Backport [#2882](https://github.com/xcl-dev/xcl/pull/2882) by @crazymanjared, original commit `3e8e2c438ca7ec71bc402f90a0a9dac5cb7f80c6`, onto `nvidia-dev` `54225f5884a94cd23b7aab3f703a7c975070aa77`. Replacing a two-pass pipeline entry dropped the old entry while holding `TWO_PASS`. With immediate pipeline releases enabled, its destructor can reenter that mutex and deadlock. This is a NVIDIA port of the existing main PR. **What is in it** - Bind the replaced entry and drop it after the map guard releases, preserving NVIDIA's current pipeline ownership and cache code. - Keep deferred release and its GPU-completion rules intact. Original author and cherry-pick provenance are preserved. **Tested** - Current PR head: `a8d5ddc13f52df4913595f196ecff73efc965997`. - `git diff --check`: passed. Source review confirmed the immediate-release reentry path. - Windows 11 Pro 26200; Intel i5-10400; NVIDIA RTX 3060 Ti driver 32.0.16.1714; Rust 1.100.0; release profile. - Combined integration `d50f6656fb50b7927a2279d4c78b24222be3da54`: `cargo build --locked --release -p xcl --target-dir <isolated-target>` exited 0 in 228.576s, with 9 warnings. This includes the change but is not a standalone build/test of this PR head. - No native replacement-lock regression was run. Source review and the combined compilation are the only validation of this defensive change. **Regression run** Pending paired clean-head main/PR title runs. No smoke result is claimed. Draft while required validation remains incomplete. **Not tested** - A deterministic replacement-lock regression, exact-head title run, full GPU workspace suite, AMD/Intel and Linux/Wine. - The observed world-load failure is not attributed to this bug: the default deferred-release mode avoids this particular immediate same-thread reentry. This is a defensive lock-lifetime correction, not a proven GPU-removal repair. **AI use** Codex (GPT-6) checked overlap, reviewed and ported the existing change, and prepared this description. Original contributor authorship remains intact. Optional temporary Discord for coordinating contributor work, testing and comparing results: https://discord.gg/6B4TykyC4W
Prime1997 commented 2026-11-28 21:50:36 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Prime1997 on 2026-11-28T21:50:36Z.


Closing as a duplicate. This was the nvidia-dev port of #2882 by crazymanjared. nvidia-dev was merged into main by #3203 and this PR was retargeted to main, where #2882 is open with the same change. Checked and closed with Claude Code on Prime's behalf.

<!-- greyfinch-sync:ivall/xcl:comment:7246313815 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3132#issuecomment-7246313815). Originally posted by [Prime1997](https://github.com/Prime1997) on 2026-11-28T21:50:36Z. --- Closing as a duplicate. This was the `nvidia-dev` port of #2882 by crazymanjared. `nvidia-dev` was merged into `main` by #3203 and this PR was retargeted to `main`, where #2882 is open with the same change. Checked and closed with Claude Code on Prime's behalf.

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!3132
No description provided.