-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UFC Undisputed 2010: Crash on device lost on some ARM GPUs #18806
Comments
Finally narrowed it down a bit. It's the "stencil discard workaround", or FS_BIT_NO_DEPTH_CANNOT_DISCARD_STENCIL , which we enable where we detect the "Bugs::NO_DEPTH_CANNOT_DISCARD_STENCIL" driver bug, presumably interacts badly with something else. (the workaround consists of doing a depth write no-op in the fragment shader to force the compiler to take a less badly optimized path). So will have to limit its use somehow - it doesn't seem to do anything here anyway, #15016 (also #13833) is somehow more specific than the similar Adreno bug, and might not affect all hardware... The workaround is still working (and still needed) in Midnight Club, for the map... Sigh. So will need to figure out what the difference is. In UFC, these stencil combinations are used, that trigger the workaround: First two with dual src blending, hm (which is not available on these devices, so i'll have to check again with it disabled): In Midnight Club: Quite different setups. All I can do is tighten the checks and re-test affected games, probably will need to split the bug into Qualcomm and Mali variants.. |
The actual trigger for the crash appears to be the combination of depth test == NEVER and writing to depth from the shader. We need to avoid this combination at all costs. Unfortunately this is a bit tricky... but, NEVER is rare, so adding some duplicate checks there is viable. |
Worked around by #18813, closing. |
After the first few punches in a fight, the game just crashes with a device loss on Mali G52 with driver v18 (model: HUAWEI:JNY-LX1).
Vulkan validation doesn't flag any problems, so this one might be real tricky to track down...
Runs fine in OpenGL.
Reported by a user on Google Play.
Confirmed affected devices:
The last one behaved slightly differently, after the bug hit it stumbles along at 1fps for a few frames, hangs, and dies after a delay. While it stumbles, our tracked GPU memory consumption does not seem to increase.
I'm trying to rule out causes, some notes:
doesn't crash! So, the problem is indeed somehow a draw, of the background geometry, unless we're simply hitting some limit that we're avoiding now.never mind, it does crash but it's harder to triggerThe game does a lot of very suboptimal indexed draws in succession (spread out indices over a large range of vertices, which Mali recommends against), but I don't think we're hitting https://community.arm.com/support-forums/f/graphics-gaming-and-vr-forum/49770/do-we-need-to-repack-our-vertex-buffers-for-mali-g76-to-avoid-vk_device_lost or https://community.arm.com/arm-community-blogs/b/graphics-gaming-and-vr-blog/posts/memory-limits-with-vulkan-on-mali-gpus .
Found another bug while at it, toggling Skip buffer effect and backing out to the pause menu can cause a crash.
The text was updated successfully, but these errors were encountered: