Linux/Proton: translate --cache --pipelines aborts (std::terminate in dxil-spirv, HansKristian-Work/dxil-spirv#383) #3101

Open
opened 2026-11-26 08:06:59 +00:00 by github-bot · 2 comments
Owner

@⁠arogan178 on GitHub · 2026-11-26 08:02 UTC · original

What

Under Proton, victory translate --cache --pipelines dies partway through with terminate called without an active exception (exit 3). The cause is a converter bug in vkd3d-proton, tracked upstream as HansKristian-Work/dxil-spirv#383. One title shader makes dxil-spirv call std::terminate(), and under Wine that ends the whole process instead of refusing one pipeline.

How it shows

  • Series X 1.0.2.1, RX 9070 XT, Mesa RADV, CachyOS, Proton Experimental bleeding-edge 11.0-20261125 (vkd3d-proton 71cae0), cross-built release victory.exe.
  • The shader step finishes (25,756 translated, 229 refused, 1.3 GB). The pipeline step aborts around pipeline 1,200 of 27,145 on every attempt, sooner with more workers. The last line before it is title pipelines to start early or a progress line.
  • WINEDEBUG=+seh shows raise (22) (SIGABRT) on a worker thread. Of the PE modules loaded, only d3d12core.dll contains the terminate message.
  • With VKD3D_SHADER_DUMP_PATH, exactly one of 1,357 DXIL modules has no .spv. Converting it with dxil-spirv master b540c8a2 reproduces the abort offline: Invalid type ID in cast<T> in fixup_load_type_typed, on a textureLoad.f32 whose resource has been given component type U64 (64-bit atomics).

Impact

  • No pipeline prebuild on Linux. A run makes pipelines on worker threads instead, so the first minutes in the world are black or have missing draws while about 300 pipelines a frame queue up.
  • If a run reaches the same pipeline, it would end the same way. My prologue runs did not reach it.

Workaround

Skip --pipelines (translate --cache alone works) and let the run make the pipelines it needs.

Fix

It needs a fix in dxil-spirv, then in the vkd3d-proton that a Proton build ships. The local change described in dxil-spirv#383 converts this shader, and the other 1,356 still convert. Until a fixed vkd3d-proton ships, Linux docs (#2082) could mention it.

**@⁠arogan178** on GitHub · 2026-11-26 08:02 UTC · [original](https://github.com/Marvisak/VIctory/issues/3101) ## What Under Proton, `victory translate --cache --pipelines` dies partway through with `terminate called without an active exception` (exit 3). The cause is a converter bug in vkd3d-proton, tracked upstream as HansKristian-Work/dxil-spirv#383. One title shader makes dxil-spirv call `std::terminate()`, and under Wine that ends the whole process instead of refusing one pipeline. ## How it shows - Series X 1.0.2.1, RX 9070 XT, Mesa RADV, CachyOS, Proton Experimental bleeding-edge 11.0-20261125 (vkd3d-proton `71cae0`), cross-built release `victory.exe`. - The shader step finishes (25,756 translated, 229 refused, 1.3 GB). The pipeline step aborts around pipeline 1,200 of 27,145 on every attempt, sooner with more workers. The last line before it is `title pipelines to start early` or a progress line. - `WINEDEBUG=+seh` shows `raise (22)` (SIGABRT) on a worker thread. Of the PE modules loaded, only `d3d12core.dll` contains the terminate message. - With `VKD3D_SHADER_DUMP_PATH`, exactly one of 1,357 DXIL modules has no `.spv`. Converting it with dxil-spirv master `b540c8a2` reproduces the abort offline: `Invalid type ID in cast<T>` in `fixup_load_type_typed`, on a `textureLoad.f32` whose resource has been given component type `U64` (64-bit atomics). ## Impact - No pipeline prebuild on Linux. A run makes pipelines on worker threads instead, so the first minutes in the world are black or have missing draws while about 300 pipelines a frame queue up. - If a run reaches the same pipeline, it would end the same way. My prologue runs did not reach it. ## Workaround Skip `--pipelines` (`translate --cache` alone works) and let the run make the pipelines it needs. ## Fix It needs a fix in dxil-spirv, then in the vkd3d-proton that a Proton build ships. The local change described in dxil-spirv#383 converts this shader, and the other 1,356 still convert. Until a fixed vkd3d-proton ships, Linux docs (#2082) could mention it.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:06:59 +00:00
Author
Owner

@⁠BastienRodz on GitHub · 2026-11-26 08:16 UTC · original

This one looks like our emitter, and open PR #2723 already removes it.

On main 63bcca4, the three heap-handle caches in emit/lower.rs (handles, entry_handles, join_handles) key a handle on the first property word only. An f32 image_load on a UAV (kind|0x1000, 0x409) and an image atomic (kind|0x1000, 0x105) through the same descriptor therefore share one handle, annotated {4098, 1033} (RWTexture2D<4xF32>). dxil-spirv then marks the handle an atomicBinOp.i64 uses as 64-bit (emit_global_heaps forces ComponentType::U64), and the textureLoad.f32 on that same handle aborts in fixup_load_type_typed. The { i32 4098, i32 1033 } on the atomic's UAV that dxil-spirv#383 shows is that output; without the shared handle, the atomic would be annotated {4098, 261}.

Synthetic repro: a compute program with an R32G32 UAV texture read by image_load (dmask 0xF) and by a 64-bit image_atomic_umax. It was tested at a fixed address, load first and atomic first, at an address offset by a root constant, and with the descriptor chosen by an if/else and used after the join:

main main + #2723
image handles (dxc -dumpbin) 1, RWTexture2D<4xF32> 2: load {4098,1033}, atomic {4098,261}
DXC 1.9 dxil.dll validator accepts all 4 accepts all 4
dxil-spirv b540c8a2 --bindless all 4: Invalid type ID in cast<T>, terminate called, exit 134 all 4 convert and pass its --validate

So #2723 should stop the prebuild abort with no dxil-spirv change. dxil-spirv#383's guard is still worth having, so a bad module fails one pipeline instead of the process. #2723's own test covers a 32-bit atomic in one block; the cases above add the 64-bit atomic, a dynamic address and a join. Not checked against the title's module itself.

**@⁠BastienRodz** on GitHub · 2026-11-26 08:16 UTC · [original](https://github.com/Marvisak/VIctory/issues/3101#issuecomment-7186389574) This one looks like our emitter, and open PR #2723 already removes it. On `main` `63bcca4`, the three heap-handle caches in `emit/lower.rs` (`handles`, `entry_handles`, `join_handles`) key a handle on the first property word only. An f32 `image_load` on a UAV (`kind|0x1000, 0x409`) and an image atomic (`kind|0x1000, 0x105`) through the same descriptor therefore share one handle, annotated `{4098, 1033}` (`RWTexture2D<4xF32>`). dxil-spirv then marks the handle an `atomicBinOp.i64` uses as 64-bit (`emit_global_heaps` forces `ComponentType::U64`), and the `textureLoad.f32` on that same handle aborts in `fixup_load_type_typed`. The `{ i32 4098, i32 1033 }` on the atomic's UAV that dxil-spirv#383 shows is that output; without the shared handle, the atomic would be annotated `{4098, 261}`. Synthetic repro: a compute program with an R32G32 UAV texture read by `image_load` (dmask 0xF) and by a 64-bit `image_atomic_umax`. It was tested at a fixed address, load first and atomic first, at an address offset by a root constant, and with the descriptor chosen by an if/else and used after the join: | | `main` | `main` + #2723 | |---|---|---| | image handles (`dxc -dumpbin`) | 1, `RWTexture2D<4xF32>` | 2: load `{4098,1033}`, atomic `{4098,261}` | | DXC 1.9 `dxil.dll` validator | accepts all 4 | accepts all 4 | | dxil-spirv `b540c8a2 --bindless` | all 4: `Invalid type ID in cast<T>`, `terminate called`, exit 134 | all 4 convert and pass its `--validate` | So #2723 should stop the prebuild abort with no dxil-spirv change. dxil-spirv#383's guard is still worth having, so a bad module fails one pipeline instead of the process. #2723's own test covers a 32-bit atomic in one block; the cases above add the 64-bit atomic, a dynamic address and a join. Not checked against the title's module itself.
Author
Owner

@⁠ClosetPie107 on GitHub · 2026-11-26 09:04 UTC · original

Confirmed on the retail title: #2723 fixes this. RX 9070 (RDNA4), CachyOS, Mesa 26.3.1, Proton Experimental 11.0-20261112, vkd3d-proton master ec207194 with dxil-spirv b540c8a2. With #2723 merged on 63bcca4:

  • translate --cache --pipelines makes all 27,135 pipelines with no abort.
  • No emitted module aborts the dxil-spirv CLI. On main, the two CS_VisHair variants do.
  • A world run reached the prologue and lasted 25 minutes without a crash.

Details: #2723

AI-assisted (Claude Code).

**@⁠ClosetPie107** on GitHub · 2026-11-26 09:04 UTC · [original](https://github.com/Marvisak/VIctory/issues/3101#issuecomment-7187381206) Confirmed on the retail title: #2723 fixes this. RX 9070 (RDNA4), CachyOS, Mesa 26.3.1, Proton Experimental 11.0-20261112, vkd3d-proton master `ec207194` with dxil-spirv `b540c8a2`. With #2723 merged on `63bcca4`: - `translate --cache --pipelines` makes all 27,135 pipelines with no abort. - No emitted module aborts the dxil-spirv CLI. On `main`, the two `CS_VisHair` variants do. - A world run reached the prologue and lasted 25 minutes without a crash. Details: https://git.gtahub.st/github/Marvisak--VIctory/pulls/2723 AI-assisted (Claude 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#3101
No description provided.