Linux: dxil-spirv at or past b540c8a2 is required — an older converter overflows the stack on 3 of 2,912 programs #2754

Open
opened 2026-11-26 05:13:24 +00:00 by github-bot · 1 comment
Owner

@⁠pablogonz12 on GitHub · 2026-11-25 19:43 UTC · original

What

Three compute programs that VIctory translates correctly make older dxil-spirv builds die with SIGSEGV in conversion (rc 139, no message, no SPIR-V out), so in a run those pipelines never create. The converter is not part of this repo but the run's host is, so the minimum is worth naming in the docs until #1885 lands.

How it shows

Offline, without a game run: translate the console container with victory-shader --example retranslate, then hand the DXIL to dxil-spirv:

dxil-spirv on the three programs
34f0ff84 (what vkd3d-proton master's submodule pins) SIGSEGV, ~174k identical CFGNode::find_common_dominator / recompute_immediate_dominator frames, then stack exhaustion
b540c8a2 (dxil-spirv master) ok: clean spirv-val --target-env vulkan1.3, RADV pipeline created

Root cause, upstream

find_common_dominator() recomputes a missing immediate dominator through the node's predecessors, and for a loop header with two latches that is recomputed while the second latch is still uncomputed, the two calls re-enter each other with no bound (first recompute_cfg() inside flatten_subgroup_shuffles, i.e. the ray-tracing path). Valid DXIL; the recursion is the converter's. The CFGNode recursion rewrite upstream (53aac418, PR #371) through b540c8a2 removes it. Nothing here is our emitter: the same DXIL converts with the newer build.

Counts on this machine (RX 9070 XT, Mesa 26.3.1 RADV, offline only)

  • 2,912-program set (RT-heavy): 3 crash the pinned 34f0ff84, 2,909 convert; with b540c8a2 all 2,912 validate and build a RADV pipeline.
  • All three are ray-tracing node-test programs.
  • 341 compute programs of the set reach that pass; 7 have multi-latch headers (1 to 5 each, the three crashing ones rank first: 5, 4, 1). Every program with one latch converts.
  • The 751-program world-shader set: 0 crashes either way (751/751 with b540c8a2).

Ask

Maintainer's call, either is fine from this side:

  1. Docs: AMD-LINUX.md already steers away from stock vkd3d-proton 3.1 ("its dxil-spirv makes invalid SPIR-V that crashes RADV"). It could name the minimum converter: dxil-spirv at or past b540c8a2, since the pin in vkd3d-proton master's submodule (34f0ff84) is below it. Happy to send that as a one-line docs PR.
  2. Emitter: as in #1885, one back edge per loop header — it removes the multi-latch header the converter trips over, and also covers hosts we do not control. If that is the preferred direction, this issue can be closed against it.

Not tested in a game run. Not tested on NVIDIA hardware.

**@⁠pablogonz12** on GitHub · 2026-11-25 19:43 UTC · [original](https://github.com/Marvisak/VIctory/issues/2754) ## What Three compute programs that VIctory translates correctly make **older dxil-spirv builds die with SIGSEGV** in conversion (rc 139, no message, no SPIR-V out), so in a run those pipelines never create. The converter is not part of this repo but the run's host is, so the minimum is worth naming in the docs until #1885 lands. ## How it shows Offline, without a game run: translate the console container with `victory-shader --example retranslate`, then hand the DXIL to dxil-spirv: | dxil-spirv | on the three programs | |---|---| | `34f0ff84` (what vkd3d-proton master's submodule pins) | SIGSEGV, ~174k identical `CFGNode::find_common_dominator` / `recompute_immediate_dominator` frames, then stack exhaustion | | `b540c8a2` (dxil-spirv master) | ok: clean `spirv-val --target-env vulkan1.3`, RADV pipeline created | ## Root cause, upstream `find_common_dominator()` recomputes a missing immediate dominator through the node's predecessors, and for a **loop header with two latches** that is recomputed while the second latch is still uncomputed, the two calls re-enter each other with no bound (first `recompute_cfg()` inside `flatten_subgroup_shuffles`, i.e. the ray-tracing path). Valid DXIL; the recursion is the converter's. The CFGNode recursion rewrite upstream (`53aac418`, PR #371) through `b540c8a2` removes it. Nothing here is our emitter: the same DXIL converts with the newer build. ## Counts on this machine (RX 9070 XT, Mesa 26.3.1 RADV, offline only) - 2,912-program set (RT-heavy): **3 crash** the pinned `34f0ff84`, **2,909 convert**; with `b540c8a2` all **2,912** validate and build a RADV pipeline. - All three are **ray-tracing node-test** programs. - 341 compute programs of the set reach that pass; **7 have multi-latch headers** (1 to 5 each, the three crashing ones rank first: 5, 4, 1). Every program with one latch converts. - The 751-program world-shader set: 0 crashes either way (751/751 with `b540c8a2`). ## Ask Maintainer's call, either is fine from this side: 1. **Docs**: AMD-LINUX.md already steers away from stock vkd3d-proton 3.1 ("its dxil-spirv makes invalid SPIR-V that crashes RADV"). It could name the minimum converter: dxil-spirv at or past `b540c8a2`, since the pin in vkd3d-proton master's submodule (`34f0ff84`) is below it. Happy to send that as a one-line docs PR. 2. **Emitter**: as in #1885, one back edge per loop header — it removes the multi-latch header the converter trips over, and also covers hosts we do not control. If that is the preferred direction, this issue can be closed against it. Not tested in a game run. Not tested on NVIDIA hardware.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:13:24 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 21:47 UTC · original

Automated triage for the maintainers.

Two corrections against main (61bfc77):

  • There is no AMD-LINUX.md, and there are no Wine/Proton notes anywhere in main's docs. Wine notes are proposed in open PR #2082, which is the place to suggest a minimum dxil-spirv version.
  • The emitter-side fix is open PR #1885 (one back edge per loop header, plus a larger stack for pipeline threads). It needs a rebase. It is a PR, not an issue, so this issue cannot be closed against it yet.

VIctory targets Windows hosts. Whether to document requirements for third-party converters under Wine is for the maintainers to decide. Your finding (only programs with multi-latch loop headers crash the older converter, and newer builds convert them) supports #1885's approach and would be useful as a comment there.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 21:47 UTC · [original](https://github.com/Marvisak/VIctory/issues/2754#issuecomment-7175539735) <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-25T19:43:26Z at=2026-11-25T21:53:00Z --> Automated triage for the maintainers. Two corrections against `main` (`61bfc77`): - There is no `AMD-LINUX.md`, and there are no Wine/Proton notes anywhere in `main`'s docs. Wine notes are proposed in open PR #2082, which is the place to suggest a minimum dxil-spirv version. - The emitter-side fix is open PR #1885 (one back edge per loop header, plus a larger stack for pipeline threads). It needs a rebase. It is a PR, not an issue, so this issue cannot be closed against it yet. VIctory targets Windows hosts. Whether to document requirements for third-party converters under Wine is for the maintainers to decide. Your finding (only programs with multi-latch loop headers crash the older converter, and newer builds convert them) supports #1885's approach and would be useful as a comment there. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
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/Marvisak--VIctory#2754
No description provided.