Added patch with stubs for d3dx10_43.D3DX10CreateEffectFromFileA/W.

This commit is contained in:
Sebastian Lackner 2015-07-19 23:14:54 +02:00
parent e5c67078fd
commit 2fdae8614e
6 changed files with 216 additions and 13 deletions

View File

@ -39,8 +39,9 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
-----------------------------------
**Bug fixes and features included in the next upcoming release [3]:**
**Bug fixes and features included in the next upcoming release [4]:**
* Add stubs for d3dx10_43.D3DX10CreateEffectFromFileA/W ([Wine Bug #27739](https://bugs.winehq.org/show_bug.cgi?id=27739))
* Check architecture before trying to load libraries ([Wine Bug #38021](https://bugs.winehq.org/show_bug.cgi?id=38021))
* Forward exitcode from child process when in wineconsole
* Share source of d3dx9_36 with d3dx9_33 to avoid Wine DLL forwards ([Wine Bug #21817](https://bugs.winehq.org/show_bug.cgi?id=21817))

1
debian/changelog vendored
View File

@ -7,6 +7,7 @@ wine-staging (1.7.48) UNRELEASED; urgency=low
* Added patch to check architecture before trying to load libraries.
* Added patch to share source of d3dx9_36 with d3dx9_33 to avoid Wine DLL
forwards.
* Added patch with stubs for d3dx10_43.D3DX10CreateEffectFromFileA/W.
* Removed patch to allow to enable/disable InsertMode in wineconsole settings
(accepted upstream).
* Removed patch to improve IoGetDeviceObjectPointer stub to appease SecuROM

View File

@ -0,0 +1,98 @@
From f6d41cfa9447e79a432628db4c4d51eef49dd2ed Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 15 Jul 2015 13:37:50 +1000
Subject: d3dx10_43: Add ID3DX10ThreadPump interface.
---
include/Makefile.in | 1 +
include/d3dx10core.idl | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 67 insertions(+)
create mode 100644 include/d3dx10core.idl
diff --git a/include/Makefile.in b/include/Makefile.in
index b524326..e0c1561 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -32,6 +32,7 @@ PUBLIC_IDL_H_SRCS = \
d3d11_1.idl \
d3d11sdklayers.idl \
d3dcommon.idl \
+ d3dx10core.idl \
ddstream.idl \
devicetopology.idl \
dimm.idl \
diff --git a/include/d3dx10core.idl b/include/d3dx10core.idl
new file mode 100644
index 0000000..d352670
--- /dev/null
+++ b/include/d3dx10core.idl
@@ -0,0 +1,66 @@
+/*
+ * Copyright 2015 Alistair Leslie-Hughes
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+import "oaidl.idl";
+import "ocidl.idl";
+import "dxgi.idl";
+import "d3dcommon.idl";
+
+[
+ object,
+ local,
+ pointer_default(unique)
+]
+interface ID3DX10DataLoader
+{
+ HRESULT Load();
+ HRESULT Decompress([out] void **data, [in] SIZE_T *bytes);
+ HRESULT Destroy();
+};
+
+[
+ object,
+ local,
+ pointer_default(unique)
+]
+interface ID3DX10DataProcessor
+{
+ HRESULT Process([in] void *data, [in] SIZE_T bytes);
+ HRESULT CreateDeviceObject([out] void **dataobject);
+ HRESULT Destroy();
+};
+
+
+[
+ object,
+ local,
+ pointer_default(unique),
+ uuid(C93FECFA-6967-478a-ABBC-402D90621FCB)
+]
+interface ID3DX10ThreadPump : IUnknown
+{
+ HRESULT AddWorkItem([in] ID3DX10DataLoader *loader, [in] ID3DX10DataProcessor *processor,
+ [in] HRESULT *result, [out] void **object);
+ UINT GetWorkItemCount();
+
+ HRESULT WaitForAllItems();
+ HRESULT ProcessDeviceWorkItems([in] UINT count);
+
+ HRESULT PurgeAllItems();
+ HRESULT GetQueueStatus([in] UINT *queue, [in] UINT *processqueue, [in] UINT *devicequeue);
+};
--
2.4.5

View File

@ -0,0 +1,81 @@
From 800e3ab9e59fb324fd8168f20a8139171794f4c8 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 15 Jul 2015 12:19:50 +1000
Subject: d3dx10_43: Add D3DX10CreateEffectFromFileA/W stubs.
---
dlls/d3dx10_43/d3dx10_43.spec | 4 ++--
dlls/d3dx10_43/d3dx10_43_main.c | 31 +++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/dlls/d3dx10_43/d3dx10_43.spec b/dlls/d3dx10_43/d3dx10_43.spec
index 363d007..5bc871b 100644
--- a/dlls/d3dx10_43/d3dx10_43.spec
+++ b/dlls/d3dx10_43/d3dx10_43.spec
@@ -20,8 +20,8 @@
@ stub D3DX10CreateAsyncTextureProcessor(ptr ptr ptr)
@ stub D3DX10CreateDevice(ptr long long long ptr)
@ stub D3DX10CreateDeviceAndSwapChain(ptr long long long ptr ptr ptr)
-@ stub D3DX10CreateEffectFromFileA(str ptr ptr str long long ptr ptr ptr ptr ptr ptr)
-@ stub D3DX10CreateEffectFromFileW(wstr ptr ptr str long long ptr ptr ptr ptr ptr ptr)
+@ stdcall D3DX10CreateEffectFromFileA(str ptr ptr str long long ptr ptr ptr ptr ptr ptr)
+@ stdcall D3DX10CreateEffectFromFileW(wstr ptr ptr str long long ptr ptr ptr ptr ptr ptr)
@ stub D3DX10CreateEffectFromMemory(ptr long str ptr ptr str long long ptr ptr ptr ptr ptr ptr)
@ stub D3DX10CreateEffectFromResourceA(long str str ptr ptr str long long ptr ptr ptr ptr ptr ptr)
@ stub D3DX10CreateEffectFromResourceW(long wstr wstr ptr ptr str long long ptr ptr ptr ptr ptr ptr)
diff --git a/dlls/d3dx10_43/d3dx10_43_main.c b/dlls/d3dx10_43/d3dx10_43_main.c
index b3f9341..1b505fa 100644
--- a/dlls/d3dx10_43/d3dx10_43_main.c
+++ b/dlls/d3dx10_43/d3dx10_43_main.c
@@ -21,6 +21,8 @@
#include "config.h"
#include "wine/port.h"
+#include "wine/debug.h"
+#include "wine/unicode.h"
#include <stdarg.h>
@@ -32,6 +34,9 @@
#include "objbase.h"
#include "d3d10.h"
+#include "d3dx10core.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
@@ -59,3 +64,29 @@ BOOL WINAPI D3DX10CheckVersion(UINT d3dsdkvers, UINT d3dxsdkvers)
return FALSE;
}
+
+HRESULT WINAPI D3DX10CreateEffectFromFileA(const char *filename, const D3D10_SHADER_MACRO *defines,
+ ID3D10Include *include, const char *profile, UINT hlslflags, UINT fxflags, ID3D10Device *device,
+ ID3D10EffectPool *effectpool, ID3DX10ThreadPump *pump, ID3D10Effect **effect, ID3D10Blob **errors,
+ HRESULT *hresult)
+{
+ FIXME("filename %s, defines %p, include %p, profile %s, hlslflags %#x, fxflags %#x, "
+ "device %p, effectpool %p, pump %p, effect %p, errors %p, hresult %p\n",
+ debugstr_a(filename), defines, include, debugstr_a(profile), hlslflags, fxflags,
+ device, effectpool, pump, effect, errors, hresult);
+
+ return E_NOTIMPL;
+}
+
+HRESULT WINAPI D3DX10CreateEffectFromFileW(const WCHAR *filename, const D3D10_SHADER_MACRO *defines,
+ ID3D10Include *include, const char *profile, UINT hlslflags, UINT fxflags, ID3D10Device *device,
+ ID3D10EffectPool *effectpool, ID3DX10ThreadPump *pump, ID3D10Effect **effect, ID3D10Blob **errors,
+ HRESULT *hresult)
+{
+ FIXME("filename %s, defines %p, include %p, profile %s, hlslflags %#x, fxflags %#x, "
+ "device %p, effectpool %p, pump %p, effect %p, errors %p, hresult %p\n",
+ debugstr_w(filename), defines, include, debugstr_a(profile), hlslflags, fxflags, device,
+ effectpool, pump, effect, errors, hresult);
+
+ return E_NOTIMPL;
+}
--
2.4.5

View File

@ -0,0 +1 @@
Fixes: [27739] Add stubs for d3dx10_43.D3DX10CreateEffectFromFileA/W

View File

@ -88,6 +88,7 @@ patch_enable_all ()
enable_d3d9_DesktopWindow="$1"
enable_d3d9_Skip_Tests="$1"
enable_d3d9_Surface_Refcount="$1"
enable_d3dx10_43_D3DX10CreateEffectFromFile="$1"
enable_d3dx9_24_ID3DXEffect="$1"
enable_d3dx9_25_ID3DXEffect="$1"
enable_d3dx9_26_ID3DXEffect="$1"
@ -332,6 +333,9 @@ patch_enable ()
d3d9-Surface_Refcount)
enable_d3d9_Surface_Refcount="$2"
;;
d3dx10_43-D3DX10CreateEffectFromFile)
enable_d3dx10_43_D3DX10CreateEffectFromFile="$2"
;;
d3dx9_24-ID3DXEffect)
enable_d3dx9_24_ID3DXEffect="$2"
;;
@ -2127,6 +2131,23 @@ if test "$enable_d3d9_Surface_Refcount" -eq 1; then
) >> "$patchlist"
fi
# Patchset d3dx10_43-D3DX10CreateEffectFromFile
# |
# | This patchset fixes the following Wine bugs:
# | * [#27739] Add stubs for d3dx10_43.D3DX10CreateEffectFromFileA/W
# |
# | Modified files:
# | * dlls/d3dx10_43/d3dx10_43.spec, dlls/d3dx10_43/d3dx10_43_main.c, include/Makefile.in, include/d3dx10core.idl
# |
if test "$enable_d3dx10_43_D3DX10CreateEffectFromFile" -eq 1; then
patch_apply d3dx10_43-D3DX10CreateEffectFromFile/0001-d3dx10_43-Add-ID3DX10ThreadPump-interface.patch
patch_apply d3dx10_43-D3DX10CreateEffectFromFile/0002-d3dx10_43-Add-D3DX10CreateEffectFromFileA-W-stubs.patch
(
echo '+ { "Alistair Leslie-Hughes", "d3dx10_43: Add ID3DX10ThreadPump interface.", 1 },';
echo '+ { "Alistair Leslie-Hughes", "d3dx10_43: Add D3DX10CreateEffectFromFileA/W stubs.", 1 },';
) >> "$patchlist"
fi
# Patchset d3dx9_25-ID3DXEffect
# |
# | This patchset fixes the following Wine bugs:
@ -2794,18 +2815,6 @@ if test "$enable_kernel32_CompareStringEx" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-SetFileInformationByHandle
# |
# | Modified files:
# | * include/winbase.h
# |
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
patch_apply kernel32-SetFileInformationByHandle/0001-include-Declare-a-couple-more-file-information-class.patch
(
echo '+ { "Michael Müller", "include: Declare a couple more file information class structures.", 1 },';
) >> "$patchlist"
fi
# Patchset server-File_Permissions
# |
# | Modified files:
@ -2869,6 +2878,18 @@ if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-SetFileInformationByHandle
# |
# | Modified files:
# | * include/winbase.h
# |
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
patch_apply kernel32-SetFileInformationByHandle/0001-include-Declare-a-couple-more-file-information-class.patch
(
echo '+ { "Michael Müller", "include: Declare a couple more file information class structures.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-CopyFileEx
# |
# | This patchset fixes the following Wine bugs: