From d96eed9e17bf78480720eaf6cbf0298c5bddea53 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 28 Jul 2015 21:36:16 +0200 Subject: [PATCH] Added patch with stubs for D3DCompile2 and D3DCompileFromFile. --- README.md | 3 +- debian/changelog | 1 + ...D3DCompileFromFile-D3DCompile2-stubs.patch | 72 ++++++++++++ patches/d3dcompiler_43-D3DCompile/definition | 1 + patches/patchinstall.sh | 104 ++++++++++-------- 5 files changed, 136 insertions(+), 45 deletions(-) create mode 100644 patches/d3dcompiler_43-D3DCompile/0001-d3dcompiler-Add-D3DCompileFromFile-D3DCompile2-stubs.patch create mode 100644 patches/d3dcompiler_43-D3DCompile/definition diff --git a/README.md b/README.md index b47c304f..42c3073a 100644 --- a/README.md +++ b/README.md @@ -39,9 +39,10 @@ Wine. All those differences are also documented on the Included bug fixes and improvements ----------------------------------- -**Bug fixes and features included in the next upcoming release [14]:** +**Bug fixes and features included in the next upcoming release [15]:** * Add stub for D3DXTessellateNPatches +* Add stubs for D3DCompile2 and D3DCompileFromFile * Add stubs for d3dx10_43.D3DX10CreateEffectFromFileA/W ([Wine Bug #27739](https://bugs.winehq.org/show_bug.cgi?id=27739)) * Add support for ThreadQuerySetWin32StartAddress info class ([Wine Bug #8277](https://bugs.winehq.org/show_bug.cgi?id=8277)) * Check architecture before trying to load libraries ([Wine Bug #38021](https://bugs.winehq.org/show_bug.cgi?id=38021)) diff --git a/debian/changelog b/debian/changelog index 43183fdb..2881f10e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,6 +20,7 @@ wine-staging (1.7.48) UNRELEASED; urgency=low * Added patch to store registry timestamps with nanoseconds precision. * Added patch to implement AMStream GetMultiMediaStream functions. * Added patch with stub for D3DXTessellateNPatches. + * Added patch with stubs for D3DCompile2 and D3DCompileFromFile. * Removed patch to allow to enable/disable InsertMode in wineconsole settings (accepted upstream). * Removed patch to improve IoGetDeviceObjectPointer stub to appease SecuROM diff --git a/patches/d3dcompiler_43-D3DCompile/0001-d3dcompiler-Add-D3DCompileFromFile-D3DCompile2-stubs.patch b/patches/d3dcompiler_43-D3DCompile/0001-d3dcompiler-Add-D3DCompileFromFile-D3DCompile2-stubs.patch new file mode 100644 index 00000000..d4df27fa --- /dev/null +++ b/patches/d3dcompiler_43-D3DCompile/0001-d3dcompiler-Add-D3DCompileFromFile-D3DCompile2-stubs.patch @@ -0,0 +1,72 @@ +From 5175515e29522c768439dd8e4464b1b7416a65f9 Mon Sep 17 00:00:00 2001 +From: Alistair Leslie-Hughes +Date: Thu, 23 Jul 2015 19:09:32 +1000 +Subject: d3dcompiler: Add D3DCompileFromFile, D3DCompile2 stubs. (try 3) + +--- + dlls/d3dcompiler_43/compiler.c | 22 ++++++++++++++++++++++ + dlls/d3dcompiler_46/d3dcompiler_46.spec | 4 ++-- + dlls/d3dcompiler_47/d3dcompiler_47.spec | 4 ++-- + 3 files changed, 26 insertions(+), 4 deletions(-) + +diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c +index 114b4c1..533740d 100644 +--- a/dlls/d3dcompiler_43/compiler.c ++++ b/dlls/d3dcompiler_43/compiler.c +@@ -763,3 +763,25 @@ HRESULT WINAPI D3DDisassemble(const void *data, SIZE_T size, UINT flags, const c + data, size, flags, comments, disassembly); + return E_NOTIMPL; + } ++ ++HRESULT WINAPI D3DCompileFromFile(const WCHAR *filename, const D3D_SHADER_MACRO *defines, ID3DInclude *includes, ++ const char *entrypoint, const char *target, UINT flags1, UINT flags2, ID3DBlob **code, ID3DBlob **errors) ++{ ++ FIXME("filename %s, defines %p, includes %p, entrypoint %s, target %s, flags1 %x, flags2 %x, code %p, errors %p\n", ++ debugstr_w(filename), defines, includes, debugstr_a(entrypoint), debugstr_a(target), flags1, flags2, code, errors); ++ ++ return E_NOTIMPL; ++} ++ ++HRESULT WINAPI D3DCompile2(const void *srcdata, SIZE_T srcdatasize, const char *sourcename, const D3D_SHADER_MACRO *defines, ++ ID3DInclude *includes, const char *entrypoint, const char *target, UINT flags1, UINT flags2, ++ UINT secondarydataflags, const void *secondarydata, SIZE_T secondarydatasize, ID3DBlob **code, ++ ID3DBlob **errors) ++{ ++ FIXME("srcdata %p, srcdatasize %lu, sourcename %s, defines %p, includes %p, entrypoint %s, target %s, " ++ "flags1 %#x, flags2 %#x, secondarydataflags %u, secondarydata %p, secondarydatasize %lu, " ++ "code %p, errors %p\n", srcdata, srcdatasize, debugstr_a(sourcename), defines, includes, debugstr_a(entrypoint), ++ debugstr_a(target), flags1, flags2, secondarydataflags, secondarydata, secondarydatasize, code, errors); ++ ++ return E_NOTIMPL; ++} +diff --git a/dlls/d3dcompiler_46/d3dcompiler_46.spec b/dlls/d3dcompiler_46/d3dcompiler_46.spec +index 5811b40..1b145c8a 100644 +--- a/dlls/d3dcompiler_46/d3dcompiler_46.spec ++++ b/dlls/d3dcompiler_46/d3dcompiler_46.spec +@@ -1,7 +1,7 @@ + @ stdcall D3DAssemble(ptr long str ptr ptr long ptr ptr) + @ stdcall D3DCompile(ptr long str ptr ptr str str long long ptr ptr) +-@ stub D3DCompile2 +-@ stub D3DCompileFromFile ++@ stdcall D3DCompile2(ptr long str ptr ptr str str long long long ptr long ptr ptr) ++@ stdcall D3DCompileFromFile(wstr ptr ptr str str long long ptr ptr) + @ stub D3DCompressShaders + @ stdcall D3DCreateBlob(long ptr) + @ stub D3DDecompressShaders +diff --git a/dlls/d3dcompiler_47/d3dcompiler_47.spec b/dlls/d3dcompiler_47/d3dcompiler_47.spec +index 40ad977..efa4767 100644 +--- a/dlls/d3dcompiler_47/d3dcompiler_47.spec ++++ b/dlls/d3dcompiler_47/d3dcompiler_47.spec +@@ -1,7 +1,7 @@ + @ stdcall D3DAssemble(ptr long str ptr ptr long ptr ptr) + @ stdcall D3DCompile(ptr long str ptr ptr str str long long ptr ptr) +-@ stub D3DCompile2 +-@ stub D3DCompileFromFile ++@ stdcall D3DCompile2(ptr long str ptr ptr str str long long long ptr long ptr ptr) ++@ stdcall D3DCompileFromFile(wstr ptr ptr str str long long ptr ptr) + @ stub D3DCompressShaders + @ stdcall D3DCreateBlob(long ptr) + @ stub D3DCreateFunctionLinkingGraph +-- +2.4.5 + diff --git a/patches/d3dcompiler_43-D3DCompile/definition b/patches/d3dcompiler_43-D3DCompile/definition new file mode 100644 index 00000000..4a2b703c --- /dev/null +++ b/patches/d3dcompiler_43-D3DCompile/definition @@ -0,0 +1 @@ +Fixes: Add stubs for D3DCompile2 and D3DCompileFromFile diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 0b75b088..270e9f31 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -89,6 +89,7 @@ patch_enable_all () enable_d3d9_DesktopWindow="$1" enable_d3d9_Skip_Tests="$1" enable_d3d9_Surface_Refcount="$1" + enable_d3dcompiler_43_D3DCompile="$1" enable_d3dx10_43_D3DX10CreateEffectFromFile="$1" enable_d3dx9_24_ID3DXEffect="$1" enable_d3dx9_25_ID3DXEffect="$1" @@ -343,6 +344,9 @@ patch_enable () d3d9-Surface_Refcount) enable_d3d9_Surface_Refcount="$2" ;; + d3dcompiler_43-D3DCompile) + enable_d3dcompiler_43_D3DCompile="$2" + ;; d3dx10_43-D3DX10CreateEffectFromFile) enable_d3dx10_43_D3DX10CreateEffectFromFile="$2" ;; @@ -1996,23 +2000,6 @@ if test "$enable_Staging" -eq 1; then ) >> "$patchlist" fi -# Patchset server-Misc_ACL -# | -# | This patchset fixes the following Wine bugs: -# | * [#15980] GetSecurityInfo returns NULL DACL for process object -# | -# | Modified files: -# | * dlls/advapi32/tests/security.c, server/process.c, server/security.h, server/token.c -# | -if test "$enable_server_Misc_ACL" -eq 1; then - patch_apply server-Misc_ACL/0001-server-Add-default-security-descriptor-ownership-for.patch - patch_apply server-Misc_ACL/0002-server-Add-default-security-descriptor-DACL-for-proc.patch - ( - echo '+ { "Erich E. Hoover", "server: Add default security descriptor ownership for processes.", 1 },'; - echo '+ { "Erich E. Hoover", "server: Add default security descriptor DACL for processes.", 1 },'; - ) >> "$patchlist" -fi - # Patchset server-CreateProcess_ACLs # | # | This patchset fixes the following Wine bugs: @@ -2032,6 +2019,23 @@ if test "$enable_server_CreateProcess_ACLs" -eq 1; then ) >> "$patchlist" fi +# Patchset server-Misc_ACL +# | +# | This patchset fixes the following Wine bugs: +# | * [#15980] GetSecurityInfo returns NULL DACL for process object +# | +# | Modified files: +# | * dlls/advapi32/tests/security.c, server/process.c, server/security.h, server/token.c +# | +if test "$enable_server_Misc_ACL" -eq 1; then + patch_apply server-Misc_ACL/0001-server-Add-default-security-descriptor-ownership-for.patch + patch_apply server-Misc_ACL/0002-server-Add-default-security-descriptor-DACL-for-proc.patch + ( + echo '+ { "Erich E. Hoover", "server: Add default security descriptor ownership for processes.", 1 },'; + echo '+ { "Erich E. Hoover", "server: Add default security descriptor DACL for processes.", 1 },'; + ) >> "$patchlist" +fi + # Patchset advapi32-LsaLookupSids # | # | Modified files: @@ -2184,6 +2188,18 @@ if test "$enable_d3d9_Surface_Refcount" -eq 1; then ) >> "$patchlist" fi +# Patchset d3dcompiler_43-D3DCompile +# | +# | Modified files: +# | * dlls/d3dcompiler_43/compiler.c, dlls/d3dcompiler_46/d3dcompiler_46.spec, dlls/d3dcompiler_47/d3dcompiler_47.spec +# | +if test "$enable_d3dcompiler_43_D3DCompile" -eq 1; then + patch_apply d3dcompiler_43-D3DCompile/0001-d3dcompiler-Add-D3DCompileFromFile-D3DCompile2-stubs.patch + ( + echo '+ { "Alistair Leslie-Hughes", "d3dcompiler: Add D3DCompileFromFile, D3DCompile2 stubs.", 3 },'; + ) >> "$patchlist" +fi + # Patchset d3dx10_43-D3DX10CreateEffectFromFile # | # | This patchset fixes the following Wine bugs: @@ -2242,33 +2258,6 @@ if test "$enable_d3dx9_26_ID3DXEffect" -eq 1; then ) >> "$patchlist" fi -# Patchset d3dx9_36-D3DXStubs -# | -# | This patchset fixes the following Wine bugs: -# | * [#26379] Support for D3DXComputeNormals -# | * [#38334] Add stub for D3DXFrameFind -# | -# | Modified files: -# | * dlls/d3dx9_24/d3dx9_24.spec, dlls/d3dx9_25/d3dx9_25.spec, dlls/d3dx9_26/d3dx9_26.spec, dlls/d3dx9_27/d3dx9_27.spec, -# | dlls/d3dx9_28/d3dx9_28.spec, dlls/d3dx9_29/d3dx9_29.spec, dlls/d3dx9_30/d3dx9_30.spec, dlls/d3dx9_31/d3dx9_31.spec, -# | dlls/d3dx9_32/d3dx9_32.spec, dlls/d3dx9_33/d3dx9_33.spec, dlls/d3dx9_34/d3dx9_34.spec, dlls/d3dx9_35/d3dx9_35.spec, -# | dlls/d3dx9_36/d3dx9_36.spec, dlls/d3dx9_36/mesh.c, dlls/d3dx9_37/d3dx9_37.spec, dlls/d3dx9_38/d3dx9_38.spec, -# | dlls/d3dx9_39/d3dx9_39.spec, dlls/d3dx9_40/d3dx9_40.spec, dlls/d3dx9_41/d3dx9_41.spec, dlls/d3dx9_42/d3dx9_42.spec, -# | dlls/d3dx9_43/d3dx9_43.spec -# | -if test "$enable_d3dx9_36_D3DXStubs" -eq 1; then - patch_apply d3dx9_36-D3DXStubs/0001-d3dx9_36-Implement-D3DXComputeNormals.patch - patch_apply d3dx9_36-D3DXStubs/0002-d3dx9_36-Add-stub-for-D3DXComputeNormalMap.patch - patch_apply d3dx9_36-D3DXStubs/0003-d3dx9_36-Add-D3DXFrameFind-stub.patch - patch_apply d3dx9_36-D3DXStubs/0004-d3dx9_36-Add-D3DXTessellateNPatches-stub.-try-2.patch - ( - echo '+ { "Christian Costa", "d3dx9_36: Implement D3DXComputeNormals.", 1 },'; - echo '+ { "Christian Costa", "d3dx9_36: Add stub for D3DXComputeNormalMap.", 1 },'; - echo '+ { "Andrey Gusev", "d3dx9_36: Add D3DXFrameFind stub.", 1 },'; - echo '+ { "Alistair Leslie-Hughes", "d3dx9_36: Add D3DXTessellateNPatches stub.", 2 },'; - ) >> "$patchlist" -fi - # Patchset wined3d-DXTn # | # | This patchset fixes the following Wine bugs: @@ -2313,6 +2302,33 @@ if test "$enable_d3dx9_36_DXTn" -eq 1; then ) >> "$patchlist" fi +# Patchset d3dx9_36-D3DXStubs +# | +# | This patchset fixes the following Wine bugs: +# | * [#26379] Support for D3DXComputeNormals +# | * [#38334] Add stub for D3DXFrameFind +# | +# | Modified files: +# | * dlls/d3dx9_24/d3dx9_24.spec, dlls/d3dx9_25/d3dx9_25.spec, dlls/d3dx9_26/d3dx9_26.spec, dlls/d3dx9_27/d3dx9_27.spec, +# | dlls/d3dx9_28/d3dx9_28.spec, dlls/d3dx9_29/d3dx9_29.spec, dlls/d3dx9_30/d3dx9_30.spec, dlls/d3dx9_31/d3dx9_31.spec, +# | dlls/d3dx9_32/d3dx9_32.spec, dlls/d3dx9_33/d3dx9_33.spec, dlls/d3dx9_34/d3dx9_34.spec, dlls/d3dx9_35/d3dx9_35.spec, +# | dlls/d3dx9_36/d3dx9_36.spec, dlls/d3dx9_36/mesh.c, dlls/d3dx9_37/d3dx9_37.spec, dlls/d3dx9_38/d3dx9_38.spec, +# | dlls/d3dx9_39/d3dx9_39.spec, dlls/d3dx9_40/d3dx9_40.spec, dlls/d3dx9_41/d3dx9_41.spec, dlls/d3dx9_42/d3dx9_42.spec, +# | dlls/d3dx9_43/d3dx9_43.spec +# | +if test "$enable_d3dx9_36_D3DXStubs" -eq 1; then + patch_apply d3dx9_36-D3DXStubs/0001-d3dx9_36-Implement-D3DXComputeNormals.patch + patch_apply d3dx9_36-D3DXStubs/0002-d3dx9_36-Add-stub-for-D3DXComputeNormalMap.patch + patch_apply d3dx9_36-D3DXStubs/0003-d3dx9_36-Add-D3DXFrameFind-stub.patch + patch_apply d3dx9_36-D3DXStubs/0004-d3dx9_36-Add-D3DXTessellateNPatches-stub.-try-2.patch + ( + echo '+ { "Christian Costa", "d3dx9_36: Implement D3DXComputeNormals.", 1 },'; + echo '+ { "Christian Costa", "d3dx9_36: Add stub for D3DXComputeNormalMap.", 1 },'; + echo '+ { "Andrey Gusev", "d3dx9_36: Add D3DXFrameFind stub.", 1 },'; + echo '+ { "Alistair Leslie-Hughes", "d3dx9_36: Add D3DXTessellateNPatches stub.", 2 },'; + ) >> "$patchlist" +fi + # Patchset d3dx9_33-Share_Source # | # | This patchset fixes the following Wine bugs: