[2/5] d3dcompiler: Stub D3DCompile implementation.
Matteo Bruni
matteo.mystral at gmail.com
Thu Aug 26 10:26:27 CDT 2010
-------------- next part --------------
From bcf92c97d6a1b7c1622aca966b2ca78830b17d96 Mon Sep 17 00:00:00 2001
From: Matteo Bruni <matteo.mystral at gmail.com>
Date: Sat, 21 Aug 2010 03:00:47 +0200
Subject: d3dcompiler: Stub D3DCompile implementation.
---
dlls/d3dcompiler_43/compiler.c | 17 +++++++++++++++++
dlls/d3dcompiler_43/d3dcompiler_43.spec | 2 +-
include/d3dcompiler.h | 6 ++++++
3 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/dlls/d3dcompiler_43/compiler.c b/dlls/d3dcompiler_43/compiler.c
index 1c5c32b..a8e8ea9 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 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("(%p, %ld, %s, %p, %p, %s, %s, %x, %x, %p, %p): stub\n",
+ data, size, filename, defines, include, debugstr_a(entrypoint),
+ debugstr_a(target), sflags, eflags, shader, error_messages);
+
+ TRACE("Shader source:\n");
+ TRACE("%s\n", debugstr_an(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..d9d19e6 100644
--- a/include/d3dcompiler.h
+++ b/include/d3dcompiler.h
@@ -41,6 +41,12 @@
#define D3DCOMPILE_OPTIMIZATION_LEVEL3 0x8000
#define D3DCOMPILE_WARNINGS_ARE_ERRORS 0x40000
+HRESULT WINAPI D3DCompile(const void *data, SIZE_T 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
--
1.7.1
More information about the wine-patches
mailing list