[Bug 35776] New: Crysis is extremely slow in Wine 1.7.14
http://bugs.winehq.org/show_bug.cgi?id=35776 Bug ID: 35776 Summary: Crysis is extremely slow in Wine 1.7.14 Product: Wine Version: 1.7.14 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs(a)winehq.org Reporter: kol(a)MV8660.spb.edu Wine 1.7.14 brings an extreme slowdown in Crysis and I found that this is caused by two regressions. 1) With Crysis under plain Wine 1.7.14 I see constant flickering and the game shows less than 1 FPS. This is a regression introduced by the commit commit 4c4552c5a1910a9d5adf8eccff0ac62d89ffe376 Author: Ken Thomases <ken(a)codeweavers.com> Date: Wed Feb 19 16:14:53 2014 -0600 wined3d: Restore the pixel format of the window whose pixel format was actually changed. A similar problem is considered in Bug#35767 and patches suggested there do not help as well as for that bug. This commit also affects some old games (TES3:Morrowind, TES4:Oblivion) but slightly: it gives about 5 FPS less than in Wine 1.7.13. 2) But after reverting the above commit I see nevertheless that Crysis shows significantly less FPS than with Wine 1.7.13 (average 30 FPS with 1.7.14 versus 45 FPS with 1.7.13). The second problem is caused by commit c1032e977bb9f850e3aea28dd79e3d7c2244cd6c Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue, 4 Mar 2014 10:21:33 +0100 wined3d: Filter redundant WINED3D_MAP_DISCARD buffer maps. After reverting both commits in Wine 1.7.14 I see the same framerates as in 1.7.13 in all games. It is interesting that Wine with Command Stream patches by Stefan Doesinger encounters only the first problem but the second commit does not cause slowdowns. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35776 Jerome Leclanche <adys.wh(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hverbeet(a)gmail.com, | |ken(a)codeweavers.com Regression SHA1| |c1032e977bb9f850e3aea28dd79 | |e3d7c2244cd6c -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35776 Alex <roboman2444(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |roboman2444(a)gmail.com --- Comment #1 from Alex <roboman2444(a)gmail.com> --- I get the same flickering and slowdown. It makes the menus unable to be navigated -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35776 --- Comment #2 from Alex <roboman2444(a)gmail.com> --- (In reply to Alex from comment #1)
I get the same flickering and slowdown. It makes the menus unable to be navigated
And yes, reverting those two commits completely fixes the problem. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35776 Ken Sharp <imwellcushtymelike(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35776 Ken Thomases <ken(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |35718 --- Comment #3 from Ken Thomases <ken(a)codeweavers.com> --- The part due to my commit is a duplicate of bug 35718. I'll add the relevant information to that bug, but I'm leaving this bug open for the additional slowdown from Henri's commit. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35776 --- Comment #4 from Henri Verbeet <hverbeet(a)gmail.com> --- Could you create a WINEDEBUG="+seh,+tid,+d3d9,+d3d" log, with commit 4c4552c5a1910a9d5adf8eccff0ac62d89ffe376 reverted, and in a place where the issue happens? What hardware and drivers are you using? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35776 --- Comment #5 from Kol <kol(a)MV8660.spb.edu> --- Created attachment 48169 --> http://bugs.winehq.org/attachment.cgi?id=48169 Log file - the part -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35776 --- Comment #6 from Kol <kol(a)MV8660.spb.edu> --- The compressed Log file (a part from the middle of it because the whole file takes 764Mb) created with WINEDEBUG="+seh,+tid,+d3d9,+d3d" is in the attachment. Here Crysis 1 works under Wine 1.7.16 with bug (1) fixed not by reverting commit 4c4552c5a1910a9d5adf8eccff0ac62d89ffe376, but by applying a patch (http://bugs.winehq.org/attachment.cgi?id=47883) from Bug#35718. The framerate is <30 due to bug (2) because when commit c1032e977bb9f850e3aea28dd79e3d7c2244cd6c is reverted I see ~50 FPS. The hardware and software are comparatively old (Phenom II x4, GTX460, kernel 2.6.27.5, X.Org 7.3), Nvidia drivers 331.20. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35776 --- Comment #7 from Henri Verbeet <hverbeet(a)gmail.com> --- Created attachment 48758 --> https://bugs.winehq.org/attachment.cgi?id=48758 debug patch The log is incomplete, but as far as I can tell from the part that's posted, the code in commit c1032e977bb9f850e3aea28dd79e3d7c2244cd6c shouldn't be triggered. If you apply the attached debug patch, does the FIXME it introduces get printed? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35776 Ronny Schmatzler <schmatzler(a)googlemail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |schmatzler(a)googlemail.com --- Comment #8 from Ronny Schmatzler <schmatzler(a)googlemail.com> --- 1) I can confirm the flickering introduced with commit 4c4552c5a1910a9d5adf8eccff0ac62d89ffe376 . The patch from http://bugs.winehq.org/show_bug.cgi?id=35718#c61 fixes this. 2) Commit c1032e977bb9f850e3aea28dd79e3d7c2244cd6c does not affect the performance of Crysis. I had problems with that commit in bug 36787 - the fixme in that bug does not get triggered and the patches don't make any difference at all. I have constant 45 fps with a Radeon 6800 and the latest MESA trunk. Before the patches: http://www11.pic-upload.de/03.07.14/4c2z9pyeebv.jpg After: http://www11.pic-upload.de/03.07.14/sz72gv629gik.jpg -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35776 --- Comment #9 from Kol <kol(a)MV8660.spb.edu> --- First, the above debug patch from Comment#7 with WINEDEBUG="fixme+all" prints nothing about "Filtering redundant WINED3D_MAP_DISCARD". I tested Crysis 1 running under Wine 1.7.19 with patch from Bug#35718 fixing bug (1). Also double buffering was forced, otherwise the game crashes on load due to Bug#18799. The framerate was measured by the GPU benchmark of the game. I carried out some experiments absolutely not understanding what I do and found that the cause of bug (2) is connected with the WINED3D_BUFFER_NOSYNC flag. With commit c1032e977bb9f850e3aea28dd79e3d7c2244cd6c the framerate is <30 but if buffer->flags |= WINED3D_BUFFER_NOSYNC; is set unconditionally in "wined3d_buffer_map()" function in "dlls/wined3d/buffer.c" the framerate grows to ~50 FPS as before the commit. In this case some graphical glitches (green flashes on textures) are seen. The other way to improve the framerate is to restore a structure which "wined3d_buffer_map()" has before the commit. If I replace else if (!buffer_is_dirty(buffer)) by else if (!dirty) and insert BOOL dirty = buffer_is_dirty(buffer); at the start of "wined3d_buffer_map()", I have 50 FPS again. In this case the game runs correctly. Maybe, the bug (2) is specific to my video system (Nvidia driver 331.20, GTX460), because the slowdown is absent on the Radeon card (Comment#8). Also I checked that patch "http://bugs.winehq.org/attachment.cgi?id=48915" from Bug#36787 does not affect the considered problem. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35776 --- Comment #10 from Henri Verbeet <hverbeet(a)gmail.com> --- Created attachment 49002 --> https://bugs.winehq.org/attachment.cgi?id=49002 patch (In reply to Kol from comment #9)
The other way to improve the framerate is to restore a structure which "wined3d_buffer_map()" has before the commit. If I replace else if (!buffer_is_dirty(buffer)) by else if (!dirty) and insert BOOL dirty = buffer_is_dirty(buffer); at the start of "wined3d_buffer_map()", I have 50 FPS again. In this case the game runs correctly.
That actually makes sense. So the attached patch fixes this, right? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=35776 --- Comment #11 from Kol <kol(a)MV8660.spb.edu> --- Yes, exactly the patch from Comment#10 eliminates the slowdown introduced by commit c1032e977bb9f850e3aea28dd79e3d7c2244cd6c. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35776 Henri Verbeet <hverbeet(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |01251f3d3cb9c5f7b8cb006f91e | |b242f4f32bf4b Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #12 from Henri Verbeet <hverbeet(a)gmail.com> --- Should be fixed in current git then. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35776 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #13 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 1.7.23. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=35776 Bug 35776 depends on bug 35718, which changed state. Bug 35718 Summary: Multiple games have extreme flicker, stutter, slowdown (Path of Exile, Roller Coaster Tycoon, Counter Strike: Global Offensive, Warframe, Crysis, Anno 1602, Splinter Cell: Blacklist) https://bugs.winehq.org/show_bug.cgi?id=35718 What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |RESOLVED Resolution|--- |FIXED -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org