https://bugs.winehq.org/show_bug.cgi?id=35444
Bug ID: 35444 Summary: Wayward Terran Frontier Open Alpha (.NET 4.0/XNA 4 game) reports 'Could not find a Direct3D device that supports the XNA Framework HiDef profile' Product: Wine Version: 1.7.11 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Classification: Unclassified
Hello folks,
as the summary says.
Prerequisite: 'winetricks -q dotnet40' in 32-bit WINEPREFIX
The game will install XNA 4.0 on its own.
Trace log isn't very interesting ... it's managed code that does the actual work.
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Wayward Terran Frontier
$ WINEDEBUG=+tid,+seh,+relay,+d3d9,+d3d wine ./Wayward\ Terran\ Frontier.exe
log.txt 2>&1
... 002a:Ret PE DLL (proc=0x7e0a24d0,module=0x7df90000 L"wined3d.dll",reason=PROCESS_ATTACH,res=(nil)) retval=1 002a:Call PE DLL (proc=0x7e218ee8,module=0x7e1f0000 L"d3d9.dll",reason=PROCESS_ATTACH,res=(nil)) ... 002a:Call PE DLL (proc=0x3abf6b8,module=0x3a80000 L"Microsoft.Xna.Framework.Graphic",reason=PROCESS_ATTACH,res=(nil)) 002a:Call KERNEL32.GetModuleFileNameW(03a80000,0033c310,00000104) ret=603d40c1 002a:Ret KERNEL32.GetModuleFileNameW() retval=0000008d ret=603d40c1 002a:Call KERNEL32.CreateFileW(0033c310 L"C:\windows\Microsoft.Net\assembly\GAC_32\Microsoft.Xna.Framework.Graphics\v4.0_4.0.0.0__842cf8be1de50553\Microsoft.Xna.Framework.Graphics.dll",80000000,00000001,00000000,00000003,08000000,00000000) ret=603be944 002a:Ret KERNEL32.CreateFileW() retval=00000184 ret=603be944 ... 002a:Call d3d9.Direct3DCreate9(00000020) ret=04c2c787 002a:trace:d3d9:Direct3DCreate9 sdk_version 0x20. ... 002a:trace:d3d:wined3d_create Created wined3d object 0x1a5860 for d3d9 support. 002a:Ret wined3d.wined3d_create() retval=001a5860 ret=7e20e6fe ... 002a:trace:d3d9:Direct3DCreate9 Created d3d9 object 0x18fed0. 002a:Ret d3d9.Direct3DCreate9() retval=0018fed0 ret=04c2c787 ... 002a:Call d3d9.D3DPERF_SetOptions(00000002) ret=04c2c8c7 002a:fixme:d3d9:D3DPERF_SetOptions (0x2) : stub 002a:Ret d3d9.D3DPERF_SetOptions() retval=00000030 ret=04c2c8c7 ... 002a:trace:d3d9:d3d9_GetDeviceCaps iface 0x18fed0, adapter 0, device_type 0x1, caps 0x33efd4. ... 002a:Call wined3d.wined3d_get_device_caps(001a5860,00000000,00000001,001a9c20) ret=7e20d852 002a:trace:d3d:wined3d_get_device_caps wined3d 0x1a5860, adapter_idx 0, device_type WINED3D_DEVICE_TYPE_HAL, caps 0x1a9c20. 002a:Ret wined3d.wined3d_get_device_caps() retval=00000000 ret=7e20d852 ... 002a:Call KERNEL32.RaiseException(e0434352,00000001,00000005,0033f094) ret=791cac08 002a:trace:seh:raise_exception code=e0434352 flags=1 addr=0x7b83a913 ip=7b83a913 tid=002a 002a:trace:seh:raise_exception info[0]=80131500 002a:trace:seh:raise_exception info[1]=00000000 002a:trace:seh:raise_exception info[2]=00000000 002a:trace:seh:raise_exception info[3]=00000000 002a:trace:seh:raise_exception info[4]=79140000 002a:trace:seh:raise_exception eax=7b826989 ebx=7b8ba000 ecx=80131500 edx=0033efa4 esi=0033f050 edi=0033f010 002a:trace:seh:raise_exception ebp=0033efe8 esp=0033ef84 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00000283 ... 002a:Call user32.MessageBoxW(0001006c,00cde088 L"No suitable graphics card found.\n\nCould not find a Direct3D device that supports the XNA Framework HiDef profile.\r\n\r\nVerify that a suitable graphics device is installed.\r\n\r\nMake sure the desktop is not locked, and that no other application is running in full screen mode.\r\n\r\nAvoid runnin"...,00ccbe48 L"Wayward Terran Frontier",00000010) ret=04c6de0f ... --- snip ---
With a managed debugger:
--- snip --- 0033f140 7b83a913 [HelperMethodFrame: 0033f140] 0033f190 04c2c514 Microsoft.Xna.Framework.GraphicsDeviceManager.FindBestPlatformDevice(Boolean) 0033f1ac 04c2c3fc Microsoft.Xna.Framework.GraphicsDeviceManager.FindBestDevice(Boolean) 0033f1b0 04c2bf01 Microsoft.Xna.Framework.GraphicsDeviceManager.ChangeDevice(Boolean) 0033f218 04c2bddb Microsoft.Xna.Framework.GraphicsDeviceManager.Microsoft.Xna.Framework.IGraphicsDeviceManager.CreateDevice() 0033f21c 04c2bb98 Microsoft.Xna.Framework.Game.RunGame(Boolean) 0033f250 037326f2 WTFLauncher.Program.Main(System.String[]) 0033f4a8 791421db [GCFrame: 0033f4a8] --- snip ---
The XNA code compares the returned D3D device caps against XNA 4.0 'HiDef' profile values.
More info here:
http://msdn.microsoft.com/en-us/library/ff604995.aspx (What Is a Profile?)
http://blogs.msdn.com/b/shawnhar/archive/2010/03/12/reach-vs-hidef.aspx (Reach vs. HiDef)
Debugging the actual validation is very annoying so I just dumped the profile values. Maybe one D3D dev can spot values that aren't met in Wine by default (shader is 3.0).
--- snip --- VertexShaderVersion = 768u, PixelShaderVersion = 768u, OcclusionQuery = true, GetBackBufferData = true, SeparateAlphaBlend = true, DestBlendSrcAlphaSat = true, MinMaxSrcDestBlend = false, MaxPrimitiveCount = 1048575, IndexElementSize32 = true, MaxVertexStreams = 16, MaxStreamStride = 255, MaxVertexBufferSize = 67108863, MaxIndexBufferSize = 67108863, MaxTextureSize = 4096, MaxCubeSize = 4096, MaxVolumeExtent = 256, MaxTextureAspectRatio = 2048, MaxSamplers = 16, MaxVertexSamplers = 4, MaxRenderTargets = 4, NonPow2Unconditional = true, NonPow2Cube = true, NonPow2Volume = true, ValidTextureFormats = { SurfaceFormat.Color, SurfaceFormat.Bgr565, SurfaceFormat.Bgra5551, SurfaceFormat.Bgra4444, SurfaceFormat.Dxt1, SurfaceFormat.Dxt3, SurfaceFormat.Dxt5, SurfaceFormat.NormalizedByte2, SurfaceFormat.NormalizedByte4, SurfaceFormat.Rgba1010102, SurfaceFormat.Rg32, SurfaceFormat.Rgba64, SurfaceFormat.Alpha8, SurfaceFormat.Single, SurfaceFormat.Vector2, SurfaceFormat.Vector4, SurfaceFormat.HalfSingle, SurfaceFormat.HalfVector2, SurfaceFormat.HalfVector4, SurfaceFormat.HdrBlendable }, ValidCubeFormats = { SurfaceFormat.Color, SurfaceFormat.Bgr565, SurfaceFormat.Bgra5551, SurfaceFormat.Bgra4444, SurfaceFormat.Dxt1, SurfaceFormat.Dxt3, SurfaceFormat.Dxt5, SurfaceFormat.Rgba1010102, SurfaceFormat.Rg32, SurfaceFormat.Rgba64, SurfaceFormat.Alpha8, SurfaceFormat.Single, SurfaceFormat.Vector2, SurfaceFormat.Vector4, SurfaceFormat.HalfSingle, SurfaceFormat.HalfVector2, SurfaceFormat.HalfVector4, SurfaceFormat.HdrBlendable }, ValidVolumeFormats = { SurfaceFormat.Color, SurfaceFormat.Bgr565, SurfaceFormat.Bgra5551, SurfaceFormat.Bgra4444, SurfaceFormat.Rgba1010102, SurfaceFormat.Rg32, SurfaceFormat.Rgba64, SurfaceFormat.Alpha8, SurfaceFormat.Single, SurfaceFormat.Vector2, SurfaceFormat.Vector4, SurfaceFormat.HalfSingle, SurfaceFormat.HalfVector2, SurfaceFormat.HalfVector4, SurfaceFormat.HdrBlendable }, ValidVertexTextureFormats = { SurfaceFormat.Single, SurfaceFormat.Vector2, SurfaceFormat.Vector4, SurfaceFormat.HalfSingle, SurfaceFormat.HalfVector2, SurfaceFormat.HalfVector4, SurfaceFormat.HdrBlendable }, InvalidFilterFormats = { SurfaceFormat.Single, SurfaceFormat.Vector2, SurfaceFormat.Vector4, SurfaceFormat.HalfSingle, SurfaceFormat.HalfVector2, SurfaceFormat.HalfVector4, SurfaceFormat.HdrBlendable }, InvalidBlendFormats = { SurfaceFormat.Single, SurfaceFormat.Vector2, SurfaceFormat.Vector4, SurfaceFormat.HalfSingle, SurfaceFormat.HalfVector2, SurfaceFormat.HalfVector4 }, ValidDepthFormats = { DepthFormat.Depth16, DepthFormat.Depth24, DepthFormat.Depth24Stencil8 }, ValidVertexFormats = { VertexElementFormat.Color, VertexElementFormat.Single, VertexElementFormat.Vector2, VertexElementFormat.Vector3, VertexElementFormat.Vector4, VertexElementFormat.Byte4, VertexElementFormat.Short2, VertexElementFormat.Short4, VertexElementFormat.NormalizedShort2, VertexElementFormat.NormalizedShort4, VertexElementFormat.HalfVector2, VertexElementFormat.HalfVector4 } --- snip ---
NOTE: Not all 'formats' (enum) values need to be present but most likely all the integer/bool properties need to pass.
$ sha1sum WaywardSetup.msi ad1b0bf88ce284b2c4c36fbb93012b60cb0a673f WaywardSetup.msi
$ du -sh WaywardSetup.msi 8.5M WaywardSetup.msi
$ wine --version wine-1.7.11-159-gee33839
Regards
https://bugs.winehq.org/show_bug.cgi?id=35444
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |dotnet, download URL| |http://www.wtfrontier.com/c | |lient_download/WaywardSetup | |.msi Component|-unknown |directx-d3d
https://bugs.winehq.org/show_bug.cgi?id=35444
--- Comment #1 from Henri Verbeet hverbeet@gmail.com --- (In reply to comment #0)
Debugging the actual validation is very annoying so I just dumped the profile values. Maybe one D3D dev can spot values that aren't met in Wine by default (shader is 3.0).
Most of the values look fine at first sight, but I'm not sure what cap MinMaxSrcDestBlend corresponds to.
https://bugs.winehq.org/show_bug.cgi?id=35444
graeme@sudo.ca changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |graeme@sudo.ca
--- Comment #2 from graeme@sudo.ca --- This is also an issue with "One Finger Death Punch", recently released through Steam.
https://bugs.winehq.org/show_bug.cgi?id=35444
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello Henri and Stefan,
I figured out what seems to be missing using the 'Graphics Profile Checker' tool:
http://xbox.create.msdn.com/en-US/education/catalog/utility/graphics_profile...
--- quote --- The XNA Framework GraphicsAdapter.IsProfileSupported API enables you to check whether the current hardware supports the Reach or HiDef graphics profiles, but this only returns a simple boolean, with no details of why a failing profile isn't supported.
This utility provides more information about hardware capabilities, by performing the same checks that are used internally by the XNA Framework and by displaying their results as a detailed failure report. This can be useful for investigating driver compatibility problems, and also to see exactly what hardware capabilities are required for each profile. --- quote ---
Tool report when run under Wine:
--- snip --- ...
Reach Supported
HiDef Yikes! I think this profile should not be supported, but XNA says it is No DestBlendCaps.D3DPBLENDCAPS_SRCALPHASAT No VertexTextureFilterCaps.D3DPTFILTERCAPS_MAGFPOINT No VertexTextureFilterCaps.D3DPTFILTERCAPS_MINFPOINT --- snip ---
DestBlendCaps.D3DPBLENDCAPS_SRCALPHASAT:
Wine: http://source.winehq.org/git/wine.git/blob/a69c488f087b5a09599b841c929ec2531...
--- snip --- 4256 caps->DestBlendCaps = WINED3DPBLENDCAPS_DESTALPHA | 4257 WINED3DPBLENDCAPS_DESTCOLOR | 4258 WINED3DPBLENDCAPS_INVDESTALPHA | 4259 WINED3DPBLENDCAPS_INVDESTCOLOR | 4260 WINED3DPBLENDCAPS_INVSRCALPHA | 4261 WINED3DPBLENDCAPS_INVSRCCOLOR | 4262 WINED3DPBLENDCAPS_ONE | 4263 WINED3DPBLENDCAPS_SRCALPHA | 4264 WINED3DPBLENDCAPS_SRCCOLOR | 4265 WINED3DPBLENDCAPS_ZERO; 4266 /* NOTE: WINED3DPBLENDCAPS_SRCALPHASAT is not supported as dest blend factor, 4267 * according to the glBlendFunc manpage 4268 * 4269 * WINED3DPBLENDCAPS_BOTHINVSRCALPHA and WINED3DPBLENDCAPS_BOTHSRCALPHA are 4270 * legacy settings for srcblend only 4271 */ --- snip ---
Hmm, looking at Wine version history this cap was indeed present at some point and later removed.
MSDN: http://msdn.microsoft.com/en-us/library/windows/hardware/ff569252%28v=vs.85%...
--- quote --- Reporting Capabilities for Shader 3 Support
The DirectX 9.0 version driver for a display device that supports pixel or vertex shader version 3.0 and later must indicate that it supports the following capabilities: Vertex shader 3.0 and later
If a device supports vertex shader 3.0 and later, its driver must set the members of the D3DCAPS9 structure to the following values: ...
SrcBlendCaps, DestBlendCaps
Set the following source and destination blending modes except where noted:
D3DPBLENDCAPS_ZERO
D3DPBLENDCAPS_ONE
D3DPBLENDCAPS_SRCCOLOR
D3DPBLENDCAPS_INVSRCCOLOR
D3DPBLENDCAPS_SRCALPHA
D3DPBLENDCAPS_INVSRCALPHA
D3DPBLENDCAPS_DESTALPHA
D3DPBLENDCAPS_INVDESTALPHA
D3DPBLENDCAPS_DESTCOLOR
D3DPBLENDCAPS_INVDESTCOLOR
D3DPBLENDCAPS_SRCALPHASAT (not set for DestBlendCaps) --- quote ---
VertexTextureFilterCaps:
Wine: http://source.winehq.org/git/wine.git/blob/a69c488f087b5a09599b841c929ec2531...
--- snip --- 4503 caps->VertexTextureFilterCaps = 0; --- snip ---
MSDN: http://msdn.microsoft.com/en-us/library/windows/hardware/ff569252%28v=vs.85%...
--- quote --- Reporting Capabilities for Shader 3 Support
The DirectX 9.0 version driver for a display device that supports pixel or vertex shader version 3.0 and later must indicate that it supports the following capabilities: Vertex shader 3.0 and later
If a device supports vertex shader 3.0 and later, its driver must set the members of the D3DCAPS9 structure to the following values: ...
VertexTextureFilterCaps
Set the following filter capabilities:
D3DPTFILTERCAPS_MINFPOINT
D3DPTFILTERCAPS_MAGFPOINT --- quote ---
After adding all three requested/missing caps XNA is happy (=HiDef support) and the games do indeed start.
$ wine --version wine-1.7.16-133-gd8ca8c2
Regards
https://bugs.winehq.org/show_bug.cgi?id=35444
--- Comment #4 from Henri Verbeet hverbeet@gmail.com --- I think that makes sense. The missing VertexTextureFilterCaps are probably just an oversight. GL_SRC_ALPHA_SATURATE as destination blend function is added by ARB_blend_func_extended.
https://bugs.winehq.org/show_bug.cgi?id=35444
--- Comment #5 from Henri Verbeet hverbeet@gmail.com --- Created attachment 48084 --> https://bugs.winehq.org/attachment.cgi?id=48084 patch
https://bugs.winehq.org/show_bug.cgi?id=35444
--- Comment #6 from Anastasius Focht focht@gmx.net --- Hello Henri,
the patch works as proposed.
Regards
https://bugs.winehq.org/show_bug.cgi?id=35444
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |5b8d3a0c70e7b800317aeda7c69 | |8f991eece1ece Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #7 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commits:
http://source.winehq.org/git/wine.git/commitdiff/7f2ae9889d4b30912b01511e0bc... ("wined3d: Set VTF filter caps when VTF is supported.")
http://source.winehq.org/git/wine.git/commitdiff/5b8d3a0c70e7b800317aeda7c69... ("wined3d: Set the WINED3DPBLENDCAPS_SRCALPHASAT destination blend cap when ARB_blend_func_extended is supported.")
Thanks Henri.
Regards
https://bugs.winehq.org/show_bug.cgi?id=35444
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #8 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.17.
https://bugs.winehq.org/show_bug.cgi?id=35444
Jason Stillwell dragonfax@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dragonfax@gmail.com
--- Comment #9 from Jason Stillwell dragonfax@gmail.com --- Unfortunately, I still get this failure from One Finger Death Punch.
I tested on macosX Mavericks using a homebrew driven build of wine 1.7.20 (brew install --devel wine). winetricks steam dotnet40 and a win32 prefix (also tried 64-bit too).
Not that because of another bug, Steam can't launch the game, but you can launch the game directly after installing it. It will just fail with this bug's error though.
https://bugs.winehq.org/show_bug.cgi?id=35444
Luke Bratch luke@bratch.co.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |luke@bratch.co.uk
https://bugs.winehq.org/show_bug.cgi?id=35444
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://www.wtfrontier.com/c |https://web.archive.org/web |lient_download/WaywardSetup |/20160903204304/http://www. |.msi |wtfrontier.com/client_downl | |oad/WaywardSetup.msi
--- Comment #10 from Anastasius Focht focht@gmx.net --- Hello folks,
adding stable download link via Internet Archive for documentation.
https://web.archive.org/web/20160903204304/http://www.wtfrontier.com/client_...
https://www.virustotal.com/gui/file/81d25d15c02e3aa3c58a7da6d363388209e007d5...
$ sha1sum WaywardSetup.msi ad1b0bf88ce284b2c4c36fbb93012b60cb0a673f WaywardSetup.msi
$ du -sh WaywardSetup.msi 8.5M WaywardSetup.msi
Regards