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,