[5/5] d3d10: Implement D3D10CompileShader, forward to d3dcompiler. [try 2]

Matteo Bruni matteo.mystral at gmail.com
Fri Aug 27 08:59:52 CDT 2010


-------------- next part --------------
From 7112e2ee08083f9f49f8b113791ccf69510349b8 Mon Sep 17 00:00:00 2001
From: Matteo Bruni <matteo.mystral at gmail.com>
Date: Thu, 26 Aug 2010 17:17:38 +0200
Subject: 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..7a18c7e 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   = d3d10core d3dcompiler dxgi dxguid uuid
 
 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);
+}
-- 
1.7.1


More information about the wine-patches mailing list