http://bugs.winehq.org/show_bug.cgi?id=29325
Bug #: 29325 Summary: Stranded II: laggy mouse pointer in the inventory screen Product: Wine Version: 1.3.32 Platform: x86 URL: http://www.strandedonline.de/s2_download.php OS/Version: Linux Status: NEW Keywords: download, regression Severity: minor Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: gyebro69@gmail.com CC: hverbeet@gmail.com Classification: Unclassified Regression SHA1: 2da4f87a7e7551f17cd650ef6d8596f595efc13b
I came across the problem while checking bug #21238.
The problem: movement of the mouse pointer becomes extremely slow/laggy if I open the inventory screen in Stranded 2. Other screens (diary, character info) don't exhibit the problem.
Terminal output doesn't reveal anything interesting. The problem appeared in 1.3.32 and is still present in wine-1.3.34-202-gb0f704d. The result of the regression test:
2da4f87a7e7551f17cd650ef6d8596f595efc13b is the first bad commit commit 2da4f87a7e7551f17cd650ef6d8596f595efc13b Author: Henri Verbeet hverbeet@codeweavers.com Date: Mon Oct 24 20:45:42 2011 +0200
wined3d: Upload directly from the source surface in wined3d_surface_blt(), if possible.
This avoids either loading sysmem surfaces into video memory (wasting GPU memory) and then doing a blit on the GPU, or downloading GPU surfaces to sysmem, doing a blit on the CPU, and likely uploading it again. This mostly matters for ddraw and d3d8 applications, d3d9 already has to go through wined3d_device_update_surface() to transfer data from sysmem surfaces to GPU surfaces.
:040000 040000 de2e083e774b6605b4330430830583b12fb510f4 16fd239dcdf7e70872e0ff77f91e66b135638d2b M dlls
git checkout 2da4f87a7e7551f17cd650ef6d8596f595efc13b >>slow mouse pointer git reset --hard HEAD^ >>smooth mouse movement
Steps to reproduce the problem: In the main menu select <Adventure>, skip the intro. Press 'c' to open the inventory screen. You can observe that the mouse pointer becomes very sluggish (compared to the rest of the game).
Fedora 16 x86 Nvidia 250 / driver 290.10 X.Org X Server 1.11.2
http://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #1 from Henri Verbeet hverbeet@gmail.com 2012-01-27 11:30:49 CST --- This happens because the application does several blits from a surface to the backbuffer, both of which have the WINED3DFMT_B8G8R8X8_UNORM format. Since we translate that format to an GL_RGB8 internal format and use GL_BGRA with GL_UNSIGNED_INT_8_8_8_8_REV for uploading, perhaps the driver ends up masking out the alpha channel during the upload, which would explain the performance hit. We may be able to fix that by using a GL_RGBA8 internal format instead and using EXT_texture_swizzle to force the alpha channel to 1 instead. It would be better if we could somehow determine that the source surface is safe to load into video memory and blit on the GPU instead, but I'm afraid ddraw might not give us enough information to make that decision in a reliable way.
http://bugs.winehq.org/show_bug.cgi?id=29325
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #2 from joaopa jeremielapuree@yahoo.fr 2012-11-19 01:23:34 CST --- Still a bug in current wine?
http://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #3 from GyB gyebro69@gmail.com 2012-11-19 01:30:06 CST --- (In reply to comment #2)
Still a bug in current wine?
Still present in wine-1.5.17-149-g098b3c7
Nvidia gfx card/binary drivers 304.60
http://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #4 from Henri Verbeet hverbeet@gmail.com 2013-06-12 08:43:44 CDT --- I imagine this still happens with current Wine, but do you happen to know if Nouveau behaves any better here?
http://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #5 from GyB gyebro69@gmail.com 2013-06-13 14:37:38 CDT --- (In reply to comment #4)
I imagine this still happens with current Wine, but do you happen to know if Nouveau behaves any better here?
Yes, the problem is still present in wine-1.6-rc1-47-gf8c7cd9, Nvidia binary drivers 319.23. With the open source Nouveau driver the problem doesn't exist, the mouse cursor is moving at normal speed.
https://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #6 from Béla Gyebrószki gyebro69@gmail.com --- Still present in wine-1.7.33-40-gca51e11, Nvidia binary drivers 340.65 Could it be a Nvidia driver issue because I can't reproduce the problem with Nouveau?
https://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #7 from Henri Verbeet hverbeet@gmail.com --- (In reply to Béla Gyebrószki from comment #6)
Still present in wine-1.7.33-40-gca51e11, Nvidia binary drivers 340.65 Could it be a Nvidia driver issue because I can't reproduce the problem with Nouveau?
Yeah, likely, although that doesn't necessarily mean it's doing anything wrong in this case. See also comment 1.
https://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #8 from Béla Gyebrószki gyebro69@gmail.com --- Still present in 1.8-rc1 and with Nvidia binary drivers 340.96. I can't reproduce the problem with Nouveau and current Mesa.
stranded2_setup_en.exe sha1: 00c09d84cf9394a4b024aa426647c380ff09c561
https://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #9 from Béla Gyebrószki gyebro69@gmail.com --- Still present in Wine 1.9.12 with Nvidia binary drivers 340.96 (GeForce GTS 250) and 364.19 (GeForce GT 730).
https://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #10 from Henri Verbeet hverbeet@gmail.com --- Created attachment 56718 --> https://bugs.winehq.org/attachment.cgi?id=56718 patch
Does this patch help?
https://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #11 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Henri Verbeet from comment #10)
Created attachment 56718 [details] patch
Does this patch help?
Yes, it fixes the problem, thank you.
OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GT 730/PCIe/SSE2 OpenGL core profile version string: 4.5.0 NVIDIA 375.26
https://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #12 from Béla Gyebrószki gyebro69@gmail.com --- On the other hand, the patch results in very dark screens in Age of Wonders 3:
https://imgur.com/a/8V9sn https://imgur.com/a/BfzME
https://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #13 from Béla Gyebrószki gyebro69@gmail.com --- If you want to reproduce the dark screen issue, actually, quite a few games are affected. It is present with nouveau/mesa too. Here are some demos that have the bug:
Candytron demo: https://files.scene.org/view/demos/groups/farb-rausch/fr-030_candytron_final...
Technobabylon demo (181M): http://www.technobabylon-game.com/demo
Space Interceptor demo (118M): http://www.fileplanet.com/146450/140000/fileinfo/Space-Interceptor-Demo
https://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #14 from Henri Verbeet hverbeet@gmail.com --- Created attachment 56730 --> https://bugs.winehq.org/attachment.cgi?id=56730 patch
New patch. Looks like the fallback in swapchain_blit() doesn't handle sRGB decode correctly. It's a bit unfortunate that adding the fixup ends up disabling FBO blits for the format.
https://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #15 from Béla Gyebrószki gyebro69@gmail.com --- (In reply to Henri Verbeet from comment #14)
Created attachment 56730 [details] patch
New patch. Looks like the fallback in swapchain_blit() doesn't handle sRGB decode correctly. It's a bit unfortunate that adding the fixup ends up disabling FBO blits for the format.
Is this patch going to make it into Wine 2.0 Stable? Just asking because several games still suffer from regressions with the patch. Most notably: - anti-aliasing not handled properly by multiple games, resulting in completely black or white (nouveau) screens. - some games have miscolored, blunt, washed away textures regardless of the graphical details set in the game options. Let me know if you need more details (demos available for the affected games).
https://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #16 from Henri Verbeet hverbeet@gmail.com --- (In reply to Béla Gyebrószki from comment #15)
Is this patch going to make it into Wine 2.0 Stable?
Probably not, it seems a little too risky compared to what it fixes.
Still, it would be good to know about things this breaks, since I'll likely give it a try right after 2.0.
https://bugs.winehq.org/show_bug.cgi?id=29325
--- Comment #17 from joaopa jeremielapuree@yahoo.fr --- Still a bu in current wine? (wine-3.11)
https://bugs.winehq.org/show_bug.cgi?id=29325
Béla Gyebrószki gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |6fc027e5acfb7f7c7f50af42165 | |8e5442e896588
--- Comment #18 from Béla Gyebrószki gyebro69@gmail.com --- Fixed by https://source.winehq.org/git/wine.git/commitdiff/6fc027e5acfb7f7c7f50af4216...
Works only when GLSL is enabled, with disabled GLSL performance on the inventory screen is still crappy.
https://bugs.winehq.org/show_bug.cgi?id=29325
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #19 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.12.