http://bugs.winehq.org/show_bug.cgi?id=26617
Summary: Need for Speed Shift 2: large black squares appear in cockpit, obscuring much of the screen Product: Wine Version: 1.3.16 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
It's as if part of the screen is censored. The black blocks usually show up after about twenty or forty seconds of racing. They're there even on lowest settings. Makes game unplayable.
There are quite a few messages like this:
fixme:d3d_surface:surface_load_location Downloading RGB surface 0x79f9eb50 to reload it as sRGB. fixme:d3d_surface:IWineD3DBaseSurfaceImpl_Blt Filter WINED3DTEXF_LINEAR not supported in software blit. fixme:d3d_surface:IWineD3DBaseSurfaceImpl_Blt Stretched blit not implemented for bpp 64!
http://bugs.winehq.org/show_bug.cgi?id=26617
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |scott@open-vote.org
--- Comment #1 from Wylda wylda@volny.cz 2011-06-26 09:02:58 CDT --- *** Bug 26837 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=26617
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #2 from joaopa jeremielapuree@yahoo.fr 2011-09-03 05:23:12 CDT --- still a bug in current wine?
http://bugs.winehq.org/show_bug.cgi?id=26617
Ben ben@wardmail.org.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ben@wardmail.org.uk
--- Comment #3 from Ben ben@wardmail.org.uk 2011-10-18 17:48:15 CDT --- This happened on my MS Windows XP Pro x64 machine and continues to happen on Windows 7 Pro x64.
I beleive it is to do with the video card (nvidia 7950 GT) being 'unsupported'. Am running latest drivers with no change. As this bug occurs in windows I would venture that the issue lies with the product itself and not the wine compatability layer.
http://bugs.winehq.org/show_bug.cgi?id=26617
Chris ckrock@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ckrock@web.de
--- Comment #4 from Chris ckrock@web.de 2012-09-14 10:00:31 CDT --- (In reply to comment #3)
This happened on my MS Windows XP Pro x64 machine and continues to happen on Windows 7 Pro x64.
I beleive it is to do with the video card (nvidia 7950 GT) being 'unsupported'. Am running latest drivers with no change. As this bug occurs in windows I would venture that the issue lies with the product itself and not the wine compatability layer.
I don't think it's the problem of the graphics card! I have an Nvidia GTX460 and still the same problem! Why? And why I don't have the problem in the demo-version of this game?
http://bugs.winehq.org/show_bug.cgi?id=26617
Yuri Shishenko yurishish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |yurishish@gmail.com
--- Comment #5 from Yuri Shishenko yurishish@gmail.com 2013-02-23 05:21:44 CST --- Im using gtx660 with latest stable drivers and this stupid squares still appears in 1.5.24.
http://bugs.winehq.org/show_bug.cgi?id=26617
Swater96 Swater96@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |Swater96@hotmail.com
--- Comment #6 from Swater96 Swater96@hotmail.com 2013-08-06 17:11:36 CDT --- Nvidia gtx 580 class and I do have the black box bug on Linux but works fine on windows. Maybe it's a matter of spoofing the video card in the game config files.
http://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #7 from Yuri Shishenko yurishish@gmail.com 2013-08-26 01:29:50 CDT --- This bug still appears in 1.7.0. I'm using GTX 660 with 325.15 driver.
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #8 from Austin English austinenglish@gmail.com --- This is your friendly reminder that there has been no bug activity for over a year. Is this still an issue in current (1.7.37 or newer) wine? If so, please attach the terminal output in 1.7.37 (see http://wiki.winehq.org/FAQ#get_log).
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #9 from Yuri Shishenko yurishish@gmail.com --- (In reply to Austin English from comment #8)
This is your friendly reminder that there has been no bug activity for over a year. Is this still an issue in current (1.7.37 or newer) wine? If so, please attach the terminal output in 1.7.37 (see http://wiki.winehq.org/FAQ#get_log).
Yes, this is still an issue in 1.7.37. Black squares still appears.
https://bugs.winehq.org/show_bug.cgi?id=26617
uselessfire@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |uselessfire@gmail.com
--- Comment #10 from uselessfire@gmail.com --- Created attachment 50910 --> https://bugs.winehq.org/attachment.cgi?id=50910 wine log
this is the log. My version of wine is 1.7.36. Black squares still appears.
https://bugs.winehq.org/show_bug.cgi?id=26617
games4tux tioneobrasil@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tioneobrasil@gmail.com
--- Comment #11 from games4tux tioneobrasil@gmail.com --- I have two tips about this issue, it might help to find the solution. The first tip works only with the game in full screen. With antialias off. During the race, when the black squares appear, if the user press alt-tab to change window and press alt-tab again to get back in the game, the black squares disappear. The second tip, in case the game NFS Shift2Unleashed, is to activate the antialias, choose normal mode, and the black squares no longer appear. But the game gets heavy with low FPS. You need a good video card.
Why the black squares disappear when switching between active Windows? Resolving this issue, might solve the problem.
I hope I helped.
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #12 from games4tux tioneobrasil@gmail.com --- About Shift2 Unleashed and black squares on screen. The game works normally with the drive radeon opensource. Not tested with the opensource drive from nvidia.
https://bugs.winehq.org/show_bug.cgi?id=26617
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |vboldizsar24@mailbox.hu
--- Comment #13 from Anastasius Focht focht@gmx.net --- *** Bug 36773 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #14 from Yuri Shishenko yurishish@gmail.com --- (In reply to games4tux from comment #11)
I have two tips about this issue, it might help to find the solution. The first tip works only with the game in full screen. With antialias off. During the race, when the black squares appear, if the user press alt-tab to change window and press alt-tab again to get back in the game, the black squares disappear. The second tip, in case the game NFS Shift2Unleashed, is to activate the antialias, choose normal mode, and the black squares no longer appear. But the game gets heavy with low FPS. You need a good video card.
Why the black squares disappear when switching between active Windows? Resolving this issue, might solve the problem.
I hope I helped.
Just tried to play this game with Nvidia GTX660 and proprietary driver v352.09. I tied both anti aliasing enabled modes but black squares still appears. After pressing alt-tab and switching back to the game, squares disappears but only for a moment, then squares appears on the same place. If wine virtual desktop is enabled, alt-tab does not helps.
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #15 from games4tux tioneobrasil@gmail.com --- Shif2 Unleashed For anti aliasing work must configure the Multisampling to Enabled in wine\Direct3D Be fun!
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #16 from Yuri Shishenko yurishish@gmail.com --- (In reply to games4tux from comment #15)
Shif2 Unleashed For anti aliasing work must configure the Multisampling to Enabled in wine\Direct3D Be fun!
I think it was enabled by default in 1.7. Anyway, i enabled this option in winetricks and changed settings in game but squares still appears.
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #17 from games4tux tioneobrasil@gmail.com --- I made a video showing the Shift2 running perfectly on my Radeon HD 6670 Visit the link below to view:
https://drive.google.com/file/d/0B4LOaS_XGGt8SHUwNWoyTENPZWs/view?usp=sharin...
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #18 from games4tux tioneobrasil@gmail.com --- I made a video showing the Shift2 running perfectly on my Radeon HD 6670 Visit the link below to view:
https://drive.google.com/file/d/0B4LOaS_XGGt8SHUwNWoyTENPZWs/view?usp=sharin...
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #19 from Yuri Shishenko yurishish@gmail.com --- Black squares still appears in wine 1.9.1 and wine-staging 1.9.1. Enabling multisampling in winetricks and changing settings in game does not fixes the problem. Screenshot: http://i.imgur.com/UXhknY2.png
Squares disappears after switching to another program and back to the game (alt-tab) but then reappears during gameplay.
This wine output may be related: fixme:d3d:wined3d_debug_callback 0x32f0de0: "Program undefined behavior warning: Sampler object 41 has depth compare enabled but is bound to a non-depth texture, and used by a program that samples it with a shadow sampler. This is undefined behavior.".
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #20 from games4tux tioneobrasil@gmail.com --- I conducted tests using wine 1.7.44-gallium-nine on Playonlinux/Q4wine with native Direct3D enabled on my Radeon HD7770 using opensource driver radeonsi/gallium Black squares disappear, the game runs fine. I had problems with shadows and the replay. I came back to play the Shift 2 Unleashed!
https://bugs.winehq.org/show_bug.cgi?id=26617
winetest@luukku.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetest@luukku.com
--- Comment #21 from winetest@luukku.com --- This is from appdb
"My hardware: 8 GB ram Intel Core i3 HD Radeon 128-bit 2 GB 6670 The game runs normally. Reached the mark of 33 fps with opensource radeon drive in 1366 x 768 video resolution. With the AMD Catalyst driver cannot run the game normally, always appears the black squares. To fix the problem of black squares, have to activate the antialias the game in video options, solves 99% of cases, but reduces the fps to 21 fps at 800 x 600 video resolution."
wine 1.7.39
Can we draw any conclusion out of this?
https://bugs.winehq.org/show_bug.cgi?id=26617
mo78@abv.bg changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mo78@abv.bg
--- Comment #22 from mo78@abv.bg --- This bug still appears in wine 2.21, wine-staging 2.21 and 3.0-rc3. Only alt+tab helps for a few seconds. Nvidia TGX 1080Ti here. It's obvious a problem with Nvidia video cards.
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #23 from mo78@abv.bg --- GTX*, I'm sorry.
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #24 from mo78@abv.bg --- Wine 3.6 - the bug is still here.
https://bugs.winehq.org/show_bug.cgi?id=26617
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #25 from mo78@abv.bg --- Wine 4.7 - the bug is still here.
https://bugs.winehq.org/show_bug.cgi?id=26617
pattietreutel katyaberezyaka@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |katyaberezyaka@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #26 from mo78@abv.bg --- Wine 4.8 - the bug is still here.
https://bugs.winehq.org/show_bug.cgi?id=26617
Paul Gofman gofmanp@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gofmanp@gmail.com
--- Comment #27 from Paul Gofman gofmanp@gmail.com --- Created attachment 64443 --> https://bugs.winehq.org/attachment.cgi?id=64443 0 * inf hack
(In reply to mo78 from comment #26)
Wine 4.8 - the bug is still here.
Since the bug might be Nvidia only, can you try it with HKCU\Software\Wine\Direct3D\strict_shader_math set to 1 (DWORD value)? And if it does not help, also with the attached patch to exclude that sort of issues.
Apart from these problems, the old log suggests it might still need d3dcompiler_47 native override.
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #28 from mo78@abv.bg --- Thank you :)
I tried the reg setting to no avail. I use d3dcompiler_47 as a override.
Unfortunately the patch can't be aplied:
patching file dlls/wined3d/glsl_shader.c Hunk #1 FAILED at 1204. Hunk #2 succeeded at 2449 (offset -108 lines). Hunk #3 succeeded at 3976 (offset -138 lines). Hunk #4 succeeded at 4167 (offset -138 lines). Hunk #5 succeeded at 4193 (offset -138 lines). Hunk #6 succeeded at 4434 (offset -138 lines). Hunk #7 succeeded at 4496 (offset -138 lines). Hunk #8 succeeded at 4834 (offset -138 lines). 1 out of 8 hunks FAILED -- saving rejects to file dlls/wined3d/glsl_shader.c.rej
Do I have to revert HKCU\Software\Wine\Direct3D\strict_shader_math set to 1 setting now?
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #29 from Paul Gofman gofmanp@gmail.com --- (In reply to mo78 from comment #28)
I tried the reg setting to no avail. I use d3dcompiler_47 as a override.
Unfortunately the patch can't be aplied:
Sorry, it was wrongly based on staging. But failed chunk is just an unrelated TRACE, you can build this way, it changes nothing.
Do I have to revert HKCU\Software\Wine\Direct3D\strict_shader_math set to 1 setting now?
I suggest you keep it for this try. And maybe also set CheckFloatConstants value to 'enabled' (string value), to check it all at once.
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #30 from mo78@abv.bg --- Yes the bug is resolved with this patch without reg tinkering, only d3dcompiler_47 override and physx installed. Thank you so much!!!
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #31 from Paul Gofman gofmanp@gmail.com --- Did you check that patch is responsible for that alone, or (one of) registry tweaks actually do that?
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #32 from Paul Gofman gofmanp@gmail.com --- (In reply to Paul Gofman from comment #31)
Did you check that patch is responsible for that alone, or (one of) registry tweaks actually do that?
Oh sorry, can't read two lines of text today, you wrote that already. So this is another duplicate of Bug #34266. Sadly, such a patch can't go upstream, too bad even for a registry key.
I am surprised it is reported to work with non-Nvidia card, it is strange. Maybe those test relate to d3d Nine?
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #33 from mo78@abv.bg --- The patch resolves the problem without anything else :)
Why it can't go upstream?
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #34 from Paul Gofman gofmanp@gmail.com --- (In reply to mo78 from comment #33)
Why it can't go upstream?
See https://bugs.winehq.org/show_bug.cgi?id=34266#c6.
The performance impact of a generic patch like this is disastrous, I can imagine 5-10 times drop in shader performance. It is not an option to consider. There are less invasive approaches, like avoiding infinity in 1/x, 1/sqrt(x) functions, but these are:
- not universal, it will help some games suffering from this problem, but won't help some other; - can cause bugs in the other games; - still affect performance.
Unfortunately we can't expect this problem to be solved through d3d9 to Vulkan translation also, Vulkan math (and Microsoft d3d10+) follow IEEE fp conventions like opengl.
So for now such patch like this can probably only appear as an app specific hack in special builds. I am not sure, maybe we can discuss if some hack like this can be considered for Staging as configurable option, at least to give a way to diagnose this easily. Yet I am not sure I would want to suggest to add such a registry key, people will leave it on just in case in recycled Wine prefixes and then report terrible performance. Don't know, maybe through the environment variable, so it couldn't be set persistent for Wine prefix.
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #35 from mo78@abv.bg --- Hmm, that's a bad news... Thank you :)
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #36 from mo78@abv.bg --- Now I think - can you post a patch for avoiding infinity in 1/x, 1/sqrt(x) functions and the users who want to play the game will use it :)
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #37 from Paul Gofman gofmanp@gmail.com --- Created attachment 64452 --> https://bugs.winehq.org/attachment.cgi?id=64452 Workaround 0 * inf by avoiding inf in rsq, rcp
You can try this one, but it won't necessarily help. And I still don't recommend using it in universally used builds, it may cause regressions and have performance impact.
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #38 from mo78@abv.bg --- Thank you!
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #39 from mo78@abv.bg --- With the second patch the black squares are back :(
https://bugs.winehq.org/show_bug.cgi?id=26617
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #40 from Zebediah Figura z.figura12@gmail.com --- I think Staging would be open to using a patch that forces the 0-wins behaviour, but it'd need to be done right and not cause regressions. I'll leave it up to anyone else to decide if such a patch is worth writing.
I guess the right way to solve this problem is with an OpenGL extension?
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #41 from Henri Verbeet hverbeet@gmail.com --- (In reply to Zebediah Figura from comment #40)
I guess the right way to solve this problem is with an OpenGL extension?
Yes, and/or potentially a SPIR-V one.
https://bugs.winehq.org/show_bug.cgi?id=26617
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE
--- Comment #42 from Matteo Bruni matteo.mystral@gmail.com --- Eh, after deduplicating a bunch of bugs into bug 34266, I noticed this one. It might have made sense to use this one instead, oh well.
*** This bug has been marked as a duplicate of bug 34266 ***
https://bugs.winehq.org/show_bug.cgi?id=26617
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #43 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Duplicate
https://bugs.winehq.org/show_bug.cgi?id=26617
--- Comment #44 from games4tux tioneobrasil@gmail.com --- Hello
With wine-staging 4.10 + d9vk 0.12 or major , the game runs normal without black squares on screen.
My hardware: Radeon HD 7770 mesa 19.1.5