http://bugs.winehq.org/show_bug.cgi?id=30019
Bug #: 30019 Summary: The Chosen (Well of Souls) demo - terrible performance in mid-game Product: Wine Version: 1.3.18 Platform: x86 URL: http://www.fileplanet.com/181300/180000/fileinfo/The-C hosen:-Well-of-Souls-Demo OS/Version: Linux Status: NEW Keywords: download, regression Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: gyebro69@gmail.com CC: stefan@codeweavers.com Classification: Unclassified Regression SHA1: 46d879eef60d6c2c6c8a7e9daf12b1448bdec7d5
Created attachment 39087 --> http://bugs.winehq.org/attachment.cgi?id=39087 terminal output
Performance is okay in the menus, but as soon as you start a new game, performance drops dramatically, making the game unplayable.
The problem appeared in 1.3.18 and is still present in 1.4-rc5. The result of the regression test:
46d879eef60d6c2c6c8a7e9daf12b1448bdec7d5 is the first bad commit commit 46d879eef60d6c2c6c8a7e9daf12b1448bdec7d5 Author: Stefan Dösinger stefan@codeweavers.com Date: Sun Feb 6 23:28:11 2011 +0100
wined3d: Don't drop VBOs for full buffer reloading without conversion.
:040000 040000 51050f46cee246b078aee2242b13eaa2cd90e496 609b304a5eb5e36ba918d8c917b4d366b5e2376c M dlls
The patch can be reverted cleanly on 1.4-rc5 and that fixed the problem.
Fedora 16 Nvidia 250 / driver 290.10 X.Org X Server 1.11.4
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #1 from Stefan Dösinger stefan@codeweavers.com 2012-02-26 14:34:24 CST --- Created attachment 39092 --> http://bugs.winehq.org/attachment.cgi?id=39092 ddraw: Make D3DVBCAPS_WRITEONLY vertex buffers dynamic
I can reproduce the bug. The main problem is that the app is using a dynamic buffer, but ddraw.dll doesn't forward this to wined3d correctly. Thus wined3d ignores the DISCARD and NOOVERWRITE flags, forcing a CPU-GPU sync every time the buffer is locked. This patch fixes the ddraw side of the problem.
The next issue is that the app sets up the lighting in a way that forces us into drawStridedSlow("Using software emulation because not all material properties could be tracked"). This in turn requires a system memory copy of the dynamic buffer, which is (for some reason) just as slow as a static buffer. So the attached patch doesn't fix the performance on its own.
The best fix for the lighting problem is a vertex pipeline replacement, which will not happen for Wine 1.4. The next best fix is not using a VBO for dynamic vertex buffers if a system memory copy has to be maintained. Once that is done, 6c53871d302cdd257675b88a01a7b6fc4944b06e can be reverted since the functionality is no longer needed.
http://bugs.winehq.org/show_bug.cgi?id=30019
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #2 from joaopa jeremielapuree@yahoo.fr 2012-02-26 14:49:57 CST ---
The best fix for the lighting problem is a vertex pipeline replacement, which
will not happen for Wine 1.4
Is it forseen for a near future?
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #3 from Stefan Dösinger stefan@codeweavers.com 2012-02-26 16:38:14 CST --- (In reply to comment #2)
The best fix for the lighting problem is a vertex pipeline replacement
Is it forseen for a near future?
I cannot promise. I don't know Henri's plans, and there are many bigger tasks we want to get done after Wine 1.4, e.g. d3d10 and d3d11 support. On my side I'm mostly stuck with schoolwork, and I don't know when I'll finish that.
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #4 from Stefan Dösinger stefan@codeweavers.com 2012-02-26 16:43:03 CST --- Created attachment 39097 --> http://bugs.winehq.org/attachment.cgi?id=39097 wined3d: Do not use double-buffered dynamic buffers
This patch, on top of attachment 39092 fixes performance in this game. Please give it a try.
The main thing I am worried is that the game crashes when it saves the game, or at least during the first autosave once you move a few steps north. I'm not sure if this patch causes this issue. It looks unrelated(The game passes a broken DDSURFACEDESC2 to Surface::Lock), but the VBO dropping in PreLoad is ugly and fragile.
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #5 from GyB gyebro69@gmail.com 2012-02-26 21:26:03 CST --- (In reply to comment #4)
Created attachment 39097 [details] wined3d: Do not use double-buffered dynamic buffers
This patch, on top of attachment 39092 [details] fixes performance in this game. Please give it a try.
Thanks, game speed is back to normal with the 2 patches.
The main thing I am worried is that the game crashes when it saves the game, or at least during the first autosave once you move a few steps north. I'm not sure if this patch causes this issue. It looks unrelated(The game passes a broken DDSURFACEDESC2 to Surface::Lock), but the VBO dropping in PreLoad is ugly and fragile.
That's bug #18725, a long standing problem. It is present with Wine-1.1.x too.
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #6 from Stefan Dösinger stefan@codeweavers.com 2012-02-27 07:20:28 CST --- Ok, if the crashes are an unrelated problem I'll submit the patches.
http://bugs.winehq.org/show_bug.cgi?id=30019
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |adys.wh@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=30019
Christian christian.frank@gmx.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |christian.frank@gmx.de
http://bugs.winehq.org/show_bug.cgi?id=30019
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #7 from Dan Kegel dank@kegel.com 2012-06-25 10:00:50 CDT --- Is this still an issue?
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #8 from GyB gyebro69@gmail.com 2012-06-25 10:21:01 CDT --- (In reply to comment #7)
Is this still an issue?
Yes, the problem is still present in Wine 1.5.7 and with the Nvidia proprietary driver 295.59.
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #9 from Stefan Dösinger stefan@codeweavers.com 2013-01-06 12:13:47 CST --- EA 6.5 works fine in wine-1.5.21 for me on two Linux systems I tested, one with a Geforce 9600 and the proprietary driver, the other one with a Intel GMA 965 xf86-video-intel 20.2.13. Please retest the application on your machine and report if it works.
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #10 from Stefan Dösinger stefan@codeweavers.com 2013-01-06 12:14:39 CST --- (In reply to comment #9)
EA 6.5 works fine
I'm sorry, wrong window - I intended to post this in bug 11203.
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #11 from GyB gyebro69@gmail.com 2013-01-06 12:35:04 CST --- Still present in 1.5.21, Nvidia binary drivers 304.64. Stefan, is there a chance that your patches will find their way into mainline?
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #12 from Stefan Dösinger stefan@codeweavers.com 2013-01-06 13:10:30 CST --- The first patch("make D3DVBCAPS_WRITEONLY vertex buffers dynamic") is in Wine in a slightly different form, see commit 67230fc013da08965df156216b8d4553f289b088. The other patch is unlikely to be committed to wine as is, because it has the potential to break other application/driver combinations.
The proper fix is to avoid the fallback to drawStridedSlow with a replacement shader for the fixed function vertex pipeline.
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #13 from joaopa jeremielapuree@yahoo.fr 2013-04-19 22:19:01 CDT --- still
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #14 from joaopa jeremielapuree@yahoo.fr 2013-04-19 22:19:34 CDT --- still a bug in current wine?
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #15 from GyB gyebro69@gmail.com 2013-04-20 09:23:42 CDT --- (In reply to comment #14)
still a bug in current wine?
Still an issue as of wine-1.5.28-114-g60faef8. Nvidia binary drivers 313.30.
http://bugs.winehq.org/show_bug.cgi?id=30019
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |murderslastcrow@gmail.com
--- Comment #16 from Bruno Jesus 00cpxxx@gmail.com 2013-05-01 10:49:41 CDT --- *** Bug 19795 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #17 from Henri Verbeet hverbeet@gmail.com 2013-06-14 01:11:28 CDT --- Created attachment 44796 --> http://bugs.winehq.org/attachment.cgi?id=44796 patch
The attached patch should help.
http://bugs.winehq.org/show_bug.cgi?id=30019
--- Comment #18 from Dan Kegel dank@kegel.com 2013-06-14 05:09:14 CDT --- The patch makes a huge difference for the better here, applied to wine-1.6-rc1.
Next problem is still bug 18725.
http://bugs.winehq.org/show_bug.cgi?id=30019
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |8a7ddfbb53c2234907ac21ea89f | |d4f69b3cb8a67 Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #19 from Henri Verbeet hverbeet@gmail.com 2013-06-15 01:46:04 CDT --- Should be fixed by commit 8a7ddfbb53c2234907ac21ea89fd4f69b3cb8a67.
http://bugs.winehq.org/show_bug.cgi?id=30019
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #20 from Alexandre Julliard julliard@winehq.org 2013-06-21 13:33:03 CDT --- Closing bugs fixed in 1.6-rc3.