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.
ge-proton10-34x1 2026-10proton 8.0x1 2026-10VKD3D_SHADER_OVERRIDEx1 2026-10
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
Cause
The hang is caused by compute shader
73dfbd1401ac5447, anumthreads(64,1,1)prefix sum dispatched as 1x1x1 groups.Roughly:
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:
COMPUTE_WALKERfor this dispatch.INTEL_DEBUG=cs,hexoutput withsrc_hash 0x73dfbd1401ac5447.Workaround
I patched the SPIR-V so that:
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.