http://bugs.winehq.org/show_bug.cgi?id=28347
Summary: Severe FPS regression in Source-based games with orm=backbuffer in Wine 1.3.27 Product: Wine Version: 1.3.27 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: mooroon2@mail.ru Regression SHA1: f58e55ec6c19d65689b273938f168287797362da
Commit that fixed bug #13313 introduced severe performance regression when playing Source-based games with OffscreenRenderingMode set to backbuffer.
Just to be sure I've done regression testing and it come with the expected result:
f58e55ec6c19d65689b273938f168287797362da is the first bad commit commit f58e55ec6c19d65689b273938f168287797362da Author: Henri Verbeet hverbeet@codeweavers.com Date: Mon Aug 22 21:02:42 2011 +0200
wined3d: Move arbfp based color blits from IWineD3DSurfaceImpl_BltOverride() to wined3d_surface_blt().
:040000 040000 691c677bfa118951a0ebe7ad76500a190f05370e 5370aba8157cc4e6b91ba1a8b19555e402e77a77 M dlls
FPS drop with this commit is very significant: it can be as much as going down to ~45 from pre-commit level of ~200. I had tested it with "HL2: Episode One" at the place where Alyx is opening the doors leading into "reactor core control room" - it is the place where bug #13313 had been triggered (FPS had been droping to zero). Prior the f58e55 commit FPS level had been at around ~200 when not looking at reactor core and around 60 when looking at it. After this commit FPS level is around ~45 when not looking at reactor core and about ~20 when looking at it.
Quick test with other source-based games, notably HL2, HL2:EP2, Portal and HL:Source showed that FPS level regressed severely in each of them. I suspect that this FPS drop also affects any other Direct3D-based game but hadn't done any tests to prove it.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #1 from Alexey Loukianov mooroon2@mail.ru 2011-09-12 03:23:52 CDT --- P.S. Cant add Henri to CC list - Bugzilla do not allow me to do it.
http://bugs.winehq.org/show_bug.cgi?id=28347
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression CC| |hverbeet@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=28347
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Severe FPS regression in |Severe FPS regression in |Source-based games with |Source-based games with |orm=backbuffer in Wine |orm=backbuffer |1.3.27 |
http://bugs.winehq.org/show_bug.cgi?id=28347
Alex Bradbury asb@asbradbury.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |asb@asbradbury.org
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #2 from Henri Verbeet hverbeet@gmail.com 2011-09-12 08:56:48 CDT --- If you have a timedemo that shows this, that may be helpful.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #3 from Alexey Loukianov mooroon2@mail.ru 2011-09-12 16:08:16 CDT --- (In reply to comment #2)
If you have a timedemo that shows this, that may be helpful.
Would record it today and attach here. Do you have access to HL2:EP1 or should I use HL2:Demo to record it?
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #4 from Henri Verbeet hverbeet@gmail.com 2011-09-12 16:37:58 CDT --- HL2:EP1 or just HL2 should be ok.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #5 from Alexey Loukianov mooroon2@mail.ru 2011-09-12 17:52:52 CDT --- Created an attachment (id=36343) --> (http://bugs.winehq.org/attachment.cgi?id=36343) HL2:EP1 demos as requested by Henri (Part 1/2)
Here are requested demos. Tested on my system with Wine 1.3.28 vs. 1.3.4 (last version I've got compiled/installed without "effects rendered upside-down with orm=backbuffer" bug).
Wine 1.3.28: 89 FPS for "not looking at the core" 30 FPS for "looking at the core"
Wine 1.3.4: 192 FPS for "not looking at the core" 51 FPS for "looking at the core"
I had recorded another demo I would attach in a minute, which causes HL2.EXE complete hang when timedemo-ing it on my system in Wine version prior to commit that caused this regression. This hang might be unrelated to this bug but I attach it "just in case" so you might use it when testing.
P.S. Sorry for using 7zip, tar.bzip2 wasn't able to compress it down to less then 1000KB.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #6 from Alexey Loukianov mooroon2@mail.ru 2011-09-12 17:53:20 CDT --- Created an attachment (id=36344) --> (http://bugs.winehq.org/attachment.cgi?id=36344) HL2:EP1 demos as requested by Henri (Part 2/2)
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #7 from Alexey Loukianov mooroon2@mail.ru 2011-09-12 17:54:33 CDT --- Created an attachment (id=36345) --> (http://bugs.winehq.org/attachment.cgi?id=36345) HL2:EP1 demo that causes app hang when doing timedemo having orm=backbuffer in older versions of Wine
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #8 from Alexey Loukianov mooroon2@mail.ru 2011-09-12 17:57:12 CDT --- Upd. Scratch the PS about 7zip - it hadn't been able to produce the archive that will slip under the 1000KB limit also, so I had attached bzipped demos in a separate attachment each.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #9 from Henri Verbeet hverbeet@gmail.com 2011-09-15 09:54:29 CDT --- What kind of settings and hardware are you using? I'm actually seeing a slight increase in fps after this commit.FBO ORM is faster in either case though.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #10 from Alexey Loukianov mooroon2@mail.ru 2011-09-15 17:24:42 CDT --- Hi, Henri.
HW: GTS-250 a.k.a. GeForce 9800 a.k.a. GeForce 8800, VRAM 1024MB, CPU AMD Phenom(tm) II X4 955 Processor, RAM 6Gb.
FBO is faster, I agree. Thing is that backbuffer ORM of now much slower than it was earlier :(. I have no problems with MSAA+FBO nowdays and you have done a very cool job implementing new MSAA support into Wine. Trouble is that I can't get any kind of "transparency AA" in HL2+Wine nowdays, and the only way it was to handle prior to Wine 1.3.27 were to use msaa=enabled + orm=bb + forcing SSAAx2+MSAAx4 in driver CP.
With new Wine's MSAA implementation it seems that speed with orm=bb had regressed severely on the hw config I have at home. Nowdays I have to stick with orm=fbo + bad quality of picture or to use something like Wine 1.3.4 + orm=bb + msaa=enabled + AA=SSAAx4+MSAAx4 forced through driver CP to get the best quality that is available through Wine's d3d emulation.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #11 from Alexey Loukianov mooroon2@mail.ru 2011-09-15 17:26:23 CDT --- As for HL2 settings I can attach the game config files in case you need them.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #12 from Henri Verbeet hverbeet@gmail.com 2011-09-15 17:32:55 CDT --- (In reply to comment #11)
As for HL2 settings I can attach the game config files in case you need them.
Yeah, mostly wondering about things like e.g. display resolution or texture quality, since stretching or no stretching may make a difference for some kinds of blits.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #13 from Alexey Loukianov mooroon2@mail.ru 2011-09-16 04:14:32 CDT --- Created an attachment (id=36416) --> (http://bugs.winehq.org/attachment.cgi?id=36416) Tarball with game config files I use in HL2:EP1
Here are config files I use with HL2EP1. Usually I execute lexa2.cfg and lx2controls.cfg once after installing the game. Having "exec lexa2.cfg" in autoexec.cfg doesn't guarantees that all the cvars would be set as specified in lexa2.cfg thus it is usually required to manually execute it once in a while.
I also have got customized {HL2EP1DIR}/bin/dxsupoprt.cfg file with my videocard specs patched in under 498th id. I would attach it in a moment.
Lastly, here are command line options I pass to the hl2.exe: -novid -heapsize 2048000 +cl_showfps 2 -width 1680 -height 1050 -windowed
"-windowed" part here is used "just for now" to workaround "xinput2+steam=X11 cursor not hidden" bug #27779. Had tested game performance either in fullscreen and in windowed mode, it is pretty much the same and FPS drop with orm=bb under new Wine happens no matter was the HL2 fullscreen or windowed.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #14 from Alexey Loukianov mooroon2@mail.ru 2011-09-16 04:17:17 CDT --- Created an attachment (id=36417) --> (http://bugs.winehq.org/attachment.cgi?id=36417) Customized dxsupport.cfg file with GTS-250 specs patched in.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #15 from Alexey Loukianov mooroon2@mail.ru 2011-09-20 10:48:30 CDT --- Henri, any luck trying to reproduce the issue? Are there any other info you need from me to continue with your efforts?
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #16 from Henri Verbeet hverbeet@gmail.com 2011-09-20 10:50:58 CDT --- Sorry, haven't had time to look at this again.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #17 from Alexey Loukianov mooroon2@mail.ru 2011-09-20 11:49:29 CDT --- (In reply to comment #16)
Sorry, haven't had time to look at this again.
Oh, sorry. That's totally OK, don't rush with it. We all know how busy you are making Wine better, thanks for that.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #18 from Alexey Loukianov mooroon2@mail.ru 2011-10-13 15:00:34 CDT --- Henri, I've got a small update on the topic.
First of all, today I had changed the GPU in my home workstation, now it's GeForce GTX 550 Ti 1Gb instead of GeForce GTS 250 1Gb. I know that GTX 550 Ti despite being more modern than GTS 250 isn't much faster. Right after GPU change I spent some time re-testing FPS issues this bug is about. Looks like that on the GTX 550 Ti FPS with orm=bb is even worse than it was on the GTS 250. With Wine 1.3.28 + GTX 550 Ti I've got ~15-19 FPS when looking at the core which is 1.5 times lower than it was with 1.3.28 + GTS 250. Also I had timedemo'ed demos I had attached here, results with GTX 550 Ti are:
Wine 1.3.4 162 FPS for "not looking at core" 39 FPS for "looking at core"
Wine 1.3.28 63 FPS for "not looking at core" 15(!) FPS for "looking at code"
Second thing I want to bring your attention to is that it looks like some surfaces/shaders are broken with orm=bb + latest official nVIDIA driver 285.05.09. Examples are street screens like one with Dr.Kleiner on ep1_background02 map (open the console while in main menu and use "map_background ep1_background02" command to load this map) and the screen that was causing all the troubles fixed in bug #13313. I had tried to downgrade drivers to 280.13 and it seems to fix this render bug. Don't know if this bug belongs to Wine or to nVIDIA drivers, so it would be cool it you would find some time to look into this prior I submit another bug report.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #19 from Henri Verbeet hverbeet@gmail.com 2011-11-02 19:40:19 CDT --- Created attachment 37264 --> http://bugs.winehq.org/attachment.cgi?id=37264 patch
Could you give this patch a try?
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #20 from Alexey Loukianov mooroon2@mail.ru 2011-11-02 21:44:00 CDT --- Henri, you're a magician! Applied your patch over current git (wine-1.3.31-293-gb4987d0), created clean prefix, set orm=bb and tested resulting FPS in HP2:EP1.
Results are exciting!
Wine 1.3.31-293-gb4987d0: 190 FPS for "not looking at the core" (back to where it was with 1.3.4); 105 FPS for "with looking at the core" (2x more than it was with 1.3.4).
This bug should be marked RESOLVED as soon as the patch you attached would made its way into git.
Thanks you for such a wonderful fix!
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #21 from Henri Verbeet hverbeet@gmail.com 2011-11-04 12:21:37 CDT --- Should be fixed by 3bfecd58d282ac50463f659e427a2d3d86d12334.
http://bugs.winehq.org/show_bug.cgi?id=28347
--- Comment #22 from Alexey Loukianov mooroon2@mail.ru 2011-11-04 14:26:32 CDT --- (In reply to comment #21)
Should be fixed by 3bfecd58d282ac50463f659e427a2d3d86d12334.
Would test today and mark bug as RESOLVED in case of success.
http://bugs.winehq.org/show_bug.cgi?id=28347
Alexey Loukianov mooroon2@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #23 from Alexey Loukianov mooroon2@mail.ru 2011-11-04 21:20:23 CDT --- Fixed in 1.3.32, commit sha: 3bfecd58d282ac50463f659e427a2d3d86d12334.
http://bugs.winehq.org/show_bug.cgi?id=28347
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |3bfecd58d282ac50463f659e427 | |a2d3d86d12334
http://bugs.winehq.org/show_bug.cgi?id=28347
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #24 from Alexandre Julliard julliard@winehq.org 2011-11-18 13:03:43 CST --- Closing bugs fixed in 1.3.33.