2 * Copyright 2009 Henri Verbeet for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "wine/port.h"
23 #include "d3d10core_private.h"
25 WINE_DEFAULT_DEBUG_CHANNEL(d3d10core);
27 /* IUnknown methods */
29 static HRESULT STDMETHODCALLTYPE d3d10_vertex_shader_QueryInterface(ID3D10VertexShader *iface,
30 REFIID riid, void **object)
32 TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
34 if (IsEqualGUID(riid, &IID_ID3D10VertexShader)
35 || IsEqualGUID(riid, &IID_ID3D10DeviceChild)
36 || IsEqualGUID(riid, &IID_IUnknown))
38 IUnknown_AddRef(iface);
43 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
49 static ULONG STDMETHODCALLTYPE d3d10_vertex_shader_AddRef(ID3D10VertexShader *iface)
51 struct d3d10_vertex_shader *This = (struct d3d10_vertex_shader *)iface;
52 ULONG refcount = InterlockedIncrement(&This->refcount);
54 TRACE("%p increasing refcount to %u\n", This, refcount);
59 static ULONG STDMETHODCALLTYPE d3d10_vertex_shader_Release(ID3D10VertexShader *iface)
61 struct d3d10_vertex_shader *This = (struct d3d10_vertex_shader *)iface;
62 ULONG refcount = InterlockedDecrement(&This->refcount);
64 TRACE("%p decreasing refcount to %u\n", This, refcount);
68 HeapFree(GetProcessHeap(), 0, This);
74 /* ID3D10DeviceChild methods */
76 static void STDMETHODCALLTYPE d3d10_vertex_shader_GetDevice(ID3D10VertexShader *iface, ID3D10Device **device)
78 FIXME("iface %p, device %p stub!\n", iface, device);
81 static HRESULT STDMETHODCALLTYPE d3d10_vertex_shader_GetPrivateData(ID3D10VertexShader *iface,
82 REFGUID guid, UINT *data_size, void *data)
84 FIXME("iface %p, guid %s, data_size %p, data %p stub!\n",
85 iface, debugstr_guid(guid), data_size, data);
90 static HRESULT STDMETHODCALLTYPE d3d10_vertex_shader_SetPrivateData(ID3D10VertexShader *iface,
91 REFGUID guid, UINT data_size, const void *data)
93 FIXME("iface %p, guid %s, data_size %u, data %p stub!\n",
94 iface, debugstr_guid(guid), data_size, data);
99 static HRESULT STDMETHODCALLTYPE d3d10_vertex_shader_SetPrivateDataInterface(ID3D10VertexShader *iface,
100 REFGUID guid, const IUnknown *data)
102 FIXME("iface %p, guid %s, data %p stub!\n", iface, debugstr_guid(guid), data);
107 const struct ID3D10VertexShaderVtbl d3d10_vertex_shader_vtbl =
109 /* IUnknown methods */
110 d3d10_vertex_shader_QueryInterface,
111 d3d10_vertex_shader_AddRef,
112 d3d10_vertex_shader_Release,
113 /* ID3D10DeviceChild methods */
114 d3d10_vertex_shader_GetDevice,
115 d3d10_vertex_shader_GetPrivateData,
116 d3d10_vertex_shader_SetPrivateData,
117 d3d10_vertex_shader_SetPrivateDataInterface,
120 /* IUnknown methods */
122 static HRESULT STDMETHODCALLTYPE d3d10_geometry_shader_QueryInterface(ID3D10GeometryShader *iface,
123 REFIID riid, void **object)
125 TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
127 if (IsEqualGUID(riid, &IID_ID3D10GeometryShader)
128 || IsEqualGUID(riid, &IID_ID3D10DeviceChild)
129 || IsEqualGUID(riid, &IID_IUnknown))
131 IUnknown_AddRef(iface);
136 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
139 return E_NOINTERFACE;
142 static ULONG STDMETHODCALLTYPE d3d10_geometry_shader_AddRef(ID3D10GeometryShader *iface)
144 struct d3d10_geometry_shader *This = (struct d3d10_geometry_shader *)iface;
145 ULONG refcount = InterlockedIncrement(&This->refcount);
147 TRACE("%p increasing refcount to %u\n", This, refcount);
152 static ULONG STDMETHODCALLTYPE d3d10_geometry_shader_Release(ID3D10GeometryShader *iface)
154 struct d3d10_geometry_shader *This = (struct d3d10_geometry_shader *)iface;
155 ULONG refcount = InterlockedDecrement(&This->refcount);
157 TRACE("%p decreasing refcount to %u\n", This, refcount);
161 HeapFree(GetProcessHeap(), 0, This);
167 /* ID3D10DeviceChild methods */
169 static void STDMETHODCALLTYPE d3d10_geometry_shader_GetDevice(ID3D10GeometryShader *iface, ID3D10Device **device)
171 FIXME("iface %p, device %p stub!\n", iface, device);
174 static HRESULT STDMETHODCALLTYPE d3d10_geometry_shader_GetPrivateData(ID3D10GeometryShader *iface,
175 REFGUID guid, UINT *data_size, void *data)
177 FIXME("iface %p, guid %s, data_size %p, data %p stub!\n",
178 iface, debugstr_guid(guid), data_size, data);
183 static HRESULT STDMETHODCALLTYPE d3d10_geometry_shader_SetPrivateData(ID3D10GeometryShader *iface,
184 REFGUID guid, UINT data_size, const void *data)
186 FIXME("iface %p, guid %s, data_size %u, data %p stub!\n",
187 iface, debugstr_guid(guid), data_size, data);
192 static HRESULT STDMETHODCALLTYPE d3d10_geometry_shader_SetPrivateDataInterface(ID3D10GeometryShader *iface,
193 REFGUID guid, const IUnknown *data)
195 FIXME("iface %p, guid %s, data %p stub!\n", iface, debugstr_guid(guid), data);
200 const struct ID3D10GeometryShaderVtbl d3d10_geometry_shader_vtbl =
202 /* IUnknown methods */
203 d3d10_geometry_shader_QueryInterface,
204 d3d10_geometry_shader_AddRef,
205 d3d10_geometry_shader_Release,
206 /* ID3D10DeviceChild methods */
207 d3d10_geometry_shader_GetDevice,
208 d3d10_geometry_shader_GetPrivateData,
209 d3d10_geometry_shader_SetPrivateData,
210 d3d10_geometry_shader_SetPrivateDataInterface,
213 /* IUnknown methods */
215 static HRESULT STDMETHODCALLTYPE d3d10_pixel_shader_QueryInterface(ID3D10PixelShader *iface,
216 REFIID riid, void **object)
218 TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
220 if (IsEqualGUID(riid, &IID_ID3D10PixelShader)
221 || IsEqualGUID(riid, &IID_ID3D10DeviceChild)
222 || IsEqualGUID(riid, &IID_IUnknown))
224 IUnknown_AddRef(iface);
229 WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
232 return E_NOINTERFACE;
235 static ULONG STDMETHODCALLTYPE d3d10_pixel_shader_AddRef(ID3D10PixelShader *iface)
237 struct d3d10_pixel_shader *This = (struct d3d10_pixel_shader *)iface;
238 ULONG refcount = InterlockedIncrement(&This->refcount);
240 TRACE("%p increasing refcount to %u\n", This, refcount);
245 static ULONG STDMETHODCALLTYPE d3d10_pixel_shader_Release(ID3D10PixelShader *iface)
247 struct d3d10_pixel_shader *This = (struct d3d10_pixel_shader *)iface;
248 ULONG refcount = InterlockedDecrement(&This->refcount);
250 TRACE("%p decreasing refcount to %u\n", This, refcount);
254 HeapFree(GetProcessHeap(), 0, This);
260 /* ID3D10DeviceChild methods */
262 static void STDMETHODCALLTYPE d3d10_pixel_shader_GetDevice(ID3D10PixelShader *iface, ID3D10Device **device)
264 FIXME("iface %p, device %p stub!\n", iface, device);
267 static HRESULT STDMETHODCALLTYPE d3d10_pixel_shader_GetPrivateData(ID3D10PixelShader *iface,
268 REFGUID guid, UINT *data_size, void *data)
270 FIXME("iface %p, guid %s, data_size %p, data %p stub!\n",
271 iface, debugstr_guid(guid), data_size, data);
276 static HRESULT STDMETHODCALLTYPE d3d10_pixel_shader_SetPrivateData(ID3D10PixelShader *iface,
277 REFGUID guid, UINT data_size, const void *data)
279 FIXME("iface %p, guid %s, data_size %u, data %p stub!\n",
280 iface, debugstr_guid(guid), data_size, data);
285 static HRESULT STDMETHODCALLTYPE d3d10_pixel_shader_SetPrivateDataInterface(ID3D10PixelShader *iface,
286 REFGUID guid, const IUnknown *data)
288 FIXME("iface %p, guid %s, data %p stub!\n", iface, debugstr_guid(guid), data);
293 const struct ID3D10PixelShaderVtbl d3d10_pixel_shader_vtbl =
295 /* IUnknown methods */
296 d3d10_pixel_shader_QueryInterface,
297 d3d10_pixel_shader_AddRef,
298 d3d10_pixel_shader_Release,
299 /* ID3D10DeviceChild methods */
300 d3d10_pixel_shader_GetDevice,
301 d3d10_pixel_shader_GetPrivateData,
302 d3d10_pixel_shader_SetPrivateData,
303 d3d10_pixel_shader_SetPrivateDataInterface,