http://bugs.winehq.org/show_bug.cgi?id=23802
Summary: Need for Speed Shift demo: slow framerate on showroom floor Product: Wine Version: 1.2 Platform: x86 OS/Version: Linux Status: NEW Keywords: download Severity: normal Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
In the showroom floor, when the car is just rotating, the framerate in Wine is well under 10fps, but in Windows it seems very smooth, above 20fps. The problem even occurs at low resolutions like 800x600. Maybe there's some event timer firing at the wrong rate?
This problem's been around as long as I can remember.
http://bugs.winehq.org/show_bug.cgi?id=23802
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefandoesinger@gmx.at
--- Comment #1 from Stefan Dösinger stefandoesinger@gmx.at 2010-07-27 04:58:33 --- I get rather crappy performance with this game on Windows as well(Core 2 Duo, GF 9600, but it is CPU limited). Can you compare the in-game race framerate, preferably with a quick race without any opponents? You can show the framerate on Windows with Fraps(http://www.fraps.com/).
I think that my Windows setup is probably broken, as my CPU isn't too old. I get 6 fps in the main menu(both Windows and Wine), which seems wrong to me, but I need some performance data from a different computer to tell if it's my system's or the game's fault.
http://bugs.winehq.org/show_bug.cgi?id=23802
--- Comment #2 from Stefan Dösinger stefandoesinger@gmx.at 2010-07-28 02:52:27 --- Ok, my windows installation was broken. I reinstalled it after Mass effect 2 ran at 0.5 fps in the main menu.
Now with a better Windows to Wine comparison I can say that our overall performance in this game is a catastrophe. Just some quick data from the main menu(rotating car, etc): Windows gets 55 fps, wined3d on Windows 19, Wine 6. So we get approximately 10% of the Windows performance. Our usual "crap is this slow" 50% seem so sweet now.
I'm back to debugging this game's performance...
http://bugs.winehq.org/show_bug.cgi?id=23802
--- Comment #3 from Dan Kegel dank@kegel.com 2010-07-28 08:45:26 --- Yeah, it's pretty bad in the main menu.
If it's any comfort, the frame rates seem better in the actual racing parts of the game.
http://bugs.winehq.org/show_bug.cgi?id=23802
--- Comment #4 from Stefan Dösinger stefandoesinger@gmx.at 2010-08-09 15:58:18 --- Created an attachment (id=30072) --> (http://bugs.winehq.org/attachment.cgi?id=30072) Avoid software blit fallbacks
http://bugs.winehq.org/show_bug.cgi?id=23802
--- Comment #5 from Stefan Dösinger stefandoesinger@gmx.at 2010-08-09 15:58:50 --- Created an attachment (id=30073) --> (http://bugs.winehq.org/attachment.cgi?id=30073) Increase the FBO cache size for NFS shift
http://bugs.winehq.org/show_bug.cgi?id=23802
--- Comment #6 from Stefan Dösinger stefandoesinger@gmx.at 2010-08-09 16:13:19 --- My performance debugging results were not as fruitful as I originally hoped. The patches I attached improve the performance with wined3d on Windows a little bit(22 -> 27 fps), but it is still a far cry from the 53 fps native d3d achieves.
The first one avoids a software fallback, it is pretty streightforward. However, the blit code is still in pretty bad shape, so I don't want to send it to wine-patches right away. This change may uncover some other problems, e.g. with backbuffer ORM.
The second one is needed because NFS:Shift uses more than 64 different framebuffer configurations in the main menu. The reconfiguration of framebuffers causes performance issues in the GL driver. This is a crude workaround only. For a proper fix we'd want some fbo cache limitation logic that isn't based on a fixed value. Also with growing FBO cache sizes we'll need different approach to organizing the cache, with the current design the cost for finding a specific FBO grows quickly with increased sizes. (NFS:Shift apparently generates mipmaps with FBO_blit, so it blits bitween many different surfaces. There may be a capability flag issue. D3D supports mipmap autogeneration that would probably be faster. Wined3d supports it too, so if the game knows about it it should be able to use it)
As I mentioned, on Windows this improves the performance by about 20%. On Linux, the non-d3d issues drain all the oxygen set free by these improvements, so the performance was improved from ~16fps to ~17fps. However, the 16 fps were better than the 6 fps I got when I ran the app the last time. Switching to Linux 2.6.34 may have improved things, I can investigate this closer if needed(about 1/3rd of the CPU time is spent in the Linux kernel).
The remaining issues in the main menu are in 3 areas: *) Blits are very expensive. There isn't a specific blit that is expensive. Some blits are integer RGBA blits, some are float blits, some scale up, some scale down. Filtering isn't the issue *) Activating the FBOs is expensive, about 10% of total CPU time are spent in glBindFramebuffer(ARB or EXT). I did not find any obvious workaround here. *) sRGB write correction. This is a GPU limitation, and it won't bother us until we remove the CPU limitations above.
http://bugs.winehq.org/show_bug.cgi?id=23802
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #7 from Dan Kegel dank@kegel.com 2010-08-13 09:03:44 --- Feels much smoother with the patches, thanks! In fact, +fps shows the framerate *doubled* in the menu on my system (e8400, Geforce GT 220, ubuntu 10.04, 2.6.32-24-generic-pae), from 8.5fps to 19fps.
(However, there's something funky going on with the sound. I'm not hearing all the sounds I should, and it's possible that some flaky sound problem is artificially improving things.)
http://bugs.winehq.org/show_bug.cgi?id=23802
--- Comment #8 from Stefan Dösinger stefandoesinger@gmx.at 2010-08-13 10:58:11 --- Did the patches double the framerate, or some other change? In my case some other change accounted for most of the improvement(6->16 fps), the patches are just some minor change(16->17)
http://bugs.winehq.org/show_bug.cgi?id=23802
--- Comment #9 from Dan Kegel dank@kegel.com 2010-08-13 11:34:05 --- I ran with and without patches. The menu was definitely twice as fast with the patches. I'm going to repeat the measurements on another computer.
http://bugs.winehq.org/show_bug.cgi?id=23802
--- Comment #10 from Dan Kegel dank@kegel.com 2010-08-13 12:53:33 --- The improvements continue on my i7 / gt 240 / 2.6.33-custom gentoo system. where performance *tripled* on the menu; it went from 9fps with current git to 28fps with current git + the two patches.
http://bugs.winehq.org/show_bug.cgi?id=23802
--- Comment #11 from Dan Kegel dank@kegel.com 2011-02-12 01:30:27 CST --- What's the status of these patches?
I just tested this game again, and it's horridly slow without them.
http://bugs.winehq.org/show_bug.cgi?id=23802
Alexander B googlolam@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |googlolam@gmail.com
--- Comment #12 from Alexander B googlolam@gmail.com 2012-09-13 13:08:27 CDT --- also affected :
Need For Speed Hot Pursuit 2010 (Bug 31078), Dirt 2 demo (Bug 30655), Dirt 3
http://bugs.winehq.org/show_bug.cgi?id=23802
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=23802
Berillions berillions@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |berillions@gmail.com
--- Comment #13 from Berillions berillions@gmail.com 2013-05-30 14:59:02 CDT --- (In reply to comment #12)
also affected :
Need For Speed Hot Pursuit 2010 (Bug 31078), Dirt 2 demo (Bug 30655), Dirt 3
This bug affect "Splinter Cell : Conviction".
http://bugs.winehq.org/show_bug.cgi?id=23802
Andrey Gusev andrey.goosev@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |andrey.goosev@gmail.com
--- Comment #14 from Andrey Gusev andrey.goosev@gmail.com 2013-12-10 08:58:39 CST --- Tried in 1.7.8 without attached patches. Framerate is normal. Nvidia driver 331.20
http://bugs.winehq.org/show_bug.cgi?id=23802
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #15 from Austin English austinenglish@gmail.com 2013-12-10 12:35:31 CST --- Reported fixed.
https://bugs.winehq.org/show_bug.cgi?id=23802
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #16 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.9.