https://bugs.winehq.org/show_bug.cgi?id=52236
Bug ID: 52236 Summary: Performance regression in Eden's Ritter - Chapter 2 (demo) Product: Wine Version: 7.0-rc2 Hardware: x86-64 URL: https://web.archive.org/web/20191215150009if_/http://s ample9.dmm.co.jp/digital/pcgame/waffle_0102/waffle_010 2t.zip OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: sagawa.aki+winebugs@gmail.com Regression SHA1: 4261369e5d8f1d71e8d207474751585fe9f90cc5 Distribution: Ubuntu
Eden's Ritter - Chapter 2[1] is a NSFW visual novel released by Waffle in Japan. I started its trial version with wine 6.0-rc2, and noticed its performance was poorer than before. My git bisecting shows commit 4261369e5d8[2] causes the issue.
[1] https://vndb.org/v24582 [2] https://source.winehq.org/git/wine.git/commit/4261369e5d8f1d71e8d20747475158...
After the commit, window update is too slow to play the game. My desktop environment is also sometimes unresponsive. However, WINEDEBUG=fps shows very high value, approx 120.
Before the commit, I can play the game without this issue. WINEDEBUG=fps is nearly 60fps.
This issue might be a duplicate of Bug 51848, but the FPS is still low.
SHA1(waffle_0102t.zip) = 1e6345f82f1ed772163005ad63c5ca778ba9128e
https://bugs.winehq.org/show_bug.cgi?id=52236
--- Comment #1 from Sagawa sagawa.aki+winebugs@gmail.com --- Created attachment 71341 --> https://bugs.winehq.org/attachment.cgi?id=71341 WINEDEBUG=fps,timestamp,d3d,d3d8 with Wine 6.17
https://bugs.winehq.org/show_bug.cgi?id=52236
--- Comment #2 from Sagawa sagawa.aki+winebugs@gmail.com --- Created attachment 71342 --> https://bugs.winehq.org/attachment.cgi?id=71342 WINEDEBUG=fps,timestamp,d3d,d3d8 with Wine 7.0rc2
https://bugs.winehq.org/show_bug.cgi?id=52236
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression CC| |hverbeet@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=52236
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, performance
https://bugs.winehq.org/show_bug.cgi?id=52236
Conor McCarthy cmccarthy@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |cmccarthy@codeweavers.com Resolution|--- |DUPLICATE Status|UNCONFIRMED |RESOLVED
--- Comment #3 from Conor McCarthy cmccarthy@codeweavers.com --- Definitely a duplicate of 51848. In both cases the problem doesn't occur if context_choose_pixel_format() is prevented from choosing a pixel format with swap method WGL_SWAP_COPY_ARB.
*** This bug has been marked as a duplicate of bug 51848 ***
https://bugs.winehq.org/show_bug.cgi?id=52236
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Duplicate.
https://bugs.winehq.org/show_bug.cgi?id=52236
--- Comment #5 from Henri Verbeet hverbeet@gmail.com --- Does the patch attached to bug 51848 help here as well?
https://bugs.winehq.org/show_bug.cgi?id=52236
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|DUPLICATE |--- Status|CLOSED |UNCONFIRMED
--- Comment #6 from Sagawa sagawa.aki+winebugs@gmail.com --- I've tested bug 51848 patch. Unfortunately, it doesn't work for ER2. With the patch, wine shows the following X11 error: --- X Error of failed request: BadWindow (invalid Window parameter) Major opcode of failed request: 7 (X_ReparentWindow) Resource id in failed request: 0x4c00063 Serial number of failed request: 267 Current serial number in output stream: 268 ---
https://bugs.winehq.org/show_bug.cgi?id=52236
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #71342|0 |1 is obsolete| |
--- Comment #7 from Sagawa sagawa.aki+winebugs@gmail.com --- Created attachment 71512 --> https://bugs.winehq.org/attachment.cgi?id=71512 WINEDEBUG=fps,wgl,timestamp,d3d,d3d8
Tested with 9ef5c9c0090f17df5bfd794485019fb8bf9a7e25 + bug 51848 patch.
https://bugs.winehq.org/show_bug.cgi?id=52236
--- Comment #8 from Sagawa sagawa.aki+winebugs@gmail.com --- I forgot to mention additional trace messages. To show whether the patch works, I added the following messages in the branches: "wglSetPixelFormatWINE with 0" for wined3d_context_gl_cleanup, "!format && allow_change" for set_pixel_format.
https://bugs.winehq.org/show_bug.cgi?id=52236
--- Comment #9 from Henri Verbeet hverbeet@gmail.com --- Created attachment 71548 --> https://bugs.winehq.org/attachment.cgi?id=71548 patch
It looks like that happens because destroy_gl_drawable() ends up destroying "gl->window", but doesn't clear the "client_window" field in the x11drv_win_data structure.
The attached patch gets around it, but I'm not at all confident it's reasonable or correct. It's probably going to require either me reading up on how the OpenGL parts of winex11 work these days, or a look from someone that already understands that code.
https://bugs.winehq.org/show_bug.cgi?id=52236
Sagawa sagawa.aki+winebugs@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE
--- Comment #10 from Sagawa sagawa.aki+winebugs@gmail.com --- The issue is fixed after applying the attached patch. It works nearly 60fps, again. Thanks, Henri.
*** This bug has been marked as a duplicate of bug 51848 ***
https://bugs.winehq.org/show_bug.cgi?id=52236
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Duplicate.