Matteo Bruni : d3dx11: Implement D3DX11CompileFromMemory().

Alexandre Julliard julliard at winehq.org
Wed Jun 15 11:39:40 CDT 2016


Module: wine
Branch: master
Commit: f7a1491a5ebd7d8ae3e9db55a8b49e66a08e6be6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f7a1491a5ebd7d8ae3e9db55a8b49e66a08e6be6

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Tue Jun 14 22:57:24 2016 +0200

d3dx11: Implement D3DX11CompileFromMemory().

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 configure                     |  2 +-
 configure.ac                  |  2 +-
 dlls/d3dx11_42/d3dx11_42.spec |  2 +-
 dlls/d3dx11_43/Makefile.in    |  6 +++++-
 dlls/d3dx11_43/async.c        | 43 +++++++++++++++++++++++++++++++++++++++++++
 dlls/d3dx11_43/d3dx11_43.c    |  2 +-
 dlls/d3dx11_43/d3dx11_43.spec |  2 +-
 include/Makefile.in           |  1 +
 include/d3dx11async.h         | 37 +++++++++++++++++++++++++++++++++++++
 9 files changed, 91 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index 6151ef8..d1a6a68 100755
--- a/configure
+++ b/configure
@@ -17595,7 +17595,7 @@ wine_fn_config_dll d3dx10_42 enable_d3dx10_42
 wine_fn_config_dll d3dx10_43 enable_d3dx10_43 implib d3dx10
 wine_fn_config_test dlls/d3dx10_43/tests d3dx10_43_test
 wine_fn_config_dll d3dx11_42 enable_d3dx11_42
-wine_fn_config_dll d3dx11_43 enable_d3dx11_43
+wine_fn_config_dll d3dx11_43 enable_d3dx11_43 implib d3dx11
 wine_fn_config_dll d3dx9_24 enable_d3dx9_24
 wine_fn_config_dll d3dx9_25 enable_d3dx9_25
 wine_fn_config_dll d3dx9_26 enable_d3dx9_26
diff --git a/configure.ac b/configure.ac
index a2b1705..7f234b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2841,7 +2841,7 @@ WINE_CONFIG_DLL(d3dx10_42)
 WINE_CONFIG_DLL(d3dx10_43,,[implib],[d3dx10])
 WINE_CONFIG_TEST(dlls/d3dx10_43/tests)
 WINE_CONFIG_DLL(d3dx11_42)
-WINE_CONFIG_DLL(d3dx11_43)
+WINE_CONFIG_DLL(d3dx11_43,,[implib],[d3dx11])
 WINE_CONFIG_DLL(d3dx9_24)
 WINE_CONFIG_DLL(d3dx9_25)
 WINE_CONFIG_DLL(d3dx9_26)
diff --git a/dlls/d3dx11_42/d3dx11_42.spec b/dlls/d3dx11_42/d3dx11_42.spec
index 3fd291c..b917263 100644
--- a/dlls/d3dx11_42/d3dx11_42.spec
+++ b/dlls/d3dx11_42/d3dx11_42.spec
@@ -1,7 +1,7 @@
 @ stdcall D3DX11CheckVersion(long long)
 @ stub D3DX11CompileFromFileA
 @ stub D3DX11CompileFromFileW
-@ stub D3DX11CompileFromMemory
+@ stdcall D3DX11CompileFromMemory(str long str ptr ptr str str long long ptr ptr ptr ptr) d3dx11_43.D3DX11CompileFromMemory
 @ stub D3DX11CompileFromResourceA
 @ stub D3DX11CompileFromResourceW
 @ stub D3DX11ComputeNormalMap
diff --git a/dlls/d3dx11_43/Makefile.in b/dlls/d3dx11_43/Makefile.in
index 8336602..1cc4911 100644
--- a/dlls/d3dx11_43/Makefile.in
+++ b/dlls/d3dx11_43/Makefile.in
@@ -1,5 +1,9 @@
 MODULE = d3dx11_43.dll
+IMPORTLIB = d3dx11
+IMPORTS   = d3dcompiler
 
-C_SRCS = d3dx11_43.c
+C_SRCS = \
+	async.c \
+	d3dx11_43.c
 
 RC_SRCS = version.rc
