Skip to content

Model M fails under Proton: the interop spin shader's globallycoherent is rejected by Wine's d3dcompiler_47 #7

Closed

Description

@j0nsh1n

What happened

Under Proton, Model M never starts: the upscaler create fails and OptiScaler falls back to FSR 2.1.2 ("falling back to FSR 2.1.2" on screen). From wronggpu-fsr.log:

U1 upscaler ERROR: network runtime unavailable: D3DCompile(spin) failed: wronggpu_interop.hlsl:26:1: E5030: Unknown modifier "globallycoherent".
#3 -> ERROR_RUNTIME_ERROR: upscaler "WrongGPU network" create failed: WG_ERROR_DEVICE

Under Proton, d3dcompiler_47.dll is Wine's builtin, which compiles HLSL with vkd3d-shader. vkd3d-shader does not know the globallycoherent modifier on spinBuf in PASS_SPIN (clean/runtime/interop/convert.cpp).

Suggested fix

The spin pass touches spinBuf only through InterlockedAdd, and UAV atomics are coherent across the device without the modifier. Dropping the modifier and keeping the atomic poll compiles on both compilers:

RWBuffer<uint> spinBuf : register(u0);   // was: globallycoherent RWBuffer<uint> spinBuf

Checked with clean/runtime/interop/tests/run-tests.sh, built with llvm-mingw and run under GE-Proton 11-11: all 31 tests fail with the E5030 error before the change and pass after it. In game, the interop shaders then compile. I did not run Windows FXC. Please check that cs_5_0 still compiles there and that done_mode=spin behaves as before.

After this, Model M's D3D12 kernels still need a dxil-spirv change under Proton (Failed DXIL opcode 79 for the AGS WMMA channel): HansKristian-Work/dxil-spirv#362. With both, Model M runs in Cyberpunk 2077 (executor dx12 on the game's device).

run-tests.sh needs two local changes on a current Linux setup. llvm-mingw needs -fms-extensions for the __try in descriptor_publish.h. A fresh Wine prefix needs vkd3d-proton's d3d12.dll and d3d12core.dll, DXVK's dxgi.dll, and libvkd3d-shader-1.dll copied into system32, run with WINEDLLOVERRIDES="d3d12,d3d12core,dxgi=n,b". Otherwise the test skips ("no D3D12 device") and would not have caught this.

Game and settings

  • Game and version: Cyberpunk 2077 (Steam), current build
  • Upscaler chosen in the game's settings, and its quality mode: DLSS, Quality
  • Resolution, Ray Reconstruction on or off, its mode: 2560x1440, off

System

  • WrongGPU version: 0.6.0
  • GPU and AMD driver version: RX 9070 XT, RADV (Mesa 27.0.0-devel), no AMD Windows driver
  • Windows version: none. Linux (Nobara), GE-Proton 11-11 (vkd3d-proton 3.1.0, DXVK dxgi)
  • OptiScaler: the WrongGPU edition from the launcher (10.0.0-pre1)

Logs

The launcher's log collection was not used; the relevant lines are quoted above.

Activity

  1. phantoslayer21 commented on Nov 13, 2026

    @phantoslayer21
    Owner

    Our half of this is fixed on main by #12 (merged as a8500cb): the spin pass's buffer is now declared without globallycoherent. Thanks for the report and the suggested fix, @j0nsh1n.

    What was checked on our side: with Windows FXC (cs_5_0) all nine interop passes compile before and after, and only the spin pass's UAV declaration changes in the bytecode. The interop test passes 30 of 30 on an RX 9070 XT in both builds. done_mode=spin was not run end to end, and nothing was run under Wine or Proton, so a retest of run-tests.sh on your setup against current main would be welcome.

    I'm closing this because the shader problem in the title is fixed in the source. Model M under Proton still depends on the dxil-spirv change you submitted upstream; Linux support as a whole stays tracked in #10. Please reopen if the interop shaders still fail to compile on your side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions