[PATCH] d3d9: add stub for Direct3DShaderValidatorCreate9()

Peter Beutner p.beutner at gmx.net
Tue Dec 18 03:44:18 CST 2007


Of course being completely undocumented and marked for internal use only doesn't
mean the function isn't used :/, as seen in bug 8051.
Looking at what the demo does with the result of this function indicates that it
actually is supposed to return some kind of COM object.
Just pretending the creation failed and return NULL seems to be enough to
satisfy the application.

---
 dlls/d3d9/d3d9.spec   |    1 +
 dlls/d3d9/d3d9_main.c |   12 ++++++++++++
 2 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/dlls/d3d9/d3d9.spec b/dlls/d3d9/d3d9.spec
index 949f03f..a9232fc 100644
--- a/dlls/d3d9/d3d9.spec
+++ b/dlls/d3d9/d3d9.spec
@@ -1,6 +1,7 @@
 @ stdcall D3D9GetSWInfo()
 @ stdcall DebugSetMute()
 @ stdcall Direct3DCreate9(long)
+@ stdcall Direct3DShaderValidatorCreate9()
 @ stdcall D3DPERF_BeginEvent(long wstr)
 @ stdcall D3DPERF_EndEvent()
 @ stdcall D3DPERF_GetStatus()
diff --git a/dlls/d3d9/d3d9_main.c b/dlls/d3d9/d3d9_main.c
index ba4da66..38f1c8c 100644
--- a/dlls/d3d9/d3d9_main.c
+++ b/dlls/d3d9/d3d9_main.c
@@ -61,6 +61,18 @@ IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion) {
     return (IDirect3D9*) object;
 }
 
+/*******************************************************************
+ *       Direct3DShaderValidatorCreate9 (D3D9.@)
+ *
+ * No documentation available for this function.
+ * SDK only says it is internal and shouldn't be used.
+ */
+void* WINAPI Direct3DShaderValidatorCreate9(void)
+{
+    FIXME("stub\n");
+    return NULL;
+}
+
 /* At process attach */
 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
 {
-- 
1.5.3.7




More information about the wine-patches mailing list