[2/5] d3dcompiler: Stub D3DCompile implementation. [try 2]
Matteo Bruni
matteo.mystral at gmail.com
Fri Aug 27 08:59:17 CDT 2010
Code style (hopefully) fixed now.
-------------- next part --------------
From 9387e172ad2172a8a792401cd004e66af71b314d 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 | 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..42af26f 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
--
1.7.1
More information about the wine-patches
mailing list