https://bugs.winehq.org/show_bug.cgi?id=46531
Bug ID: 46531 Summary: Regression in Spellforce 2: textures flickering to darker/lighter ones Product: Wine Version: 4.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: idarktemplar@mail.ru Distribution: ---
Created attachment 63385 --> https://bugs.winehq.org/attachment.cgi?id=63385 screenshots-collage.jpeg
When playing first mission of Spellforce 2 Shadow Wars, I've noticed screen flickering. On further inspection I noticed that when you move screen to different locations on map using mouse at screen border or arrow keys, sometimes objects on screen go darker, sometimes they go back to original colours or something close to them, and on some other locations it switches between dark and usual colours few times a second. This colour switching during move of screen camera looks like some annoying screen flickering. Effect is especially noticeable if there are a lot of trees on screen.
Due to bug #34323 I was using a prefix with directx9, directplay and d3dcompiler_43 installed via winetricks.
I've tried a clean prefix with wine 3.0.3 with and without winetricks stuff, and it worked fine. After that I've switched to wine 4.0, and both with and without winetricks stuff issue appears.
After that I've tried bisecting and testing using prefix with winetricks stuff, and I've found first commit which causes issue to me. I wasn't able to revert it for wine 4.0 and test without that change.
3d6eb8cf1dc1e509a74f85fd2356c6946372ecc5 is the first bad commit commit 3d6eb8cf1dc1e509a74f85fd2356c6946372ecc5 Author: Matteo Bruni mbruni@codeweavers.com Date: Tue Feb 13 01:00:42 2018 +0100
d3d9: Handle D3DUSAGE_AUTOGENMIPMAP textures entirely in d3d9.
Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
:040000 040000 85b2524db3e32e37bf00a4cc87c0c1b63b68a6be 0fc10fb629b23703e3aa087b45b3b3960e6b5956 M dlls
Screenshots collage is in attachment. It contains two locations from first map of campaign, taken with wine 3.0.3, wine 4.0 and wine 4.0 at a bit different location (causing objects to be coloured darker). It demonstrates difference between usual screen and darker screen, and when camera is moving the change between two of them causes effect similar to flickering.
OS: Gentoo Linux x86_64 (amd64)
https://bugs.winehq.org/show_bug.cgi?id=46531
i.Dark_Templar idarktemplar@mail.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression Distribution|--- |Gentoo CC| |idarktemplar@mail.ru Regression SHA1| |3d6eb8cf1dc1e509a74f85fd235 | |6c6946372ecc5
https://bugs.winehq.org/show_bug.cgi?id=46531
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |matteo.mystral@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=46531
--- Comment #1 from Matteo Bruni matteo.mystral@gmail.com --- Thank you for the very nice bug report. Unfortunately it looks like I'm unable to reproduce the issue here. Can you give me more details? Have you changed any in-game graphical option from the default values? What GPU / drivers are you using? Also, just in case, can you attach the plain terminal output?
https://bugs.winehq.org/show_bug.cgi?id=46531
--- Comment #2 from i.Dark_Templar idarktemplar@mail.ru --- Created attachment 63654 --> https://bugs.winehq.org/attachment.cgi?id=63654 stdout_stderr.log
I've attached stdout/stderr output.
I've just tested it with wine-4.1 and it still reproduces for me.
Part of output of glxinfo: OpenGL vendor string: NVIDIA Corporation OpenGL renderer string: GeForce GTX 750/PCIe/SSE2 OpenGL core profile version string: 4.5.0 NVIDIA 415.27 OpenGL core profile shading language version string: 4.50 NVIDIA
OS: Gentoo Linux x86_64 (amd64), current kernel: 4.14.83-gentoo
Spellforce 2 graphics options: Quality of shadow: very high Quality of textury: very high Range of vision: very high Shader model: maximum Clouds: On Auto Adjust Brightness: On Grass: On Anisotropic Filtering: 16x Resolution: 1600x1200 Water Quality: High Glow: On
I've tried setting default options (except for resolution), issue still reproduces for me.
https://bugs.winehq.org/show_bug.cgi?id=46531
--- Comment #3 from i.Dark_Templar idarktemplar@mail.ru --- I've tried changing some settings and discovered that I can't reproduce issue if I change "Shader model" from "Maximum" to "1.1".
https://bugs.winehq.org/show_bug.cgi?id=46531
--- Comment #4 from i.Dark_Templar idarktemplar@mail.ru --- Created attachment 63655 --> https://bugs.winehq.org/attachment.cgi?id=63655 example.mkv
I've made a small video with demonstration of issue. I hope it shows issue a bit better than images.
I've set resolution to 800x600 in order to make video take less space.
Please let me know if additional information is required.
https://bugs.winehq.org/show_bug.cgi?id=46531
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW
--- Comment #5 from Matteo Bruni matteo.mystral@gmail.com --- Thank you for all the additional info. I can reproduce on Nvidia but not AMD. I'll have a look.
https://bugs.winehq.org/show_bug.cgi?id=46531
--- Comment #6 from Matteo Bruni matteo.mystral@gmail.com --- Created attachment 63661 --> https://bugs.winehq.org/attachment.cgi?id=63661 Hacky workaround
AFAICS it's a driver bug. The attached patch is a workaround for me.
https://bugs.winehq.org/show_bug.cgi?id=46531
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |NOTOURBUG
--- Comment #7 from Matteo Bruni matteo.mystral@gmail.com --- I looked at this with apitrace: apparently glGenerateMipmap() somehow affects the current framebuffer attachments even though the target texture has nothing to do with it.
https://bugs.winehq.org/show_bug.cgi?id=46531
--- Comment #8 from i.Dark_Templar idarktemplar@mail.ru --- Thank you for your help! Attached patch also fixes issue for me.
https://bugs.winehq.org/show_bug.cgi?id=46531
Arthur Huillet arthur.huillet@free.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |arthur.huillet@free.fr
--- Comment #9 from Arthur Huillet arthur.huillet@free.fr --- We're tracking this as NVIDIA bug 2527607. In case anyone gets to it before I can, I'd be happy to hear whether r387 or earlier versions of our driver have the problem.
https://bugs.winehq.org/show_bug.cgi?id=46531
--- Comment #10 from Arthur Huillet arthur.huillet@free.fr --- This was indeed a driver bug and it should be fixed in our 435.21 release. https://www.nvidia.com/Download/driverResults.aspx/150803/en-us (And any more recent release). Confirmation of the fix would be appreciated.
https://bugs.winehq.org/show_bug.cgi?id=46531
--- Comment #11 from i.Dark_Templar idarktemplar@mail.ru --- I've checked it on same hardware with wine 4.15, kernel 4.14.138-gentoo.
I was able to reproduce issue with nvidia-drivers-415.27-r2.
I was unable to reproduce issue with nvidia-drivers-430.40 and nvidia-drivers-435.21.
Looks like it was fixed. Thanks!
https://bugs.winehq.org/show_bug.cgi?id=46531
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from Matteo Bruni matteo.mystral@gmail.com --- (In reply to i.Dark_Templar from comment #11)
I've checked it on same hardware with wine 4.15, kernel 4.14.138-gentoo.
I was able to reproduce issue with nvidia-drivers-415.27-r2.
I was unable to reproduce issue with nvidia-drivers-430.40 and nvidia-drivers-435.21.
Looks like it was fixed. Thanks!
For me the apitrace I mentioned in comment 7 is fixed and I couldn't reproduce it in the game in my quick testing. Thank you both for the bug and the fix!