https://bugs.winehq.org/show_bug.cgi?id=40215
Bug ID: 40215 Summary: DirectX Texture Tool save wrong DDS file with native d3dx9_36.dll Product: Wine Version: 1.9.4 Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: isakov-sl@bk.ru
Created attachment 53734 --> https://bugs.winehq.org/attachment.cgi?id=53734 Left with native d3dx9_36, right with my patches
The tool with its sources can be downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=6812
wine-1.9.4-118-g36095db from git Start DxTex.exe New texture with default setting (256x256, 1 level, A8R8G8B8 format). Open onto this surface some small png file. Looks on the screen OK. Save as DDS texture. With builtin d3dx9_36.dll it is impossible because this function is just not implemented ~~~~ if (file_format == D3DXIFF_DDS) { FIXME("DDS file format isn't supported yet\n"); return E_NOTIMPL; } ~~~~ But this is possible with native d3dx9_36.dll. The file saved successfully. I open it with GraphicsConverter (Lemke Soft) and see wrong picture (attached). GC is good application. Next test with my own implementation of d3dx9_36.dll containing the DDS save. I got good file that correctly opened by the GraphicsConverter.
I can't propose that microsoft d3dx9_36 is wrong. So I have to propose that the interface between Wine d3d9 and native d3dx9_36 is wrong.
gcc-4.8.4 from MacPort
https://bugs.winehq.org/show_bug.cgi?id=40215
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |STAGED Ever confirmed|0 |1 Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/d3dx9_36-DDS
https://bugs.winehq.org/show_bug.cgi?id=40215
Matteo Bruni matteo.mystral@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |https://www.microsoft.com/e | |n-us/download/details.aspx? | |id=6812
--- Comment #1 from Matteo Bruni matteo.mystral@gmail.com --- This doesn't quite make sense, either the staged patchset doesn't fix the bug or the bug title and description are wrong.
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #2 from Sergey Isakov isakov-sl@bk.ru --- (In reply to Matteo Bruni from comment #1)
This doesn't quite make sense, either the staged patchset doesn't fix the bug or the bug title and description are wrong.
Yes, although staging give a good picture (I am not tested yet) the bug is about "interface between Wine d3d9 and native d3dx9_36 is wrong"
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #3 from Sergey Isakov isakov-sl@bk.ru --- I have no enough rights to change back from STAGED to UNCONFIRMED.
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #4 from Rosanne DiMesio dimesio@earthlink.net ---
Yes, although staging give a good picture (I am not tested yet) the bug is about "interface between Wine d3d9 and native d3dx9_36 is wrong"
Problems caused by using native dlls are not normally considered valid bugs.
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #5 from Sergey Isakov isakov-sl@bk.ru --- Huh? Not our bug? You said this is Microsoft bug???
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #6 from Rosanne DiMesio dimesio@earthlink.net --- (In reply to Sergey Isakov from comment #5)
Huh? Not our bug? You said this is Microsoft bug???
No. I am saying using a native dll is only a workaround. Users shouldn't have to use native dlls at all. The real bug is the deficiency in Wine's builtin dll.
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #7 from Sergey Isakov isakov-sl@bk.ru --- I think the real bug in builtin d3d9.dll
https://bugs.winehq.org/show_bug.cgi?id=40215
Christian Costa titan.costa@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |titan.costa@gmail.com
--- Comment #8 from Christian Costa titan.costa@gmail.com --- I've tested DxTex.exe with wine staging and generated textures with both builtin and native d3dx9_36. Both dds files look the same under gimp + dds plugin. Hex diffing files gives few differences: 1) Headers are the same except DDSCAPS_ALPHA missing for builtin (this is a known limitation that needs to be fix) 2) Surface data is slightly different (probably because native does some filtering)
I think that would be good if you attach the dds files generated with both builtin and native under wine staging as well as the original image.
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #9 from Sergey Isakov isakov-sl@bk.ru --- Yes, you are right.wine-staging produced dds file approximitely same native or builtin d3dx9_36. My version is different. Other DDS revision? Attached original image, staging+builtin, me+builtin.
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #10 from Sergey Isakov isakov-sl@bk.ru --- Created attachment 53768 --> https://bugs.winehq.org/attachment.cgi?id=53768 Original image
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #11 from Sergey Isakov isakov-sl@bk.ru --- Created attachment 53769 --> https://bugs.winehq.org/attachment.cgi?id=53769 DDS file saved by staging with builtin d3dx9_36
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #12 from Sergey Isakov isakov-sl@bk.ru --- Created attachment 53770 --> https://bugs.winehq.org/attachment.cgi?id=53770 DDS file saved by my d3dx9_36
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #13 from Christian Costa titan.costa@gmail.com --- Your version sets a pitch (DDSD_PITCH flag + value in dwPitchOrLinearSize) compared to native and staging builtin. So I guess GraphicsConverter doesn't like when the pitch is missing and that's why only your version is displayed correctly. In that case the problem is in your viewer which makes this bug invalid.
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #14 from Sergey Isakov isakov-sl@bk.ru --- Created attachment 53775 --> https://bugs.winehq.org/attachment.cgi?id=53775 DDS file saved in Windows 7
This file saved in real Windows 7-64. It is opened fine by the GraphicsConverter.
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #15 from Christian Costa titan.costa@gmail.com --- This file is DTX1 not A8R8G8B8. Can you do save a dds file on windows with the same origin image you attached and same format (A8R8G8B8).
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #16 from Sergey Isakov isakov-sl@bk.ru --- OK, windows make same file. It's not a bug, it's improvement and should be proposed to microsoft. )
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #17 from Christian Costa titan.costa@gmail.com --- Windows makes same file as wine + native d3dx9_36?
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #18 from Sergey Isakov isakov-sl@bk.ru --- Byte by byte.
https://bugs.winehq.org/show_bug.cgi?id=40215
--- Comment #19 from Christian Costa titan.costa@gmail.com --- Ok. What improvement would you propose to Microsoft? I would say GraphicsConverter should be fixed instead.
https://bugs.winehq.org/show_bug.cgi?id=40215
Sergey Isakov isakov-sl@bk.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |RESOLVED Resolution|--- |INVALID
--- Comment #20 from Sergey Isakov isakov-sl@bk.ru --- Initial idea of this bug report is wrong. May be rename it as "builtin d3dx9_36 has not implemented SaveTexture as DDS file".
PS. Anyway my version is better then native. :)
https://bugs.winehq.org/show_bug.cgi?id=40215
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #21 from Bruno Jesus 00cpxxx@gmail.com --- Closing invalid bugs.