http://bugs.winehq.org/show_bug.cgi?id=26980
Summary: FFXI: Depth Sorting Broken Product: Wine Version: unspecified Platform: x86 OS/Version: Mac OS X 10.6 Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: cpansky@azlance.com
Commit 96b758f7b37033bf382ce40dd3310965d3ac3f76 (d3d: Map D3DRS_ZBIAS to WINED3DRS_DEPTH_BIAS) seems to have messed up FFXI's depth sorting. Causing polygons that are behind others to be rendered in front. For instance the cloud weather effect on the character screen now appears on top of the characters instead of behind them. This continues within the game itself across all the geometry.
http://bugs.winehq.org/show_bug.cgi?id=26980
Cedric cpansky@azlance.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com
http://bugs.winehq.org/show_bug.cgi?id=26980
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefandoesinger@gmx.at
--- Comment #1 from Stefan Dösinger stefandoesinger@gmx.at 2011-04-30 16:51:11 CDT --- I guess the mapping between the ZBIAS and DEPTHBIAS values isn't quite right. Thinking about it, mapping the 0;16 range to the entire z buffer range is probably too much. Can you attach a screenshot of the problem? I'm wondering if there are just the decals broken or if different objects don't intersect properly.
http://bugs.winehq.org/show_bug.cgi?id=26980
--- Comment #2 from Cedric cpansky@azlance.com 2011-04-30 18:37:30 CDT --- Created an attachment (id=34413) --> (http://bugs.winehq.org/attachment.cgi?id=34413) FFXI: Pre ZBias change, working
The clouds are behind the trees and all the hills up ahead aren't clipped by bits of the hills beyond them.
http://bugs.winehq.org/show_bug.cgi?id=26980
--- Comment #3 from Cedric cpansky@azlance.com 2011-04-30 18:38:33 CDT --- Created an attachment (id=34414) --> (http://bugs.winehq.org/attachment.cgi?id=34414) FFXI: After ZBias change
Clouds are in front of the trees and pieces of distant hills are in front of the nearby hills.
http://bugs.winehq.org/show_bug.cgi?id=26980
--- Comment #4 from Stefan Dösinger stefandoesinger@gmx.at 2011-05-01 03:20:16 CDT --- Ah yes, looks like the Z bias is way too big
http://bugs.winehq.org/show_bug.cgi?id=26980
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gyebro69@gmail.com
--- Comment #5 from GyB gyebro69@gmail.com 2011-05-05 13:36:20 CDT --- In Sniper Elite, decals (bullet holes and bloodstains) are visible through the walls. This is due to the same commit:
96b758f7b37033bf382ce40dd3310965d3ac3f76 is the first bad commit commit 96b758f7b37033bf382ce40dd3310965d3ac3f76 Author: Stefan Dösinger stefan@codeweavers.com Date: Thu Apr 21 22:36:11 2011 +0200
d3d: Map D3DRS_ZBIAS to WINED3DRS_DEPTHBIAS.
ZBIAS was removed in d3d9 and replaced with DEPTHBIAS. Currently wined3d implements both independently which will cause trouble if we want to set the depthbias value depending on the depth stencil format.
Sniper Elite demo (~630 MB): http://www.gamershell.com/download_12731.shtml
wine-1.3.19-165-g0c69e7f Fedora 14 Nvidia GeForce 250 / driver 270.41.03
http://bugs.winehq.org/show_bug.cgi?id=26980
--- Comment #6 from Stefan Dösinger stefandoesinger@gmx.at 2011-05-08 10:30:38 CDT --- Created an attachment (id=34546) --> (http://bugs.winehq.org/attachment.cgi?id=34546) Possible fix
Hi, Can you give this patch a try? It fixes the FFXI benchmark for me. However, the factor was the result of guesswork so I prefer to have it tested on a few other machines.
ddraw needs a similar change. ffxi uses d3d8, but other games that were broken by the patch that caused the ffxi regression might use d3d7.
http://bugs.winehq.org/show_bug.cgi?id=26980
--- Comment #7 from GyB gyebro69@gmail.com 2011-05-08 12:31:12 CDT --- The patch fixed the bug in Sniper Elite and decals appear where they should. Btw it's a DX9 game.
http://bugs.winehq.org/show_bug.cgi?id=26980
--- Comment #8 from Stefan Dösinger stefandoesinger@gmx.at 2011-05-08 16:29:43 CDT --- It may claim that it is a dx9 game and ship the dx9 runtime and still use d3d8.dll. You can tell for sure by creating a +d3d8,+d3d9 log and see which channel writes most output.
http://bugs.winehq.org/show_bug.cgi?id=26980
--- Comment #9 from Stefan Dösinger stefandoesinger@gmx.at 2011-05-08 16:30:12 CDT --- actually, since the patch patches d3d8.dll and works it must be a d3d8 game.
http://bugs.winehq.org/show_bug.cgi?id=26980
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #10 from Stefan Dösinger stefandoesinger@gmx.at 2011-05-11 12:15:39 CDT --- The patch is in Wine git now, resolving.
http://bugs.winehq.org/show_bug.cgi?id=26980
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #11 from Alexandre Julliard julliard@winehq.org 2011-05-13 13:33:46 CDT --- Closing bugs fixed in 1.3.20.
http://bugs.winehq.org/show_bug.cgi?id=26980
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Mac OS X 10.6 |Mac OS X