http://bugs.winehq.org/show_bug.cgi?id=31988
Bug #: 31988 Summary: Red fog covers the scene in Payday: The Heist (without native d3dx9_36) Product: Wine Version: 1.5.15 Platform: x86 OS/Version: Linux Status: NEW Severity: minor Priority: P2 Component: directx-d3dx9 AssignedTo: wine-bugs@winehq.org ReportedBy: gyebro69@gmail.com CC: wine-bugs@winehq.org Classification: Unclassified
Created attachment 42154 --> http://bugs.winehq.org/attachment.cgi?id=42154 terminal output
Steam automatically installs the required DirectX components when launching the game the first time, the problem occurs only if I stick to the built-in d3dx9 dlls.
The game loads to the main menu without glitches, the first sign of the problem can be observed when you start a new game: the loading screen is tinted with red. When the actual game is loaded it looks as if everything was covered with thick red fog. Plain terminal output doesn't reveal anything interesting.
Native d3dx9_36 (or d3dx9_40) is a workaround.
Nvidia 250 / driver 304.51
http://bugs.winehq.org/show_bug.cgi?id=31988
--- Comment #1 from GyB gyebro69@gmail.com 2012-10-16 12:52:33 CDT --- Created attachment 42155 --> http://bugs.winehq.org/attachment.cgi?id=42155 screenshot
http://bugs.winehq.org/show_bug.cgi?id=31988
--- Comment #2 from GyB gyebro69@gmail.com 2012-10-16 13:00:24 CDT --- Created attachment 42159 --> http://bugs.winehq.org/attachment.cgi?id=42159 +d3dx log (uncompressed 165 MB)
http://bugs.winehq.org/show_bug.cgi?id=31988
--- Comment #3 from Rico kgbricola@web.de 2012-10-17 10:23:40 CDT --- Just one example, may not be the real one we need to fix, but it should show where the problem is.
004c:trace:d3dx:parse_ctab_constant_type name ref_shadow_slice_depths, elements 1, index 16, defaultvalue (nil), regset D3DXRS_FLOAT4 004c:trace:d3dx:parse_ctab_constant_type class D3DXPC_VECTOR, type D3DXPT_FLOAT, rows 1, columns 3, elements 1, struct_members 0 ... 004c:trace:d3dx:ID3DXConstantTableImpl_GetConstant (0x104e0098)->((nil), 5) 004c:trace:d3dx:ID3DXConstantTableImpl_GetConstant Returning constant 0x104e0364 004c:trace:d3dx:ID3DXConstantTableImpl_GetConstantDesc (0x104e0098)->(0x104e0364, 0x106b2b84, 0x33f418) ... 0050:trace:d3dx:ID3DXConstantTableImpl_SetFloatArray (0x104e0098)->(0x13e408, 0x104e0364, 0x8681bb0, 3)
Which is: 1432 static HRESULT WINAPI ID3DXConstantTableImpl_SetFloatArray(ID3DXConstantTable *iface, LPDIRECT3DDEVICE9 device, 1433 D3DXHANDLE constant, CONST FLOAT *f, UINT count) ... 1439 return set_scalar_array(iface, device, constant, f, count, D3DXPT_FLOAT); ... 1024 if (desc.Class != D3DXPC_SCALAR) // 0x104e0364 is a D3DXPC_VECTOR 1025 return D3D_OK;
Setting arrays should work for vecs and matrices. It's on my todo, but I'm still fighting with some obscure problems.
http://bugs.winehq.org/show_bug.cgi?id=31988
--- Comment #4 from GyB gyebro69@gmail.com 2012-10-18 09:50:38 CDT --- I'm not good at interpreting such debug logs, but looking at the following screenshot, this could be the same problem that affects Clive Barker's Jericho, when using the built-in d3dx9 dlls. Strange, vivid colors are filling the screen during gameplay (menus are not affected). Screenshot: https://docs.google.com/open?id=0B-tTbLKBl-tOSEhUOFJHX1hmMlE
A demo for Jericho is available (>1 GB size), or I can provide further logs if you think that helps. http://www.gamefront.com/files/8639239/Clive-Barkers-Jericho-Demo/
http://bugs.winehq.org/show_bug.cgi?id=31988
--- Comment #5 from Rico kgbricola@web.de 2012-10-23 03:51:12 CDT --- I have the Jericho demo available. I'll have a look. At this time there is no further log needed.
http://bugs.winehq.org/show_bug.cgi?id=31988
--- Comment #6 from Rico kgbricola@web.de 2012-10-30 14:15:25 CDT --- Created attachment 42335 --> http://bugs.winehq.org/attachment.cgi?id=42335 Improve constant table handling
Attached is a patch, which improves the constant table handling. What's still missing is the handling of structures and *PointerArray()s.
I couldn't try the patch with Jericho, it seems to fail on a AMD 4350 with open source drivers: fixme:d3d_surface:surface_allocate_surface No GL internal format for format WINED3DFMT_R32_FLOAT. It later fails when attaching this format to the fbo.
http://bugs.winehq.org/show_bug.cgi?id=31988
--- Comment #7 from GyB gyebro69@gmail.com 2012-10-30 22:16:52 CDT --- (In reply to comment #6)
Created attachment 42335 [details] Improve constant table handling
Attached is a patch, which improves the constant table handling. What's still missing is the handling of structures and *PointerArray()s.
I couldn't try the patch with Jericho, it seems to fail on a AMD 4350 with open source drivers: fixme:d3d_surface:surface_allocate_surface No GL internal format for format WINED3DFMT_R32_FLOAT. It later fails when attaching this format to the fbo.
Thanks, the patch fixes the reported problem in both games. One problem remains in Jericho: intro videos play in black and white with built-in d3dx9_36. This could be a different problem, probably related to these messages: ... fixme:d3dcompiler:D3DCompile data 0x758668, data_size 1054, filename (null), defines (nil), include (nil), entrypoint "main", target "ps_2_0", sflags 0, eflags 0, shader 0x33e5f0, error_messages (nil) stub! err:d3dcompiler:compile_shader HLSL shader parsing failed. ...
http://bugs.winehq.org/show_bug.cgi?id=31988
--- Comment #8 from GyB gyebro69@gmail.com 2013-01-08 09:01:13 CST --- *** Bug 32001 has been marked as a duplicate of this bug. ***
http://bugs.winehq.org/show_bug.cgi?id=31988
Yuri Shishenko yurishish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |yurishish@gmail.com
--- Comment #9 from Yuri Shishenko yurishish@gmail.com 2013-06-07 14:35:03 CDT --- Fixed? I wasnt override this dll but see no red fog. I'm usin 1.5.31.
http://bugs.winehq.org/show_bug.cgi?id=31988
--- Comment #10 from GyB gyebro69@gmail.com 2013-06-07 18:38:38 CDT --- (In reply to comment #9)
Fixed? I wasnt override this dll but see no red fog. I'm usin 1.5.31.
Still an issue in 1.6-rc1.
http://bugs.winehq.org/show_bug.cgi?id=31988
Rico kgbricola@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #42335|0 |1 is obsolete| |
--- Comment #11 from Rico kgbricola@web.de 2013-06-25 05:56:40 CDT --- Created attachment 44960 --> http://bugs.winehq.org/attachment.cgi?id=44960 Improve constant table handling (try 2)
Slightly new version: - pointer arrays should work - initial struct handling (it may not be perfect, especially for deeper structs)
Still missing: - SetDefaults - Clean up the code and add some more comments for the corner cases
This will hit the git after 1.6.
Could you please try it with the mentioned games. It should be a lot better than the old patch. Well, it may be the case, that the games don't use the newly added features, at least it would be nice to check if there are no regressions to the last patch.
http://bugs.winehq.org/show_bug.cgi?id=31988
--- Comment #12 from Rico kgbricola@web.de 2013-07-22 14:52:25 CDT --- Should be fixed by commit 8231c8ef50ca26f9e9208ffe3db4563f9a77dc6c . Please give it a try. Patches for SetDefaults and for structs are not yet send, but they are not needed for this bug, I think.
http://bugs.winehq.org/show_bug.cgi?id=31988
GyB gyebro69@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |8231c8ef50ca26f9e9208ffe3db | |4563f9a77dc6c Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #13 from GyB gyebro69@gmail.com 2013-07-22 20:03:29 CDT --- (In reply to comment #12)
Should be fixed by commit 8231c8ef50ca26f9e9208ffe3db4563f9a77dc6c . Please give it a try. Patches for SetDefaults and for structs are not yet send, but they are not needed for this bug, I think.
Thanks for all of your efforts to fix this bug, it is indeed fixed in wine-1.6-59-g7e136d6.
http://bugs.winehq.org/show_bug.cgi?id=31988
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #14 from Alexandre Julliard julliard@winehq.org 2013-08-02 13:18:48 CDT --- Closing bugs fixed in 1.7.0.