Matteo Bruni : d3dcompiler: Stub D3DCompile implementation.

Alexandre Julliard julliard at winehq.org
Mon Aug 30 13:00:37 CDT 2010


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

Author: Matteo Bruni <matteo.mystral at gmail.com>
Date:   Sat Aug 21 03:00:47 2010 +0200

d3dcompiler: Stub D3DCompile implementation.

---

 dlls/d3dcompiler_43/compiler.c          |   17 +++++++++++++++++
 dlls/d3dcompiler_43/d3dcompiler_43.spec |    2 +-
 include/d3dcompiler.h                   |    4 ++++
 3 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c
index 1c5c32b..43a5a3a 100644
--- a/dlls/d3dcompiler_43/compiler.c
+++ b/dlls/d3dcompiler_43/compiler.c
@@ -491,3 +491,20 @@ cleanup:
     LeaveCriticalSection(&wpp_mutex);
     return hr;
 }
+
+HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename,
+        const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
+        const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages)
+{
+    FIXME("data %p, data_size %lu, filename %s, defines %p, include %p, entrypoint %s,\n"
+            "target %s, sflags %#x, eflags %#x, shader %p, error_messages %p stub!\n",
+            data, data_size, debugstr_a(filename), defines, include, debugstr_a(entrypoint),
+            debugstr_a(target), sflags, eflags, shader, error_messages);
+
+    TRACE("Shader source:\n%s\n", debugstr_an(data, data_size));
+
+    if (error_messages)
+        D3DCreateBlob(1, error_messages); /* zero fill used as string end */
+
+    return D3DERR_INVALIDCALL;
+}
diff --git a/dlls/d3dcompiler_43/d3dcompiler_43.spec b/dlls/d3dcompiler_43/d3dcompiler_43.spec
index e86acef..ef57d52 100644
--- a/dlls/d3dcompiler_43/d3dcompiler_43.spec
+++ b/dlls/d3dcompiler_43/d3dcompiler_43.spec
@@ -1,6 +1,6 @@
 @ stdcall D3DAssemble(ptr long str ptr ptr long ptr ptr)
 @ stub DebugSetMute
-@ stub D3DCompile
+@ stdcall D3DCompile(ptr long str ptr ptr str str long long ptr ptr)
 @ stub D3DCompressShaders
 @ stdcall D3DCreateBlob(long ptr)
 @ stub D3DDecompressShaders
diff --git a/include/d3dcompiler.h b/include/d3dcompiler.h
index 1939124..9929cba 100644
--- a/include/d3dcompiler.h
+++ b/include/d3dcompiler.h
@@ -41,6 +41,10 @@
 #define D3DCOMPILE_OPTIMIZATION_LEVEL3            0x8000
 #define D3DCOMPILE_WARNINGS_ARE_ERRORS           0x40000
 
+HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename,
+        const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
+        const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages);
+
 HRESULT WINAPI D3DCreateBlob(SIZE_T data_size, ID3DBlob **blob);
 
 #endif




More information about the wine-cvs mailing list