Matteo Bruni : d3d10: Implement D3D10CompileShader, forward to d3dcompiler.

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


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

Author: Matteo Bruni <matteo.mystral at gmail.com>
Date:   Thu Aug 26 17:17:38 2010 +0200

d3d10: Implement D3D10CompileShader, forward to d3dcompiler.

---

 dlls/d3d10/Makefile.in     |    2 +-
 dlls/d3d10/d3d10.spec      |    2 +-
 dlls/d3d10/d3d10_private.h |    1 +
 dlls/d3d10/shader.c        |    9 +++++++++
 4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d10/Makefile.in b/dlls/d3d10/Makefile.in
index 79b2bbc..f48a1eb 100644
--- a/dlls/d3d10/Makefile.in
+++ b/dlls/d3d10/Makefile.in
@@ -4,7 +4,7 @@ SRCDIR    = @srcdir@
 VPATH     = @srcdir@
 MODULE    = d3d10.dll
 IMPORTLIB = d3d10
-IMPORTS   = dxguid uuid d3d10core dxgi
+IMPORTS   = dxguid uuid d3d10core d3dcompiler dxgi
 
 C_SRCS = \
 	d3d10_main.c \
diff --git a/dlls/d3d10/d3d10.spec b/dlls/d3d10/d3d10.spec
index e108a5c..1d62aea 100644
--- a/dlls/d3d10/d3d10.spec
+++ b/dlls/d3d10/d3d10.spec
@@ -1,5 +1,5 @@
 @ stub D3D10CompileEffectFromMemory
-@ stub D3D10CompileShader
+@ stdcall D3D10CompileShader(ptr long str ptr ptr str str long ptr ptr)
 @ stdcall D3D10CreateBlob(long ptr) d3dcompiler_43.D3DCreateBlob
 @ stdcall D3D10CreateDevice(ptr long ptr long long ptr)
 @ stdcall D3D10CreateDeviceAndSwapChain(ptr long ptr long long ptr ptr ptr)
diff --git a/dlls/d3d10/d3d10_private.h b/dlls/d3d10/d3d10_private.h
index 77a3529..20871ae 100644
--- a/dlls/d3d10/d3d10_private.h
+++ b/dlls/d3d10/d3d10_private.h
@@ -28,6 +28,7 @@
 #include "objbase.h"
 
 #include "d3d10.h"
+#include "d3dcompiler.h"
 
 /*
  * This doesn't belong here, but for some functions it is possible to return that value,
diff --git a/dlls/d3d10/shader.c b/dlls/d3d10/shader.c
index d5d9e16..29d7897 100644
--- a/dlls/d3d10/shader.c
+++ b/dlls/d3d10/shader.c
@@ -133,3 +133,12 @@ const struct ID3D10ShaderReflectionVtbl d3d10_shader_reflection_vtbl =
     d3d10_shader_reflection_GetInputParameterDesc,
     d3d10_shader_reflection_GetOutputParameterDesc,
 };
+
+HRESULT WINAPI D3D10CompileShader(const char *data, SIZE_T data_size, const char *filename,
+        const D3D10_SHADER_MACRO *defines, ID3D10Include *include, const char *entrypoint,
+        const char *profile, UINT flags, ID3D10Blob **shader, ID3D10Blob **error_messages)
+{
+    /* Forward to d3dcompiler */
+    return D3DCompile(data, data_size, filename, defines, include,
+            entrypoint, profile, flags, 0, shader, error_messages);
+}




More information about the wine-cvs mailing list