http://bugs.winehq.org/show_bug.cgi?id=33770
Bug #: 33770 Summary: Strong Bad's Cool Game for Attractive People Demo has interesting rendering glitches on initial menu screen without native d3dx_36 (purist) Product: Wine Version: 1.6-rc1 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: directx-d3dx9 AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com CC: wine-bugs@winehq.org Classification: Unclassified
First, go purist with 'winetricks alldlls=builtin', then work around bug 33769 with 'winetricks d3dcompiler_43'.
The game seems to start ok, but the initial menu screen (where Strong Bad speaks the left-hand menu items as you mouse over them) shows ghosts of Strong Bad and his sidekick when they move.
'winetricks d3dx9_36' works around the problem.
http://bugs.winehq.org/show_bug.cgi?id=33770
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://www.strategyinformer | |.com/pc/strongbadscoolgamef | |orattractivepeople/demo/257 | |96.html
--- Comment #1 from Dan Kegel dank@kegel.com 2013-06-09 17:47:44 CDT --- sha1sum dd2f18068f16a1353a3490d95723b746cec8050f SBCG4AP_Homestar_Ruiner_setup.exe
http://bugs.winehq.org/show_bug.cgi?id=33770
Christian Costa titan.costa@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |titan.costa@gmail.com
--- Comment #2 from Christian Costa titan.costa@gmail.com 2013-06-11 06:55:47 CDT --- What about attaching screenshots of working and non working cases?
http://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #3 from Dan Kegel dank@kegel.com 2013-06-11 08:55:53 CDT --- Created attachment 44752 --> http://bugs.winehq.org/attachment.cgi?id=44752 menu with native d3dx9_36
Voilà!
http://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #4 from Dan Kegel dank@kegel.com 2013-06-11 08:56:42 CDT --- Created attachment 44753 --> http://bugs.winehq.org/attachment.cgi?id=44753 Menu with builtin d3d9_36
http://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #5 from Christian Costa titan.costa@gmail.com 2013-06-22 11:49:51 CDT --- Texture problem is due to DXTn. There is an interesting message I don't have with native: fixme:d3d:fixed_get_input Unsupported input stream [usage=WINED3D_DECL_USAGE_NORMAL, usage_idx=1] This may be the cause of the vertex problem.
http://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #6 from Christian Costa titan.costa@gmail.com 2013-07-02 04:09:06 CDT --- The vertex issue comes from D3DCompileShader. In our implementation we forward the call to D3DCompile from d3dcompiler. There should be a difference between the shaders generated by these two functions.
http://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #7 from Christian Costa titan.costa@gmail.com 2013-07-06 10:08:39 CDT --- Created attachment 45122 --> http://bugs.winehq.org/attachment.cgi?id=45122 Don't return warnings on success
The vertex problem issue comes from the fact that even if the call succeeds, the game interprets a non null error_messages pointer as an error.
By calling D3DCompile we use a newer version of the compiler which is more strict and generates the following warning. - warning X3206: 'dot': implicit truncation of vector type - warning X3206: implicit truncation of vector type - warning X3206: 'mul': implicit truncation of vector type D3DCompileShader does not generate such warnings.
I did a search and found something that comfirm this:
New Warning X3206: Implicit Truncation of Vector Type Beginning in the August 2009 release of the DirectX SDK, the compiler will warn when an implicit truncation of a vector type occurs.
It does not seem there is a way to disable this warning so we will have to strip these strings in D3DCompileShader and reset the error messages pointer if the resulting buffer is empty.
I will update the patch accordingly.
http://bugs.winehq.org/show_bug.cgi?id=33770
Qian Hong fracting@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fracting@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=33770
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wylda@volny.cz
--- Comment #8 from Wylda wylda@volny.cz --- Hi Christian, your patch should fix the graphical issues or just to get rid of:
fixme:d3d:fixed_get_input Unsupported input stream [usage=WINED3D_DECL_USAGE_NORMAL, usage_idx=1]
When i applied it on top of wine-1.5.30 those messages gone, but character face became black.
Still present in wine-1.7.29 (patch can't be applied at 1.7.0 or latter).
https://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #9 from Christian Costa titan.costa@gmail.com --- Hi Wylda, There are 2 graphical problems: the texture one and the vertex one. The message is related to the vertex problem. The patch fixes vertex related stuff. graphical To see the graphical difference, apply the patch below and do cp d3dx9_36.dll to d3dx9_36_2.dll. This will makes DTXTN textures work.
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index d5c09a7..24ea367 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -185,7 +185,7 @@ @ stdcall D3DXLoadSurfaceFromFileA(ptr ptr ptr str ptr long long ptr) @ stdcall D3DXLoadSurfaceFromFileInMemory(ptr ptr ptr ptr long ptr long long ptr) @ stdcall D3DXLoadSurfaceFromFileW(ptr ptr ptr wstr ptr long long ptr) -@ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) +@ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36_2.D3DXLoadSurfaceFromMemory @ stdcall D3DXLoadSurfaceFromResourceA(ptr ptr ptr ptr str ptr long long ptr) @ stdcall D3DXLoadSurfaceFromResourceW(ptr ptr ptr ptr wstr ptr long long ptr) @ stdcall D3DXLoadSurfaceFromSurface(ptr ptr ptr ptr ptr ptr long long) diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index 09c2fce..b632822 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -1731,7 +1731,7 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic * negative values for pSrcRect are allowed as we're only looking at the width and height anyway. * */ -HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, +HRESULT WINAPI D3DXLoadSurfaceFromMemory_(IDirect3DSurface9 *dst_surface, const PALETTEENTRY *dst_palette, const RECT *dst_rect, const void *src_memory, D3DFORMAT src_format, UINT src_pitch, const PALETTEENTRY *src_palette, const RECT *src_rect, DWORD filter, D3DCOLOR color_key) diff --git a/dlls/d3dxof/d3dxof.spec b/dlls/d3dxof/d3dxof.spec index 2eee2fd..51739de 100644 --- a/dlls/d3dxof/d3dxof.spec +++ b/dlls/d3dxof/d3dxof.spec @@ -3,3 +3,6 @@ @ stdcall -private DllGetClassObject(ptr ptr ptr) @ stdcall -private DllRegisterServer() @ stdcall -private DllUnregisterServer() +@ stdcall D3DXLoadSurfaceFromMemory(ptr ptr ptr ptr long long ptr ptr long long) d3dx9_36.D3DXLoadSurfaceFromMemory +@ stdcall D3DXCompileShaderNative(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36_2.D3DXCompileShader +
https://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #10 from Christian Costa titan.costa@gmail.com --- The patch applies here. Note that the demo crashes in mshtml at the beginning (bot related to the fix).
https://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #11 from Wylda wylda@volny.cz --- Many thanks for the patch.
Note that the demo crashes in mshtml at the beginning (bot related to the fix).
I came here from bug 25418 and its demo (http://telltale.vo.llnwd.net/o15/games/strongbad/105/8BitIsEnough_setup.exe) has same graphical issues and starts-up fine.
When i: * applied your patch from comment 9 * rebuilt wine-1.7.29 * set d3dcompiler_43 to native * set d3dx9_36 to builtin * copied native d3dx9_36.dll as d3dx9_36_2.dll
then it displays better, but there are still graphical glitches: * still some graphical issues * tons of ...WINED3D_DECL_USAGE_NORMAL, usage_idx=1] (patch from comment 7 can't be applied to wine-1.7.29)
https://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #12 from Christian Costa titan.costa@gmail.com --- Created attachment 49772 --> https://bugs.winehq.org/attachment.cgi?id=49772 Fix for vertex problem
Use this patch instead of the one from comment 7. It should apply.
https://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #13 from Wylda wylda@volny.cz --- Great Christian, now it looks the same way like on WinXP :c)
I stare at patch at comment 9 and trying to understand it. From the native d3dx9_36.dll you "borrowed" D3DXLoadSurfaceFromMemory(). That's what 1st and 2nd hunks are. But what trik is done by 3rd hunk - the "d3dxof.spec"?
Thank you again for your work Christian!
https://bugs.winehq.org/show_bug.cgi?id=33770
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #14 from Christian Costa titan.costa@gmail.com --- hunk 1 is to use native D3DXLoadSurfaceFromMemory from the outsied of d3dx9_36 (apps & games) hunk 2 & 3 is the same but from within d3dx9_36 (there are several calls to D3DXLoadSurfaceFromMemory)
When linking d3dx9_36 we don't have access yet to the symbol provided by the .spec. Which is quite logical as the lib does not exist yet, we're creating it. Only the internal symbols (that's why we rename D3DXLoadSurfaceFromMemory to avoid using it in hunk 2) and symbols from the libraries we depend on are available (d3dxof in our case in hunk 3).
The line below is just garbage: +@ stdcall D3DXCompileShaderNative(ptr long ptr ptr str str long ptr ptr ptr) d3dx9_36_2.D3DXCompileShader
https://bugs.winehq.org/show_bug.cgi?id=33770
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #15 from Sebastian Lackner sebastian@fds-team.de --- Latest version of the patch is available here:
https://github.com/wine-compholio/wine-staging/blob/master/patches/d3dx9_36-...
https://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #16 from Wylda wylda@volny.cz --- Is there anything more to test?
I noticed that this patch is still sitting in staging without even trying to send to wine-patches.
https://bugs.winehq.org/show_bug.cgi?id=33770
Michael Müller michael@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED CC| |michael@fds-team.de Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/d3dx9_36-Filte | |r_Warnings
https://bugs.winehq.org/show_bug.cgi?id=33770
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Staged patchset|https://github.com/wine-com |https://github.com/wine-sta |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast |ster/patches/d3dx9_36-Filte |er/patches/d3dx9_36-Filter_ |r_Warnings |Warnings CC| |nerv@dawncrow.de
https://bugs.winehq.org/show_bug.cgi?id=33770
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.strategyinformer |https://megagames.com/demos |.com/pc/strongbadscoolgamef |/strong-bad-episode-1-homes |orattractivepeople/demo/257 |tar-ruiner-demo |96.html | Distribution|--- |Debian Summary|Strong Bad's Cool Game for |Strong Bad's Episode 1 - |Attractive People Demo has |Homestar Ruiner Demo |interesting rendering |crashes without d3dx9_27 |glitches on initial menu |(purist) |screen without native | |d3dx_36 (purist) |
https://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #17 from Wylda wylda@volny.cz --- Created attachment 63018 --> https://bugs.winehq.org/attachment.cgi?id=63018 console log wine-4.0-rc2
Attached is the log, when game runs with alldlls=builtin.
d3dx9_27.dll is set to native, everything works flawlessly.
https://bugs.winehq.org/show_bug.cgi?id=33770
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jacek@codeweavers.com, | |matteo.mystral@gmail.com
--- Comment #18 from Wylda wylda@volny.cz ---
Actually Staging's patch no longer works + there are probably some regression.
Would be better to start from scratch with new bug report, but would be better if someone knowledgeable would take a look first...
Two cases:
1. all bultin + only d3dx9_27.dll set to native = works flawlessly
2. It used to work with d3dx9_27.dll builtin and native d3dcompiler_43.dll + staging patches. This no longer works. It crashes after intro video because of commit wine-3.13-2-g169c033bda:
commit 169c033bda314358ee3ed085bffedf4bf763bfcf Author: Jacek Caban jacek@codeweavers.com Date: Thu Jul 19 14:36:28 2018 +0200
d3dcompiler: Use d3dcompiler_47 for importlib.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Matteo Bruni mbruni@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
...if i revert this commit, game starts in case 2, but there are glitches, which Staging patch used to fix. When i apply staging patches, it is improved a bit, but faces are rendered black.
https://bugs.winehq.org/show_bug.cgi?id=33770
--- Comment #19 from Matteo Bruni matteo.mystral@gmail.com --- (In reply to Wylda from comment #18)
- It used to work with d3dx9_27.dll builtin and native d3dcompiler_43.dll +
staging patches. This no longer works. It crashes after intro video because of commit wine-3.13-2-g169c033bda:
commit 169c033bda314358ee3ed085bffedf4bf763bfcf Author: Jacek Caban jacek@codeweavers.com Date: Thu Jul 19 14:36:28 2018 +0200
d3dcompiler: Use d3dcompiler_47 for importlib.
Since that patch the d3dx9 builtin DLLs will use d3dcompiler_47.dll for the HLSL compiler instead. Try with native d3dcompiler_47.dll.
https://bugs.winehq.org/show_bug.cgi?id=33770
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #20 from joaopa jeremielapuree@yahoo.fr --- Proposed download link works but the demo has a problem with the enter screen (unable to go beyond it) This demo does not have the problem https://web.archive.org/web/20130802132943/https://telltale.vo.llnwd.net/o15...
Can an administrator put this link at URL place?
And obviously, the bug still occurs with wine-6.20.