http://bugs.winehq.org/show_bug.cgi?id=13025
Summary: Supreme Commander: Incorrect z-buffering (regression) Product: Wine Version: 0.9.61. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: trivial Priority: P2 Component: -unknown AssignedTo: wine-bugs@winehq.org ReportedBy: tdb@tdb.fi
Z-Buffering in Supreme Commander with Wine 0.9.61 is acting funny. Things that should normally be underground are visible, shield effect overlap is wrong, buildings obscure things in fromt of them. This is very prominently visible in the Aeon construction effect, and when rotating camera at ground level. Also water seems to be rendered over most units that should float on the surface.
Wine 0.9.60 works correctly. I will post screenshots and try to do a bisection later when I get some hardware problems sorted out. I don't really know what trace would be useful but can provide one on request.
http://bugs.winehq.org/show_bug.cgi?id=13025
--- Comment #1 from Mikko Rasa tdb@tdb.fi 2008-05-07 16:07:24 --- Created an attachment (id=12806) --> (http://bugs.winehq.org/attachment.cgi?id=12806) screenshots of incorrect z-buffering
Correct ones (from wine 0.9.60) on the left, incorrect ones (from wine 0.9.61) on the right.
http://bugs.winehq.org/show_bug.cgi?id=13025
--- Comment #2 from Mikko Rasa tdb@tdb.fi 2008-05-07 18:51:06 --- I did a git bisect, and it reported this:
4428cc32de1f99463ebaa990726c8bd7a3eef6c4 is first bad commit commit 4428cc32de1f99463ebaa990726c8bd7a3eef6c4 Author: Roderick Colenbrander thunderbird2k@gmx.net Date: Mon Apr 28 21:13:12 2008 +0000
wined3d: Fix a few small bugs in WineD3D_ChoosePixelFormat.
:040000 040000 6e6e5f451c4a9961328c12a57c3042b6b622067c b5090b2050987a2273e1e20d55c91be1117c1c92 M dlls
The culprit is the middle hunk, i.e. this:
- } else { + } else if(!iPixelFormat) {
The game is not requesting an automatic depth/stencil buffer, so WineD3D_ChoosePixelFormat doesn't give it one. However, this bug allows it to call ChoosePixelFormat even though a valid one was already found. It finds the exact same pixel format, but apparently somehow with a depth buffer.
http://bugs.winehq.org/show_bug.cgi?id=13025
--- Comment #3 from Roderick Colenbrander thunderbird2k@gmx.net 2008-05-08 14:37:55 --- The patch in question is correct. WineD3D_ChoosePixelFormat first searches for a format in its (cached) opengl pixel format table. If nothing is found in there and findCompatible is set it defaults to ChoosePixelFormat.
Previously by accident it defaulted to ChoosePixelFormat in nearly all cases basically that ignores the previous search in wined3d its own pixel format table.
What needs to be investigated is why wined3d thinks that no depth stencil support is required for Supreme Commander as that's what the real bug is.
http://bugs.winehq.org/show_bug.cgi?id=13025
Roderick Colenbrander thunderbird2k@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |o6akan9@googlemail.com
--- Comment #4 from Roderick Colenbrander thunderbird2k@gmx.net 2008-05-10 05:26:17 --- *** Bug 13078 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=13025
--- Comment #5 from Rico kgbricola@web.de 2008-05-10 05:49:12 --- Created an attachment (id=12871) --> (http://bugs.winehq.org/attachment.cgi?id=12871) +d3d cod2 log with AA
Here is no Z-Buffer issue.
http://bugs.winehq.org/show_bug.cgi?id=13025
--- Comment #6 from Rico kgbricola@web.de 2008-05-10 05:49:35 --- Created an attachment (id=12872) --> (http://bugs.winehq.org/attachment.cgi?id=12872) +d3d cod2 log with AA
Here is no Z-Buffer issue.
http://bugs.winehq.org/show_bug.cgi?id=13025
--- Comment #7 from Rico kgbricola@web.de 2008-05-10 05:51:12 --- Created an attachment (id=12873) --> (http://bugs.winehq.org/attachment.cgi?id=12873) +d3d cod2 log without AA
Here is with Z-Buffer issue.
http://bugs.winehq.org/show_bug.cgi?id=13025
Rico kgbricola@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #12871|0 |1 is obsolete| |
--- Comment #8 from Rico kgbricola@web.de 2008-05-10 05:52:43 --- Created an attachment (id=12874) --> (http://bugs.winehq.org/attachment.cgi?id=12874) this is my glxinfo
http://bugs.winehq.org/show_bug.cgi?id=13025
--- Comment #9 from Rico kgbricola@web.de 2008-05-10 11:59:16 --- Created an attachment (id=12889) --> (http://bugs.winehq.org/attachment.cgi?id=12889) workaround for cod2
This is only a workaround for cod2.
Mikko Rasa: Could you try this with Supreme Commander?
http://bugs.winehq.org/show_bug.cgi?id=13025
--- Comment #10 from Mikko Rasa tdb@tdb.fi 2008-05-11 16:44:46 --- No effect on SupCom, and a +d3d trace doesn't show the patched function being called at all.
I tried to take a backtrace with gdb, but couldn't get suitable breakpoints inserted. Backtracing by hand failed due to my complete lack of knowledge about Direct3D.
http://bugs.winehq.org/show_bug.cgi?id=13025
Jonathan echidnaman@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |echidnaman@gmail.com
--- Comment #11 from Jonathan echidnaman@gmail.com 2008-05-12 09:59:24 --- This effects a Platinum-rated app, Robot Wars: Arenas of Destruction. (Well, platinum-rated before the bug, anyway. :P)
http://bugs.winehq.org/show_bug.cgi?id=13025
haarp liquitsnake@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |liquitsnake@gmx.net
http://bugs.winehq.org/show_bug.cgi?id=13025
Roderick Colenbrander thunderbird2k@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE
--- Comment #12 from Roderick Colenbrander thunderbird2k@gmx.net 2008-05-17 11:56:45 --- This is just the same as bug 12923. I have added a (hacky) patch to there. See if it works for these games too.
*** This bug has been marked as a duplicate of bug 12923 ***
http://bugs.winehq.org/show_bug.cgi?id=13025
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Austin English austinenglish@gmail.com 2008-10-31 13:59:15 --- Closing duplicate.