d3d12: catch the driver's compiler crashing on a pipeline and carry on (carry of #3222) #3333

Manually merged
github merged 4 commits from github-bot/gh-3333 into gh-pr/3333/base 2026-12-03 14:34:51 +00:00 AGit
Owner

@⁠MoonEyes on GitHub · 2026-12-03 14:02 UTC · original
MoonEyes:carry/3222-compiler-guard → main · +701 −43 · 4 files · 4 commits · merged 2026-12-03 14:27 UTC

Carries #3222 by @⁠roanh47 onto current main. Claim and authorship stay theirs: the two commits are theirs, unchanged; the only new commit merges main and regenerates d3d12/docs/switches.md with tools/d3d12_switches.py --out (the one conflict, a generated file whose format changed in #3318).

#3222 was green but stuck in conflict on that generated page only, and the contributor branch could not be updated from here.

What it does (from #3222)

Catches the driver's shader compiler crashing on a pipeline and carries on (LEONIDA_COMPILER_GUARD), instead of taking the game down.

Tested

  • In game by a third party on #3222: RTX 5070 12 GB, 315 s in the world, PASS (comment on #3222, head d59a9d6e2; the later head only regenerated the switches page).
  • Here: python -I tools/d3d12_switches.py --check d3d12/docs/switches.md exit 0, python -I tests/test_d3d12_switches.py OK. CI runs on this pull request.

If #3222 is updated by its author first, this one can be closed.

AI-assisted (Claude Code, Claude Opus 5.5).

🤖 Generated with Claude Code

**@⁠MoonEyes** on GitHub · 2026-12-03 14:02 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3333) `MoonEyes:carry/3222-compiler-guard` → `main` · +701 −43 · 4 files · 4 commits · merged 2026-12-03 14:27 UTC Carries #3222 by @⁠roanh47 onto current `main`. Claim and authorship stay theirs: the two commits are theirs, unchanged; the only new commit merges `main` and regenerates `d3d12/docs/switches.md` with `tools/d3d12_switches.py --out` (the one conflict, a generated file whose format changed in #3318). #3222 was green but stuck in conflict on that generated page only, and the contributor branch could not be updated from here. ## What it does (from #3222) Catches the driver's shader compiler crashing on a pipeline and carries on (`LEONIDA_COMPILER_GUARD`), instead of taking the game down. ## Tested - In game by a third party on #3222: RTX 5070 12 GB, 315 s in the world, PASS (comment on #3222, head `d59a9d6e2`; the later head only regenerated the switches page). - Here: `python -I tools/d3d12_switches.py --check d3d12/docs/switches.md` exit 0, `python -I tests/test_d3d12_switches.py` OK. CI runs on this pull request. If #3222 is updated by its author first, this one can be closed. AI-assisted (Claude Code, Claude Opus 5.5). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
AMD's D3D12 compiler takes an access violation inside CreateGraphicsPipelineState/CreateComputePipelineState on RDNA4 (RX 9070 XT, driver 32.0.32029.2010), which killed the whole run: 11 of 11 starts on the machine this was found on, at amdxc64.dll+0x861b9f.

Ported from Belobug/VIctory (GPL-3.0, credited in the module): a vectored exception handler catches the access violation while a worker compiles, parks that worker, records the pipeline key in warm-bad.txt so later runs skip it, and starts a replacement. make_with no longer uses OnceLock::get_or_init, because a parked builder would block every other caller forever.

LEONIDA_COMPILER_GUARD (default on) turns the catching off; the bad-key list is still honoured.
# Conflicts:
#	d3d12/docs/switches.md
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 14:04:51 +00:00
github-bot changed target branch from main to gh-pr/3333/base 2026-12-03 14:34:33 +00:00
github manually merged commit ee7dec0b2e into gh-pr/3333/base 2026-12-03 14:34:39 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!3333
No description provided.