diff --git a/dlls/d3dx11_43/async.c b/dlls/d3dx11_43/async.c
new file mode 100644
index 0000000..c809f2c
--- /dev/null
+++ b/dlls/d3dx11_43/async.c
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2016 Matteo Bruni for CodeWeavers
+ *
+ * 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
+ */
+
+#include "config.h"
+#include "wine/port.h"
+#include "d3dx11.h"
+#include "d3dcompiler.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
+
+HRESULT WINAPI D3DX11CompileFromMemory(const char *data, SIZE_T data_size, const char *filename,
+        const D3D10_SHADER_MACRO *defines, ID3D10Include *include, const char *entry_point,
+        const char *target, UINT sflags, UINT eflags, ID3DX11ThreadPump *pump, ID3D10Blob **shader,
+        ID3D10Blob **error_messages, HRESULT *hresult)
+{
+    TRACE("data %s, data_size %lu, filename %s, defines %p, include %p, entry_point %s, target %s, "
+            "sflags %#x, eflage %#x, pump %p, shader %p, error_messages %p, hresult %p.\n",
+            debugstr_a(data), data_size, debugstr_a(filename), defines, include, entry_point,
+            debugstr_a(target), sflags, eflags, pump, shader, error_messages, hresult);
+
+    if (pump)
+        FIXME("Unimplemented ID3DX11ThreadPump handling.\n");
+
+    return D3DCompile(data, data_size, filename, defines, include, entry_point, target,
+            sflags, eflags, shader, error_messages);
+}
diff --git a/dlls/d3dx11_43/d3dx11_43.c b/dlls/d3dx11_43/d3dx11_43.c
index a609613..149d953 100644
--- a/dlls/d3dx11_43/d3dx11_43.c
+++ b/dlls/d3dx11_43/d3dx11_43.c
@@ -26,7 +26,7 @@
 #include "winbase.h"
 #include "winuser.h"
 #include "objbase.h"
-#include "d3d11.h"
+#include "d3dx11.h"
 
 BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved)
 {
diff --git a/dlls/d3dx11_43/d3dx11_43.spec b/dlls/d3dx11_43/d3dx11_43.spec
index 3fd291c..a2a32ff 100644
--- a/dlls/d3dx11_43/d3dx11_43.spec
+++ b/dlls/d3dx11_43/d3dx11_43.spec
@@ -1,7 +1,7 @@
 @ stdcall D3DX11CheckVersion(long long)
 @ stub D3DX11CompileFromFileA
 @ stub D3DX11CompileFromFileW
-@ stub D3DX11CompileFromMemory
+@ stdcall D3DX11CompileFromMemory(str long str ptr ptr str str long long ptr ptr ptr ptr)
 @ stub D3DX11CompileFromResourceA
 @ stub D3DX11CompileFromResourceW
 @ stub D3DX11ComputeNormalMap
diff --git a/include/Makefile.in b/include/Makefile.in
index d981ac5..b2002a9 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -258,6 +258,7 @@ HEADER_SRCS = \
 	d3dx10async.h \
 	d3dx10tex.h \
 	d3dx11.h \
+	d3dx11async.h \
 	d3dx11tex.h \
 	d3dx9.h \
 	d3dx9anim.h \
diff --git a/include/d3dx11async.h b/include/d3dx11async.h
new file mode 100644
index 0000000..210067b
--- /dev/null
+++ b/include/d3dx11async.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2016 Matteo Bruni for CodeWeavers
+ *
+ * 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
+ */
+
+#ifndef __D3DX11ASYNC_H__
+#define __D3DX11ASYNC_H__
+
+#include "d3dx11.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+HRESULT WINAPI D3DX11CompileFromMemory(const char *data, SIZE_T data_size, const char *filename,
+        const D3D10_SHADER_MACRO *defines, ID3D10Include *include, const char *entry_point,
+        const char *target, UINT sflags, UINT eflags, ID3DX11ThreadPump *pump, ID3D10Blob **shader,
+        ID3D10Blob **error_messages, HRESULT *hresult);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif




More information about the wine-cvs mailing list