https://bugs.winehq.org/show_bug.cgi?id=57461
Bug ID: 57461 Summary: Heroes of Might and Magic 5 Random crashes at start Product: Wine Version: 9.22 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: d3d Assignee: wine-bugs@winehq.org Reporter: marcin.deranek@slonko.net Distribution: ---
Created attachment 77459 --> https://bugs.winehq.org/attachment.cgi?id=77459 Backtrace + Log
Since wine-8.0, I noticed that Heroes of Might and Magic 5 no longer starts, so I had to use wine-7.x instead. Recently I had some time to troubleshoot this problem. These Might and Magic 5 startup crashes happen ~50% of the time (see attached sample backtrace). I did bisect the changes and this is the commit which has caused these:
69a730090abe81c5829c6504aac373babbe9e8a8 is the first bad commit commit 69a730090abe81c5829c6504aac373babbe9e8a8 (HEAD) Author: Zebediah Figura zfigura@codeweavers.com Date: Wed Jan 11 14:19:21 2023 -0600
wined3d: Write into a mapped BO when replacing the entire destination in wined3d_context_gl_copy_bo_address().
Instead of using glBufferSubData(). In practice, this means that we will either discard and rename the BO (if it's still in use) or write directly into it (if not).
This improves performance drastically on NVidia GL drivers.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53408
dlls/wined3d/context_gl.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-)
In my case, I have AMD Radeon hardware: Device: AMD Radeon 680M (radeonsi, rembrandt, LLVM 18.1.8, DRM 3.59, 6.11.9-hardened-k8s) (0x1681) and also mesa-24.2.7 xf86-video-amdgpu-23.0.0
Reverting the patch makes Heroes of Might and Magic 5 start every time without any issues.