d3d9: Add stub for Direct3DShaderValidatorCreate9().
[wine] / dlls / d3d9 / d3d9_main.c
1 /*
2  * Direct3D 9
3  *
4  * Copyright 2002-2003 Jason Edmeades
5  * Copyright 2002-2003 Raphael Junqueira
6  * Copyright 2005 Oliver Stieber
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21  *
22  */
23
24 #include "config.h"
25 #include "initguid.h"
26 #include "d3d9_private.h"
27
28 static CRITICAL_SECTION_DEBUG d3d9_cs_debug =
29 {
30     0, 0, &d3d9_cs,
31     { &d3d9_cs_debug.ProcessLocksList,
32     &d3d9_cs_debug.ProcessLocksList },
33     0, 0, { (DWORD_PTR)(__FILE__ ": d3d9_cs") }
34 };
35 CRITICAL_SECTION d3d9_cs = { &d3d9_cs_debug, -1, 0, 0, 0, 0 };
36
37 WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
38
39 static int D3DPERF_event_level = 0;
40
41 HRESULT WINAPI D3D9GetSWInfo(void) {
42     FIXME("(void): stub\n");
43     return 0;
44 }
45
46 void WINAPI DebugSetMute(void) {
47     /* nothing to do */
48 }
49
50 IDirect3D9* WINAPI Direct3DCreate9(UINT SDKVersion) {
51     IDirect3D9Impl* object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3D9Impl));
52
53     object->lpVtbl = &Direct3D9_Vtbl;
54     object->ref = 1;
55     EnterCriticalSection(&d3d9_cs);
56     object->WineD3D = WineDirect3DCreate(SDKVersion, 9, (IUnknown *)object);
57     LeaveCriticalSection(&d3d9_cs);
58
59     TRACE("SDKVersion = %x, Created Direct3D object @ %p, WineObj @ %p\n", SDKVersion, object, object->WineD3D);
60
61     return (IDirect3D9*) object;
62 }
63
64 /*******************************************************************
65  *       Direct3DShaderValidatorCreate9 (D3D9.@)
66  *
67  * No documentation available for this function.
68  * SDK only says it is internal and shouldn't be used.
69  */
70 void* WINAPI Direct3DShaderValidatorCreate9(void)
71 {
72     FIXME("stub\n");
73     return NULL;
74 }
75
76 /* At process attach */
77 BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
78 {
79     TRACE("fdwReason=%d\n", fdwReason);
80     if (fdwReason == DLL_PROCESS_ATTACH)
81         DisableThreadLibraryCalls(hInstDLL);
82
83     return TRUE;
84 }
85
86 /***********************************************************************
87  *              D3DPERF_BeginEvent (D3D9.@)
88  */
89 int WINAPI D3DPERF_BeginEvent(D3DCOLOR color, LPCWSTR name) {
90     FIXME("(color %#x, name %s) : stub\n", color, debugstr_w(name));
91
92     return D3DPERF_event_level++;
93 }
94
95 /***********************************************************************
96  *              D3DPERF_EndEvent (D3D9.@)
97  */
98 int WINAPI D3DPERF_EndEvent(void) {
99     FIXME("(void) : stub\n");
100
101     return --D3DPERF_event_level;
102 }
103
104 /***********************************************************************
105  *              D3DPERF_GetStatus (D3D9.@)
106  */
107 DWORD WINAPI D3DPERF_GetStatus(void) {
108     FIXME("(void) : stub\n");
109
110     return 0;
111 }
112
113 /***********************************************************************
114  *              D3DPERF_SetOptions (D3D9.@)
115  *
116  */
117 void WINAPI D3DPERF_SetOptions(DWORD options)
118 {
119   FIXME("(%#x) : stub\n", options);
120 }
121
122 /***********************************************************************
123  *              D3DPERF_QueryRepeatFrame (D3D9.@)
124  */
125 BOOL WINAPI D3DPERF_QueryRepeatFrame(void) {
126     FIXME("(void) : stub\n");
127
128     return FALSE;
129 }
130
131 /***********************************************************************
132  *              D3DPERF_SetMarker (D3D9.@)
133  */
134 void WINAPI D3DPERF_SetMarker(D3DCOLOR color, LPCWSTR name) {
135     FIXME("(color %#x, name %s) : stub\n", color, debugstr_w(name));
136 }
137
138 /***********************************************************************
139  *              D3DPERF_SetRegion (D3D9.@)
140  */
141 void WINAPI D3DPERF_SetRegion(D3DCOLOR color, LPCWSTR name) {
142     FIXME("(color %#x, name %s) : stub\n", color, debugstr_w(name));
143 }