comctl32: Add implementation of LVS_EX_ONECLICKACTIVATE.
[wine] / dlls / d3d10 / device.c
1 /*
2  * Copyright 2008 Henri Verbeet for CodeWeavers
3  *
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.
8  *
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.
13  *
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
17  *
18  */
19
20 #include "config.h"
21 #include "wine/port.h"
22
23 #include "d3d10_private.h"
24
25 WINE_DEFAULT_DEBUG_CHANNEL(d3d10);
26
27 /* IUnknown methods */
28
29 static HRESULT STDMETHODCALLTYPE d3d10_device_QueryInterface(ID3D10Device *iface, REFIID riid, void **object)
30 {
31     TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
32
33     if (IsEqualGUID(riid, &IID_IUnknown)
34             || IsEqualGUID(riid, &IID_ID3D10Device))
35     {
36         IUnknown_AddRef(iface);
37         *object = iface;
38         return S_OK;
39     }
40
41     WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
42
43     *object = NULL;
44     return E_NOINTERFACE;
45 }
46
47 static ULONG STDMETHODCALLTYPE d3d10_device_AddRef(ID3D10Device *iface)
48 {
49     struct d3d10_device *This = (struct d3d10_device *)iface;
50     ULONG refcount = InterlockedIncrement(&This->refcount);
51
52     TRACE("%p increasing refcount to %u\n", This, refcount);
53
54     return refcount;
55 }
56
57 static ULONG STDMETHODCALLTYPE d3d10_device_Release(ID3D10Device *iface)
58 {
59     struct d3d10_device *This = (struct d3d10_device *)iface;
60     ULONG refcount = InterlockedDecrement(&This->refcount);
61
62     TRACE("%p decreasing refcount to %u\n", This, refcount);
63
64     if (!refcount)
65     {
66         HeapFree(GetProcessHeap(), 0, This);
67     }
68
69     return refcount;
70 }
71
72 /* ID3D10Device methods */
73
74 static void STDMETHODCALLTYPE d3d10_device_VSSetConstantBuffers(ID3D10Device *iface,
75         UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers)
76 {
77     FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
78             iface, start_slot, buffer_count, buffers);
79 }
80
81 static void STDMETHODCALLTYPE d3d10_device_PSSetShaderResources(ID3D10Device *iface,
82         UINT start_slot, UINT view_count, ID3D10ShaderResourceView *const *views)
83 {
84     FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n",
85             iface, start_slot, view_count, views);
86 }
87
88 static void STDMETHODCALLTYPE d3d10_device_PSSetShader(ID3D10Device *iface, ID3D10PixelShader *shader)
89 {
90     FIXME("iface %p, shader %p stub!\n", iface, shader);
91 }
92
93 static void STDMETHODCALLTYPE d3d10_device_PSSetSamplers(ID3D10Device *iface,
94         UINT start_slot, UINT sampler_count, ID3D10SamplerState *const *samplers)
95 {
96     FIXME("iface %p, start_slot %u, sampler_count %u, samplers %p stub!\n",
97             iface, start_slot, sampler_count, samplers);
98 }
99
100 static void STDMETHODCALLTYPE d3d10_device_VSSetShader(ID3D10Device *iface, ID3D10VertexShader *shader)
101 {
102     FIXME("iface %p, shader %p stub!\n", iface, shader);
103 }
104
105 static void STDMETHODCALLTYPE d3d10_device_DrawIndexed(ID3D10Device *iface,
106         UINT index_count, UINT start_index_location, INT base_vertex_location)
107 {
108     FIXME("iface %p, index_count %u, start_index_location %u, base_vertex_location %d stub!\n",
109             iface, index_count, start_index_location, base_vertex_location);
110 }
111
112 static void STDMETHODCALLTYPE d3d10_device_Draw(ID3D10Device *iface,
113         UINT vertex_count, UINT start_vertex_location)
114 {
115     FIXME("iface %p, vertex_count %u, start_vertex_location %u stub!\n",
116             iface, vertex_count, start_vertex_location);
117 }
118
119 static void STDMETHODCALLTYPE d3d10_device_PSSetConstantBuffers(ID3D10Device *iface,
120         UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers)
121 {
122     FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
123             iface, start_slot, buffer_count, buffers);
124 }
125
126 static void STDMETHODCALLTYPE d3d10_device_IASetInputLayout(ID3D10Device *iface, ID3D10InputLayout *input_layout)
127 {
128     FIXME("iface %p, input_layout %p stub!\n", iface, input_layout);
129 }
130
131 static void STDMETHODCALLTYPE d3d10_device_IASetVertexBuffers(ID3D10Device *iface,
132         UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers,
133         const UINT *strides, const UINT *offsets)
134 {
135     FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p stub!\n",
136             iface, start_slot, buffer_count, buffers, strides, offsets);
137 }
138
139 static void STDMETHODCALLTYPE d3d10_device_IASetIndexBuffer(ID3D10Device *iface,
140         ID3D10Buffer *buffer, DXGI_FORMAT format, UINT offset)
141 {
142     FIXME("iface %p, buffer %p, format %s, offset %u stub!\n",
143             iface, buffer, debug_dxgi_format(format), offset);
144 }
145
146 static void STDMETHODCALLTYPE d3d10_device_DrawIndexedInstanced(ID3D10Device *iface,
147         UINT instance_index_count, UINT instance_count, UINT start_index_location,
148         INT base_vertex_location, UINT start_instance_location)
149 {
150     FIXME("iface %p, instance_index_count %u, instance_count %u, start_index_location %u,\n"
151             "\tbase_vertex_location %d, start_instance_location %u stub!\n",
152             iface, instance_index_count, instance_count, start_index_location,
153             base_vertex_location, start_instance_location);
154 }
155
156 static void STDMETHODCALLTYPE d3d10_device_DrawInstanced(ID3D10Device *iface,
157         UINT instance_vertex_count, UINT instance_count,
158         UINT start_vertex_location, UINT start_instance_location)
159 {
160     FIXME("iface %p, instance_vertex_count %u, instance_count %u, start_vertex_location %u,\n"
161             "\tstart_instance_location %u stub!\n", iface, instance_vertex_count, instance_count,
162             start_vertex_location, start_instance_location);
163 }
164
165 static void STDMETHODCALLTYPE d3d10_device_GSSetConstantBuffers(ID3D10Device *iface,
166         UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers)
167 {
168     FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
169             iface, start_slot, buffer_count, buffers);
170 }
171
172 static void STDMETHODCALLTYPE d3d10_device_GSSetShader(ID3D10Device *iface, ID3D10GeometryShader *shader)
173 {
174     FIXME("iface %p, shader %p stub!\n", iface, shader);
175 }
176
177 static void STDMETHODCALLTYPE d3d10_device_IASetPrimitiveTopology(ID3D10Device *iface, D3D10_PRIMITIVE_TOPOLOGY topology)
178 {
179     FIXME("iface %p, topology %s stub!\n", iface, debug_d3d10_primitive_topology(topology));
180 }
181
182 static void STDMETHODCALLTYPE d3d10_device_VSSetShaderResources(ID3D10Device *iface,
183         UINT start_slot, UINT view_count, ID3D10ShaderResourceView *const *views)
184 {
185     FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n",
186             iface, start_slot, view_count, views);
187 }
188
189 static void STDMETHODCALLTYPE d3d10_device_VSSetSamplers(ID3D10Device *iface,
190         UINT start_slot, UINT sampler_count, ID3D10SamplerState *const *samplers)
191 {
192     FIXME("iface %p, start_slot %u, sampler_count %u, samplers %p stub!\n",
193             iface, start_slot, sampler_count, samplers);
194 }
195
196 static void STDMETHODCALLTYPE d3d10_device_SetPredication(ID3D10Device *iface, ID3D10Predicate *predicate, BOOL value)
197 {
198     FIXME("iface %p, predicate %p, value %d stub!\n", iface, predicate, value);
199 }
200
201 static void STDMETHODCALLTYPE d3d10_device_GSSetShaderResources(ID3D10Device *iface,
202         UINT start_slot, UINT view_count, ID3D10ShaderResourceView *const *views)
203 {
204     FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n",
205             iface, start_slot, view_count, views);
206 }
207
208 static void STDMETHODCALLTYPE d3d10_device_GSSetSamplers(ID3D10Device *iface,
209         UINT start_slot, UINT sampler_count, ID3D10SamplerState *const *samplers)
210 {
211     FIXME("iface %p, start_slot %u, sampler_count %u, samplers %p stub!\n",
212             iface, start_slot, sampler_count, samplers);
213 }
214
215 static void STDMETHODCALLTYPE d3d10_device_OMSetRenderTargets(ID3D10Device *iface,
216         UINT render_target_view_count, ID3D10RenderTargetView *const *render_target_views,
217         ID3D10DepthStencilView *depth_stencil_view)
218 {
219     FIXME("iface %p, render_target_view_count %u, render_target_views %p, depth_stencil_view %p\n",
220             iface, render_target_view_count, render_target_views, depth_stencil_view);
221 }
222
223 static void STDMETHODCALLTYPE d3d10_device_OMSetBlendState(ID3D10Device *iface,
224         ID3D10BlendState *blend_state, const FLOAT blend_factor[4], UINT sample_mask)
225 {
226     FIXME("iface %p, blend_state %p, blend_factor [%f %f %f %f], sample_mask 0x%08x stub!\n",
227             iface, blend_state, blend_factor[0], blend_factor[1], blend_factor[2], blend_factor[3], sample_mask);
228 }
229
230 static void STDMETHODCALLTYPE d3d10_device_OMSetDepthStencilState(ID3D10Device *iface,
231         ID3D10DepthStencilState *depth_stencil_state, UINT stencil_ref)
232 {
233     FIXME("iface %p, depth_stencil_state %p, stencil_ref %u stub!\n",
234             iface, depth_stencil_state, stencil_ref);
235 }
236
237 static void STDMETHODCALLTYPE d3d10_device_SOSetTargets(ID3D10Device *iface,
238         UINT target_count, ID3D10Buffer *const *targets, const UINT *offsets)
239 {
240     FIXME("iface %p, target_count %u, targets %p, offsets %p stub!\n", iface, target_count, targets, offsets);
241 }
242
243 static void STDMETHODCALLTYPE d3d10_device_DrawAuto(ID3D10Device *iface)
244 {
245     FIXME("iface %p stub!\n", iface);
246 }
247
248 static void STDMETHODCALLTYPE d3d10_device_RSSetState(ID3D10Device *iface, ID3D10RasterizerState *rasterizer_state)
249 {
250     FIXME("iface %p, rasterizer_state %p stub!\n", iface, rasterizer_state);
251 }
252
253 static void STDMETHODCALLTYPE d3d10_device_RSSetViewports(ID3D10Device *iface,
254         UINT viewport_count, const D3D10_VIEWPORT *viewports)
255 {
256     FIXME("iface %p, viewport_count %u, viewports %p stub!\n", iface, viewport_count, viewports);
257 }
258
259 static void STDMETHODCALLTYPE d3d10_device_RSSetScissorRects(ID3D10Device *iface,
260         UINT rect_count, const D3D10_RECT *rects)
261 {
262     FIXME("iface %p, rect_count %u, rects %p\n", iface, rect_count, rects);
263 }
264
265 static void STDMETHODCALLTYPE d3d10_device_CopySubresourceRegion(ID3D10Device *iface,
266         ID3D10Resource *dst_resource, UINT dst_subresource_idx, UINT dst_x, UINT dst_y, UINT dst_z,
267         ID3D10Resource *src_resource, UINT src_subresource_idx, const D3D10_BOX *src_box)
268 {
269     FIXME("iface %p, dst_resource %p, dst_subresource_idx %u, dst_x %u, dst_y %u, dst_z %u,\n"
270             "\tsrc_resource %p, src_subresource_idx %u, src_box %p stub!\n",
271             iface, dst_resource, dst_subresource_idx, dst_x, dst_y, dst_z,
272             src_resource, src_subresource_idx, src_box);
273 }
274
275 static void STDMETHODCALLTYPE d3d10_device_CopyResource(ID3D10Device *iface,
276         ID3D10Resource *dst_resource, ID3D10Resource *src_resource)
277 {
278     FIXME("iface %p, dst_resource %p, src_resource %p stub!\n", iface, dst_resource, src_resource);
279 }
280
281 static void STDMETHODCALLTYPE d3d10_device_UpdateSubresource(ID3D10Device *iface,
282         ID3D10Resource *resource, UINT subresource_idx, const D3D10_BOX *box,
283         const void *data, UINT row_pitch, UINT depth_pitch)
284 {
285     FIXME("iface %p, resource %p, subresource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u stub!\n",
286             iface, resource, subresource_idx, box, data, row_pitch, depth_pitch);
287 }
288
289 static void STDMETHODCALLTYPE d3d10_device_ClearRenderTargetView(ID3D10Device *iface,
290         ID3D10RenderTargetView *render_target_view, const FLOAT color_rgba[4])
291 {
292     FIXME("iface %p, render_target_view %p, color_rgba [%f %f %f %f] stub!\n",
293             iface, render_target_view, color_rgba[0], color_rgba[1], color_rgba[2], color_rgba[3]);
294 }
295
296 static void STDMETHODCALLTYPE d3d10_device_ClearDepthStencilView(ID3D10Device *iface,
297         ID3D10DepthStencilView *depth_stencil_view, UINT flags, FLOAT depth, UINT8 stencil)
298 {
299     FIXME("iface %p, depth_stencil_view %p, flags %#x, depth %f, stencil %u stub!\n",
300             iface, depth_stencil_view, flags, depth, stencil);
301 }
302
303 static void STDMETHODCALLTYPE d3d10_device_GenerateMips(ID3D10Device *iface, ID3D10ShaderResourceView *shader_resource_view)
304 {
305     FIXME("iface %p, shader_resource_view %p stub!\n", iface, shader_resource_view);
306 }
307
308 static void STDMETHODCALLTYPE d3d10_device_ResolveSubresource(ID3D10Device *iface,
309         ID3D10Resource *dst_resource, UINT dst_subresource_idx,
310         ID3D10Resource *src_resource, UINT src_subresource_idx, DXGI_FORMAT format)
311 {
312     FIXME("iface %p, dst_resource %p, dst_subresource_idx %u,\n"
313             "\tsrc_resource %p, src_subresource_idx %u, format %s stub!\n",
314             iface, dst_resource, dst_subresource_idx,
315             src_resource, src_subresource_idx, debug_dxgi_format(format));
316 }
317
318 static void STDMETHODCALLTYPE d3d10_device_VSGetConstantBuffers(ID3D10Device *iface,
319         UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers)
320 {
321     FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
322             iface, start_slot, buffer_count, buffers);
323 }
324
325 static void STDMETHODCALLTYPE d3d10_device_PSGetShaderResources(ID3D10Device *iface,
326         UINT start_slot, UINT view_count, ID3D10ShaderResourceView **views)
327 {
328     FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n",
329             iface, start_slot, view_count, views);
330 }
331
332 static void STDMETHODCALLTYPE d3d10_device_PSGetShader(ID3D10Device *iface, ID3D10PixelShader **shader)
333 {
334     FIXME("iface %p, shader %p stub!\n", iface, shader);
335 }
336
337 static void STDMETHODCALLTYPE d3d10_device_PSGetSamplers(ID3D10Device *iface,
338         UINT start_slot, UINT sampler_count, ID3D10SamplerState **samplers)
339 {
340     FIXME("iface %p, start_slot %u, sampler_count %u, samplers %p stub!\n",
341             iface, start_slot, sampler_count, samplers);
342 }
343
344 static void STDMETHODCALLTYPE d3d10_device_VSGetShader(ID3D10Device *iface, ID3D10VertexShader **shader)
345 {
346     FIXME("iface %p, shader %p stub!\n", iface, shader);
347 }
348
349 static void STDMETHODCALLTYPE d3d10_device_PSGetConstantBuffers(ID3D10Device *iface,
350         UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers)
351 {
352     FIXME("iface %p, start_slot %u, buffer_count %u, buffer %p stub!\n",
353             iface, start_slot, buffer_count, buffers);
354 }
355
356 static void STDMETHODCALLTYPE d3d10_device_IAGetInputLayout(ID3D10Device *iface, ID3D10InputLayout **input_layout)
357 {
358     FIXME("iface %p, input_layout %p stub!\n", iface, input_layout);
359 }
360
361 static void STDMETHODCALLTYPE d3d10_device_IAGetVertexBuffers(ID3D10Device *iface,
362         UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers, UINT *strides, UINT *offsets)
363 {
364     FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p stub!\n",
365             iface, start_slot, buffer_count, buffers, strides, offsets);
366 }
367
368 static void STDMETHODCALLTYPE d3d10_device_IAGetIndexBuffer(ID3D10Device *iface,
369         ID3D10Buffer **buffer, DXGI_FORMAT *format, UINT *offset)
370 {
371     FIXME("iface %p, buffer %p, format %p, offset %p stub!\n", iface, buffer, format, offset);
372 }
373
374 static void STDMETHODCALLTYPE d3d10_device_GSGetConstantBuffers(ID3D10Device *iface,
375         UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers)
376 {
377     FIXME("iface %p, start_slot %u, buffer_count %u, buffers %p stub!\n",
378             iface, start_slot, buffer_count, buffers);
379 }
380
381 static void STDMETHODCALLTYPE d3d10_device_GSGetShader(ID3D10Device *iface, ID3D10GeometryShader **shader)
382 {
383     FIXME("iface %p, shader %p stub!\n", iface, shader);
384 }
385
386 static void STDMETHODCALLTYPE d3d10_device_IAGetPrimitiveTopology(ID3D10Device *iface, D3D10_PRIMITIVE_TOPOLOGY *topology)
387 {
388     FIXME("iface %p, topology %p stub!\n", iface, topology);
389 }
390
391 static void STDMETHODCALLTYPE d3d10_device_VSGetShaderResources(ID3D10Device *iface,
392         UINT start_slot, UINT view_count, ID3D10ShaderResourceView **views)
393 {
394     FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n",
395             iface, start_slot, view_count, views);
396 }
397
398 static void STDMETHODCALLTYPE d3d10_device_VSGetSamplers(ID3D10Device *iface,
399         UINT start_slot, UINT sampler_count, ID3D10SamplerState **samplers)
400 {
401     FIXME("iface %p, start_slot %u, sampler_count %u, samplers %p stub!\n",
402             iface, start_slot, sampler_count, samplers);
403 }
404
405 static void STDMETHODCALLTYPE d3d10_device_GetPredication(ID3D10Device *iface,
406         ID3D10Predicate **predicate, BOOL *value)
407 {
408     FIXME("iface %p, predicate %p, value %p stub!\n", iface, predicate, value);
409 }
410
411 static void STDMETHODCALLTYPE d3d10_device_GSGetShaderResources(ID3D10Device *iface,
412         UINT start_slot, UINT view_count, ID3D10ShaderResourceView **views)
413 {
414     FIXME("iface %p, start_slot %u, view_count %u, views %p stub!\n",
415             iface, start_slot, view_count, views);
416 }
417
418 static void STDMETHODCALLTYPE d3d10_device_GSGetSamplers(ID3D10Device *iface,
419         UINT start_slot, UINT sampler_count, ID3D10SamplerState **samplers)
420 {
421     FIXME("iface %p, start_slot %u, sampler_count %u, samplers %p stub!\n",
422             iface, start_slot, sampler_count, samplers);
423 }
424
425 static void STDMETHODCALLTYPE d3d10_device_OMGetRenderTargets(ID3D10Device *iface,
426         UINT view_count, ID3D10RenderTargetView **render_target_views, ID3D10DepthStencilView **depth_stencil_view)
427 {
428     FIXME("iface %p, view_count %u, render_target_views %p, depth_stencil_view %p stub!\n",
429             iface, view_count, render_target_views, depth_stencil_view);
430 }
431
432 static void STDMETHODCALLTYPE d3d10_device_OMGetBlendState(ID3D10Device *iface,
433         ID3D10BlendState **blend_state, FLOAT blend_factor[4], UINT *sample_mask)
434 {
435     FIXME("iface %p, blend_state %p, blend_factor %p, sample_mask %p stub!\n",
436             iface, blend_state, blend_factor, sample_mask);
437 }
438
439 static void STDMETHODCALLTYPE d3d10_device_OMGetDepthStencilState(ID3D10Device *iface,
440         ID3D10DepthStencilState **depth_stencil_state, UINT *stencil_ref)
441 {
442     FIXME("iface %p, depth_stencil_state %p, stencil_ref %p stub!\n",
443             iface, depth_stencil_state, stencil_ref);
444 }
445
446 static void STDMETHODCALLTYPE d3d10_device_SOGetTargets(ID3D10Device *iface,
447         UINT buffer_count, ID3D10Buffer **buffers, UINT *offsets)
448 {
449     FIXME("iface %p, buffer_count %u, buffers %p, offsets %p stub!\n",
450             iface, buffer_count, buffers, offsets);
451 }
452
453 static void STDMETHODCALLTYPE d3d10_device_RSGetState(ID3D10Device *iface, ID3D10RasterizerState **rasterizer_state)
454 {
455     FIXME("iface %p, rasterizer_state %p stub!\n", iface, rasterizer_state);
456 }
457
458 static void STDMETHODCALLTYPE d3d10_device_RSGetViewports(ID3D10Device *iface,
459         UINT *viewport_count, D3D10_VIEWPORT *viewports)
460 {
461     FIXME("iface %p, viewport_count %p, viewports %p stub!\n", iface, viewport_count, viewports);
462 }
463
464 static void STDMETHODCALLTYPE d3d10_device_RSGetScissorRects(ID3D10Device *iface, UINT *rect_count, D3D10_RECT *rects)
465 {
466     FIXME("iface %p, rect_count %p, rects %p stub!\n", iface, rect_count, rects);
467 }
468
469 static HRESULT STDMETHODCALLTYPE d3d10_device_GetDeviceRemovedReason(ID3D10Device *iface)
470 {
471     FIXME("iface %p stub!\n", iface);
472
473     return E_NOTIMPL;
474 }
475
476 static HRESULT STDMETHODCALLTYPE d3d10_device_SetExceptionMode(ID3D10Device *iface, UINT flags)
477 {
478     FIXME("iface %p, flags %#x stub!\n", iface, flags);
479
480     return E_NOTIMPL;
481 }
482
483 static UINT STDMETHODCALLTYPE d3d10_device_GetExceptionMode(ID3D10Device *iface)
484 {
485     FIXME("iface %p stub!\n", iface);
486
487     return 0;
488 }
489
490 static HRESULT STDMETHODCALLTYPE d3d10_device_GetPrivateData(ID3D10Device *iface,
491         REFGUID guid, UINT *data_size, void *data)
492 {
493     FIXME("iface %p, guid %s, data_size %p, data %p stub!\n",
494             iface, debugstr_guid(guid), data_size, data);
495
496     return E_NOTIMPL;
497 }
498
499 static HRESULT STDMETHODCALLTYPE d3d10_device_SetPrivateData(ID3D10Device *iface,
500         REFGUID guid, UINT data_size, const void *data)
501 {
502     FIXME("iface %p, guid %s, data_size %u, data %p stub!\n",
503             iface, debugstr_guid(guid), data_size, data);
504
505     return E_NOTIMPL;
506 }
507
508 static HRESULT STDMETHODCALLTYPE d3d10_device_SetPrivateDataInterface(ID3D10Device *iface,
509         REFGUID guid, const IUnknown *data)
510 {
511     FIXME("iface %p, guid %s, data %p stub!\n", iface, debugstr_guid(guid), data);
512
513     return E_NOTIMPL;
514 }
515
516 static void STDMETHODCALLTYPE d3d10_device_ClearState(ID3D10Device *iface)
517 {
518     FIXME("iface %p stub!\n", iface);
519 }
520
521 static void STDMETHODCALLTYPE d3d10_device_Flush(ID3D10Device *iface)
522 {
523     FIXME("iface %p stub!\n", iface);
524 }
525
526 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBuffer(ID3D10Device *iface,
527         const D3D10_BUFFER_DESC *desc, const D3D10_SUBRESOURCE_DATA *data, ID3D10Buffer **buffer)
528 {
529     FIXME("iface %p, desc %p, data %p, buffer %p stub!\n", iface, desc, data, buffer);
530
531     return E_NOTIMPL;
532 }
533
534 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture1D(ID3D10Device *iface,
535         const D3D10_TEXTURE1D_DESC *desc, const D3D10_SUBRESOURCE_DATA *data, ID3D10Texture1D **texture)
536 {
537     FIXME("iface %p, desc %p, data %p, texture %p stub!\n", iface, desc, data, texture);
538
539     return E_NOTIMPL;
540 }
541
542 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture2D(ID3D10Device *iface,
543         const D3D10_TEXTURE2D_DESC *desc, const D3D10_SUBRESOURCE_DATA *data, ID3D10Texture2D **texture)
544 {
545     FIXME("iface %p, desc %p, data %p, texture %p stub!\n", iface, desc, data, texture);
546
547     return E_NOTIMPL;
548 }
549
550 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture3D(ID3D10Device *iface,
551         const D3D10_TEXTURE3D_DESC *desc, const D3D10_SUBRESOURCE_DATA *data, ID3D10Texture3D **texture)
552 {
553     FIXME("iface %p, desc %p, data %p, texture %p stub!\n", iface, desc, data, texture);
554
555     return E_NOTIMPL;
556 }
557
558 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateShaderResourceView(ID3D10Device *iface,
559         ID3D10Resource *resource, const D3D10_SHADER_RESOURCE_VIEW_DESC *desc, ID3D10ShaderResourceView **view)
560 {
561     FIXME("iface %p, resource %p, desc %p, view %p stub!\n", iface, resource, desc, view);
562
563     return E_NOTIMPL;
564 }
565
566 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRenderTargetView(ID3D10Device *iface,
567         ID3D10Resource *resource, const D3D10_RENDER_TARGET_VIEW_DESC *desc, ID3D10RenderTargetView **view)
568 {
569     FIXME("iface %p, resource %p, desc %p, view %p stub!\n", iface, resource, desc, view);
570
571     return E_NOTIMPL;
572 }
573
574 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilView(ID3D10Device *iface,
575         ID3D10Resource *resource, const D3D10_DEPTH_STENCIL_VIEW_DESC *desc, ID3D10DepthStencilView **view)
576 {
577     FIXME("iface %p, resource %p, desc %p, view %p stub!\n", iface, resource, desc, view);
578
579     return E_NOTIMPL;
580 }
581
582 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateInputLayout(ID3D10Device *iface,
583         const D3D10_INPUT_ELEMENT_DESC *element_descs, UINT element_count, const void *shader_byte_code,
584         SIZE_T shader_byte_code_length, ID3D10InputLayout **input_layout)
585 {
586     FIXME("iface %p, element_descs %p, element_count %u, shader_byte_code %p,"
587             "\tshader_byte_code_length %lu, input_layout %p stub!\n",
588             iface, element_descs, element_count, shader_byte_code,
589             shader_byte_code_length, input_layout);
590
591     return E_NOTIMPL;
592 }
593
594 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateVertexShader(ID3D10Device *iface,
595         const void *byte_code, SIZE_T byte_code_length, ID3D10VertexShader **shader)
596 {
597     FIXME("iface %p, byte_code %p, byte_code_length %lu, shader %p stub!\n",
598             iface, byte_code, byte_code_length, shader);
599
600     return E_NOTIMPL;
601 }
602
603 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateGeometryShader(ID3D10Device *iface,
604         const void *byte_code, SIZE_T byte_code_length, ID3D10GeometryShader **shader)
605 {
606     FIXME("iface %p, byte_code %p, byte_code_length %lu, shader %p stub!\n",
607             iface, byte_code, byte_code_length, shader);
608
609     return E_NOTIMPL;
610 }
611
612 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateGeometryShaderWithStreamOutput(ID3D10Device *iface,
613         const void *byte_code, SIZE_T byte_code_length, const D3D10_SO_DECLARATION_ENTRY *output_stream_decls,
614         UINT output_stream_decl_count, UINT output_stream_stride, ID3D10GeometryShader **shader)
615 {
616     FIXME("iface %p, byte_code %p, byte_code_length %lu, output_stream_decls %p,\n"
617             "\toutput_stream_decl_count %u, output_stream_stride %u, shader %p stub!\n",
618             iface, byte_code, byte_code_length, output_stream_decls,
619             output_stream_decl_count, output_stream_stride, shader);
620
621     return E_NOTIMPL;
622 }
623
624 static HRESULT STDMETHODCALLTYPE d3d10_device_CreatePixelShader(ID3D10Device *iface,
625         const void *byte_code, SIZE_T byte_code_length, ID3D10PixelShader **shader)
626 {
627     FIXME("iface %p, byte_code %p, byte_code_length %lu, shader %p stub!\n",
628             iface, byte_code, byte_code_length, shader);
629
630     return E_NOTIMPL;
631 }
632
633 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBlendState(ID3D10Device *iface,
634         const D3D10_BLEND_DESC *desc, ID3D10BlendState **blend_state)
635 {
636     FIXME("iface %p, desc %p, blend_state %p stub!\n", iface, desc, blend_state);
637
638     return E_NOTIMPL;
639 }
640
641 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilState(ID3D10Device *iface,
642         const D3D10_DEPTH_STENCIL_DESC *desc, ID3D10DepthStencilState **depth_stencil_state)
643 {
644     FIXME("iface %p, desc %p, depth_stencil_state %p stub!\n", iface, desc, depth_stencil_state);
645
646     return E_NOTIMPL;
647 }
648
649 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRasterizerState(ID3D10Device *iface,
650         const D3D10_RASTERIZER_DESC *desc, ID3D10RasterizerState **rasterizer_state)
651 {
652     FIXME("iface %p, desc %p, rasterizer_state %p stub!\n", iface, desc, rasterizer_state);
653
654     return E_NOTIMPL;
655 }
656
657 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateSamplerState(ID3D10Device *iface,
658         const D3D10_SAMPLER_DESC *desc, ID3D10SamplerState **sampler_state)
659 {
660     FIXME("iface %p, desc %p, sampler_state %p stub!\n", iface, desc, sampler_state);
661
662     return E_NOTIMPL;
663 }
664
665 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateQuery(ID3D10Device *iface,
666         const D3D10_QUERY_DESC *desc, ID3D10Query **query)
667 {
668     FIXME("iface %p, desc %p, query %p stub!\n", iface, desc, query);
669
670     return E_NOTIMPL;
671 }
672
673 static HRESULT STDMETHODCALLTYPE d3d10_device_CreatePredicate(ID3D10Device *iface,
674         const D3D10_QUERY_DESC *desc, ID3D10Predicate **predicate)
675 {
676     FIXME("iface %p, desc %p, predicate %p stub!\n", iface, desc, predicate);
677
678     return E_NOTIMPL;
679 }
680
681 static HRESULT STDMETHODCALLTYPE d3d10_device_CreateCounter(ID3D10Device *iface,
682         const D3D10_COUNTER_DESC *desc, ID3D10Counter **counter)
683 {
684     FIXME("iface %p, desc %p, counter %p stub!\n", iface, desc, counter);
685
686     return E_NOTIMPL;
687 }
688
689 static HRESULT STDMETHODCALLTYPE d3d10_device_CheckFormatSupport(ID3D10Device *iface,
690         DXGI_FORMAT format, UINT *format_support)
691 {
692     FIXME("iface %p, format %s, format_support %p stub!\n",
693             iface, debug_dxgi_format(format), format_support);
694
695     return E_NOTIMPL;
696 }
697
698 static HRESULT STDMETHODCALLTYPE d3d10_device_CheckMultisampleQualityLevels(ID3D10Device *iface,
699         DXGI_FORMAT format, UINT sample_count, UINT *quality_level_count)
700 {
701     FIXME("iface %p, format %s, sample_count %u, quality_level_count %p stub!\n",
702             iface, debug_dxgi_format(format), sample_count, quality_level_count);
703
704     return E_NOTIMPL;
705 }
706
707 static void STDMETHODCALLTYPE d3d10_device_CheckCounterInfo(ID3D10Device *iface, D3D10_COUNTER_INFO *counter_info)
708 {
709     FIXME("iface %p, counter_info %p stub!\n", iface, counter_info);
710 }
711
712 static HRESULT STDMETHODCALLTYPE d3d10_device_CheckCounter(ID3D10Device *iface,
713         const D3D10_COUNTER_DESC *desc, D3D10_COUNTER_TYPE *type, UINT *active_counters, LPSTR name,
714         UINT *name_length, LPSTR units, UINT *units_length, LPSTR description, UINT *description_length)
715 {
716     FIXME("iface %p, desc %p, type %p, active_counters %p, name %p, name_length %p,\n"
717             "\tunits %p, units_length %p, description %p, description_length %p stub!\n",
718             iface, desc, type, active_counters, name, name_length,
719             units, units_length, description, description_length);
720
721     return E_NOTIMPL;
722 }
723
724 static UINT STDMETHODCALLTYPE d3d10_device_GetCreationFlags(ID3D10Device *iface)
725 {
726     FIXME("iface %p stub!\n", iface);
727
728     return 0;
729 }
730
731 static HRESULT STDMETHODCALLTYPE d3d10_device_OpenSharedResource(ID3D10Device *iface,
732         HANDLE resource_handle, REFIID guid, void **resource)
733 {
734     FIXME("iface %p, resource_handle %p, guid %s, resource %p stub!\n",
735             iface, resource_handle, debugstr_guid(guid), resource);
736
737     return E_NOTIMPL;
738 }
739
740 static void STDMETHODCALLTYPE d3d10_device_SetTextFilterSize(ID3D10Device *iface, UINT width, UINT height)
741 {
742     FIXME("iface %p, width %u, height %u stub!\n", iface, width, height);
743 }
744
745 static void STDMETHODCALLTYPE d3d10_device_GetTextFilterSize(ID3D10Device *iface, UINT *width, UINT *height)
746 {
747     FIXME("iface %p, width %p, height %p stub!\n", iface, width, height);
748 }
749
750 const struct ID3D10DeviceVtbl d3d10_device_vtbl =
751 {
752     /* IUnknown methods */
753     d3d10_device_QueryInterface,
754     d3d10_device_AddRef,
755     d3d10_device_Release,
756     /* ID3D10Device methods */
757     d3d10_device_VSSetConstantBuffers,
758     d3d10_device_PSSetShaderResources,
759     d3d10_device_PSSetShader,
760     d3d10_device_PSSetSamplers,
761     d3d10_device_VSSetShader,
762     d3d10_device_DrawIndexed,
763     d3d10_device_Draw,
764     d3d10_device_PSSetConstantBuffers,
765     d3d10_device_IASetInputLayout,
766     d3d10_device_IASetVertexBuffers,
767     d3d10_device_IASetIndexBuffer,
768     d3d10_device_DrawIndexedInstanced,
769     d3d10_device_DrawInstanced,
770     d3d10_device_GSSetConstantBuffers,
771     d3d10_device_GSSetShader,
772     d3d10_device_IASetPrimitiveTopology,
773     d3d10_device_VSSetShaderResources,
774     d3d10_device_VSSetSamplers,
775     d3d10_device_SetPredication,
776     d3d10_device_GSSetShaderResources,
777     d3d10_device_GSSetSamplers,
778     d3d10_device_OMSetRenderTargets,
779     d3d10_device_OMSetBlendState,
780     d3d10_device_OMSetDepthStencilState,
781     d3d10_device_SOSetTargets,
782     d3d10_device_DrawAuto,
783     d3d10_device_RSSetState,
784     d3d10_device_RSSetViewports,
785     d3d10_device_RSSetScissorRects,
786     d3d10_device_CopySubresourceRegion,
787     d3d10_device_CopyResource,
788     d3d10_device_UpdateSubresource,
789     d3d10_device_ClearRenderTargetView,
790     d3d10_device_ClearDepthStencilView,
791     d3d10_device_GenerateMips,
792     d3d10_device_ResolveSubresource,
793     d3d10_device_VSGetConstantBuffers,
794     d3d10_device_PSGetShaderResources,
795     d3d10_device_PSGetShader,
796     d3d10_device_PSGetSamplers,
797     d3d10_device_VSGetShader,
798     d3d10_device_PSGetConstantBuffers,
799     d3d10_device_IAGetInputLayout,
800     d3d10_device_IAGetVertexBuffers,
801     d3d10_device_IAGetIndexBuffer,
802     d3d10_device_GSGetConstantBuffers,
803     d3d10_device_GSGetShader,
804     d3d10_device_IAGetPrimitiveTopology,
805     d3d10_device_VSGetShaderResources,
806     d3d10_device_VSGetSamplers,
807     d3d10_device_GetPredication,
808     d3d10_device_GSGetShaderResources,
809     d3d10_device_GSGetSamplers,
810     d3d10_device_OMGetRenderTargets,
811     d3d10_device_OMGetBlendState,
812     d3d10_device_OMGetDepthStencilState,
813     d3d10_device_SOGetTargets,
814     d3d10_device_RSGetState,
815     d3d10_device_RSGetViewports,
816     d3d10_device_RSGetScissorRects,
817     d3d10_device_GetDeviceRemovedReason,
818     d3d10_device_SetExceptionMode,
819     d3d10_device_GetExceptionMode,
820     d3d10_device_GetPrivateData,
821     d3d10_device_SetPrivateData,
822     d3d10_device_SetPrivateDataInterface,
823     d3d10_device_ClearState,
824     d3d10_device_Flush,
825     d3d10_device_CreateBuffer,
826     d3d10_device_CreateTexture1D,
827     d3d10_device_CreateTexture2D,
828     d3d10_device_CreateTexture3D,
829     d3d10_device_CreateShaderResourceView,
830     d3d10_device_CreateRenderTargetView,
831     d3d10_device_CreateDepthStencilView,
832     d3d10_device_CreateInputLayout,
833     d3d10_device_CreateVertexShader,
834     d3d10_device_CreateGeometryShader,
835     d3d10_device_CreateGeometryShaderWithStreamOutput,
836     d3d10_device_CreatePixelShader,
837     d3d10_device_CreateBlendState,
838     d3d10_device_CreateDepthStencilState,
839     d3d10_device_CreateRasterizerState,
840     d3d10_device_CreateSamplerState,
841     d3d10_device_CreateQuery,
842     d3d10_device_CreatePredicate,
843     d3d10_device_CreateCounter,
844     d3d10_device_CheckFormatSupport,
845     d3d10_device_CheckMultisampleQualityLevels,
846     d3d10_device_CheckCounterInfo,
847     d3d10_device_CheckCounter,
848     d3d10_device_GetCreationFlags,
849     d3d10_device_OpenSharedResource,
850     d3d10_device_SetTextFilterSize,
851     d3d10_device_GetTextFilterSize,
852 };