turnip: compute shader hang in the Monster Hunter World
Reproducible on at least a630/660. I created a standalone reproducer of the issue: mh_world_hang_repro.tar.gz (link
data/ folder into your build folder)
In the original trace the hang is just a timeout, in my reproducer it is a "context fault".
The issue happens in a huge compute shader, it has an early exit at the start of the shader:
layout(set = 0, binding = 8) uniform usamplerBuffer t3; ... uint x = texelFetch(t3, int(gl_GlobalInvocationID.x)).x; if (x == 4294967295u) return;
There is a previous compute shader which fill this
t3 buffer, however even without it when the whole buffer is filled with
4294967295u - there is a hang. Also there is a barrier between shader which translates into
It seems that either:
- Wrong value is retrieved for some reason;
- The jump to the end of the shader doesn't work;
flushall helps but if I try to isolate the specific flush/invalidate - all falls apart: just adding
INVALIDATE_DEPTH helps, additional
INVALIDATE_COLOR - helps, additional
CACHE_FLUSH_TS - helps, two additional of them - hang returns, 3x - no hang, 4x - hang.
I feel like I'm going in a wrong direction...