https://bugs.winehq.org/show_bug.cgi?id=46774
Bug ID: 46774 Summary: DDS compression tools crash, possibly due to creating a DirectX context without a window Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: qsniyg@mail.com Distribution: ---
Both DDSopt ( https://www.nexusmods.com/skyrim/mods/5755/ ) and Oredenator ( https://www.nexusmods.com/skyrim/mods/12801/ ) are unable to be used. DDSopt soft-crashes before startup, and Ordenator cannot compress textures, both for the same reason.
This might be because they create a DirectX 9 context without a window attached to it.
Testing with DDSopt, as it is the simpler of the two, it seems to fail when it creates the device at this line: https://github.com/Ethatron/ddsopt/blob/d969a2c6d9f10500c0adfe83ad034a7d41fd...
Changing from D3DDEVTYPE_NULLREF to D3DDEVTYPE_HAL doesn't help either.
The error before crashing is this, repeated 5 times (with different values for the context):
003b:err:d3d:wined3d_adapter_gl_create_context Failed to set pixel format 27 on device context 0x1f0050.
This is also the error shown with Ordenator as well.
https://bugs.winehq.org/show_bug.cgi?id=46774
Lorenzo Ferrillo lorenzofer@live.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |lorenzofer@live.it
--- Comment #1 from Lorenzo Ferrillo lorenzofer@live.it --- Created attachment 64241 --> https://bugs.winehq.org/attachment.cgi?id=64241 Allow settign pixel format on a context with win_handle == NULL
This small patch allow both DDSOpt and Ordenador to startup.
DDSOpt is still not working (the file picker ignore operations).
Ordenador still require d3dx9_43.dll as native from winetricks. Otherwise it will badly fail on saving dds textures with mipmaps (mipmap levels are not supported) or save DDS file at all without DXTn staging patchset and company.
With the attached patch and d3dx9_47 as native Ordenador seems to work well (I will need to test the result on Oblivion).
The issue is that in the context the associated window handle is setted to NULL but the DC window is GetDesktopWindow handle.
https://bugs.winehq.org/show_bug.cgi?id=46774
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
https://bugs.winehq.org/show_bug.cgi?id=46774
--- Comment #2 from qsniyg qsniyg@mail.com --- Thank you! Could the patch be submitted? It looks clean to me.
https://bugs.winehq.org/show_bug.cgi?id=46774
--- Comment #3 from Lorenzo Ferrillo lorenzofer@live.it --- Isn't suited for submission.
Firstly according to the present tests on windows, the pixel format cannot be selected on GetDestktopWindow DC, and this means that there is probably something incomplete in the windowless directx context.
Second, the patch is tested only above wine-staging, that already has a workaround for SetPixelFormat on the GetDesktopWindow DC. This patch will not work without this staging patch.
Third, other apps that create a windowless DC doesn't have win_handle setted to null.
It may be suited for inclusion in wine-staging, until the proper beheviour is documented and tested, but there may be a way to fix this better.
https://bugs.winehq.org/show_bug.cgi?id=46774
pattietreutel katyaberezyaka@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |katyaberezyaka@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=46774
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE CC| |z.figura12@gmail.com Status|UNCONFIRMED |RESOLVED
--- Comment #4 from Zebediah Figura z.figura12@gmail.com --- Based on the attached patch, this is a duplicate of already fixed bug 18490.
*** This bug has been marked as a duplicate of bug 18490 ***
https://bugs.winehq.org/show_bug.cgi?id=46774
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net Version|unspecified |4.3
https://bugs.winehq.org/show_bug.cgi?id=46774
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Closing Duplicate