protonscr

WRC Generations: GPU hang on Intel (ANV) from barrier in divergent control flow in a compute shader

vkd3dopen
HansKristian-Work/vkd3d-proton#3395 · opened 2026-10-22 by 4ni1ak · updated 2026-10-22 · 1 comments · github
44ni1ak 2026-10-22 github

Software information

WRC Generations (Epic, also on Steam as 1953520), default settings. The game freezes at the "KT Engine" splash with a GPU hang on Intel. NVIDIA and AMD are not affected.

System information

  • GPU: Intel Core Ultra 7 165H, Meteor Lake iGPU (8086:7dd5)
  • Driver: Mesa 26.2.5 (ANV), Linux 7.2.10, hangs on both i915 and xe
  • Wine version: GE-Proton10-34 (Proton-8.0 hangs too)
  • VKD3D-Proton version: the one bundled with GE-Proton10-34

Cause

The hang is caused by compute shader 73dfbd1401ac5447, a numthreads(64,1,1) prefix sum dispatched as 1x1x1 groups.

Roughly:

for (chunk = 0; chunk < (count + 63) / 64; chunk++) {
    idx = chunk * 64 + lid;
    if (idx <= count) {
        GroupMemoryBarrierWithGroupSync();
        // load into groupshared
        GroupMemoryBarrierWithGroupSync();
        // scan, write out
    }
}

Both barriers are inside a non-uniform branch. On the last partial chunk, ANV runs the group as four SIMD16 threads. A thread with no lanes in range skips the barrier and the group never completes.

How I traced it:

  • In the i915 error state, ACTHD sits right after the COMPUTE_WALKER for this dispatch.
  • The kernel bytes match the INTEL_DEBUG=cs,hex output with src_hash 0x73dfbd1401ac5447.

Workaround

I patched the SPIR-V so that:

  • every lane executes both barriers;
  • out-of-range lanes store 0 to groupshared;
  • only in-range lanes do the final stores.

With that patch loaded through VKD3D_SHADER_OVERRIDE, the game runs on both i915 and xe.

Patch, diff, and the scripts I used: https://github.com/4ni1ak/wrc-generations-intel-gpu-hang-fix

Maybe this could become a per-app shader workaround, or a generic fixup for barriers in divergent control flow? I can provide a GPU error state dump or logs if useful.

Ddoitsujin maintainer 2026-10-22 github

What's the workgroup size here? If it's 32 then I think a saner workaround would be to just force wave32 for this shader, driver should optimize the barrier away or treat it as a subgroup-scope barrier in that case.

Edit: nvm, it's 64. That's... a problem.

Rewriting the control flow in dxil-spirv seems brittle, shipping a patched shader is impossible for legal reasons, and actually divergent workgroup barriers also won't work on AMD hardware if we hit wave32. Won't directly cause hangs there, but will also completely break synchronization. This kind of needs to be fixed in game.

Proton versions

Launch options