https://bugs.winehq.org/show_bug.cgi?id=48685
Bug ID: 48685 Summary: Multiple games and applications need D3DX11CompileFromFile implementation Product: Wine Version: 5.2 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: directx-d3dx11 Assignee: wine-bugs@winehq.org Reporter: focht@gmx.net Distribution: ---
Hello folks,
continuation of bug 40846 which added the stub(s).
https://source.winehq.org/git/wine.git/commit/2bee102353aab551a5e274624acb32... ("d3dx11: Add D3DX11CompileFromFileA/W stub.")
I found a collection of DirextX 11 example apps which include prebuilt binaries along with the sources:
03. DirectX 11 - Braynzar Soft Tutorials -> 12. Blending
https://www.braynzarsoft.net/viewtutorial/q16390-12-blending
https://www.braynzarsoft.net/file/12
--- snip --- $ unzip -l DX11_Lesson_12_Blending_zip.zip Archive: DX11_Lesson_12_Blending_zip.zip Length Date Time Name --------- ---------- ----- ---- 0 09-18-2011 11:54 d3d11Blending/ 0 09-18-2011 11:54 d3d11Blending/d3d11Blending/ 84083 12-23-2009 13:34 d3d11Blending/d3d11Blending/braynzar.jpg 16896 09-18-2011 11:54 d3d11Blending/d3d11Blending/d3d11Blending.exe 3989 06-13-2011 18:16 d3d11Blending/d3d11Blending/d3d11Blending.vcxproj 1019 06-13-2011 18:16 d3d11Blending/d3d11Blending/d3d11Blending.vcxproj.filters 143 06-13-2011 18:16 d3d11Blending/d3d11Blending/d3d11Blending.vcxproj.user 493 09-18-2011 11:54 d3d11Blending/d3d11Blending/Effects.fx 19828 09-18-2011 11:54 d3d11Blending/d3d11Blending/main.cpp 906 06-13-2011 18:16 d3d11Blending/d3d11Blending.sln 13312 06-15-2011 20:28 d3d11Blending/d3d11Blending.suo --------- ------- 140669 11 files --- snip ---
--- snip --- $ WINEDEBUG=+seh,+relay,+d3d wine ./d3d11Blending.exe >>log.txt 2>&1 ... 002b:Call d3dx11_42.D3DX11CompileFromFileW(0040437c L"Effects.fx",00000000,00000000,00404378 "VS",00404370 "vs_4_0",00000000,00000000,00000000,004053c8,00000000,00000000) ret=004016ed ... filename L"Effects.fx", defines 00000000, include 00000000, entry_point "VS", target "vs_4_0", sflags 0, eflags 0, pump 00000000, shader 004053C8, error_messages 00000000, hresult 00000000 stub. 002b:Ret d3dx11_42.D3DX11CompileFromFileW() retval=80004001 ret=004016ed 002b:Call d3dx11_42.D3DX11CompileFromFileW(0040437c L"Effects.fx",00000000,00000000,0040439c "PS",00404394 "ps_4_0",00000000,00000000,00000000,00405404,00000000,00000000) ret=0040170f ... 002b:fixme:d3dx:D3DX11CompileFromFileW filename L"Effects.fx", defines 00000000, include 00000000, entry_point "PS", target "ps_4_0", sflags 0, eflags 0, pump 00000000, shader 00405404, error_messages 00000000, hresult 00000000 stub. 002b:Ret d3dx11_42.D3DX11CompileFromFileW() retval=80004001 ret=0040170f 002b:trace:seh:raise_exception code=c0000005 flags=0 addr=0x401720 ip=00401720 tid=002b 002b:trace:seh:raise_exception info[0]=00000000 002b:trace:seh:raise_exception info[1]=00000000 002b:trace:seh:raise_exception eax=00000000 ebx=0032fe88 ecx=0f95da37 edx=00000000 esi=00000000 edi=0043b6c8 002b:trace:seh:raise_exception ebp=0032fe80 esp=0032f9c0 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010202 002b:trace:seh:call_stack_handlers calling handler at 0x403599 code=c0000005 flags=0 002b:Call msvcr100._except_handler4_common(00405000,00402e7f,0032f968,0032ff20,0032f69c,0032f65c) ret=004035b9 002b:trace:seh:_except_handler4_common exception c0000005 flags=0 at 0x401720 handler=0x403599 0x32f69c 0x32f65c cookie=f95da37 scope table=0x404568 cookies=-2/0,-124/0 --- snip ---
'winetricks -q d3dx11_42' works around (leading to next crash which is bug in another component: d3d_compiler).
Wine source:
https://source.winehq.org/git/wine.git/blob/c6b852e3c37247a01547d8ab9d163068...
--- snip --- 247 HRESULT WINAPI D3DX11CompileFromFileW(const WCHAR *filename, const D3D10_SHADER_MACRO *defines, 248 ID3D10Include *include, const char *entry_point, const char *target, UINT sflags, UINT eflags, 249 ID3DX11ThreadPump *pump, ID3D10Blob **shader, ID3D10Blob **error_messages, HRESULT *hresult) 250 { 251 FIXME("filename %s, defines %p, include %p, entry_point %s, target %s, sflags %#x, " 252 "eflags %#x, pump %p, shader %p, error_messages %p, hresult %p stub.\n", 253 debugstr_w(filename), defines, include, debugstr_a(entry_point), debugstr_a(target), 254 sflags, eflags, pump, shader, error_messages, hresult); 255 256 return E_NOTIMPL; 257 } --- snip ---
$ du -sh DX11_Lesson_12_Blending_zip.zip 88K DX11_Lesson_12_Blending_zip.zip
$ sha1sum DX11_Lesson_12_Blending_zip.zip 9063be4fb49ec705daec283135530f18dd8524eb DX11_Lesson_12_Blending_zip.zip
$ wine --version wine-5.2-312-gc6b852e3c3
Regards
https://bugs.winehq.org/show_bug.cgi?id=48685
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://web.archive.org/web | |/20200228100621/https://www | |.braynzarsoft.net/file/12 Keywords| |download
https://bugs.winehq.org/show_bug.cgi?id=48685
Ker noa blue-t@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |blue-t@web.de
https://bugs.winehq.org/show_bug.cgi?id=48685
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|directx-d3dx11 |directx-d3d-util
https://bugs.winehq.org/show_bug.cgi?id=48685
--- Comment #1 from Jactry Zeng jactry92@gmail.com --- D3DX11CompileFromFile was implemented by https://source.winehq.org/git/wine.git/?a=commit;h=cb8de48f7788270d6b581893d... .
https://bugs.winehq.org/show_bug.cgi?id=48685
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
this was fixed by commit https://source.winehq.org/git/wine.git/commitdiff/cb8de48f7788270d6b581893d4... ("d3dx11: Partially implement D3DX11CompileFromFile{A, W}().").
Part of Wine 5.15 release.
Thanks Jactry (and for the reminder)
It currently crashes due to insufficiencies in Wine D3D compiler (bug 45038 et al).
--- snip --- $ WINEDEBUG=+seh,+relay,+d3d,+d3dcompiler wine ./d3d11Blending.exe >>log.txt 2>&1 ... 017c:Call d3dx11_42.D3DX11CompileFromFileW(0040437c L"Effects.fx",00000000,00000000,00404378 "VS",00404370 "vs_4_0",00000000,00000000,00000000,004053c8,00000000,00000000) ret=004016ed ... 017c:Call d3dcompiler_47.D3DCompileFromFile(0040437c L"Effects.fx",00000000,00000001,00404378 "VS",00404370 "vs_4_0",00000000,00000000,004053c8,00000000) ret=006d193f ... 017c:trace:d3dcompiler:compile_shader Compiler messages: 017c:trace:d3dcompiler:compile_shader "Effects.fx:2:8: error: syntax error, unexpected KW_CBUFFER\n" 017c:trace:d3dcompiler:compile_shader Shader source: 017c:trace:d3dcompiler:compile_shader "# 1 "Effects.fx" 1\n\r\ncbuffer cbPerObject\r\n{\r\n\tfloat4x4 WVP;\r\n};\r\n\r\nTexture2D ObjTexture;\r\nSamplerState ObjSamplerState;\r\n\r\nstruct VS_OUTPUT\r\n{\r\n\tfloat4 Pos : SV_POSITION;\r\n\tfloat2 TexCoord : TEXCOORD;\r\n};\r\n\r\nVS_OUTPUT VS(float4 inPos : POSITION, float2 in"... ... 017c:Ret d3dcompiler_47.D3DCompileFromFile() retval=80004005 ret=006d193f 017c:Ret d3dx11_42.D3DX11CompileFromFileW() retval=80004005 ret=004016ed 017c:Call d3dx11_42.D3DX11CompileFromFileW(0040437c L"Effects.fx",00000000,00000000,0040439c "PS",00404394 "ps_4_0",00000000,00000000,00000000,00405404,00000000,00000000) ret=0040170f 017c:Call d3dcompiler_47.D3DCompileFromFile(0040437c L"Effects.fx",00000000,00000001,0040439c "PS",00404394 "ps_4_0",00000000,00000000,00405404,00000000) ret=006d193f ... 017c:trace:d3dcompiler:D3DCompileFromFile filename L"Effects.fx", defines 00000000, include 00000001, entrypoint "PS", target "ps_4_0", flags1 0, flags2 0, code 00405404, errors 00000000. ... 017c:trace:d3dcompiler:D3DCompile data 00191108, data_size 493, filename "Effects.fx", defines 00000000, include 00000001, entrypoint "PS", target "ps_4_0", sflags 0, eflags 0, shader 00405404, error_messages 00000000. 017c:trace:d3dcompiler:D3DCompile2 data 00191108, data_size 493, filename "Effects.fx", defines 00000000, include 00000001, entrypoint "PS", target "ps_4_0", sflags 0, eflags 0, secondary_flags 0, secondary_data 00000000, secondary_data_size 0, shader 00405404, error_messages 00000000. ... 017c:trace:d3dcompiler:compile_shader Compiler messages: 017c:trace:d3dcompiler:compile_shader "Effects.fx:2:8: error: syntax error, unexpected KW_CBUFFER\n" 017c:trace:d3dcompiler:compile_shader Shader source: 017c:trace:d3dcompiler:compile_shader "# 1 "Effects.fx" 1\n\r\ncbuffer cbPerObject\r\n{\r\n\tfloat4x4 WVP;\r\n};\r\n\r\nTexture2D ObjTexture;\r\nSamplerState ObjSamplerState;\r\n\r\nstruct VS_OUTPUT\r\n{\r\n\tfloat4 Pos : SV_POSITION;\r\n\tfloat2 TexCoord : TEXCOORD;\r\n};\r\n\r\nVS_OUTPUT VS(float4 inPos : POSITION, float2 in"... ... 017c:Ret d3dcompiler_47.D3DCompileFromFile() retval=80004005 ret=006d193f 017c:Ret d3dx11_42.D3DX11CompileFromFileW() retval=80004005 ret=0040170f 017c:trace:seh:dispatch_exception code=c0000005 flags=0 addr=00401720 ip=00401720 tid=017c 017c:trace:seh:dispatch_exception info[0]=00000000 017c:trace:seh:dispatch_exception info[1]=00000000 017c:trace:seh:dispatch_exception eax=00000000 ebx=0031fe70 ecx=462b3d83 edx=00000000 esi=00000000 edi=006ac6c8 017c:trace:seh:dispatch_exception ebp=0031fe60 esp=0031f9a0 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00210216 017c:trace:seh:call_vectored_handlers calling handler at 7B00F270 code=c0000005 flags=0 017c:trace:seh:call_vectored_handlers handler at 7B00F270 returned 0 017c:trace:seh:call_stack_handlers calling handler at 00403599 code=c0000005 flags=0 --- snip ---
With 'winetricks -q d3dcompiler_47' it runs into bug 48804
--- snip --- wine: Call from 7B00FF28 to unimplemented function d3dx11_42.dll.D3DX11CreateShaderResourceViewFromFileW, aborting wine: Unimplemented function d3dx11_42.dll.D3DX11CreateShaderResourceViewFromFileW called at address 7B00FF28 (thread 01d0), starting debugger... --- snip ---
$ wine --version wine-6.0-rc6
Regards
https://bugs.winehq.org/show_bug.cgi?id=48685
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |cb8de48f7788270d6b581893d45 | |742ef0757fbee
https://bugs.winehq.org/show_bug.cgi?id=48685
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.1.