ReactOS 0.4.17-dev-923-g4c9a150
device.c
Go to the documentation of this file.
1/*
2 * Copyright 2008-2012 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#define NONAMELESSUNION
21#define WINE_NO_NAMELESS_EXTENSION
22#include "d3d11_private.h"
23
25
26static BOOL d3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
27{
28 SIZE_T max_capacity, new_capacity;
29 void *new_elements;
30
31 if (count <= *capacity)
32 return TRUE;
33
34 max_capacity = ~(SIZE_T)0 / size;
35 if (count > max_capacity)
36 return FALSE;
37
38 new_capacity = max(1, *capacity);
39 while (new_capacity < count && new_capacity <= max_capacity / 2)
40 new_capacity *= 2;
41 if (new_capacity < count)
42 new_capacity = count;
43
44 if (!(new_elements = realloc(*elements, new_capacity * size)))
45 return FALSE;
46
47 *elements = new_elements;
48 *capacity = new_capacity;
49 return TRUE;
50}
51
53
55{
57};
58
60{
61 return !device->state
62 || IsEqualGUID(&device->state->emulated_interface, &IID_ID3D10Device)
63 || IsEqualGUID(&device->state->emulated_interface, &IID_ID3D10Device1);
64}
65
67{
69}
70
71/* ID3DDeviceContextState methods */
72
74{
76}
77
79 REFIID iid, void **out)
80{
81 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
82
83 if (IsEqualGUID(iid, &IID_ID3DDeviceContextState)
84 || IsEqualGUID(iid, &IID_ID3D11DeviceChild)
85 || IsEqualGUID(iid, &IID_IUnknown))
86 {
87 ID3DDeviceContextState_AddRef(iface);
88 *out = iface;
89 return S_OK;
90 }
91
92 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
93 *out = NULL;
94
95 return E_NOINTERFACE;
96}
97
99{
100 ULONG refcount = InterlockedIncrement(&state->private_refcount);
101
102 TRACE("%p increasing private refcount to %lu.\n", state, refcount);
103
104 return refcount;
105}
106
108{
111
112 TRACE("%p increasing refcount to %lu.\n", state, refcount);
113
114 if (refcount == 1)
115 {
117 ID3D11Device2_AddRef(state->device);
118 }
119
120 return refcount;
121}
122
124{
125 unsigned int i;
126
127 for (i = 0; i < device->context_state_count; ++i)
128 {
129 if (device->context_states[i] != state)
130 continue;
131
132 if (i != device->context_state_count - 1)
133 device->context_states[i] = device->context_states[device->context_state_count - 1];
134 --device->context_state_count;
135 break;
136 }
137}
138
140{
141 ULONG refcount = InterlockedDecrement(&state->private_refcount);
143 struct d3d_device *device;
144 unsigned int i;
145
146 TRACE("%p decreasing private refcount to %lu.\n", state, refcount);
147
148 if (!refcount)
149 {
150 wined3d_private_store_cleanup(&state->private_store);
151 for (i = 0; i < state->entry_count; ++i)
152 {
153 entry = &state->entries[i];
154 device = entry->device;
155
156 if (entry->wined3d_state != wined3d_device_get_state(device->wined3d_device))
157 wined3d_state_destroy(entry->wined3d_state);
158
160 }
161 free(state->entries);
162 wined3d_device_decref(state->wined3d_device);
163 free(state);
164 }
165}
166
168{
171
172 TRACE("%p decreasing refcount to %lu.\n", state, refcount);
173
174 if (!refcount)
175 {
176 ID3D11Device2_Release(state->device);
178 }
179
180 return refcount;
181}
182
184{
186
187 TRACE("iface %p, device %p.\n", iface, device);
188
189 *device = (ID3D11Device *)state->device;
190 ID3D11Device_AddRef(*device);
191}
192
194 UINT *data_size, void *data)
195{
197
198 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
199
200 return d3d_get_private_data(&state->private_store, guid, data_size, data);
201}
202
204 UINT data_size, const void *data)
205{
207
208 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
209
210 return d3d_set_private_data(&state->private_store, guid, data_size, data);
211}
212
214 REFGUID guid, const IUnknown *data)
215{
217
218 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
219
220 return d3d_set_private_data_interface(&state->private_store, guid, data);
221}
222
223static const struct ID3DDeviceContextStateVtbl d3d_device_context_state_vtbl =
224{
225 /* IUnknown methods */
229 /* ID3D11DeviceChild methods */
234 /* ID3DDeviceContextState methods */
235};
236
239{
240 unsigned int i;
241
242 for (i = 0; i < state->entry_count; ++i)
243 {
244 if (state->entries[i].device == device)
245 return &state->entries[i];
246 }
247
248 return NULL;
249}
250
253{
255
256 if (!d3d_array_reserve((void **)&state->entries, &state->entries_size,
257 state->entry_count + 1, sizeof(*state->entries)))
258 return FALSE;
259
260 if (!d3d_array_reserve((void **)&device->context_states, &device->context_states_size,
261 device->context_state_count + 1, sizeof(*device->context_states)))
262 return FALSE;
263
264 entry = &state->entries[state->entry_count++];
265 entry->device = device;
266 entry->wined3d_state = wined3d_state;
267
268 device->context_states[device->context_state_count++] = state;
269
270 return TRUE;
271}
272
274{
276 unsigned int i;
277
278 for (i = 0; i < state->entry_count; ++i)
279 {
280 entry = &state->entries[i];
281 if (entry->device != device)
282 continue;
283
284 if (entry->wined3d_state != wined3d_device_get_state(device->wined3d_device))
285 wined3d_state_destroy(entry->wined3d_state);
286
287 if (i != state->entry_count)
288 state->entries[i] = state->entries[state->entry_count - 1];
289 --state->entry_count;
290
291 break;
292 }
293}
294
296 struct d3d_device *device)
297{
300
302 return entry->wined3d_state;
303
304 if (FAILED(wined3d_state_create(device->wined3d_device,
305 (enum wined3d_feature_level *)&state->feature_level, 1, &wined3d_state)))
306 return NULL;
307
309 {
311 return NULL;
312 }
313
314 return wined3d_state;
315}
316
318 struct d3d_device *device, D3D_FEATURE_LEVEL feature_level, REFIID emulated_interface)
319{
320 state->ID3DDeviceContextState_iface.lpVtbl = &d3d_device_context_state_vtbl;
321 state->refcount = state->private_refcount = 0;
322
323 wined3d_private_store_init(&state->private_store);
324
325 state->feature_level = feature_level;
326 state->emulated_interface = *emulated_interface;
327 wined3d_device_incref(state->wined3d_device = device->wined3d_device);
328 state->device = &device->ID3D11Device2_iface;
329
330 d3d_device_context_state_AddRef(&state->ID3DDeviceContextState_iface);
331}
332
333/* ID3D11CommandList methods */
334
335static inline struct d3d11_command_list *impl_from_ID3D11CommandList(ID3D11CommandList *iface)
336{
338}
339
340static HRESULT STDMETHODCALLTYPE d3d11_command_list_QueryInterface(ID3D11CommandList *iface, REFIID iid, void **out)
341{
342 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
343
344 if (IsEqualGUID(iid, &IID_ID3D11CommandList)
345 || IsEqualGUID(iid, &IID_ID3D11DeviceChild)
346 || IsEqualGUID(iid, &IID_IUnknown))
347 {
348 ID3D11CommandList_AddRef(iface);
349 *out = iface;
350 return S_OK;
351 }
352
353 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
354 *out = NULL;
355
356 return E_NOINTERFACE;
357}
358
359static ULONG STDMETHODCALLTYPE d3d11_command_list_AddRef(ID3D11CommandList *iface)
360{
363
364 TRACE("%p increasing refcount to %lu.\n", list, refcount);
365
366 return refcount;
367}
368
369static ULONG STDMETHODCALLTYPE d3d11_command_list_Release(ID3D11CommandList *iface)
370{
373
374 TRACE("%p decreasing refcount to %lu.\n", list, refcount);
375
376 if (!refcount)
377 {
378 wined3d_command_list_decref(list->wined3d_list);
379 wined3d_private_store_cleanup(&list->private_store);
380 ID3D11Device2_Release(list->device);
381 free(list);
382 }
383
384 return refcount;
385}
386
387static void STDMETHODCALLTYPE d3d11_command_list_GetDevice(ID3D11CommandList *iface, ID3D11Device **device)
388{
390
391 TRACE("iface %p, device %p.\n", iface, device);
392
393 *device = (ID3D11Device *)list->device;
394 ID3D11Device2_AddRef(list->device);
395}
396
398 UINT *data_size, void *data)
399{
401
402 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
403
404 return d3d_get_private_data(&list->private_store, guid, data_size, data);
405}
406
408 UINT data_size, const void *data)
409{
411
412 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
413
414 return d3d_set_private_data(&list->private_store, guid, data_size, data);
415}
416
418 REFGUID guid, const IUnknown *data)
419{
421
422 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
423
424 return d3d_set_private_data_interface(&list->private_store, guid, data);
425}
426
428{
429 TRACE("iface %p.\n", iface);
430
431 return 0;
432}
433
434static const struct ID3D11CommandListVtbl d3d11_command_list_vtbl =
435{
436 /* IUnknown methods */
440 /* ID3D11DeviceChild methods */
445 /* ID3D11CommandList methods */
447};
448
449static struct d3d11_command_list *unsafe_impl_from_ID3D11CommandList(ID3D11CommandList *iface)
450{
451 if (!iface)
452 return NULL;
453 assert(iface->lpVtbl == &d3d11_command_list_vtbl);
454 return impl_from_ID3D11CommandList(iface);
455}
456
458{
459 wined3d_private_store_cleanup(&context->private_store);
460}
461
462/* ID3D11DeviceContext - immediate context methods */
463
465{
467}
468
470 REFIID iid, void **out)
471{
473
474 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
475
476 if (IsEqualGUID(iid, &IID_ID3D11DeviceContext1)
477 || IsEqualGUID(iid, &IID_ID3D11DeviceContext)
478 || IsEqualGUID(iid, &IID_ID3D11DeviceChild)
479 || IsEqualGUID(iid, &IID_IUnknown))
480 {
481 *out = &context->ID3D11DeviceContext1_iface;
482 }
483 else if (context->type == D3D11_DEVICE_CONTEXT_IMMEDIATE && IsEqualGUID(iid, &IID_ID3D11Multithread))
484 {
485 *out = &context->ID3D11Multithread_iface;
486 }
487 else if (context->type == D3D11_DEVICE_CONTEXT_IMMEDIATE && IsEqualGUID(iid, &IID_ID3D11VideoContext))
488 {
489 *out = &context->ID3D11VideoContext_iface;
490 }
491 else if (IsEqualGUID(iid, &IID_ID3DUserDefinedAnnotation))
492 {
493 *out = &context->ID3DUserDefinedAnnotation_iface;
494 }
495 else
496 {
497 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
498 *out = NULL;
499 return E_NOINTERFACE;
500 }
501
502 ID3D11DeviceContext1_AddRef(iface);
503 return S_OK;
504}
505
507{
510
511 TRACE("%p increasing refcount to %lu.\n", context, refcount);
512
513 if (refcount == 1)
514 {
515 ID3D11Device2_AddRef(&context->device->ID3D11Device2_iface);
516 }
517
518 return refcount;
519}
520
522{
525
526 TRACE("%p decreasing refcount to %lu.\n", context, refcount);
527
528 if (!refcount)
529 {
530 ID3D11Device2 *device = &context->device->ID3D11Device2_iface;
532 {
535 free(context);
536 }
537 ID3D11Device2_Release(device);
538 }
539
540 return refcount;
541}
542
544 unsigned int start_slot, unsigned int buffer_count, ID3D11Buffer **buffers,
545 unsigned int *offsets, unsigned int *counts)
546{
548 unsigned int i;
549
551 for (i = 0; i < buffer_count; ++i)
552 {
554 struct d3d_buffer *buffer_impl;
555
556 wined3d_device_context_get_constant_buffer(context->wined3d_context, type, start_slot + i, &state);
557
558 if (offsets)
559 offsets[i] = state.offset / sizeof(struct wined3d_vec4);
560 if (counts)
561 counts[i] = state.size / sizeof(struct wined3d_vec4);
562
563 if (!state.buffer)
564 {
565 buffers[i] = NULL;
566 continue;
567 }
568
569 buffer_impl = wined3d_buffer_get_parent(state.buffer);
570 buffers[i] = &buffer_impl->ID3D11Buffer_iface;
571 ID3D11Buffer_AddRef(buffers[i]);
572 }
574}
575
577 unsigned int start_slot, unsigned int buffer_count, ID3D11Buffer *const *buffers,
578 const unsigned int *offsets, const unsigned int *counts)
579{
583 unsigned int i;
584
585 if (buffer_count > ARRAY_SIZE(wined3d_buffers))
586 {
587 WARN("Buffer count %u exceeds limit; ignoring call.\n", buffer_count);
588 return;
589 }
590
591 if (!offsets != !counts)
592 {
593 WARN("Got offsets pointer %p but counts pointer %p; ignoring call.\n", offsets, counts);
594 return;
595 }
596
597 for (i = 0; i < buffer_count; ++i)
598 {
600
601 if (offsets && (offsets[i] & (alignment - 1)))
602 {
603 WARN("Offset %u is not aligned.\n", offsets[i]);
604 return;
605 }
606
607 if (counts && (counts[i] & (alignment - 1)))
608 {
609 WARN("Count %u is not aligned.\n", counts[i]);
610 return;
611 }
612
613 wined3d_buffers[i].buffer = buffer ? buffer->wined3d_buffer : NULL;
614 wined3d_buffers[i].offset = (offsets ? offsets[i] : 0) * sizeof(struct wined3d_vec4);
615 wined3d_buffers[i].size = (counts ? counts[i] : WINED3D_MAX_CONSTANT_BUFFER_SIZE) * sizeof(struct wined3d_vec4);
616 }
617
619 type, start_slot, buffer_count, wined3d_buffers);
620}
621
623 unsigned int start_slot, unsigned int count, ID3D11ShaderResourceView *const *views)
624{
627 unsigned int i;
628
629 if (count > ARRAY_SIZE(wined3d_views))
630 {
631 WARN("View count %u exceeds limit; ignoring call.\n", count);
632 return;
633 }
634
635 for (i = 0; i < count; ++i)
636 {
638
639 wined3d_views[i] = view ? view->wined3d_view : NULL;
640 }
641
643 type, start_slot, count, wined3d_views);
644}
645
647 unsigned int start_slot, unsigned int count, ID3D11SamplerState *const *samplers)
648{
651 unsigned int i;
652
653 if (count > ARRAY_SIZE(wined3d_samplers))
654 {
655 WARN("Sampler count %u exceeds limit; ignoring call.\n", count);
656 return;
657 }
658
659 for (i = 0; i < count; ++i)
660 {
662
663 wined3d_samplers[i] = sampler ? sampler->wined3d_sampler : NULL;
664 }
665
666 wined3d_device_context_set_samplers(context->wined3d_context, type, start_slot, count, wined3d_samplers);
667}
668
670{
672
673 TRACE("iface %p, device %p.\n", iface, device);
674
675 *device = (ID3D11Device *)&context->device->ID3D11Device2_iface;
676 ID3D11Device_AddRef(*device);
677}
678
680 UINT *data_size, void *data)
681{
683
684 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
685
686 return d3d_get_private_data(&context->private_store, guid, data_size, data);
687}
688
690 UINT data_size, const void *data)
691{
693
694 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
695
696 return d3d_set_private_data(&context->private_store, guid, data_size, data);
697}
698
700 REFGUID guid, const IUnknown *data)
701{
703
704 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
705
706 return d3d_set_private_data_interface(&context->private_store, guid, data);
707}
708
710 UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
711{
712 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
713 iface, start_slot, buffer_count, buffers);
714
717}
718
720 UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
721{
722 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
723 iface, start_slot, view_count, views);
724
726}
727
729 ID3D11PixelShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
730{
733
734 TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
735 iface, shader, class_instances, class_instance_count);
736
737 if (class_instance_count)
738 FIXME("Dynamic linking is not implemented yet.\n");
739
741 ps ? ps->wined3d_shader : NULL);
742}
743
745 UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
746{
747 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
748 iface, start_slot, sampler_count, samplers);
749
750 d3d11_device_context_set_samplers(iface, WINED3D_SHADER_TYPE_PIXEL, start_slot, sampler_count, samplers);
751}
752
754 ID3D11VertexShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
755{
758
759 TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
760 iface, shader, class_instances, class_instance_count);
761
762 if (class_instance_count)
763 FIXME("Dynamic linking is not implemented yet.\n");
764
766 vs ? vs->wined3d_shader : NULL);
767}
768
770 UINT index_count, UINT start_index_location, INT base_vertex_location)
771{
773
774 TRACE("iface %p, index_count %u, start_index_location %u, base_vertex_location %d.\n",
775 iface, index_count, start_index_location, base_vertex_location);
776
778 base_vertex_location, start_index_location, index_count, 0, 0);
779}
780
782 UINT vertex_count, UINT start_vertex_location)
783{
785
786 TRACE("iface %p, vertex_count %u, start_vertex_location %u.\n",
787 iface, vertex_count, start_vertex_location);
788
789 wined3d_device_context_draw(context->wined3d_context, start_vertex_location, vertex_count, 0, 0);
790}
791
793 UINT subresource_idx, D3D11_MAP map_type, UINT map_flags, D3D11_MAPPED_SUBRESOURCE *mapped_subresource)
794{
797 struct wined3d_map_desc map_desc;
798 HRESULT hr;
799
800 TRACE("iface %p, resource %p, subresource_idx %u, map_type %u, map_flags %#x, mapped_subresource %p.\n",
801 iface, resource, subresource_idx, map_type, map_flags, mapped_subresource);
802
803 if (map_flags)
804 FIXME("Ignoring map_flags %#x.\n", map_flags);
805
806 mapped_subresource->pData = NULL;
807
810 return E_INVALIDARG;
811
813
814 if (SUCCEEDED(hr = wined3d_device_context_map(context->wined3d_context, wined3d_resource, subresource_idx,
816 {
817 mapped_subresource->pData = map_desc.data;
818 mapped_subresource->RowPitch = map_desc.row_pitch;
819 mapped_subresource->DepthPitch = map_desc.slice_pitch;
820 }
821
822 return hr;
823}
824
826 UINT subresource_idx)
827{
830
831 TRACE("iface %p, resource %p, subresource_idx %u.\n", iface, resource, subresource_idx);
832
834
835 wined3d_device_context_unmap(context->wined3d_context, wined3d_resource, subresource_idx);
836}
837
839 UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
840{
841 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
842 iface, start_slot, buffer_count, buffers);
843
846}
847
849 ID3D11InputLayout *input_layout)
850{
852 struct d3d_input_layout *layout = unsafe_impl_from_ID3D11InputLayout(input_layout);
853
854 TRACE("iface %p, input_layout %p.\n", iface, input_layout);
855
856 wined3d_device_context_set_vertex_declaration(context->wined3d_context, layout ? layout->wined3d_decl : NULL);
857}
858
860 UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *strides, const UINT *offsets)
861{
864 unsigned int i;
865
866 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p.\n",
867 iface, start_slot, buffer_count, buffers, strides, offsets);
868
869 if (buffer_count > ARRAY_SIZE(streams))
870 {
871 WARN("Buffer count %u exceeds limit.\n", buffer_count);
872 buffer_count = ARRAY_SIZE(streams);
873 }
874
875 for (i = 0; i < buffer_count; ++i)
876 {
878
879 streams[i].buffer = buffer ? buffer->wined3d_buffer : NULL;
880 streams[i].offset = offsets[i];
881 streams[i].stride = strides[i];
882 streams[i].frequency = 1;
883 streams[i].flags = 0;
884 }
885
886 wined3d_device_context_set_stream_sources(context->wined3d_context, start_slot, buffer_count, streams);
887}
888
890 ID3D11Buffer *buffer, DXGI_FORMAT format, UINT offset)
891{
893 struct d3d_buffer *buffer_impl = unsafe_impl_from_ID3D11Buffer(buffer);
894
895 TRACE("iface %p, buffer %p, format %s, offset %u.\n",
897
899 buffer_impl ? buffer_impl->wined3d_buffer : NULL,
901}
902
904 UINT instance_index_count, UINT instance_count, UINT start_index_location, INT base_vertex_location,
905 UINT start_instance_location)
906{
908
909 TRACE("iface %p, instance_index_count %u, instance_count %u, start_index_location %u, "
910 "base_vertex_location %d, start_instance_location %u.\n",
911 iface, instance_index_count, instance_count, start_index_location,
912 base_vertex_location, start_instance_location);
913
914 wined3d_device_context_draw_indexed(context->wined3d_context, base_vertex_location,
915 start_index_location, instance_index_count, start_instance_location, instance_count);
916}
917
919 UINT instance_vertex_count, UINT instance_count, UINT start_vertex_location, UINT start_instance_location)
920{
922
923 TRACE("iface %p, instance_vertex_count %u, instance_count %u, start_vertex_location %u, "
924 "start_instance_location %u.\n",
925 iface, instance_vertex_count, instance_count, start_vertex_location,
926 start_instance_location);
927
928 wined3d_device_context_draw(context->wined3d_context, start_vertex_location,
929 instance_vertex_count, start_instance_location, instance_count);
930}
931
933 UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
934{
935 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
936 iface, start_slot, buffer_count, buffers);
937
940}
941
943 ID3D11GeometryShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
944{
947
948 TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
949 iface, shader, class_instances, class_instance_count);
950
951 if (class_instance_count)
952 FIXME("Dynamic linking is not implemented yet.\n");
953
955 gs ? gs->wined3d_shader : NULL);
956}
957
960{
962 enum wined3d_primitive_type primitive_type;
963 unsigned int patch_vertex_count;
964
965 TRACE("iface %p, topology %#x.\n", iface, topology);
966
967 wined3d_primitive_type_from_d3d11_primitive_topology(topology, &primitive_type, &patch_vertex_count);
968
969 wined3d_device_context_set_primitive_type(context->wined3d_context, primitive_type, patch_vertex_count);
970}
971
973 UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
974{
975 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
976
978}
979
981 UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
982{
983 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
984 iface, start_slot, sampler_count, samplers);
985
987}
988
990 ID3D11Asynchronous *asynchronous)
991{
994
995 TRACE("iface %p, asynchronous %p.\n", iface, asynchronous);
996
997 wined3d_device_context_issue_query(context->wined3d_context, query->wined3d_query, WINED3DISSUE_BEGIN);
998}
999
1001 ID3D11Asynchronous *asynchronous)
1002{
1004 struct d3d_query *query = unsafe_impl_from_ID3D11Asynchronous(asynchronous);
1005
1006 TRACE("iface %p, asynchronous %p.\n", iface, asynchronous);
1007
1008 wined3d_device_context_issue_query(context->wined3d_context, query->wined3d_query, WINED3DISSUE_END);
1009}
1010
1012 ID3D11Asynchronous *asynchronous, void *data, UINT data_size, UINT data_flags)
1013{
1015 struct d3d_query *query = unsafe_impl_from_ID3D11Asynchronous(asynchronous);
1016 unsigned int wined3d_flags;
1017 HRESULT hr;
1018
1019 TRACE("iface %p, asynchronous %p, data %p, data_size %u, data_flags %#x.\n",
1020 iface, asynchronous, data, data_size, data_flags);
1021
1024
1025 if (!data && data_size)
1026 return E_INVALIDARG;
1027
1028 wined3d_flags = wined3d_getdata_flags_from_d3d11_async_getdata_flags(data_flags);
1029
1031 if (!data_size || wined3d_query_get_data_size(query->wined3d_query) == data_size)
1032 {
1033 hr = wined3d_query_get_data(query->wined3d_query, data, data_size, wined3d_flags);
1036 }
1037 else
1038 {
1039 WARN("Invalid data size %u.\n", data_size);
1040 hr = E_INVALIDARG;
1041 }
1043
1044 return hr;
1045}
1046
1048 ID3D11Predicate *predicate, BOOL value)
1049{
1051 struct d3d_query *query;
1052
1053 TRACE("iface %p, predicate %p, value %#x.\n", iface, predicate, value);
1054
1056
1057 wined3d_device_context_set_predication(context->wined3d_context, query ? query->wined3d_query : NULL, value);
1058}
1059
1061 UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
1062{
1063 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
1064
1066}
1067
1069 UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
1070{
1071 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
1072 iface, start_slot, sampler_count, samplers);
1073
1075}
1076
1078 UINT rtv_count, ID3D11RenderTargetView *const *rtvs, ID3D11DepthStencilView *depth_stencil_view)
1079{
1082 struct d3d_depthstencil_view *dsv;
1083 unsigned int i;
1084
1085 TRACE("iface %p, rtv_count %u, rtvs %p, depth_stencil_view %p.\n", iface, rtv_count, rtvs, depth_stencil_view);
1086
1087 if (rtv_count > ARRAY_SIZE(wined3d_rtvs))
1088 {
1089 WARN("View count %u exceeds limit.\n", rtv_count);
1090 rtv_count = ARRAY_SIZE(wined3d_rtvs);
1091 }
1092
1093 for (i = 0; i < rtv_count; ++i)
1094 {
1096
1097 wined3d_rtvs[i] = rtv ? rtv->wined3d_view : NULL;
1098 }
1099
1100 dsv = unsafe_impl_from_ID3D11DepthStencilView(depth_stencil_view);
1101
1103 ARRAY_SIZE(wined3d_rtvs), wined3d_rtvs, dsv ? dsv->wined3d_view : NULL, ~0u, NULL, NULL);
1104}
1105
1107 ID3D11DeviceContext1 *iface, UINT render_target_view_count, ID3D11RenderTargetView *const *render_target_views,
1108 ID3D11DepthStencilView *depth_stencil_view, UINT uav_start_idx, UINT uav_count,
1109 ID3D11UnorderedAccessView *const *uavs, const UINT *initial_counts)
1110{
1111 struct d3d_depthstencil_view *dsv = unsafe_impl_from_ID3D11DepthStencilView(depth_stencil_view);
1115 unsigned int wined3d_initial_counts[D3D11_PS_CS_UAV_REGISTER_COUNT];
1116 unsigned int i;
1117
1118 TRACE("iface %p, render_target_view_count %u, render_target_views %p, depth_stencil_view %p, "
1119 "uav_start_idx %u, uav_count %u, uavs %p, initial_counts %p.\n",
1120 iface, render_target_view_count, render_target_views, depth_stencil_view,
1121 uav_start_idx, uav_count, uavs, initial_counts);
1122
1123 if (render_target_view_count == D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL)
1124 render_target_view_count = ~0u;
1125 else
1126 {
1127 if (render_target_view_count > ARRAY_SIZE(wined3d_rtvs))
1128 {
1129 WARN("View count %u exceeds limit.\n", render_target_view_count);
1130 render_target_view_count = ARRAY_SIZE(wined3d_rtvs);
1131 }
1132
1133 for (i = 0; i < render_target_view_count; ++i)
1134 {
1135 struct d3d_rendertarget_view *rtv = unsafe_impl_from_ID3D11RenderTargetView(render_target_views[i]);
1136
1137 wined3d_rtvs[i] = rtv ? rtv->wined3d_view : NULL;
1138 }
1139 }
1140
1141 if (uav_count == D3D11_KEEP_UNORDERED_ACCESS_VIEWS)
1142 uav_count = ~0u;
1143 else
1144 {
1145 if (!wined3d_bound_range(uav_start_idx, uav_count, ARRAY_SIZE(wined3d_uavs)))
1146 {
1147 WARN("View count %u exceeds limit; ignoring call.\n", uav_count);
1148 return;
1149 }
1150
1151 memset(wined3d_initial_counts, 0xff, sizeof(wined3d_initial_counts));
1152
1153 for (i = 0; i < uav_count; ++i)
1154 {
1157
1158 wined3d_uavs[uav_start_idx + i] = view ? view->wined3d_view : NULL;
1159 wined3d_initial_counts[uav_start_idx + i] = initial_counts ? initial_counts[i] : ~0u;
1160 }
1161 }
1162
1164 render_target_view_count == ~0u ? ~0u : ARRAY_SIZE(wined3d_rtvs), wined3d_rtvs,
1165 dsv ? dsv->wined3d_view : NULL, uav_count == ~0u ? ~0u : ARRAY_SIZE(wined3d_uavs), wined3d_uavs,
1166 wined3d_initial_counts);
1167}
1168
1170 ID3D11BlendState *blend_state, const float blend_factor[4], UINT sample_mask)
1171{
1173 static const float default_blend_factor[] = {1.0f, 1.0f, 1.0f, 1.0f};
1174 struct d3d_blend_state *blend_state_impl;
1175
1176 TRACE("iface %p, blend_state %p, blend_factor %s, sample_mask 0x%08x.\n",
1177 iface, blend_state, debug_float4(blend_factor), sample_mask);
1178
1179 if (!blend_factor)
1180 blend_factor = default_blend_factor;
1181
1182 if (!(blend_state_impl = unsafe_impl_from_ID3D11BlendState(blend_state)))
1184 (const struct wined3d_color *)blend_factor, sample_mask);
1185 else
1186 wined3d_device_context_set_blend_state(context->wined3d_context, blend_state_impl->wined3d_state,
1187 (const struct wined3d_color *)blend_factor, sample_mask);
1188}
1189
1191 ID3D11DepthStencilState *depth_stencil_state, UINT stencil_ref)
1192{
1194 struct d3d_depthstencil_state *state_impl;
1195
1196 TRACE("iface %p, depth_stencil_state %p, stencil_ref %u.\n",
1197 iface, depth_stencil_state, stencil_ref);
1198
1199 if (!(state_impl = unsafe_impl_from_ID3D11DepthStencilState(depth_stencil_state)))
1200 {
1201 wined3d_device_context_set_depth_stencil_state(context->wined3d_context, NULL, stencil_ref);
1202 return;
1203 }
1204
1205 wined3d_device_context_set_depth_stencil_state(context->wined3d_context, state_impl->wined3d_state, stencil_ref);
1206}
1207
1209 ID3D11Buffer *const *buffers, const UINT *offsets)
1210{
1213 unsigned int count, i;
1214
1215 TRACE("iface %p, buffer_count %u, buffers %p, offsets %p.\n", iface, buffer_count, buffers, offsets);
1216
1217 count = min(buffer_count, ARRAY_SIZE(outputs));
1218 for (i = 0; i < count; ++i)
1219 {
1221
1222 outputs[i].buffer = buffer ? buffer->wined3d_buffer : NULL;
1223 outputs[i].offset = offsets ? offsets[i] : 0;
1224 }
1225
1226 wined3d_device_context_set_stream_outputs(context->wined3d_context, outputs);
1227}
1228
1230{
1231 FIXME("iface %p stub!\n", iface);
1232}
1233
1235 ID3D11Buffer *buffer, UINT offset)
1236{
1238 struct d3d_buffer *d3d_buffer;
1239
1240 TRACE("iface %p, buffer %p, offset %u.\n", iface, buffer, offset);
1241
1243
1245}
1246
1248 ID3D11Buffer *buffer, UINT offset)
1249{
1251 struct d3d_buffer *d3d_buffer;
1252
1253 TRACE("iface %p, buffer %p, offset %u.\n", iface, buffer, offset);
1254
1256
1258}
1259
1261 UINT thread_group_count_x, UINT thread_group_count_y, UINT thread_group_count_z)
1262{
1264
1265 TRACE("iface %p, thread_group_count_x %u, thread_group_count_y %u, thread_group_count_z %u.\n",
1266 iface, thread_group_count_x, thread_group_count_y, thread_group_count_z);
1267
1269 thread_group_count_x, thread_group_count_y, thread_group_count_z);
1270}
1271
1273 ID3D11Buffer *buffer, UINT offset)
1274{
1276 struct d3d_buffer *buffer_impl;
1277
1278 TRACE("iface %p, buffer %p, offset %u.\n", iface, buffer, offset);
1279
1281
1283}
1284
1286 ID3D11RasterizerState *rasterizer_state)
1287{
1289 struct d3d_rasterizer_state *rasterizer_state_impl;
1290
1291 TRACE("iface %p, rasterizer_state %p.\n", iface, rasterizer_state);
1292
1293 rasterizer_state_impl = unsafe_impl_from_ID3D11RasterizerState(rasterizer_state);
1295 rasterizer_state_impl ? rasterizer_state_impl->wined3d_state : NULL);
1296}
1297
1299 UINT viewport_count, const D3D11_VIEWPORT *viewports)
1300{
1302 struct wined3d_viewport wined3d_vp[WINED3D_MAX_VIEWPORTS];
1303 unsigned int i;
1304
1305 TRACE("iface %p, viewport_count %u, viewports %p.\n", iface, viewport_count, viewports);
1306
1307 if (viewport_count > ARRAY_SIZE(wined3d_vp))
1308 return;
1309
1310 for (i = 0; i < viewport_count; ++i)
1311 {
1312 wined3d_vp[i].x = viewports[i].TopLeftX;
1313 wined3d_vp[i].y = viewports[i].TopLeftY;
1314 wined3d_vp[i].width = viewports[i].Width;
1315 wined3d_vp[i].height = viewports[i].Height;
1316 wined3d_vp[i].min_z = viewports[i].MinDepth;
1317 wined3d_vp[i].max_z = viewports[i].MaxDepth;
1318 }
1319
1320 wined3d_device_context_set_viewports(context->wined3d_context, viewport_count, wined3d_vp);
1321}
1322
1324 UINT rect_count, const D3D11_RECT *rects)
1325{
1327
1328 TRACE("iface %p, rect_count %u, rects %p.\n", iface, rect_count, rects);
1329
1330 if (rect_count > WINED3D_MAX_VIEWPORTS)
1331 return;
1332
1333 wined3d_device_context_set_scissor_rects(context->wined3d_context, rect_count, rects);
1334}
1335
1337 ID3D11Resource *dst_resource, UINT dst_subresource_idx, UINT dst_x, UINT dst_y, UINT dst_z,
1338 ID3D11Resource *src_resource, UINT src_subresource_idx, const D3D11_BOX *src_box)
1339{
1341 struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource;
1342 struct wined3d_box wined3d_src_box;
1343
1344 TRACE("iface %p, dst_resource %p, dst_subresource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
1345 "src_resource %p, src_subresource_idx %u, src_box %p.\n",
1346 iface, dst_resource, dst_subresource_idx, dst_x, dst_y, dst_z,
1347 src_resource, src_subresource_idx, src_box);
1348
1349 if (!dst_resource || !src_resource)
1350 return;
1351
1352 if (src_box)
1353 wined3d_box_set(&wined3d_src_box, src_box->left, src_box->top,
1354 src_box->right, src_box->bottom, src_box->front, src_box->back);
1355
1356 wined3d_dst_resource = wined3d_resource_from_d3d11_resource(dst_resource);
1357 wined3d_src_resource = wined3d_resource_from_d3d11_resource(src_resource);
1358 wined3d_device_context_copy_sub_resource_region(context->wined3d_context, wined3d_dst_resource, dst_subresource_idx,
1359 dst_x, dst_y, dst_z, wined3d_src_resource, src_subresource_idx, src_box ? &wined3d_src_box : NULL, 0);
1360}
1361
1363 ID3D11Resource *dst_resource, ID3D11Resource *src_resource)
1364{
1366 struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource;
1367
1368 TRACE("iface %p, dst_resource %p, src_resource %p.\n", iface, dst_resource, src_resource);
1369
1370 wined3d_dst_resource = wined3d_resource_from_d3d11_resource(dst_resource);
1371 wined3d_src_resource = wined3d_resource_from_d3d11_resource(src_resource);
1372 wined3d_device_context_copy_resource(context->wined3d_context, wined3d_dst_resource, wined3d_src_resource);
1373}
1374
1376 ID3D11Resource *resource, UINT subresource_idx, const D3D11_BOX *box,
1377 const void *data, UINT row_pitch, UINT depth_pitch)
1378{
1381 struct wined3d_box wined3d_box;
1382
1383 TRACE("iface %p, resource %p, subresource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u.\n",
1384 iface, resource, subresource_idx, box, data, row_pitch, depth_pitch);
1385
1386 if (box)
1387 wined3d_box_set(&wined3d_box, box->left, box->top, box->right, box->bottom, box->front, box->back);
1388
1391 subresource_idx, box ? &wined3d_box : NULL, data, row_pitch, depth_pitch, 0);
1392}
1393
1395 ID3D11Buffer *dst_buffer, UINT dst_offset, ID3D11UnorderedAccessView *src_view)
1396{
1398 struct d3d11_unordered_access_view *uav;
1399 struct d3d_buffer *buffer_impl;
1400
1401 TRACE("iface %p, dst_buffer %p, dst_offset %u, src_view %p.\n",
1402 iface, dst_buffer, dst_offset, src_view);
1403
1404 buffer_impl = unsafe_impl_from_ID3D11Buffer(dst_buffer);
1406
1408 buffer_impl->wined3d_buffer, dst_offset, uav->wined3d_view);
1409}
1410
1412 ID3D11RenderTargetView *render_target_view, const float color_rgba[4])
1413{
1416 const struct wined3d_color color = {color_rgba[0], color_rgba[1], color_rgba[2], color_rgba[3]};
1417 HRESULT hr;
1418
1419 TRACE("iface %p, render_target_view %p, color_rgba %s.\n",
1420 iface, render_target_view, debug_float4(color_rgba));
1421
1422 if (!view)
1423 return;
1424
1425 if (FAILED(hr = wined3d_device_context_clear_rendertarget_view(context->wined3d_context, view->wined3d_view, NULL,
1426 WINED3DCLEAR_TARGET, &color, 0.0f, 0)))
1427 ERR("Failed to clear view, hr %#lx.\n", hr);
1428}
1429
1431 ID3D11UnorderedAccessView *unordered_access_view, const UINT values[4])
1432{
1435
1436 TRACE("iface %p, unordered_access_view %p, values {%u, %u, %u, %u}.\n",
1437 iface, unordered_access_view, values[0], values[1], values[2], values[3]);
1438
1439 view = unsafe_impl_from_ID3D11UnorderedAccessView(unordered_access_view);
1441 view->wined3d_view, (const struct wined3d_uvec4 *)values);
1442}
1443
1445 ID3D11UnorderedAccessView *unordered_access_view, const float values[4])
1446{
1449
1450 TRACE("iface %p, unordered_access_view %p, values %s.\n",
1451 iface, unordered_access_view, debug_float4(values));
1452
1453 view = unsafe_impl_from_ID3D11UnorderedAccessView(unordered_access_view);
1455 view->wined3d_view, (const struct wined3d_vec4 *)values);
1456}
1457
1459 ID3D11DepthStencilView *depth_stencil_view, UINT flags, FLOAT depth, UINT8 stencil)
1460{
1463 DWORD wined3d_flags;
1464 HRESULT hr;
1465
1466 TRACE("iface %p, depth_stencil_view %p, flags %#x, depth %.8e, stencil %u.\n",
1467 iface, depth_stencil_view, flags, depth, stencil);
1468
1469 if (!view)
1470 return;
1471
1473
1474 if (FAILED(hr = wined3d_device_context_clear_rendertarget_view(context->wined3d_context, view->wined3d_view, NULL,
1475 wined3d_flags, NULL, depth, stencil)))
1476 ERR("Failed to clear view, hr %#lx.\n", hr);
1477}
1478
1480 ID3D11ShaderResourceView *view)
1481{
1484
1485 TRACE("iface %p, view %p.\n", iface, view);
1486
1488}
1489
1491 ID3D11Resource *resource, FLOAT min_lod)
1492{
1493 FIXME("iface %p, resource %p, min_lod %f stub!\n", iface, resource, min_lod);
1494}
1495
1497 ID3D11Resource *resource)
1498{
1499 FIXME("iface %p, resource %p stub!\n", iface, resource);
1500
1501 return 0.0f;
1502}
1503
1505 ID3D11Resource *dst_resource, UINT dst_subresource_idx,
1506 ID3D11Resource *src_resource, UINT src_subresource_idx,
1508{
1510 struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource;
1512
1513 TRACE("iface %p, dst_resource %p, dst_subresource_idx %u, "
1514 "src_resource %p, src_subresource_idx %u, format %s.\n",
1515 iface, dst_resource, dst_subresource_idx,
1516 src_resource, src_subresource_idx, debug_dxgi_format(format));
1517
1518 wined3d_dst_resource = wined3d_resource_from_d3d11_resource(dst_resource);
1519 wined3d_src_resource = wined3d_resource_from_d3d11_resource(src_resource);
1522 wined3d_dst_resource, dst_subresource_idx,
1523 wined3d_src_resource, src_subresource_idx, wined3d_format);
1524}
1525
1527 ID3D11CommandList *command_list, BOOL restore_state)
1528{
1530 struct d3d11_command_list *list_impl = unsafe_impl_from_ID3D11CommandList(command_list);
1531
1532 TRACE("iface %p, command_list %p, restore_state %#x.\n", iface, command_list, restore_state);
1533
1534 wined3d_device_context_execute_command_list(context->wined3d_context, list_impl->wined3d_list, !!restore_state);
1535}
1536
1538 UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
1539{
1540 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
1541 iface, start_slot, view_count, views);
1542
1543 d3d11_device_context_set_shader_resource_views(iface, WINED3D_SHADER_TYPE_HULL, start_slot, view_count, views);
1544}
1545
1547 ID3D11HullShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
1548{
1551
1552 TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
1553 iface, shader, class_instances, class_instance_count);
1554
1555 if (class_instance_count)
1556 FIXME("Dynamic linking is not implemented yet.\n");
1557
1559 hs ? hs->wined3d_shader : NULL);
1560}
1561
1563 UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
1564{
1565 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
1566 iface, start_slot, sampler_count, samplers);
1567
1568 d3d11_device_context_set_samplers(iface, WINED3D_SHADER_TYPE_HULL, start_slot, sampler_count, samplers);
1569}
1570
1572 UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
1573{
1574 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
1575 iface, start_slot, buffer_count, buffers);
1576
1579}
1580
1582 UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
1583{
1584 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
1585 iface, start_slot, view_count, views);
1586
1588}
1589
1591 ID3D11DomainShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
1592{
1595
1596 TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
1597 iface, shader, class_instances, class_instance_count);
1598
1599 if (class_instance_count)
1600 FIXME("Dynamic linking is not implemented yet.\n");
1601
1603 ds ? ds->wined3d_shader : NULL);
1604}
1605
1607 UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
1608{
1609 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
1610 iface, start_slot, sampler_count, samplers);
1611
1612 d3d11_device_context_set_samplers(iface, WINED3D_SHADER_TYPE_DOMAIN, start_slot, sampler_count, samplers);
1613}
1614
1616 UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
1617{
1618 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
1619 iface, start_slot, buffer_count, buffers);
1620
1623}
1624
1626 UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
1627{
1628 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
1629 iface, start_slot, view_count, views);
1630
1632}
1633
1635 UINT start_slot, UINT view_count, ID3D11UnorderedAccessView *const *views, const UINT *initial_counts)
1636{
1639 unsigned int i;
1640
1641 TRACE("iface %p, start_slot %u, view_count %u, views %p, initial_counts %p.\n",
1642 iface, start_slot, view_count, views, initial_counts);
1643
1644 if (view_count > ARRAY_SIZE(wined3d_views))
1645 {
1646 WARN("View count %u exceeds limit; ignoring call.\n", view_count);
1647 return;
1648 }
1649
1650 for (i = 0; i < view_count; ++i)
1651 {
1653
1654 wined3d_views[i] = view ? view->wined3d_view : NULL;
1655 }
1656
1658 start_slot, view_count, wined3d_views, initial_counts);
1659}
1660
1662 ID3D11ComputeShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
1663{
1666
1667 TRACE("iface %p, shader %p, class_instances %p, class_instance_count %u.\n",
1668 iface, shader, class_instances, class_instance_count);
1669
1670 if (class_instance_count)
1671 FIXME("Dynamic linking is not implemented yet.\n");
1672
1674 cs ? cs->wined3d_shader : NULL);
1675}
1676
1678 UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
1679{
1680 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
1681 iface, start_slot, sampler_count, samplers);
1682
1684}
1685
1687 UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
1688{
1689 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
1690 iface, start_slot, buffer_count, buffers);
1691
1694}
1695
1697 UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
1698{
1699 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
1700 iface, start_slot, buffer_count, buffers);
1701
1704}
1705
1707 UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
1708{
1710 unsigned int i;
1711
1712 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
1713 iface, start_slot, view_count, views);
1714
1716 for (i = 0; i < view_count; ++i)
1717 {
1718 struct wined3d_shader_resource_view *wined3d_view;
1719 struct d3d_shader_resource_view *view_impl;
1720
1722 context->wined3d_context, WINED3D_SHADER_TYPE_PIXEL, start_slot + i)))
1723 {
1724 views[i] = NULL;
1725 continue;
1726 }
1727
1729 views[i] = &view_impl->ID3D11ShaderResourceView_iface;
1730 ID3D11ShaderResourceView_AddRef(views[i]);
1731 }
1733}
1734
1736 ID3D11PixelShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
1737{
1740 struct d3d_pixel_shader *shader_impl;
1741
1742 TRACE("iface %p, shader %p, class_instances %p, class_instance_count %p.\n",
1743 iface, shader, class_instances, class_instance_count);
1744
1745 if (class_instance_count)
1746 *class_instance_count = 0;
1747
1750 {
1752 *shader = NULL;
1753 return;
1754 }
1755
1758 *shader = &shader_impl->ID3D11PixelShader_iface;
1759 ID3D11PixelShader_AddRef(*shader);
1760}
1761
1763 UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
1764{
1766 unsigned int i;
1767
1768 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
1769 iface, start_slot, sampler_count, samplers);
1770
1772 for (i = 0; i < sampler_count; ++i)
1773 {
1775 struct d3d_sampler_state *sampler_impl;
1776
1778 context->wined3d_context, WINED3D_SHADER_TYPE_PIXEL, start_slot + i)))
1779 {
1780 samplers[i] = NULL;
1781 continue;
1782 }
1783
1785 samplers[i] = &sampler_impl->ID3D11SamplerState_iface;
1786 ID3D11SamplerState_AddRef(samplers[i]);
1787 }
1789}
1790
1792 ID3D11VertexShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
1793{
1795 struct d3d_vertex_shader *shader_impl;
1797
1798 TRACE("iface %p, shader %p, class_instances %p, class_instance_count %p.\n",
1799 iface, shader, class_instances, class_instance_count);
1800
1801 if (class_instance_count)
1802 *class_instance_count = 0;
1803
1806 {
1808 *shader = NULL;
1809 return;
1810 }
1811
1814 *shader = &shader_impl->ID3D11VertexShader_iface;
1815 ID3D11VertexShader_AddRef(*shader);
1816}
1817
1819 UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
1820{
1821 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
1822 iface, start_slot, buffer_count, buffers);
1823
1826}
1827
1829 ID3D11InputLayout **input_layout)
1830{
1832 struct wined3d_vertex_declaration *wined3d_declaration;
1833 struct d3d_input_layout *input_layout_impl;
1834
1835 TRACE("iface %p, input_layout %p.\n", iface, input_layout);
1836
1838 if (!(wined3d_declaration = wined3d_device_context_get_vertex_declaration(context->wined3d_context)))
1839 {
1841 *input_layout = NULL;
1842 return;
1843 }
1844
1845 input_layout_impl = wined3d_vertex_declaration_get_parent(wined3d_declaration);
1847 *input_layout = &input_layout_impl->ID3D11InputLayout_iface;
1848 ID3D11InputLayout_AddRef(*input_layout);
1849}
1850
1852 UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *strides, UINT *offsets)
1853{
1855 unsigned int i;
1856
1857 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p.\n",
1858 iface, start_slot, buffer_count, buffers, strides, offsets);
1859
1861 for (i = 0; i < buffer_count; ++i)
1862 {
1864 struct d3d_buffer *buffer_impl;
1865
1866 if (FAILED(wined3d_device_context_get_stream_source(context->wined3d_context, start_slot + i,
1867 &wined3d_buffer, &offsets[i], &strides[i])))
1868 {
1869 FIXME("Failed to get vertex buffer %u.\n", start_slot + i);
1870 if (strides)
1871 strides[i] = 0;
1872 if (offsets)
1873 offsets[i] = 0;
1874 }
1875
1876 if (!wined3d_buffer)
1877 {
1878 buffers[i] = NULL;
1879 continue;
1880 }
1881
1883 ID3D11Buffer_AddRef(buffers[i] = &buffer_impl->ID3D11Buffer_iface);
1884 }
1886}
1887
1889 ID3D11Buffer **buffer, DXGI_FORMAT *format, UINT *offset)
1890{
1894 struct d3d_buffer *buffer_impl;
1895
1896 TRACE("iface %p, buffer %p, format %p, offset %p.\n", iface, buffer, format, offset);
1897
1901 if (!wined3d_buffer)
1902 {
1904 *buffer = NULL;
1905 return;
1906 }
1907
1910 ID3D11Buffer_AddRef(*buffer = &buffer_impl->ID3D11Buffer_iface);
1911}
1912
1914 UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
1915{
1916 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
1917 iface, start_slot, buffer_count, buffers);
1918
1921}
1922
1924 ID3D11GeometryShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
1925{
1927 struct d3d_geometry_shader *shader_impl;
1929
1930 TRACE("iface %p, shader %p, class_instances %p, class_instance_count %p.\n",
1931 iface, shader, class_instances, class_instance_count);
1932
1933 if (class_instance_count)
1934 *class_instance_count = 0;
1935
1938 {
1940 *shader = NULL;
1941 return;
1942 }
1943
1946 *shader = &shader_impl->ID3D11GeometryShader_iface;
1947 ID3D11GeometryShader_AddRef(*shader);
1948}
1949
1951 D3D11_PRIMITIVE_TOPOLOGY *topology)
1952{
1954 enum wined3d_primitive_type primitive_type;
1955 unsigned int patch_vertex_count;
1956
1957 TRACE("iface %p, topology %p.\n", iface, topology);
1958
1960 wined3d_device_context_get_primitive_type(context->wined3d_context, &primitive_type, &patch_vertex_count);
1962
1963 d3d11_primitive_topology_from_wined3d_primitive_type(primitive_type, patch_vertex_count, topology);
1964}
1965
1967 UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
1968{
1970 unsigned int i;
1971
1972 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
1973
1975 for (i = 0; i < view_count; ++i)
1976 {
1977 struct wined3d_shader_resource_view *wined3d_view;
1978 struct d3d_shader_resource_view *view_impl;
1979
1981 context->wined3d_context, WINED3D_SHADER_TYPE_VERTEX, start_slot + i)))
1982 {
1983 views[i] = NULL;
1984 continue;
1985 }
1986
1988 views[i] = &view_impl->ID3D11ShaderResourceView_iface;
1989 ID3D11ShaderResourceView_AddRef(views[i]);
1990 }
1992}
1993
1995 UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
1996{
1998 unsigned int i;
1999
2000 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
2001 iface, start_slot, sampler_count, samplers);
2002
2004 for (i = 0; i < sampler_count; ++i)
2005 {
2007 struct d3d_sampler_state *sampler_impl;
2008
2010 context->wined3d_context, WINED3D_SHADER_TYPE_VERTEX, start_slot + i)))
2011 {
2012 samplers[i] = NULL;
2013 continue;
2014 }
2015
2017 samplers[i] = &sampler_impl->ID3D11SamplerState_iface;
2018 ID3D11SamplerState_AddRef(samplers[i]);
2019 }
2021}
2022
2024 ID3D11Predicate **predicate, BOOL *value)
2025{
2027 struct wined3d_query *wined3d_predicate;
2028 struct d3d_query *predicate_impl;
2029
2030 TRACE("iface %p, predicate %p, value %p.\n", iface, predicate, value);
2031
2033 if (!(wined3d_predicate = wined3d_device_context_get_predication(context->wined3d_context, value)))
2034 {
2036 *predicate = NULL;
2037 return;
2038 }
2039
2040 predicate_impl = wined3d_query_get_parent(wined3d_predicate);
2042 *predicate = (ID3D11Predicate *)&predicate_impl->ID3D11Query_iface;
2043 ID3D11Predicate_AddRef(*predicate);
2044}
2045
2047 UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
2048{
2050 unsigned int i;
2051
2052 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
2053
2055 for (i = 0; i < view_count; ++i)
2056 {
2057 struct wined3d_shader_resource_view *wined3d_view;
2058 struct d3d_shader_resource_view *view_impl;
2059
2061 context->wined3d_context, WINED3D_SHADER_TYPE_GEOMETRY, start_slot + i)))
2062 {
2063 views[i] = NULL;
2064 continue;
2065 }
2066
2068 views[i] = &view_impl->ID3D11ShaderResourceView_iface;
2069 ID3D11ShaderResourceView_AddRef(views[i]);
2070 }
2072}
2073
2075 UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
2076{
2078 unsigned int i;
2079
2080 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
2081 iface, start_slot, sampler_count, samplers);
2082
2084 for (i = 0; i < sampler_count; ++i)
2085 {
2086 struct d3d_sampler_state *sampler_impl;
2088
2090 context->wined3d_context, WINED3D_SHADER_TYPE_GEOMETRY, start_slot + i)))
2091 {
2092 samplers[i] = NULL;
2093 continue;
2094 }
2095
2097 samplers[i] = &sampler_impl->ID3D11SamplerState_iface;
2098 ID3D11SamplerState_AddRef(samplers[i]);
2099 }
2101}
2102
2104 UINT render_target_view_count, ID3D11RenderTargetView **render_target_views,
2105 ID3D11DepthStencilView **depth_stencil_view)
2106{
2108 struct wined3d_rendertarget_view *wined3d_view;
2109
2110 TRACE("iface %p, render_target_view_count %u, render_target_views %p, depth_stencil_view %p.\n",
2111 iface, render_target_view_count, render_target_views, depth_stencil_view);
2112
2114 if (render_target_views)
2115 {
2116 struct d3d_rendertarget_view *view_impl;
2117 unsigned int i;
2118
2119 for (i = 0; i < render_target_view_count; ++i)
2120 {
2123 {
2124 render_target_views[i] = NULL;
2125 continue;
2126 }
2127
2128 render_target_views[i] = &view_impl->ID3D11RenderTargetView_iface;
2129 ID3D11RenderTargetView_AddRef(render_target_views[i]);
2130 }
2131 }
2132
2133 if (depth_stencil_view)
2134 {
2135 struct d3d_depthstencil_view *view_impl;
2136
2139 {
2140 *depth_stencil_view = NULL;
2141 }
2142 else
2143 {
2144 *depth_stencil_view = &view_impl->ID3D11DepthStencilView_iface;
2145 ID3D11DepthStencilView_AddRef(*depth_stencil_view);
2146 }
2147 }
2149}
2150
2152 ID3D11DeviceContext1 *iface,
2153 UINT render_target_view_count, ID3D11RenderTargetView **render_target_views,
2154 ID3D11DepthStencilView **depth_stencil_view,
2155 UINT unordered_access_view_start_slot, UINT unordered_access_view_count,
2156 ID3D11UnorderedAccessView **unordered_access_views)
2157{
2159 struct wined3d_unordered_access_view *wined3d_view;
2160 struct d3d11_unordered_access_view *view_impl;
2161 unsigned int i;
2162
2163 TRACE("iface %p, render_target_view_count %u, render_target_views %p, depth_stencil_view %p, "
2164 "unordered_access_view_start_slot %u, unordered_access_view_count %u, "
2165 "unordered_access_views %p.\n",
2166 iface, render_target_view_count, render_target_views, depth_stencil_view,
2167 unordered_access_view_start_slot, unordered_access_view_count, unordered_access_views);
2168
2169 if (render_target_views || depth_stencil_view)
2170 d3d11_device_context_OMGetRenderTargets(iface, render_target_view_count,
2171 render_target_views, depth_stencil_view);
2172
2173 if (unordered_access_views)
2174 {
2176 for (i = 0; i < unordered_access_view_count; ++i)
2177 {
2179 WINED3D_PIPELINE_GRAPHICS, unordered_access_view_start_slot + i)))
2180 {
2181 unordered_access_views[i] = NULL;
2182 continue;
2183 }
2184
2186 unordered_access_views[i] = &view_impl->ID3D11UnorderedAccessView_iface;
2187 ID3D11UnorderedAccessView_AddRef(unordered_access_views[i]);
2188 }
2190 }
2191}
2192
2194 ID3D11BlendState **blend_state, FLOAT blend_factor[4], UINT *sample_mask)
2195{
2198 struct d3d_blend_state *blend_state_impl;
2199 unsigned int tmp_sample_mask;
2200 float tmp_blend_factor[4];
2201
2202 TRACE("iface %p, blend_state %p, blend_factor %p, sample_mask %p.\n",
2203 iface, blend_state, blend_factor, sample_mask);
2204
2206 if (!blend_factor) blend_factor = tmp_blend_factor;
2207 if (!sample_mask) sample_mask = &tmp_sample_mask;
2209 (struct wined3d_color *)blend_factor, sample_mask);
2210 if (blend_state)
2211 {
2212 if (wined3d_state)
2213 {
2215 ID3D11BlendState_AddRef(*blend_state = (ID3D11BlendState *)&blend_state_impl->ID3D11BlendState1_iface);
2216 }
2217 else
2218 *blend_state = NULL;
2219 }
2221}
2222
2224 ID3D11DepthStencilState **depth_stencil_state, UINT *stencil_ref)
2225{
2228 struct d3d_depthstencil_state *state_impl;
2229 UINT stencil_ref_tmp;
2230
2231 TRACE("iface %p, depth_stencil_state %p, stencil_ref %p.\n",
2232 iface, depth_stencil_state, stencil_ref);
2233
2235 if (!stencil_ref) stencil_ref = &stencil_ref_tmp;
2237 if (depth_stencil_state)
2238 {
2239 if (wined3d_state)
2240 {
2242 ID3D11DepthStencilState_AddRef(*depth_stencil_state = &state_impl->ID3D11DepthStencilState_iface);
2243 }
2244 else
2245 {
2246 *depth_stencil_state = NULL;
2247 }
2248 }
2250}
2251
2253 UINT buffer_count, ID3D11Buffer **buffers)
2254{
2256 unsigned int i;
2257
2258 TRACE("iface %p, buffer_count %u, buffers %p.\n", iface, buffer_count, buffers);
2259
2261 for (i = 0; i < buffer_count; ++i)
2262 {
2264 struct d3d_buffer *buffer_impl;
2265
2267 {
2268 buffers[i] = NULL;
2269 continue;
2270 }
2271
2273 buffers[i] = &buffer_impl->ID3D11Buffer_iface;
2274 ID3D11Buffer_AddRef(buffers[i]);
2275 }
2277}
2278
2280 ID3D11RasterizerState **rasterizer_state)
2281{
2283 struct d3d_rasterizer_state *rasterizer_state_impl;
2285
2286 TRACE("iface %p, rasterizer_state %p.\n", iface, rasterizer_state);
2287
2290 {
2291 rasterizer_state_impl = wined3d_rasterizer_state_get_parent(wined3d_state);
2292 *rasterizer_state = (ID3D11RasterizerState *)&rasterizer_state_impl->ID3D11RasterizerState1_iface;
2293 ID3D11RasterizerState_AddRef(*rasterizer_state);
2294 }
2295 else
2296 {
2297 *rasterizer_state = NULL;
2298 }
2300}
2301
2303 UINT *viewport_count, D3D11_VIEWPORT *viewports)
2304{
2306 struct wined3d_viewport wined3d_vp[WINED3D_MAX_VIEWPORTS];
2307 unsigned int actual_count = ARRAY_SIZE(wined3d_vp), i;
2308
2309 TRACE("iface %p, viewport_count %p, viewports %p.\n", iface, viewport_count, viewports);
2310
2311 if (!viewport_count)
2312 return;
2313
2315 wined3d_device_context_get_viewports(context->wined3d_context, &actual_count, viewports ? wined3d_vp : NULL);
2317
2318 if (!viewports)
2319 {
2320 *viewport_count = actual_count;
2321 return;
2322 }
2323
2324 if (*viewport_count > actual_count)
2325 memset(&viewports[actual_count], 0, (*viewport_count - actual_count) * sizeof(*viewports));
2326
2327 *viewport_count = min(actual_count, *viewport_count);
2328 for (i = 0; i < *viewport_count; ++i)
2329 {
2330 viewports[i].TopLeftX = wined3d_vp[i].x;
2331 viewports[i].TopLeftY = wined3d_vp[i].y;
2332 viewports[i].Width = wined3d_vp[i].width;
2333 viewports[i].Height = wined3d_vp[i].height;
2334 viewports[i].MinDepth = wined3d_vp[i].min_z;
2335 viewports[i].MaxDepth = wined3d_vp[i].max_z;
2336 }
2337}
2338
2340 UINT *rect_count, D3D11_RECT *rects)
2341{
2343 unsigned int actual_count;
2344
2345 TRACE("iface %p, rect_count %p, rects %p.\n", iface, rect_count, rects);
2346
2347 if (!rect_count)
2348 return;
2349
2350 actual_count = *rect_count;
2351
2353 wined3d_device_context_get_scissor_rects(context->wined3d_context, &actual_count, rects);
2355
2356 if (rects && *rect_count > actual_count)
2357 memset(&rects[actual_count], 0, (*rect_count - actual_count) * sizeof(*rects));
2358 *rect_count = actual_count;
2359}
2360
2362 UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
2363{
2365 unsigned int i;
2366
2367 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
2368
2370 for (i = 0; i < view_count; ++i)
2371 {
2372 struct wined3d_shader_resource_view *wined3d_view;
2373 struct d3d_shader_resource_view *view_impl;
2374
2376 context->wined3d_context, WINED3D_SHADER_TYPE_HULL, start_slot + i)))
2377 {
2378 views[i] = NULL;
2379 continue;
2380 }
2381
2383 ID3D11ShaderResourceView_AddRef(views[i] = &view_impl->ID3D11ShaderResourceView_iface);
2384 }
2386}
2387
2389 ID3D11HullShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
2390{
2392 struct d3d11_hull_shader *shader_impl;
2394
2395 TRACE("iface %p, shader %p, class_instances %p, class_instance_count %p.\n",
2396 iface, shader, class_instances, class_instance_count);
2397
2398 if (class_instance_count)
2399 *class_instance_count = 0;
2400
2403 {
2405 *shader = NULL;
2406 return;
2407 }
2408
2411 ID3D11HullShader_AddRef(*shader = &shader_impl->ID3D11HullShader_iface);
2412}
2413
2415 UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
2416{
2418 unsigned int i;
2419
2420 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
2421 iface, start_slot, sampler_count, samplers);
2422
2424 for (i = 0; i < sampler_count; ++i)
2425 {
2427 struct d3d_sampler_state *sampler_impl;
2428
2430 context->wined3d_context, WINED3D_SHADER_TYPE_HULL, start_slot + i)))
2431 {
2432 samplers[i] = NULL;
2433 continue;
2434 }
2435
2437 ID3D11SamplerState_AddRef(samplers[i] = &sampler_impl->ID3D11SamplerState_iface);
2438 }
2440}
2441
2443 UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
2444{
2445 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
2446 iface, start_slot, buffer_count, buffers);
2447
2450}
2451
2453 UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
2454{
2456 unsigned int i;
2457
2458 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
2459 iface, start_slot, view_count, views);
2460
2462 for (i = 0; i < view_count; ++i)
2463 {
2464 struct wined3d_shader_resource_view *wined3d_view;
2465 struct d3d_shader_resource_view *view_impl;
2466
2468 context->wined3d_context, WINED3D_SHADER_TYPE_DOMAIN, start_slot + i)))
2469 {
2470 views[i] = NULL;
2471 continue;
2472 }
2473
2475 ID3D11ShaderResourceView_AddRef(views[i] = &view_impl->ID3D11ShaderResourceView_iface);
2476 }
2478}
2479
2481 ID3D11DomainShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
2482{
2484 struct d3d11_domain_shader *shader_impl;
2486
2487 TRACE("iface %p, shader %p, class_instances %p, class_instance_count %p.\n",
2488 iface, shader, class_instances, class_instance_count);
2489
2490 if (class_instance_count)
2491 *class_instance_count = 0;
2492
2495 {
2497 *shader = NULL;
2498 return;
2499 }
2500
2503 ID3D11DomainShader_AddRef(*shader = &shader_impl->ID3D11DomainShader_iface);
2504}
2505
2507 UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
2508{
2510 unsigned int i;
2511
2512 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
2513 iface, start_slot, sampler_count, samplers);
2514
2516 for (i = 0; i < sampler_count; ++i)
2517 {
2519 struct d3d_sampler_state *sampler_impl;
2520
2522 context->wined3d_context, WINED3D_SHADER_TYPE_DOMAIN, start_slot + i)))
2523 {
2524 samplers[i] = NULL;
2525 continue;
2526 }
2527
2529 ID3D11SamplerState_AddRef(samplers[i] = &sampler_impl->ID3D11SamplerState_iface);
2530 }
2532}
2533
2535 UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
2536{
2537 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
2538 iface, start_slot, buffer_count, buffers);
2539
2542}
2543
2545 UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
2546{
2548 unsigned int i;
2549
2550 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
2551
2553 for (i = 0; i < view_count; ++i)
2554 {
2555 struct wined3d_shader_resource_view *wined3d_view;
2556 struct d3d_shader_resource_view *view_impl;
2557
2559 context->wined3d_context, WINED3D_SHADER_TYPE_COMPUTE, start_slot + i)))
2560 {
2561 views[i] = NULL;
2562 continue;
2563 }
2564
2566 ID3D11ShaderResourceView_AddRef(views[i] = &view_impl->ID3D11ShaderResourceView_iface);
2567 }
2569}
2570
2572 UINT start_slot, UINT view_count, ID3D11UnorderedAccessView **views)
2573{
2575 unsigned int i;
2576
2577 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n", iface, start_slot, view_count, views);
2578
2580 for (i = 0; i < view_count; ++i)
2581 {
2582 struct wined3d_unordered_access_view *wined3d_view;
2583 struct d3d11_unordered_access_view *view_impl;
2584
2586 context->wined3d_context, WINED3D_PIPELINE_COMPUTE, start_slot + i)))
2587 {
2588 views[i] = NULL;
2589 continue;
2590 }
2591
2593 ID3D11UnorderedAccessView_AddRef(views[i] = &view_impl->ID3D11UnorderedAccessView_iface);
2594 }
2596}
2597
2599 ID3D11ComputeShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
2600{
2602 struct d3d11_compute_shader *shader_impl;
2604
2605 TRACE("iface %p, shader %p, class_instances %p, class_instance_count %p.\n",
2606 iface, shader, class_instances, class_instance_count);
2607
2608 if (class_instance_count)
2609 *class_instance_count = 0;
2610
2613 {
2615 *shader = NULL;
2616 return;
2617 }
2618
2621 ID3D11ComputeShader_AddRef(*shader = &shader_impl->ID3D11ComputeShader_iface);
2622}
2623
2625 UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
2626{
2628 unsigned int i;
2629
2630 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
2631 iface, start_slot, sampler_count, samplers);
2632
2634 for (i = 0; i < sampler_count; ++i)
2635 {
2637 struct d3d_sampler_state *sampler_impl;
2638
2640 context->wined3d_context, WINED3D_SHADER_TYPE_COMPUTE, start_slot + i)))
2641 {
2642 samplers[i] = NULL;
2643 continue;
2644 }
2645
2647 ID3D11SamplerState_AddRef(samplers[i] = &sampler_impl->ID3D11SamplerState_iface);
2648 }
2650}
2651
2653 UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
2654{
2655 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
2656 iface, start_slot, buffer_count, buffers);
2657
2660}
2661
2663{
2665
2666 TRACE("iface %p.\n", iface);
2667
2669}
2670
2672{
2674
2675 TRACE("iface %p.\n", iface);
2676
2677 wined3d_device_context_flush(context->wined3d_context);
2678}
2679
2681{
2683
2684 TRACE("iface %p.\n", iface);
2685
2686 return context->type;
2687}
2688
2690{
2691 TRACE("iface %p.\n", iface);
2692
2693 return 0;
2694}
2695
2697 BOOL restore, ID3D11CommandList **command_list)
2698{
2700 struct d3d11_command_list *object;
2701 HRESULT hr;
2702
2703 TRACE("iface %p, restore %#x, command_list %p.\n", iface, restore, command_list);
2704
2706 {
2707 WARN("Attempt to record command list on an immediate context; returning DXGI_ERROR_INVALID_CALL.\n");
2709 }
2710
2711 if (!(object = calloc(1, sizeof(*object))))
2712 return E_OUTOFMEMORY;
2713
2715 !!restore, &object->wined3d_list)))
2716 {
2717 WARN("Failed to record wined3d command list, hr %#lx.\n", hr);
2718 free(object);
2719 return hr;
2720 }
2721
2722 object->ID3D11CommandList_iface.lpVtbl = &d3d11_command_list_vtbl;
2723 object->refcount = 1;
2724 object->device = &context->device->ID3D11Device2_iface;
2725 wined3d_private_store_init(&object->private_store);
2726
2727 ID3D11Device2_AddRef(object->device);
2728
2729 TRACE("Created command list %p.\n", object);
2730 *command_list = &object->ID3D11CommandList_iface;
2731
2732 return S_OK;
2733}
2734
2736 ID3D11Resource *dst_resource, UINT dst_subresource_idx, UINT dst_x, UINT dst_y, UINT dst_z,
2737 ID3D11Resource *src_resource, UINT src_subresource_idx, const D3D11_BOX *src_box, UINT flags)
2738{
2740 struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource;
2741 struct wined3d_box wined3d_src_box;
2742
2743 TRACE("iface %p, dst_resource %p, dst_subresource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
2744 "src_resource %p, src_subresource_idx %u, src_box %p, flags %#x.\n",
2745 iface, dst_resource, dst_subresource_idx, dst_x, dst_y, dst_z,
2746 src_resource, src_subresource_idx, src_box, flags);
2747
2748 if (!dst_resource || !src_resource)
2749 return;
2750
2751 if (src_box)
2752 wined3d_box_set(&wined3d_src_box, src_box->left, src_box->top,
2753 src_box->right, src_box->bottom, src_box->front, src_box->back);
2754
2755 wined3d_dst_resource = wined3d_resource_from_d3d11_resource(dst_resource);
2756 wined3d_src_resource = wined3d_resource_from_d3d11_resource(src_resource);
2757 wined3d_device_context_copy_sub_resource_region(context->wined3d_context, wined3d_dst_resource, dst_subresource_idx,
2758 dst_x, dst_y, dst_z, wined3d_src_resource, src_subresource_idx, src_box ? &wined3d_src_box : NULL, flags);
2759}
2760
2762 ID3D11Resource *resource, UINT subresource_idx, const D3D11_BOX *box, const void *data,
2763 UINT row_pitch, UINT depth_pitch, UINT flags)
2764{
2767 struct wined3d_box wined3d_box;
2768
2769 TRACE("iface %p, resource %p, subresource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u, flags %#x.\n",
2770 iface, resource, subresource_idx, box, data, row_pitch, depth_pitch, flags);
2771
2772 if (box)
2773 wined3d_box_set(&wined3d_box, box->left, box->top, box->right, box->bottom,
2774 box->front, box->back);
2775
2777 wined3d_device_context_update_sub_resource(context->wined3d_context, wined3d_resource, subresource_idx,
2778 box ? &wined3d_box : NULL, data, row_pitch, depth_pitch, flags);
2779}
2780
2782 ID3D11Resource *resource)
2783{
2784 FIXME("iface %p, resource %p stub!\n", iface, resource);
2785}
2786
2788{
2789 FIXME("iface %p, view %p stub!\n", iface, view);
2790}
2791
2793 UINT start_slot, UINT buffer_count, ID3D11Buffer * const *buffers, const UINT *first_constant,
2794 const UINT *num_constants)
2795{
2796 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p.\n",
2797 iface, start_slot, buffer_count, buffers, first_constant, num_constants);
2798
2800 buffer_count, buffers, first_constant, num_constants);
2801}
2802
2804 UINT start_slot, UINT buffer_count, ID3D11Buffer * const *buffers, const UINT *first_constant,
2805 const UINT *num_constants)
2806{
2807 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p.\n",
2808 iface, start_slot, buffer_count, buffers, first_constant, num_constants);
2809
2811 buffer_count, buffers, first_constant, num_constants);
2812}
2813
2815 UINT start_slot, UINT buffer_count, ID3D11Buffer * const *buffers, const UINT *first_constant,
2816 const UINT *num_constants)
2817{
2818 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p.\n",
2819 iface, start_slot, buffer_count, buffers, first_constant, num_constants);
2820
2822 buffer_count, buffers, first_constant, num_constants);
2823}
2824
2826 UINT start_slot, UINT buffer_count, ID3D11Buffer * const *buffers, const UINT *first_constant,
2827 const UINT *num_constants)
2828{
2829 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p.\n",
2830 iface, start_slot, buffer_count, buffers, first_constant, num_constants);
2831
2833 buffer_count, buffers, first_constant, num_constants);
2834}
2835
2837 UINT start_slot, UINT buffer_count, ID3D11Buffer * const *buffers, const UINT *first_constant,
2838 const UINT *num_constants)
2839{
2840 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p.\n",
2841 iface, start_slot, buffer_count, buffers, first_constant, num_constants);
2842
2844 buffer_count, buffers, first_constant, num_constants);
2845}
2846
2848 UINT start_slot, UINT buffer_count, ID3D11Buffer * const *buffers, const UINT *first_constant,
2849 const UINT *num_constants)
2850{
2851 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p.\n",
2852 iface, start_slot, buffer_count, buffers, first_constant, num_constants);
2853
2855 buffer_count, buffers, first_constant, num_constants);
2856}
2857
2859 UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
2860{
2861 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p.\n",
2862 iface, start_slot, buffer_count, buffers, first_constant, num_constants);
2863
2865 buffer_count, buffers, first_constant, num_constants);
2866}
2867
2869 UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
2870{
2871 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p.\n",
2872 iface, start_slot, buffer_count, buffers, first_constant, num_constants);
2873
2875 buffer_count, buffers, first_constant, num_constants);
2876}
2877
2879 UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
2880{
2881 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p.\n",
2882 iface, start_slot, buffer_count, buffers, first_constant, num_constants);
2883
2885 buffer_count, buffers, first_constant, num_constants);
2886}
2887
2889 UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
2890{
2891 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p.\n",
2892 iface, start_slot, buffer_count, buffers, first_constant, num_constants);
2893
2895 buffer_count, buffers, first_constant, num_constants);
2896}
2897
2899 UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
2900{
2901 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p.\n",
2902 iface, start_slot, buffer_count, buffers, first_constant, num_constants);
2903
2905 buffer_count, buffers, first_constant, num_constants);
2906}
2907
2909 UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
2910{
2911 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, first_constant %p, num_constants %p.\n",
2912 iface, start_slot, buffer_count, buffers, first_constant, num_constants);
2913
2915 buffer_count, buffers, first_constant, num_constants);
2916}
2917
2920{
2922 struct d3d_device_context_state *state_impl, *prev_impl;
2923 struct d3d_device *device = context->device;
2925 static unsigned int once;
2926
2927 TRACE("iface %p, state %p, prev %p.\n", iface, state, prev);
2928
2929 if (prev)
2930 *prev = NULL;
2931
2933 {
2934 WARN("SwapDeviceContextState is not allowed on a deferred context.\n");
2935 return;
2936 }
2937
2938 if (!state)
2939 return;
2940
2942
2943 prev_impl = device->state;
2946 ERR("Failed to get wined3d state for device context state %p.\n", state_impl);
2948
2949 if (prev)
2950 ID3DDeviceContextState_AddRef(*prev = &prev_impl->ID3DDeviceContextState_iface);
2951
2953 device->state = state_impl;
2955
2956 if (d3d_device_is_d3d10_active(device) && !once++)
2957 FIXME("D3D10 interface emulation not fully implemented yet!\n");
2959}
2960
2962 const FLOAT color[4], const D3D11_RECT *rect, UINT num_rects)
2963{
2964 FIXME("iface %p, view %p, color %p, rect %p, num_rects %u stub!\n", iface, view, color, rect, num_rects);
2965}
2966
2968 const D3D11_RECT *rects, UINT num_rects)
2969{
2970 FIXME("iface %p, view %p, rects %p, num_rects %u stub!\n", iface, view, rects, num_rects);
2971}
2972
2973static const struct ID3D11DeviceContext1Vtbl d3d11_device_context_vtbl =
2974{
2975 /* IUnknown methods */
2979 /* ID3D11DeviceChild methods */
2984 /* ID3D11DeviceContext methods */
3093 /* ID3D11DeviceContext1 methods */
3113};
3114
3115static struct d3d11_device_context *impl_from_ID3D11VideoContext(ID3D11VideoContext *iface)
3116{
3118}
3119
3121 REFIID iid, void **out)
3122{
3124
3125 return d3d11_device_context_QueryInterface(&context->ID3D11DeviceContext1_iface, iid, out);
3126}
3127
3128static ULONG STDMETHODCALLTYPE d3d11_video_context_AddRef(ID3D11VideoContext *iface)
3129{
3131
3132 return d3d11_device_context_AddRef(&context->ID3D11DeviceContext1_iface);
3133}
3134
3135static ULONG STDMETHODCALLTYPE d3d11_video_context_Release(ID3D11VideoContext *iface)
3136{
3138
3139 return d3d11_device_context_Release(&context->ID3D11DeviceContext1_iface);
3140}
3141
3142static void STDMETHODCALLTYPE d3d11_video_context_GetDevice(ID3D11VideoContext *iface, ID3D11Device **device)
3143{
3145
3146 return d3d11_device_context_GetDevice(&context->ID3D11DeviceContext1_iface, device);
3147}
3148
3150 ID3D11VideoContext *iface, REFGUID guid, UINT *size, void *data)
3151{
3153
3154 return d3d11_device_context_GetPrivateData(&context->ID3D11DeviceContext1_iface, guid, size, data);
3155}
3156
3158 ID3D11VideoContext *iface, REFGUID guid, UINT size, const void *data)
3159{
3161
3162 return d3d11_device_context_SetPrivateData(&context->ID3D11DeviceContext1_iface, guid, size, data);
3163}
3164
3166 ID3D11VideoContext *iface, REFGUID guid, const IUnknown *data)
3167{
3169
3170 return d3d11_device_context_SetPrivateDataInterface(&context->ID3D11DeviceContext1_iface, guid, data);
3171}
3172
3174 ID3D11VideoDecoder *decoder, D3D11_VIDEO_DECODER_BUFFER_TYPE type, UINT *size, void **buffer)
3175{
3176 FIXME("iface %p, decoder %p, type %#x, size %p, buffer %p, stub!\n", iface, decoder, type, size, buffer);
3177 return E_NOTIMPL;
3178}
3179
3181 ID3D11VideoDecoder *decoder, D3D11_VIDEO_DECODER_BUFFER_TYPE type)
3182{
3183 FIXME("iface %p, decoder %p, type %#x, stub!\n", iface, decoder, type);
3184 return E_NOTIMPL;
3185}
3186
3188 ID3D11VideoDecoder *decoder, ID3D11VideoDecoderOutputView *view, UINT key_size, const void *key)
3189{
3190 FIXME("iface %p, decoder %p, view %p, key_size %u, key %p, stub!\n", iface, decoder, view, key_size, key);
3191 return E_NOTIMPL;
3192}
3193
3195 ID3D11VideoContext *iface, ID3D11VideoDecoder *decoder)
3196{
3197 FIXME("iface %p, decoder %p, stub!\n", iface, decoder);
3198 return E_NOTIMPL;
3199}
3200
3202 ID3D11VideoDecoder *decoder, UINT count, const D3D11_VIDEO_DECODER_BUFFER_DESC *buffers)
3203{
3204 FIXME("iface %p, decoder %p, count %u, buffers %p, stub!\n", iface, decoder, count, buffers);
3205 return E_NOTIMPL;
3206}
3207
3209 ID3D11VideoDecoder *decoder, const D3D11_VIDEO_DECODER_EXTENSION *extension)
3210{
3211 FIXME("iface %p, decoder %p, extension %p, stub!\n", iface, decoder, extension);
3212 return E_NOTIMPL;
3213}
3214
3216 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL enable, const RECT *rect)
3217{
3218 FIXME("iface %p, processor %p, enable %d, rect %s, stub!\n", iface, processor, enable, wine_dbgstr_rect(rect));
3219}
3220
3222 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL yuv, const D3D11_VIDEO_COLOR *color)
3223{
3224 FIXME("iface %p, processor %p, yuv %d, color {%.8e, %.8e, %.8e, %.8e}, stub!\n",
3225 iface, processor, yuv, color->u.RGBA.R, color->u.RGBA.G, color->u.RGBA.B, color->u.RGBA.A);
3226}
3227
3229 ID3D11VideoProcessor *processor, const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *space)
3230{
3231 FIXME("iface %p, processor %p, space %p, stub!\n", iface, processor, space);
3232}
3233
3235 ID3D11VideoProcessor *processor, D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE mode, UINT stream_idx)
3236{
3237 FIXME("iface %p, processor %p, mode %#x, stream_idx %u, stub!\n", iface, processor, mode, stream_idx);
3238}
3239
3241 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL enable, SIZE size)
3242{
3243 FIXME("iface %p, processor %p, enable %d, size (%lux%lu), stub!\n", iface, processor, enable, size.cx, size.cy);
3244}
3245
3247 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL enable)
3248{
3249 FIXME("iface %p, processor %p, enable %d, stub!\n", iface, processor, enable);
3250}
3251
3253 ID3D11VideoProcessor *processor, const GUID *guid, UINT size, void *data)
3254{
3255 FIXME("iface %p, processor %p, guid %s, size %u, data %p, stub!\n",
3256 iface, processor, debugstr_guid(guid), size, data);
3257 return E_NOTIMPL;
3258}
3259
3261 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL *enabled, RECT *rect)
3262{
3263 FIXME("iface %p, processor %p, enabled %p, rect %p, stub!\n", iface, processor, enabled, rect);
3264}
3265
3267 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL *yuv, D3D11_VIDEO_COLOR *color)
3268{
3269 FIXME("iface %p, processor %p, yuv %p, color %p, stub!\n", iface, processor, yuv, color);
3270}
3271
3273 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, D3D11_VIDEO_PROCESSOR_COLOR_SPACE *space)
3274{
3275 FIXME("iface %p, processor %p, space %p, stub!\n", iface, processor, space);
3276}
3277
3279 ID3D11VideoProcessor *processor, D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE *mode, UINT *stream_idx)
3280{
3281 FIXME("iface %p, processor %p, mode %p, stream_idx %p, stub!\n", iface, processor, mode, stream_idx);
3282}
3283
3285 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL *enabled, SIZE *size)
3286{
3287 FIXME("iface %p, processor %p, enabled %p, size %p, stub!\n", iface, processor, enabled, size);
3288}
3289
3291 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL *enabled)
3292{
3293 FIXME("iface %p, processor %p, enabled %p, stub!\n", iface, processor, enabled);
3294}
3295
3297 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, const GUID *guid, UINT size, void *data)
3298{
3299 FIXME("iface %p, processor %p, guid %s, size %u, data %p, stub!\n",
3300 iface, processor, debugstr_guid(guid), size, data);
3301 return E_NOTIMPL;
3302}
3303
3305 ID3D11VideoProcessor *processor, UINT stream_idx, D3D11_VIDEO_FRAME_FORMAT format)
3306{
3307 FIXME("iface %p, processor %p, stream_idx %u, format %#x, stub!\n", iface, processor, stream_idx, format);
3308}
3309
3311 ID3D11VideoProcessor *processor, UINT stream_idx, const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *space)
3312{
3313 FIXME("iface %p, processor %p, stream_idx %u, space %p, stub!\n", iface, processor, stream_idx, space);
3314}
3315
3317 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx,
3318 D3D11_VIDEO_PROCESSOR_OUTPUT_RATE rate, BOOL repeat, const DXGI_RATIONAL *custom_rate)
3319{
3320 FIXME("iface %p, processor %p, stream_idx %u, rate %#x, repeat %d, custom_rate %u/%u, stub!\n",
3321 iface, processor, stream_idx, rate, repeat, custom_rate->Numerator, custom_rate->Denominator);
3322}
3323
3325 ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable, const RECT *rect)
3326{
3327 FIXME("iface %p, processor %p, stream_idx %u, enable %d, rect %s, stub!\n",
3328 iface, processor, stream_idx, enable, wine_dbgstr_rect(rect));
3329}
3330
3332 ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable, const RECT *rect)
3333{
3334 FIXME("iface %p, processor %p, stream_idx %u, enable %d, rect %s, stub!\n",
3335 iface, processor, stream_idx, enable, wine_dbgstr_rect(rect));
3336}
3337
3339 ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable, float alpha)
3340{
3341 FIXME("iface %p, processor %p, stream_idx %u, enable %d, alpha %.8e, stub!\n",
3342 iface, processor, stream_idx, enable, alpha);
3343}
3344
3346 ID3D11VideoProcessor *processor, UINT stream_idx, UINT entry_count, const UINT *entries)
3347{
3348 FIXME("iface %p, processor %p, stream_idx %u, entry_count %u, entries %p, stub!\n",
3349 iface, processor, stream_idx, entry_count, entries);
3350}
3351
3353 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx,
3354 BOOL enable, const DXGI_RATIONAL *src_ratio, const DXGI_RATIONAL *dst_ratio)
3355{
3356 FIXME("iface %p, processor %p, stream_idx %u, enable %d, src_ratio %u/%u, dst_ratio %u/%u stub!\n",
3357 iface, processor, stream_idx, enable, src_ratio->Numerator, src_ratio->Denominator,
3358 dst_ratio->Numerator, dst_ratio->Denominator);
3359}
3360
3362 ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable, float lower, float upper)
3363{
3364 FIXME("iface %p, processor %p, stream_idx %u, enable %d, lower %.8e, upper %.8e, stub!\n",
3365 iface, processor, stream_idx, enable, lower, upper);
3366}
3367
3369 ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable, D3D11_VIDEO_PROCESSOR_STEREO_FORMAT format,
3370 BOOL left_view_frame0, BOOL base_view_frame0, D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE flip_mode, int mono_offset)
3371{
3372 FIXME("iface %p, processor %p, stream_idx %u, enable %d, format %#x,"
3373 " left_view_frame0 %d, base_view_frame0 %d, flip_mode %#x, mono_offset %d, stub!\n",
3374 iface, processor, stream_idx, enable, format, left_view_frame0, base_view_frame0, flip_mode, mono_offset);
3375}
3376
3378 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable)
3379{
3380 FIXME("iface %p, processor %p, stream_idx %u, enable %d, stub!\n", iface, processor, stream_idx, enable);
3381}
3382
3384 ID3D11VideoProcessor *processor, UINT stream_idx, D3D11_VIDEO_PROCESSOR_FILTER filter, BOOL enable, int level)
3385{
3386 FIXME("iface %p, processor %p, stream_idx %u, filter %#x, enable %d, level %d, stub!\n",
3387 iface, processor, stream_idx, filter, enable, level);
3388}
3389
3391 ID3D11VideoProcessor *processor, UINT stream_idx, const GUID *guid, UINT size, void *data)
3392{
3393 FIXME("iface %p, processor %p, stream_idx %u, guid %s, size %u, data %p, stub!\n",
3394 iface, processor, stream_idx, debugstr_guid(guid), size, data);
3395 return E_NOTIMPL;
3396}
3397
3399 ID3D11VideoProcessor *processor, UINT stream_idx, D3D11_VIDEO_FRAME_FORMAT *format)
3400{
3401 FIXME("iface %p, processor %p, stream_idx %u, format %p, stub!\n", iface, processor, stream_idx, format);
3402}
3403
3405 ID3D11VideoProcessor *processor, UINT stream_idx, D3D11_VIDEO_PROCESSOR_COLOR_SPACE *space)
3406{
3407 FIXME("iface %p, processor %p, stream_idx %u, space %p, stub!\n", iface, processor, stream_idx, space);
3408}
3409
3411 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx,
3413{
3414 FIXME("iface %p, processor %p, stream_idx %u, rate %p, repeat %p, custom_rate %p, stub!\n",
3415 iface, processor, stream_idx, rate, repeat, custom_rate);
3416}
3417
3419 ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enabled, RECT *rect)
3420{
3421 FIXME("iface %p, processor %p, stream_idx %u, enabled %p, rect %p, stub!\n",
3422 iface, processor, stream_idx, enabled, rect);
3423}
3424
3426 ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enabled, RECT *rect)
3427{
3428 FIXME("iface %p, processor %p, stream_idx %u, enabled %p, rect %p, stub!\n",
3429 iface, processor, stream_idx, enabled, rect);
3430}
3431
3433 ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enabled, float *alpha)
3434{
3435 FIXME("iface %p, processor %p, stream_idx %u, enabled %p, alpha %p, stub!\n",
3436 iface, processor, stream_idx, enabled, alpha);
3437}
3438
3440 ID3D11VideoProcessor *processor, UINT stream_idx, UINT count, UINT *entries)
3441{
3442 FIXME("iface %p, processor %p, stream_idx %u, count %u, entries %p, stub!\n",
3443 iface, processor, stream_idx, count, entries);
3444}
3445
3447 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx,
3448 BOOL *enabled, DXGI_RATIONAL *src_ratio, DXGI_RATIONAL *dst_ratio)
3449{
3450 FIXME("iface %p, processor %p, stream_idx %u, enabled %p, src_ratio %p, dst_ratio %p, stub!\n",
3451 iface, processor, stream_idx, enabled, src_ratio, dst_ratio);
3452}
3453
3455 ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enabled, float *lower, float *upper)
3456{
3457 FIXME("iface %p, processor %p, stream_idx %u, enabled %p, lower %p, upper %p, stub!\n",
3458 iface, processor, stream_idx, enabled, lower, upper);
3459}
3460
3462 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enabled,
3464 BOOL *base_view_frame0, D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE *flip_mode, int *mono_offset)
3465{
3466 FIXME("iface %p, processor %p, stream_idx %u, enabled %p, format %p, left_view_frame0 %p,"
3467 " base_view_frame0 %p flip_mode %p, mono_offset %p, stub!\n",
3468 iface, processor, stream_idx, enabled, format, left_view_frame0, base_view_frame0, flip_mode, mono_offset);
3469}
3470
3472 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enabled)
3473{
3474 FIXME("iface %p, processor %p, stream_idx %u, enabled %p, stub!\n", iface, processor, stream_idx, enabled);
3475}
3476
3478 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx,
3479 D3D11_VIDEO_PROCESSOR_FILTER filter, BOOL *enabled, int *level)
3480{
3481 FIXME("iface %p, processor %p, stream_idx %u, filter %#x, enabled %p, level %p, stub!\n",
3482 iface, processor, stream_idx, filter, enabled, level);
3483}
3484
3486 ID3D11VideoProcessor *processor, UINT stream_idx, const GUID *guid, UINT size, void *data)
3487{
3488 FIXME("iface %p, processor %p, stream_idx %u, guid %s, size %u, data %p, stub!\n",
3489 iface, processor, stream_idx, debugstr_guid(guid), size, data);
3490 return E_NOTIMPL;
3491}
3492
3494 ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, ID3D11VideoProcessorOutputView *view,
3495 UINT frame_idx, UINT stream_count, const D3D11_VIDEO_PROCESSOR_STREAM *streams)
3496{
3497 FIXME("iface %p, processor %p, view %p, frame_idx %u, stream_count %u, streams %p, stub!\n",
3498 iface, processor, view, frame_idx, stream_count, streams);
3499 return E_NOTIMPL;
3500}
3501
3503 ID3D11VideoContext *iface, ID3D11CryptoSession *session, UINT size, void *data)
3504{
3505 FIXME("iface %p, session %p, size %u, data %p, stub!\n", iface, session, size, data);
3506 return E_NOTIMPL;
3507}
3508
3510 ID3D11VideoContext *iface, ID3D11CryptoSession *session,
3511 ID3D11Texture2D *src_surface, ID3D11Texture2D *dst_surface, UINT iv_size, void *iv)
3512{
3513 FIXME("iface %p, session %p, src_surface %p, dst_surface %p, iv_size %u, iv %p, stub!\n",
3514 iface, session, src_surface, dst_surface, iv_size, iv);
3515}
3516
3517static void STDMETHODCALLTYPE d3d11_video_context_DecryptionBlt(ID3D11VideoContext *iface,
3518 ID3D11CryptoSession *session, ID3D11Texture2D *src_surface, ID3D11Texture2D *dst_surface,
3519 D3D11_ENCRYPTED_BLOCK_INFO *block_info, UINT key_size, const void *key, UINT iv_size, void *iv)
3520{
3521 FIXME("iface %p, session %p, src_surface %p, dst_surface %p, block_info %p,"
3522 " key_size %u, key %p, iv_size %u, iv %p, stub!\n",
3523 iface, session, src_surface, dst_surface, block_info, key_size, key, iv_size, iv);
3524}
3525
3527 ID3D11CryptoSession *session, UINT random_number_size, void *random_number)
3528{
3529 FIXME("iface %p, session %p, random_number_size %u, random_number %p, stub!\n",
3530 iface, session, random_number_size, random_number);
3531}
3532
3534 ID3D11VideoContext *iface, ID3D11CryptoSession *session)
3535{
3536 FIXME("iface %p, session %p, stub!\n", iface, session);
3537}
3538
3540 ID3D11VideoContext *iface, ID3D11CryptoSession *session, UINT size, void *key)
3541{
3542 FIXME("iface %p, session %p, size %u, key %p, stub!\n", iface, session, size, key);
3543 return E_NOTIMPL;
3544}
3545
3547 ID3D11VideoContext *iface, ID3D11AuthenticatedChannel *channel, UINT size, void *data)
3548{
3549 FIXME("iface %p, channel %p, size %u, data %p, stub!\n", iface, channel, size, data);
3550 return E_NOTIMPL;
3551}
3552
3554 ID3D11AuthenticatedChannel *channel, UINT input_size, const void *input, UINT output_size, void *output)
3555{
3556 FIXME("iface %p, channel %p, input_size %u, input %p, output_size %u, output %p stub!\n",
3557 iface, channel, input_size, input, output_size, output);
3558 return E_NOTIMPL;
3559}
3560
3562 ID3D11VideoContext *iface, ID3D11AuthenticatedChannel *channel,
3563 UINT input_size, const void *input, D3D11_AUTHENTICATED_CONFIGURE_OUTPUT *output)
3564{
3565 FIXME("iface %p, channel %p, input_size %u, input %p, output %p, stub!\n",
3566 iface, channel, input_size, input, output);
3567 return E_NOTIMPL;
3568}
3569
3571 ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable, D3D11_VIDEO_PROCESSOR_ROTATION rotation)
3572{
3573 FIXME("iface %p, processor %p, stream_idx %u, enable %d, rotation %#x, stub!\n",
3574 iface, processor, stream_idx, enable, rotation);
3575}
3576
3578 ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enable, D3D11_VIDEO_PROCESSOR_ROTATION *rotation)
3579{
3580 FIXME("iface %p, processor %p, stream_idx %u, enable %p, rotation %p, stub!\n",
3581 iface, processor, stream_idx, enable, rotation);
3582}
3583
3584static const ID3D11VideoContextVtbl d3d11_video_context_vtbl =
3585{
3651};
3652
3653/* ID3D11Multithread methods */
3654
3656{
3658}
3659
3661 REFIID iid, void **out)
3662{
3664
3665 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
3666
3667 return d3d11_device_context_QueryInterface(&context->ID3D11DeviceContext1_iface, iid, out);
3668}
3669
3671{
3673
3674 TRACE("iface %p.\n", iface);
3675
3676 return d3d11_device_context_AddRef(&context->ID3D11DeviceContext1_iface);
3677}
3678
3680{
3682
3683 TRACE("iface %p.\n", iface);
3684
3685 return d3d11_device_context_Release(&context->ID3D11DeviceContext1_iface);
3686}
3687
3689{
3690 TRACE("iface %p.\n", iface);
3691
3693}
3694
3696{
3697 TRACE("iface %p.\n", iface);
3698
3700}
3701
3704{
3705 FIXME("iface %p, enable %#x stub!\n", iface, enable);
3706
3707 return TRUE;
3708}
3709
3711{
3712 FIXME("iface %p stub!\n", iface);
3713
3714 return TRUE;
3715}
3716
3717static const struct ID3D11MultithreadVtbl d3d11_multithread_vtbl =
3718{
3726};
3727
3728/* ID3DUserDefinedAnnotation methods */
3729
3731{
3733}
3734
3736 REFIID iid, void **out)
3737{
3739
3740 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
3741
3742 return d3d11_device_context_QueryInterface(&context->ID3D11DeviceContext1_iface, iid, out);
3743}
3744
3746{
3748
3749 TRACE("iface %p.\n", iface);
3750
3751 return d3d11_device_context_AddRef(&context->ID3D11DeviceContext1_iface);
3752}
3753
3755{
3757
3758 TRACE("iface %p.\n", iface);
3759
3760 return d3d11_device_context_Release(&context->ID3D11DeviceContext1_iface);
3761}
3762
3764 const WCHAR *name)
3765{
3766 TRACE("iface %p, name %s.\n", iface, debugstr_w(name));
3767
3768 return -1;
3769}
3770
3772{
3773 TRACE("iface %p.\n", iface);
3774
3775 return -1;
3776}
3777
3779 const WCHAR *name)
3780{
3781 TRACE("iface %p, name %s.\n", iface, debugstr_w(name));
3782}
3783
3785{
3786 TRACE("iface %p.\n", iface);
3787
3788 return FALSE;
3789}
3790
3791static const struct ID3DUserDefinedAnnotationVtbl d3d11_user_defined_annotation_vtbl =
3792{
3800};
3801
3804{
3805 context->ID3D11DeviceContext1_iface.lpVtbl = &d3d11_device_context_vtbl;
3806 context->ID3D11Multithread_iface.lpVtbl = &d3d11_multithread_vtbl;
3807 context->ID3D11VideoContext_iface.lpVtbl = &d3d11_video_context_vtbl;
3808 context->ID3DUserDefinedAnnotation_iface.lpVtbl = &d3d11_user_defined_annotation_vtbl;
3809 context->refcount = 1;
3810 context->type = type;
3811
3812 context->device = device;
3813 ID3D11Device2_AddRef(&device->ID3D11Device2_iface);
3814
3815 wined3d_private_store_init(&context->private_store);
3816}
3817
3818/* ID3D11Device methods */
3819
3821{
3822 struct d3d_device *device = impl_from_ID3D11Device2(iface);
3823 return IUnknown_QueryInterface(device->outer_unk, iid, out);
3824}
3825
3827{
3828 struct d3d_device *device = impl_from_ID3D11Device2(iface);
3829 return IUnknown_AddRef(device->outer_unk);
3830}
3831
3833{
3834 struct d3d_device *device = impl_from_ID3D11Device2(iface);
3835 return IUnknown_Release(device->outer_unk);
3836}
3837
3839 const D3D11_SUBRESOURCE_DATA *data, ID3D11Buffer **buffer)
3840{
3841 struct d3d_device *device = impl_from_ID3D11Device2(iface);
3842 struct d3d_buffer *object;
3843 HRESULT hr;
3844
3845 TRACE("iface %p, desc %p, data %p, buffer %p.\n", iface, desc, data, buffer);
3846
3847 if (FAILED(hr = d3d_buffer_create(device, desc, data, &object)))
3848 return hr;
3849
3850 *buffer = &object->ID3D11Buffer_iface;
3851
3852 return S_OK;
3853}
3854
3856 const D3D11_TEXTURE1D_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, ID3D11Texture1D **texture)
3857{
3858 struct d3d_device *device = impl_from_ID3D11Device2(iface);
3859 struct d3d_texture1d *object;
3860 HRESULT hr;
3861
3862 TRACE("iface %p, desc %p, data %p, texture %p.\n", iface, desc, data, texture);
3863
3864 if (FAILED(hr = d3d_texture1d_create(device, desc, data, &object)))
3865 return hr;
3866
3867 *texture = &object->ID3D11Texture1D_iface;
3868
3869 return S_OK;
3870}
3871
3873 const D3D11_TEXTURE2D_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, ID3D11Texture2D **texture)
3874{
3875 struct d3d_device *device = impl_from_ID3D11Device2(iface);
3876 struct d3d_texture2d *object;
3877 HRESULT hr;
3878
3879 TRACE("iface %p, desc %p, data %p, texture %p.\n", iface, desc, data, texture);
3880
3881 if (FAILED(hr = d3d_texture2d_create(device, desc, NULL, data, &object)))
3882 return hr;
3883
3884 *texture = &object->ID3D11Texture2D_iface;
3885
3886 return S_OK;
3887}
3888
3890 const D3D11_TEXTURE3D_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, ID3D11Texture3D **texture)
3891{
3892 struct d3d_device *device = impl_from_ID3D11Device2(iface);
3893 struct d3d_texture3d *object;
3894 HRESULT hr;
3895
3896 TRACE("iface %p, desc %p, data %p, texture %p.\n", iface, desc, data, texture);
3897
3898 if (FAILED(hr = d3d_texture3d_create(device, desc, data, &object)))
3899 return hr;
3900
3901 *texture = &object->ID3D11Texture3D_iface;
3902
3903 return S_OK;
3904}
3905
3907 ID3D11Resource *resource, const D3D11_SHADER_RESOURCE_VIEW_DESC *desc, ID3D11ShaderResourceView **view)
3908{
3909 struct d3d_device *device = impl_from_ID3D11Device2(iface);
3911 HRESULT hr;
3912
3913 TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
3914
3915 *view = NULL;
3916
3917 if (!resource)
3918 return E_INVALIDARG;
3919
3921 return hr;
3922
3923 *view = &object->ID3D11ShaderResourceView_iface;
3924
3925 return S_OK;
3926}
3927
3929 ID3D11Resource *resource, const D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, ID3D11UnorderedAccessView **view)
3930{
3931 struct d3d_device *device = impl_from_ID3D11Device2(iface);
3933 HRESULT hr;
3934
3935 TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
3936
3937 *view = NULL;
3938
3940 return hr;
3941
3942 *view = &object->ID3D11UnorderedAccessView_iface;
3943
3944 return S_OK;
3945}
3946
3948 ID3D11Resource *resource, const D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3D11RenderTargetView **view)
3949{
3950 struct d3d_device *device = impl_from_ID3D11Device2(iface);
3952 HRESULT hr;
3953
3954 TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
3955
3956 *view = NULL;
3957
3958 if (!resource)
3959 return E_INVALIDARG;
3960
3962 return hr;
3963
3964 *view = &object->ID3D11RenderTargetView_iface;
3965
3966 return S_OK;
3967}
3968
3970 ID3D11Resource *resource, const D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3D11DepthStencilView **view)
3971{
3972 struct d3d_device *device = impl_from_ID3D11Device2(iface);
3974 HRESULT hr;
3975
3976 TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
3977
3978 *view = NULL;
3979
3981 return hr;
3982
3983 *view = &object->ID3D11DepthStencilView_iface;
3984
3985 return S_OK;
3986}
3987
3989 const D3D11_INPUT_ELEMENT_DESC *element_descs, UINT element_count, const void *shader_byte_code,
3990 SIZE_T shader_byte_code_length, ID3D11InputLayout **input_layout)
3991{
3992 struct d3d_device *device = impl_from_ID3D11Device2(iface);
3993 struct d3d_input_layout *object;
3994 HRESULT hr;
3995
3996 TRACE("iface %p, element_descs %p, element_count %u, shader_byte_code %p, shader_byte_code_length %Iu, "
3997 "input_layout %p.\n", iface, element_descs, element_count, shader_byte_code,
3998 shader_byte_code_length, input_layout);
3999
4001 shader_byte_code, shader_byte_code_length, &object)))
4002 return hr;
4003
4004 *input_layout = &object->ID3D11InputLayout_iface;
4005
4006 return S_OK;
4007}
4008
4010 SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11VertexShader **shader)
4011{
4012 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4013 struct d3d_vertex_shader *object;
4014 HRESULT hr;
4015
4016 TRACE("iface %p, byte_code %p, byte_code_length %Iu, class_linkage %p, shader %p.\n",
4017 iface, byte_code, byte_code_length, class_linkage, shader);
4018
4019 *shader = NULL;
4020
4021 if (class_linkage)
4022 FIXME("Class linkage is not implemented yet.\n");
4023
4024 if (FAILED(hr = d3d_vertex_shader_create(device, byte_code, byte_code_length, &object)))
4025 return hr;
4026
4027 *shader = &object->ID3D11VertexShader_iface;
4028
4029 return S_OK;
4030}
4031
4033 SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11GeometryShader **shader)
4034{
4035 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4037 HRESULT hr;
4038
4039 TRACE("iface %p, byte_code %p, byte_code_length %Iu, class_linkage %p, shader %p.\n",
4040 iface, byte_code, byte_code_length, class_linkage, shader);
4041
4042 *shader = NULL;
4043
4044 if (class_linkage)
4045 FIXME("Class linkage is not implemented yet.\n");
4046
4047 if (FAILED(hr = d3d_geometry_shader_create(device, byte_code, byte_code_length,
4048 NULL, 0, NULL, 0, 0, &object)))
4049 return hr;
4050
4051 *shader = &object->ID3D11GeometryShader_iface;
4052
4053 return S_OK;
4054}
4055
4057 const void *byte_code, SIZE_T byte_code_length, const D3D11_SO_DECLARATION_ENTRY *so_entries,
4058 UINT entry_count, const UINT *buffer_strides, UINT strides_count, UINT rasterizer_stream,
4059 ID3D11ClassLinkage *class_linkage, ID3D11GeometryShader **shader)
4060{
4061 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4063 HRESULT hr;
4064
4065 TRACE("iface %p, byte_code %p, byte_code_length %Iu, so_entries %p, entry_count %u, "
4066 "buffer_strides %p, strides_count %u, rasterizer_stream %u, class_linkage %p, shader %p.\n",
4067 iface, byte_code, byte_code_length, so_entries, entry_count, buffer_strides, strides_count,
4068 rasterizer_stream, class_linkage, shader);
4069
4070 *shader = NULL;
4071
4072 if (class_linkage)
4073 FIXME("Class linkage is not implemented yet.\n");
4074
4075 if (FAILED(hr = d3d_geometry_shader_create(device, byte_code, byte_code_length,
4076 so_entries, entry_count, buffer_strides, strides_count, rasterizer_stream, &object)))
4077 {
4078 return hr;
4079 }
4080
4081 *shader = &object->ID3D11GeometryShader_iface;
4082
4083 return hr;
4084}
4085
4087 SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11PixelShader **shader)
4088{
4089 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4090 struct d3d_pixel_shader *object;
4091 HRESULT hr;
4092
4093 TRACE("iface %p, byte_code %p, byte_code_length %Iu, class_linkage %p, shader %p.\n",
4094 iface, byte_code, byte_code_length, class_linkage, shader);
4095
4096 *shader = NULL;
4097
4098 if (class_linkage)
4099 FIXME("Class linkage is not implemented yet.\n");
4100
4101 if (FAILED(hr = d3d_pixel_shader_create(device, byte_code, byte_code_length, &object)))
4102 return hr;
4103
4104 *shader = &object->ID3D11PixelShader_iface;
4105
4106 return S_OK;
4107}
4108
4110 SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11HullShader **shader)
4111{
4112 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4113 struct d3d11_hull_shader *object;
4114 HRESULT hr;
4115
4116 TRACE("iface %p, byte_code %p, byte_code_length %Iu, class_linkage %p, shader %p.\n",
4117 iface, byte_code, byte_code_length, class_linkage, shader);
4118
4119 *shader = NULL;
4120
4121 if (class_linkage)
4122 FIXME("Class linkage is not implemented yet.\n");
4123
4124 if (FAILED(hr = d3d11_hull_shader_create(device, byte_code, byte_code_length, &object)))
4125 return hr;
4126
4127 *shader = &object->ID3D11HullShader_iface;
4128
4129 return S_OK;
4130}
4131
4133 SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11DomainShader **shader)
4134{
4135 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4137 HRESULT hr;
4138
4139 TRACE("iface %p, byte_code %p, byte_code_length %Iu, class_linkage %p, shader %p.\n",
4140 iface, byte_code, byte_code_length, class_linkage, shader);
4141
4142 *shader = NULL;
4143
4144 if (class_linkage)
4145 FIXME("Class linkage is not implemented yet.\n");
4146
4147 if (FAILED(hr = d3d11_domain_shader_create(device, byte_code, byte_code_length, &object)))
4148 return hr;
4149
4150 *shader = &object->ID3D11DomainShader_iface;
4151
4152 return S_OK;
4153}
4154
4156 SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11ComputeShader **shader)
4157{
4158 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4160 HRESULT hr;
4161
4162 TRACE("iface %p, byte_code %p, byte_code_length %Iu, class_linkage %p, shader %p.\n",
4163 iface, byte_code, byte_code_length, class_linkage, shader);
4164
4165 *shader = NULL;
4166
4167 if (class_linkage)
4168 FIXME("Class linkage is not implemented yet.\n");
4169
4170 if (FAILED(hr = d3d11_compute_shader_create(device, byte_code, byte_code_length, &object)))
4171 return hr;
4172
4173 *shader = &object->ID3D11ComputeShader_iface;
4174
4175 return S_OK;
4176}
4177
4179 ID3D11ClassLinkage **class_linkage)
4180{
4181 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4183 HRESULT hr;
4184
4185 TRACE("iface %p, class_linkage %p.\n", iface, class_linkage);
4186
4187 if (FAILED(hr = d3d11_class_linkage_create(device, &object)))
4188 return hr;
4189
4190 *class_linkage = &object->ID3D11ClassLinkage_iface;
4191
4192 return S_OK;
4193}
4194
4197{
4198 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4199 struct d3d_blend_state *object;
4200 HRESULT hr;
4201
4202 TRACE("iface %p, desc %p, state %p.\n", iface, desc, state);
4203
4204 if (FAILED(hr = d3d_blend_state_create(device, desc, &object)))
4205 return hr;
4206
4207 *state = &object->ID3D11BlendState1_iface;
4208
4209 return S_OK;
4210}
4211
4213 const D3D11_BLEND_DESC *desc, ID3D11BlendState **blend_state)
4214{
4215 D3D11_BLEND_DESC1 d3d11_1_desc;
4216 unsigned int i;
4217
4218 TRACE("iface %p, desc %p, blend_state %p.\n", iface, desc, blend_state);
4219
4220 if (!desc)
4221 return E_INVALIDARG;
4222
4223 d3d11_1_desc.AlphaToCoverageEnable = desc->AlphaToCoverageEnable;
4224 d3d11_1_desc.IndependentBlendEnable = desc->IndependentBlendEnable;
4226 {
4227 d3d11_1_desc.RenderTarget[i].BlendEnable = desc->RenderTarget[i].BlendEnable;
4228 d3d11_1_desc.RenderTarget[i].LogicOpEnable = FALSE;
4229 d3d11_1_desc.RenderTarget[i].SrcBlend = desc->RenderTarget[i].SrcBlend;
4230 d3d11_1_desc.RenderTarget[i].DestBlend = desc->RenderTarget[i].DestBlend;
4231 d3d11_1_desc.RenderTarget[i].BlendOp = desc->RenderTarget[i].BlendOp;
4232 d3d11_1_desc.RenderTarget[i].SrcBlendAlpha = desc->RenderTarget[i].SrcBlendAlpha;
4233 d3d11_1_desc.RenderTarget[i].DestBlendAlpha = desc->RenderTarget[i].DestBlendAlpha;
4234 d3d11_1_desc.RenderTarget[i].BlendOpAlpha = desc->RenderTarget[i].BlendOpAlpha;
4235 d3d11_1_desc.RenderTarget[i].LogicOp = D3D11_LOGIC_OP_COPY;
4236 d3d11_1_desc.RenderTarget[i].RenderTargetWriteMask = desc->RenderTarget[i].RenderTargetWriteMask;
4237 }
4238
4239 return d3d11_device_CreateBlendState1(iface, &d3d11_1_desc, (ID3D11BlendState1 **)blend_state);
4240}
4241
4243 const D3D11_DEPTH_STENCIL_DESC *desc, ID3D11DepthStencilState **depth_stencil_state)
4244{
4245 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4247 HRESULT hr;
4248
4249 TRACE("iface %p, desc %p, depth_stencil_state %p.\n", iface, desc, depth_stencil_state);
4250
4252 return hr;
4253
4254 *depth_stencil_state = &object->ID3D11DepthStencilState_iface;
4255
4256 return S_OK;
4257}
4258
4260 const D3D11_RASTERIZER_DESC *desc, ID3D11RasterizerState **rasterizer_state)
4261{
4262 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4265 HRESULT hr;
4266
4267 TRACE("iface %p, desc %p, rasterizer_state %p.\n", iface, desc, rasterizer_state);
4268
4269 if (!desc)
4270 return E_INVALIDARG;
4271
4272 memcpy(&desc1, desc, sizeof(*desc));
4273 desc1.ForcedSampleCount = 0;
4274
4275 if (FAILED(hr = d3d_rasterizer_state_create(device, &desc1, &object)))
4276 return hr;
4277
4278 *rasterizer_state = (ID3D11RasterizerState *)&object->ID3D11RasterizerState1_iface;
4279
4280 return S_OK;
4281}
4282
4284 const D3D11_SAMPLER_DESC *desc, ID3D11SamplerState **sampler_state)
4285{
4286 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4287 struct d3d_sampler_state *object;
4288 HRESULT hr;
4289
4290 TRACE("iface %p, desc %p, sampler_state %p.\n", iface, desc, sampler_state);
4291
4292 if (FAILED(hr = d3d_sampler_state_create(device, desc, &object)))
4293 return hr;
4294
4295 *sampler_state = &object->ID3D11SamplerState_iface;
4296
4297 return S_OK;
4298}
4299
4301 const D3D11_QUERY_DESC *desc, ID3D11Query **query)
4302{
4303 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4304 struct d3d_query *object;
4305 HRESULT hr;
4306
4307 TRACE("iface %p, desc %p, query %p.\n", iface, desc, query);
4308
4309 if (FAILED(hr = d3d_query_create(device, desc, FALSE, &object)))
4310 return hr;
4311
4312 if (query)
4313 {
4314 *query = &object->ID3D11Query_iface;
4315 return S_OK;
4316 }
4317
4318 ID3D11Query_Release(&object->ID3D11Query_iface);
4319 return S_FALSE;
4320}
4321
4323 ID3D11Predicate **predicate)
4324{
4325 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4326 struct d3d_query *object;
4327 HRESULT hr;
4328
4329 TRACE("iface %p, desc %p, predicate %p.\n", iface, desc, predicate);
4330
4331 if (FAILED(hr = d3d_query_create(device, desc, TRUE, &object)))
4332 return hr;
4333
4334 if (predicate)
4335 {
4336 *predicate = (ID3D11Predicate *)&object->ID3D11Query_iface;
4337 return S_OK;
4338 }
4339
4340 ID3D11Query_Release(&object->ID3D11Query_iface);
4341 return S_FALSE;
4342}
4343
4345 ID3D11Counter **counter)
4346{
4347 FIXME("iface %p, desc %p, counter %p stub!\n", iface, desc, counter);
4348
4349 return E_NOTIMPL;
4350}
4351
4354{
4356 HRESULT hr;
4357
4358 if (flags)
4359 FIXME("Ignoring flags %#x.\n", flags);
4360
4361 if (!(object = calloc(1, sizeof(*object))))
4362 return E_OUTOFMEMORY;
4364
4365 if (FAILED(hr = wined3d_deferred_context_create(device->wined3d_device, &object->wined3d_context)))
4366 {
4367 WARN("Failed to create wined3d deferred context, hr %#lx.\n", hr);
4368 free(object);
4369 return hr;
4370 }
4371
4372 TRACE("Created deferred context %p.\n", object);
4373 *context = object;
4374
4375 return S_OK;
4376}
4377
4379 ID3D11DeviceContext **context)
4380{
4381 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4383 HRESULT hr;
4384
4385 TRACE("iface %p, flags %#x, context %p.\n", iface, flags, context);
4386
4388 return hr;
4389
4390 *context = (ID3D11DeviceContext *)&object->ID3D11DeviceContext1_iface;
4391 return S_OK;
4392}
4393
4395 void **out)
4396{
4397 FIXME("iface %p, resource %p, iid %s, out %p stub!\n", iface, resource, debugstr_guid(iid), out);
4398
4399 return E_NOTIMPL;
4400}
4401
4403 UINT *format_support)
4404{
4405 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4409 D3D_FEATURE_LEVEL feature_level;
4410 struct wined3d *wined3d;
4411 unsigned int i;
4412
4413 static const struct
4414 {
4415 enum wined3d_resource_type rtype;
4416 unsigned int bind_flags;
4417 unsigned int usage;
4418 D3D11_FORMAT_SUPPORT flag;
4419 }
4420 flag_mapping[] =
4421 {
4422 {WINED3D_RTYPE_BUFFER, WINED3D_BIND_SHADER_RESOURCE, 0, D3D11_FORMAT_SUPPORT_BUFFER},
4423 {WINED3D_RTYPE_BUFFER, WINED3D_BIND_VERTEX_BUFFER, 0, D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER},
4424 {WINED3D_RTYPE_BUFFER, WINED3D_BIND_INDEX_BUFFER, 0, D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER},
4425 {WINED3D_RTYPE_TEXTURE_1D, WINED3D_BIND_SHADER_RESOURCE, 0, D3D11_FORMAT_SUPPORT_TEXTURE1D},
4426 {WINED3D_RTYPE_TEXTURE_2D, WINED3D_BIND_SHADER_RESOURCE, 0, D3D11_FORMAT_SUPPORT_TEXTURE2D},
4427 {WINED3D_RTYPE_TEXTURE_3D, WINED3D_BIND_SHADER_RESOURCE, 0, D3D11_FORMAT_SUPPORT_TEXTURE3D},
4428 {WINED3D_RTYPE_NONE, WINED3D_BIND_RENDER_TARGET, 0, D3D11_FORMAT_SUPPORT_RENDER_TARGET},
4429 {WINED3D_RTYPE_NONE, WINED3D_BIND_DEPTH_STENCIL, 0, D3D11_FORMAT_SUPPORT_DEPTH_STENCIL},
4430 {WINED3D_RTYPE_NONE, WINED3D_BIND_UNORDERED_ACCESS, 0, D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW},
4434 };
4435 HRESULT hr;
4436
4437 FIXME("iface %p, format %u, format_support %p partial-stub!\n", iface, format, format_support);
4438
4440 if (format && !wined3d_format)
4441 {
4442 WARN("Invalid format %#x.\n", format);
4443 *format_support = 0;
4444 return E_FAIL;
4445 }
4446
4447 *format_support = 0;
4448
4450 feature_level = device->state->feature_level;
4451 wined3d = wined3d_device_get_wined3d(device->wined3d_device);
4454 for (i = 0; i < ARRAY_SIZE(flag_mapping); ++i)
4455 {
4457 WINED3DFMT_UNKNOWN, flag_mapping[i].usage, flag_mapping[i].bind_flags, flag_mapping[i].rtype, wined3d_format);
4459 continue;
4460 if (hr != WINED3D_OK)
4461 {
4462 WARN("Failed to check device format support, hr %#lx.\n", hr);
4464 return E_FAIL;
4465 }
4466
4467 *format_support |= flag_mapping[i].flag;
4468 }
4470
4471 if (feature_level < D3D_FEATURE_LEVEL_10_0)
4472 *format_support &= ~D3D11_FORMAT_SUPPORT_BUFFER;
4473
4474 if (*format_support & (D3D11_FORMAT_SUPPORT_TEXTURE1D
4475 | D3D11_FORMAT_SUPPORT_TEXTURE2D | D3D11_FORMAT_SUPPORT_TEXTURE3D))
4476 {
4477 *format_support |= D3D11_FORMAT_SUPPORT_SHADER_LOAD;
4478 *format_support |= D3D11_FORMAT_SUPPORT_SHADER_SAMPLE;
4479 *format_support |= D3D11_FORMAT_SUPPORT_TEXTURECUBE;
4480
4481 if (feature_level >= D3D_FEATURE_LEVEL_10_1)
4482 *format_support |= D3D11_FORMAT_SUPPORT_SHADER_GATHER;
4483
4484 if (*format_support & D3D11_FORMAT_SUPPORT_DEPTH_STENCIL)
4485 {
4486 if (feature_level >= D3D_FEATURE_LEVEL_10_0)
4487 *format_support |= D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON;
4488
4489 if (feature_level >= D3D_FEATURE_LEVEL_10_1)
4490 *format_support |= D3D11_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON;
4491 }
4492 }
4493
4494 /* d3d11 requires 4 and 8 sample counts support for formats reported to
4495 * support multisample. */
4500 {
4501 *format_support |= D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE
4502 | D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET
4503 | D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD;
4504 }
4505
4506 return *format_support ? S_OK : E_FAIL;
4507}
4508
4510 DXGI_FORMAT format, UINT sample_count, UINT *quality_level_count)
4511{
4512 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4515 struct wined3d *wined3d;
4516 HRESULT hr;
4517
4518 TRACE("iface %p, format %s, sample_count %u, quality_level_count %p.\n",
4519 iface, debug_dxgi_format(format), sample_count, quality_level_count);
4520
4521 if (!quality_level_count)
4522 return E_INVALIDARG;
4523
4524 *quality_level_count = 0;
4525
4526 if (!sample_count)
4527 return E_FAIL;
4528 if (sample_count == 1)
4529 {
4530 *quality_level_count = 1;
4531 return S_OK;
4532 }
4533 if (sample_count > D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT)
4534 return E_FAIL;
4535
4537 wined3d = wined3d_device_get_wined3d(device->wined3d_device);
4541 wined3dformat_from_dxgi_format(format), TRUE, sample_count, quality_level_count);
4543
4545 return E_INVALIDARG;
4547 return S_OK;
4548 return hr;
4549}
4550
4552{
4553 FIXME("iface %p, info %p stub!\n", iface, info);
4554}
4555
4557 D3D11_COUNTER_TYPE *type, UINT *active_counter_count, char *name, UINT *name_length,
4558 char *units, UINT *units_length, char *description, UINT *description_length)
4559{
4560 FIXME("iface %p, desc %p, type %p, active_counter_count %p, name %p, name_length %p, "
4561 "units %p, units_length %p, description %p, description_length %p stub!\n",
4562 iface, desc, type, active_counter_count, name, name_length,
4563 units, units_length, description, description_length);
4564
4565 return E_NOTIMPL;
4566}
4567
4569 void *feature_support_data, UINT feature_support_data_size)
4570{
4571 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4573 HRESULT hr;
4574
4575 TRACE("iface %p, feature %u, feature_support_data %p, feature_support_data_size %u.\n",
4576 iface, feature, feature_support_data, feature_support_data_size);
4577
4578 switch (feature)
4579 {
4581 {
4582 D3D11_FEATURE_DATA_THREADING *threading_data = feature_support_data;
4583 if (feature_support_data_size != sizeof(*threading_data))
4584 {
4585 WARN("Invalid data size.\n");
4586 return E_INVALIDARG;
4587 }
4588
4589 /* We lie about the threading support to make Tomb Raider 2013 and
4590 * Deus Ex: Human Revolution happy. */
4591 FIXME("Returning fake threading support data.\n");
4592 threading_data->DriverConcurrentCreates = TRUE;
4593 threading_data->DriverCommandLists = TRUE;
4594 return S_OK;
4595 }
4596
4598 {
4599 D3D11_FEATURE_DATA_DOUBLES *doubles_data = feature_support_data;
4600 if (feature_support_data_size != sizeof(*doubles_data))
4601 {
4602 WARN("Invalid data size.\n");
4603 return E_INVALIDARG;
4604 }
4605
4609 if (FAILED(hr))
4610 {
4611 WARN("Failed to get device caps, hr %#lx.\n", hr);
4612 return hr;
4613 }
4614
4616 return S_OK;
4617 }
4618
4620 {
4621 D3D11_FEATURE_DATA_D3D9_OPTIONS *options = feature_support_data;
4622 if (feature_support_data_size != sizeof(*options))
4623 {
4624 WARN("Invalid data size.\n");
4625 return E_INVALIDARG;
4626 }
4627
4631 if (FAILED(hr))
4632 {
4633 WARN("Failed to get device caps, hr %#lx.\n", hr);
4634 return hr;
4635 }
4636
4637 options->FullNonPow2TextureSupport = !(wined3d_caps.TextureCaps & WINED3DPTEXTURECAPS_POW2);
4638 return S_OK;
4639 }
4640
4642 {
4644 if (feature_support_data_size != sizeof(*options))
4645 {
4646 WARN("Invalid data size.\n");
4647 return E_INVALIDARG;
4648 }
4649
4653 if (FAILED(hr))
4654 {
4655 WARN("Failed to get device caps, hr %#lx.\n", hr);
4656 return hr;
4657 }
4658
4659 options->ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x
4661 return S_OK;
4662 }
4663
4665 {
4666 D3D11_FEATURE_DATA_D3D11_OPTIONS *options = feature_support_data;
4667 if (feature_support_data_size != sizeof(*options))
4668 {
4669 WARN("Invalid data size.\n");
4670 return E_INVALIDARG;
4671 }
4672
4673 FIXME("Returning fake Options support data.\n");
4674 options->OutputMergerLogicOp = FALSE;
4675 options->UAVOnlyRenderingForcedSampleCount = FALSE;
4676 options->DiscardAPIsSeenByDriver = FALSE;
4677 options->FlagsForUpdateAndCopySeenByDriver = FALSE;
4678 options->ClearView = FALSE;
4679 options->CopyWithOverlap = FALSE;
4680 options->ConstantBufferPartialUpdate = TRUE;
4681 options->ConstantBufferOffsetting = TRUE;
4682 options->MapNoOverwriteOnDynamicConstantBuffer = TRUE;
4683 options->MapNoOverwriteOnDynamicBufferSRV = TRUE;
4684 options->MultisampleRTVWithForcedSampleCountOne = FALSE;
4685 options->SAD4ShaderInstructions = FALSE;
4686 options->ExtendedDoublesShaderInstructions = FALSE;
4687 options->ExtendedResourceSharing = FALSE;
4688 return S_OK;
4689 }
4690
4692 {
4693 D3D11_FEATURE_DATA_D3D11_OPTIONS1 *options = feature_support_data;
4694 if (feature_support_data_size != sizeof(*options))
4695 {
4696 WARN("Invalid data size.\n");
4697 return E_INVALIDARG;
4698 }
4699
4700 FIXME("Returning fake Options1 support data.\n");
4701 options->TiledResourcesTier = D3D11_TILED_RESOURCES_NOT_SUPPORTED;
4702 options->MinMaxFiltering = FALSE;
4703 options->ClearViewAlsoSupportsDepthOnlyFormats = FALSE;
4704 options->MapOnDefaultBuffers = FALSE;
4705 return S_OK;
4706 }
4707
4709 {
4710 D3D11_FEATURE_DATA_D3D11_OPTIONS2 *options = feature_support_data;
4711 if (feature_support_data_size != sizeof(*options))
4712 {
4713 WARN("Invalid data size.\n");
4714 return E_INVALIDARG;
4715 }
4716
4720 if (FAILED(hr))
4721 {
4722 WARN("Failed to get device caps, hr %#lx.\n", hr);
4723 return hr;
4724 }
4725
4726 options->PSSpecifiedStencilRefSupported = wined3d_caps.stencil_export;
4727 options->TypedUAVLoadAdditionalFormats = FALSE;
4728 options->ROVsSupported = FALSE;
4729 options->ConservativeRasterizationTier = D3D11_CONSERVATIVE_RASTERIZATION_NOT_SUPPORTED;
4730 options->TiledResourcesTier = D3D11_TILED_RESOURCES_NOT_SUPPORTED;
4731 options->MapOnDefaultTextures = FALSE;
4732 options->StandardSwizzle = FALSE;
4733 options->UnifiedMemoryArchitecture = FALSE;
4734 return S_OK;
4735 }
4736
4738 {
4739 D3D11_FEATURE_DATA_D3D11_OPTIONS3 *options = feature_support_data;
4740 if (feature_support_data_size != sizeof(*options))
4741 {
4742 WARN("Invalid data size.\n");
4743 return E_INVALIDARG;
4744 }
4745
4749 if (FAILED(hr))
4750 {
4751 WARN("Failed to get device caps, hr %#lx.\n", hr);
4752 return hr;
4753 }
4754
4755 options->VPAndRTArrayIndexFromAnyShaderFeedingRasterizer
4757 return S_OK;
4758 }
4759
4761 {
4762 D3D11_FEATURE_DATA_ARCHITECTURE_INFO *options = feature_support_data;
4763 if (feature_support_data_size != sizeof(*options))
4764 {
4765 WARN("Invalid data size.\n");
4766 return E_INVALIDARG;
4767 }
4768
4769 FIXME("Returning fake data architecture info.\n");
4770 options->TileBasedDeferredRenderer = FALSE;
4771 return S_OK;
4772 }
4773
4775 {
4776 D3D11_FEATURE_DATA_FORMAT_SUPPORT *data = feature_support_data;
4777 if (feature_support_data_size != sizeof(*data))
4778 {
4779 WARN("Invalid size %u for D3D11_FEATURE_FORMAT_SUPPORT.\n", feature_support_data_size);
4780 return E_INVALIDARG;
4781 }
4782
4783 return d3d11_device_CheckFormatSupport(iface, data->InFormat, &data->OutFormatSupport);
4784 }
4785
4786 default:
4787 FIXME("Unhandled feature %#x.\n", feature);
4788 return E_NOTIMPL;
4789 }
4790}
4791
4793 UINT *data_size, void *data)
4794{
4795 IDXGIDevice *dxgi_device;
4796 HRESULT hr;
4797
4798 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
4799
4800 if (FAILED(hr = ID3D11Device2_QueryInterface(iface, &IID_IDXGIDevice, (void **)&dxgi_device)))
4801 return hr;
4802 hr = IDXGIDevice_GetPrivateData(dxgi_device, guid, data_size, data);
4803 IDXGIDevice_Release(dxgi_device);
4804
4805 return hr;
4806}
4807
4809 UINT data_size, const void *data)
4810{
4811 IDXGIDevice *dxgi_device;
4812 HRESULT hr;
4813
4814 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
4815
4816 if (FAILED(hr = ID3D11Device2_QueryInterface(iface, &IID_IDXGIDevice, (void **)&dxgi_device)))
4817 return hr;
4818 hr = IDXGIDevice_SetPrivateData(dxgi_device, guid, data_size, data);
4819 IDXGIDevice_Release(dxgi_device);
4820
4821 return hr;
4822}
4823
4825 const IUnknown *data)
4826{
4827 IDXGIDevice *dxgi_device;
4828 HRESULT hr;
4829
4830 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
4831
4832 if (FAILED(hr = ID3D11Device2_QueryInterface(iface, &IID_IDXGIDevice, (void **)&dxgi_device)))
4833 return hr;
4834 hr = IDXGIDevice_SetPrivateDataInterface(dxgi_device, guid, data);
4835 IDXGIDevice_Release(dxgi_device);
4836
4837 return hr;
4838}
4839
4841{
4842 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4843
4844 TRACE("iface %p.\n", iface);
4845
4846 return device->state->feature_level;
4847}
4848
4850{
4851 FIXME("iface %p stub!\n", iface);
4852
4853 return 0;
4854}
4855
4857{
4858 WARN("iface %p stub!\n", iface);
4859
4860 return S_OK;
4861}
4862
4864 ID3D11DeviceContext **immediate_context)
4865{
4866 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4867
4868 TRACE("iface %p, immediate_context %p.\n", iface, immediate_context);
4869
4870 *immediate_context = (ID3D11DeviceContext *)&device->immediate_context.ID3D11DeviceContext1_iface;
4871 ID3D11DeviceContext_AddRef(*immediate_context);
4872}
4873
4875{
4876 FIXME("iface %p, flags %#x stub!\n", iface, flags);
4877
4878 return E_NOTIMPL;
4879}
4880
4882{
4883 FIXME("iface %p stub!\n", iface);
4884
4885 return 0;
4886}
4887
4890{
4891 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4892
4893 TRACE("iface %p, immediate_context %p.\n", iface, immediate_context);
4894
4895 *immediate_context = &device->immediate_context.ID3D11DeviceContext1_iface;
4896 ID3D11DeviceContext1_AddRef(*immediate_context);
4897}
4898
4901{
4902 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4904 HRESULT hr;
4905
4906 TRACE("iface %p, flags %#x, context %p.\n", iface, flags, context);
4907
4909 return hr;
4910
4911 *context = &object->ID3D11DeviceContext1_iface;
4912 return S_OK;
4913}
4914
4917{
4918 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4920 HRESULT hr;
4921
4922 TRACE("iface %p, desc %p, state %p.\n", iface, desc, state);
4923
4924 if (!desc)
4925 return E_INVALIDARG;
4926
4928 return hr;
4929
4930 *state = &object->ID3D11RasterizerState1_iface;
4931
4932 return S_OK;
4933}
4934
4936 const D3D_FEATURE_LEVEL *feature_levels, UINT feature_level_count, UINT sdk_version,
4937 REFIID emulated_interface, D3D_FEATURE_LEVEL *chosen_feature_level, ID3DDeviceContextState **state)
4938{
4939 struct d3d_device *device = impl_from_ID3D11Device2(iface);
4940 struct d3d_device_context_state *state_impl;
4944
4945 TRACE("iface %p, flags %#x, feature_levels %p, feature_level_count %u, "
4946 "sdk_version %u, emulated_interface %s, chosen_feature_level %p, state %p.\n",
4947 iface, flags, feature_levels, feature_level_count,
4948 sdk_version, debugstr_guid(emulated_interface), chosen_feature_level, state);
4949
4950 if (flags)
4951 FIXME("Ignoring flags %#x.\n", flags);
4952
4954
4955 if (!feature_level_count)
4956 goto fail;
4957
4958 if (FAILED(hr = wined3d_state_create(device->wined3d_device,
4959 (const enum wined3d_feature_level *)feature_levels, feature_level_count, &wined3d_state)))
4960 goto fail;
4962
4963 if (chosen_feature_level)
4964 *chosen_feature_level = feature_level;
4965
4966 if (!state)
4967 {
4970 return S_FALSE;
4971 }
4972
4973 if (!(state_impl = calloc(1, sizeof(*state_impl))))
4974 {
4976 hr = E_OUTOFMEMORY;
4977 goto fail;
4978 }
4979
4980 d3d_device_context_state_init(state_impl, device, feature_level, emulated_interface);
4982 {
4984 ID3DDeviceContextState_Release(&state_impl->ID3DDeviceContextState_iface);
4985 hr = E_FAIL;
4986 goto fail;
4987 }
4988
4989 *state = &state_impl->ID3DDeviceContextState_iface;
4990 device->d3d11_only = FALSE;
4992
4993 return S_OK;
4994
4995fail:
4997 if (chosen_feature_level)
4998 *chosen_feature_level = 0;
4999 if (state)
5000 *state = NULL;
5001 return hr;
5002}
5003
5005 REFIID iid, void **resource)
5006{
5007 FIXME("iface %p, handle %p, iid %s, resource %p stub!\n", iface, handle, debugstr_guid(iid), resource);
5008
5009 return E_NOTIMPL;
5010}
5011
5013 DWORD access, REFIID iid, void **resource)
5014{
5015 FIXME("iface %p, name %s, access %#lx, iid %s, resource %p stub!\n", iface, debugstr_w(name), access,
5016 debugstr_guid(iid), resource);
5017
5018 return E_NOTIMPL;
5019}
5020
5023{
5024 FIXME("iface %p, context %p stub!\n", iface, context);
5025}
5026
5029{
5030 FIXME("iface %p, flags %#x, context %p stub!\n", iface, flags, context);
5031
5032 return E_NOTIMPL;
5033}
5034
5036 ID3D11Resource *resource, UINT *tile_count, D3D11_PACKED_MIP_DESC *mip_desc,
5037 D3D11_TILE_SHAPE *tile_shape, UINT *subresource_tiling_count, UINT first_subresource_tiling,
5038 D3D11_SUBRESOURCE_TILING *subresource_tiling)
5039{
5040 FIXME("iface %p, resource %p, tile_count %p, mip_desc %p, tile_shape %p, "
5041 "subresource_tiling_count %p, first_subresource_tiling %u, subresource_tiling %p stub!\n",
5042 iface, resource, tile_count, mip_desc, tile_shape,
5043 subresource_tiling_count, first_subresource_tiling, subresource_tiling);
5044}
5045
5047 DXGI_FORMAT format, UINT sample_count, UINT flags, UINT *quality_level_count)
5048{
5049 FIXME("iface %p, format %#x, sample_count %u, flags %#x, quality_level_count %p stub!\n",
5050 iface, format, sample_count, flags, quality_level_count);
5051
5052 return E_NOTIMPL;
5053}
5054
5055static const struct ID3D11Device2Vtbl d3d11_device_vtbl =
5056{
5057 /* IUnknown methods */
5061 /* ID3D11Device methods */
5102 /* ID3D11Device1 methods */
5110 /* ID3D11Device2 methods */
5115};
5116
5117/* Inner IUnknown methods */
5118
5119static inline struct d3d_device *impl_from_IUnknown(IUnknown *iface)
5120{
5121 return CONTAINING_RECORD(iface, struct d3d_device, IUnknown_inner);
5122}
5123
5125{
5126 struct d3d_device *device = impl_from_IUnknown(iface);
5127
5128 TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
5129
5130 if (IsEqualGUID(riid, &IID_ID3D11Device2)
5131 || IsEqualGUID(riid, &IID_ID3D11Device1)
5132 || IsEqualGUID(riid, &IID_ID3D11Device)
5134 {
5135 *out = &device->ID3D11Device2_iface;
5136 }
5137 else if (!device->d3d11_only
5138 && (IsEqualGUID(riid, &IID_ID3D10Device1)
5139 || IsEqualGUID(riid, &IID_ID3D10Device)))
5140 {
5141 *out = &device->ID3D10Device1_iface;
5142 }
5143 else if (IsEqualGUID(riid, &IID_ID3D10Multithread))
5144 {
5145 *out = &device->ID3D10Multithread_iface;
5146 }
5147 else if (IsEqualGUID(riid, &IID_IWineDXGIDeviceParent))
5148 {
5149 *out = &device->IWineDXGIDeviceParent_iface;
5150 }
5151 else if (IsEqualGUID(riid, &IID_ID3D11VideoDevice) || IsEqualGUID(riid, &IID_ID3D11VideoDevice1))
5152 {
5153 *out = &device->ID3D11VideoDevice1_iface;
5154 }
5155 else
5156 {
5157 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
5158 *out = NULL;
5159 return E_NOINTERFACE;
5160 }
5161
5162 IUnknown_AddRef((IUnknown *)*out);
5163 return S_OK;
5164}
5165
5167{
5168 struct d3d_device *device = impl_from_IUnknown(iface);
5170
5171 TRACE("%p increasing refcount to %lu.\n", device, refcount);
5172
5173 return refcount;
5174}
5175
5177{
5178 struct d3d_device *device = impl_from_IUnknown(iface);
5180 unsigned int i;
5181
5182 TRACE("%p decreasing refcount to %lu.\n", device, refcount);
5183
5184 if (!refcount)
5185 {
5186 if (device->state)
5188 for (i = 0; i < device->context_state_count; ++i)
5189 {
5191 }
5192 free(device->context_states);
5193 d3d11_device_context_cleanup(&device->immediate_context);
5194 if (device->wined3d_device)
5195 {
5196 wined3d_device_decref(device->wined3d_device);
5197 }
5198 wine_rb_destroy(&device->sampler_states, NULL, NULL);
5199 wine_rb_destroy(&device->rasterizer_states, NULL, NULL);
5200 wine_rb_destroy(&device->depthstencil_states, NULL, NULL);
5201 wine_rb_destroy(&device->blend_states, NULL, NULL);
5202 }
5203
5204 return refcount;
5205}
5206
5207/* IUnknown methods */
5208
5210 void **out)
5211{
5212 struct d3d_device *device = impl_from_ID3D10Device(iface);
5213 return IUnknown_QueryInterface(device->outer_unk, iid, out);
5214}
5215
5217{
5218 struct d3d_device *device = impl_from_ID3D10Device(iface);
5219 return IUnknown_AddRef(device->outer_unk);
5220}
5221
5223{
5224 struct d3d_device *device = impl_from_ID3D10Device(iface);
5225 return IUnknown_Release(device->outer_unk);
5226}
5227
5228/* ID3D10Device methods */
5229
5232{
5233 struct d3d_device *device = impl_from_ID3D10Device(iface);
5234 unsigned int i;
5235
5237 for (i = 0; i < buffer_count; ++i)
5238 {
5240 struct d3d_buffer *buffer_impl;
5241
5242 wined3d_device_context_get_constant_buffer(device->immediate_context.wined3d_context,
5243 type, start_slot + i, &state);
5244
5245 if (!state.buffer)
5246 {
5247 buffers[i] = NULL;
5248 continue;
5249 }
5250
5251 buffer_impl = wined3d_buffer_get_parent(state.buffer);
5252 buffers[i] = &buffer_impl->ID3D10Buffer_iface;
5253 ID3D10Buffer_AddRef(buffers[i]);
5254 }
5256}
5257
5259 unsigned int start_slot, unsigned int buffer_count, ID3D10Buffer *const *buffers)
5260{
5262 struct d3d_device *device = impl_from_ID3D10Device(iface);
5263 unsigned int i;
5264
5265 if (buffer_count > ARRAY_SIZE(wined3d_buffers))
5266 {
5267 WARN("Buffer count %u exceeds limit; ignoring call.\n", buffer_count);
5268 return;
5269 }
5270
5271 for (i = 0; i < buffer_count; ++i)
5272 {
5274
5275 wined3d_buffers[i].buffer = buffer ? buffer->wined3d_buffer : NULL;
5276 wined3d_buffers[i].offset = 0;
5277 wined3d_buffers[i].size = WINED3D_MAX_CONSTANT_BUFFER_SIZE * sizeof(struct wined3d_vec4);
5278 }
5279
5280 wined3d_device_context_set_constant_buffers(device->immediate_context.wined3d_context,
5281 type, start_slot, buffer_count, wined3d_buffers);
5282}
5283
5285 unsigned int start_slot, unsigned int count, ID3D10ShaderResourceView *const *views)
5286{
5288 struct d3d_device *device = impl_from_ID3D10Device(iface);
5289 unsigned int i;
5290
5291 if (count > ARRAY_SIZE(wined3d_views))
5292 {
5293 WARN("View count %u exceeds limit; ignoring call.\n", count);
5294 return;
5295 }
5296
5297 for (i = 0; i < count; ++i)
5298 {
5300
5301 wined3d_views[i] = view ? view->wined3d_view : NULL;
5302 }
5303
5304 wined3d_device_context_set_shader_resource_views(device->immediate_context.wined3d_context,
5305 type, start_slot, count, wined3d_views);
5306}
5307
5309 unsigned int start_slot, unsigned int count, ID3D10SamplerState *const *samplers)
5310{
5312 struct d3d_device *device = impl_from_ID3D10Device(iface);
5313 unsigned int i;
5314
5315 if (count > ARRAY_SIZE(wined3d_samplers))
5316 {
5317 WARN("Sampler count %u exceeds limit; ignoring call.\n", count);
5318 return;
5319 }
5320
5321 for (i = 0; i < count; ++i)
5322 {
5324
5325 wined3d_samplers[i] = sampler ? sampler->wined3d_sampler : NULL;
5326 }
5327
5328 wined3d_device_context_set_samplers(device->immediate_context.wined3d_context,
5329 type, start_slot, count, wined3d_samplers);
5330}
5331
5333 UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers)
5334{
5335 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
5336 iface, start_slot, buffer_count, buffers);
5337
5340}
5341
5343 UINT start_slot, UINT view_count, ID3D10ShaderResourceView *const *views)
5344{
5345 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
5346 iface, start_slot, view_count, views);
5347
5348 d3d10_device_set_shader_resource_views(iface, WINED3D_SHADER_TYPE_PIXEL, start_slot, view_count, views);
5349}
5350
5353{
5354 struct d3d_device *device = impl_from_ID3D10Device(iface);
5356
5357 TRACE("iface %p, shader %p\n", iface, shader);
5358
5359 wined3d_device_context_set_shader(device->immediate_context.wined3d_context,
5361}
5362
5364 UINT start_slot, UINT sampler_count, ID3D10SamplerState *const *samplers)
5365{
5366 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
5367 iface, start_slot, sampler_count, samplers);
5368
5369 d3d10_device_set_samplers(iface, WINED3D_SHADER_TYPE_PIXEL, start_slot, sampler_count, samplers);
5370}
5371
5374{
5375 struct d3d_device *device = impl_from_ID3D10Device(iface);
5377
5378 TRACE("iface %p, shader %p\n", iface, shader);
5379
5380 wined3d_device_context_set_shader(device->immediate_context.wined3d_context,
5381 WINED3D_SHADER_TYPE_VERTEX, vs ? vs->wined3d_shader : NULL);
5382}
5383
5385 UINT start_index_location, INT base_vertex_location)
5386{
5387 struct d3d_device *device = impl_from_ID3D10Device(iface);
5388
5389 TRACE("iface %p, index_count %u, start_index_location %u, base_vertex_location %d.\n",
5390 iface, index_count, start_index_location, base_vertex_location);
5391
5392 wined3d_device_context_draw_indexed(device->immediate_context.wined3d_context,
5393 base_vertex_location, start_index_location, index_count, 0, 0);
5394}
5395
5397 UINT start_vertex_location)
5398{
5399 struct d3d_device *device = impl_from_ID3D10Device(iface);
5400
5401 TRACE("iface %p, vertex_count %u, start_vertex_location %u\n",
5402 iface, vertex_count, start_vertex_location);
5403
5404 wined3d_device_context_draw(device->immediate_context.wined3d_context, start_vertex_location, vertex_count, 0, 0);
5405}
5406
5408 UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers)
5409{
5410 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
5411 iface, start_slot, buffer_count, buffers);
5412
5415}
5416
5418 ID3D10InputLayout *input_layout)
5419{
5420 struct d3d_device *device = impl_from_ID3D10Device(iface);
5421 struct d3d_input_layout *layout = unsafe_impl_from_ID3D10InputLayout(input_layout);
5422
5423 TRACE("iface %p, input_layout %p\n", iface, input_layout);
5424
5425 wined3d_device_context_set_vertex_declaration(device->immediate_context.wined3d_context,
5426 layout ? layout->wined3d_decl : NULL);
5427}
5428
5430 UINT buffer_count, ID3D10Buffer *const *buffers, const UINT *strides, const UINT *offsets)
5431{
5433 struct d3d_device *device = impl_from_ID3D10Device(iface);
5434 unsigned int i;
5435
5436 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p\n",
5437 iface, start_slot, buffer_count, buffers, strides, offsets);
5438
5439 if (buffer_count > ARRAY_SIZE(streams))
5440 {
5441 WARN("Buffer count %u exceeds limit.\n", buffer_count);
5442 buffer_count = ARRAY_SIZE(streams);
5443 }
5444
5445 for (i = 0; i < buffer_count; ++i)
5446 {
5448
5449 streams[i].buffer = buffer ? buffer->wined3d_buffer : NULL;
5450 streams[i].offset = offsets[i];
5451 streams[i].stride = strides[i];
5452 streams[i].frequency = 1;
5453 streams[i].flags = 0;
5454 }
5455
5456 wined3d_device_context_set_stream_sources(device->immediate_context.wined3d_context,
5457 start_slot, buffer_count, streams);
5458}
5459
5462{
5463 struct d3d_device *device = impl_from_ID3D10Device(iface);
5464 struct d3d_buffer *buffer_impl = unsafe_impl_from_ID3D10Buffer(buffer);
5465
5466 TRACE("iface %p, buffer %p, format %s, offset %u.\n",
5468
5469 wined3d_device_context_set_index_buffer(device->immediate_context.wined3d_context,
5470 buffer_impl ? buffer_impl->wined3d_buffer : NULL,
5472}
5473
5475 UINT instance_index_count, UINT instance_count, UINT start_index_location,
5476 INT base_vertex_location, UINT start_instance_location)
5477{
5478 struct d3d_device *device = impl_from_ID3D10Device(iface);
5479
5480 TRACE("iface %p, instance_index_count %u, instance_count %u, start_index_location %u, "
5481 "base_vertex_location %d, start_instance_location %u.\n",
5482 iface, instance_index_count, instance_count, start_index_location,
5483 base_vertex_location, start_instance_location);
5484
5485 wined3d_device_context_draw_indexed(device->immediate_context.wined3d_context, base_vertex_location,
5486 start_index_location, instance_index_count, start_instance_location, instance_count);
5487}
5488
5490 UINT instance_vertex_count, UINT instance_count,
5491 UINT start_vertex_location, UINT start_instance_location)
5492{
5493 struct d3d_device *device = impl_from_ID3D10Device(iface);
5494
5495 TRACE("iface %p, instance_vertex_count %u, instance_count %u, start_vertex_location %u, "
5496 "start_instance_location %u.\n", iface, instance_vertex_count, instance_count,
5497 start_vertex_location, start_instance_location);
5498
5499 wined3d_device_context_draw(device->immediate_context.wined3d_context, start_vertex_location,
5500 instance_vertex_count, start_instance_location, instance_count);
5501}
5502
5504 UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers)
5505{
5506 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
5507 iface, start_slot, buffer_count, buffers);
5508
5511}
5512
5514{
5515 struct d3d_device *device = impl_from_ID3D10Device(iface);
5517
5518 TRACE("iface %p, shader %p.\n", iface, shader);
5519
5520 wined3d_device_context_set_shader(device->immediate_context.wined3d_context,
5521 WINED3D_SHADER_TYPE_GEOMETRY, gs ? gs->wined3d_shader : NULL);
5522}
5523
5525 D3D10_PRIMITIVE_TOPOLOGY topology)
5526{
5527 struct d3d_device *device = impl_from_ID3D10Device(iface);
5528
5529 TRACE("iface %p, topology %s.\n", iface, debug_d3d10_primitive_topology(topology));
5530
5531 wined3d_device_context_set_primitive_type(device->immediate_context.wined3d_context,
5532 (enum wined3d_primitive_type)topology, 0);
5533}
5534
5536 UINT start_slot, UINT view_count, ID3D10ShaderResourceView *const *views)
5537{
5538 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
5539 iface, start_slot, view_count, views);
5540
5541 d3d10_device_set_shader_resource_views(iface, WINED3D_SHADER_TYPE_VERTEX, start_slot, view_count, views);
5542}
5543
5545 UINT start_slot, UINT sampler_count, ID3D10SamplerState *const *samplers)
5546{
5547 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
5548 iface, start_slot, sampler_count, samplers);
5549
5550 d3d10_device_set_samplers(iface, WINED3D_SHADER_TYPE_VERTEX, start_slot, sampler_count, samplers);
5551}
5552
5554{
5555 struct d3d_device *device = impl_from_ID3D10Device(iface);
5556 struct d3d_query *query;
5557
5558 TRACE("iface %p, predicate %p, value %#x.\n", iface, predicate, value);
5559
5561 wined3d_device_context_set_predication(device->immediate_context.wined3d_context,
5562 query ? query->wined3d_query : NULL, value);
5563}
5564
5566 UINT start_slot, UINT view_count, ID3D10ShaderResourceView *const *views)
5567{
5568 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
5569 iface, start_slot, view_count, views);
5570
5571 d3d10_device_set_shader_resource_views(iface, WINED3D_SHADER_TYPE_GEOMETRY, start_slot, view_count, views);
5572}
5573
5575 UINT start_slot, UINT sampler_count, ID3D10SamplerState *const *samplers)
5576{
5577 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
5578 iface, start_slot, sampler_count, samplers);
5579
5580 d3d10_device_set_samplers(iface, WINED3D_SHADER_TYPE_GEOMETRY, start_slot, sampler_count, samplers);
5581}
5582
5584 UINT rtv_count, ID3D10RenderTargetView *const *rtvs, ID3D10DepthStencilView *depth_stencil_view)
5585{
5587 struct d3d_device *device = impl_from_ID3D10Device(iface);
5588 struct d3d_depthstencil_view *dsv;
5589 unsigned int i;
5590
5591 TRACE("iface %p, rtv_count %u, rtvs %p, depth_stencil_view %p.\n", iface, rtv_count, rtvs, depth_stencil_view);
5592
5593 if (rtv_count > ARRAY_SIZE(wined3d_rtvs))
5594 {
5595 WARN("View count %u exceeds limit.\n", rtv_count);
5596 rtv_count = ARRAY_SIZE(wined3d_rtvs);
5597 }
5598
5599 for (i = 0; i < rtv_count; ++i)
5600 {
5602
5603 wined3d_rtvs[i] = rtv ? rtv->wined3d_view : NULL;
5604 }
5605
5606 dsv = unsafe_impl_from_ID3D10DepthStencilView(depth_stencil_view);
5607
5609 ARRAY_SIZE(wined3d_rtvs), wined3d_rtvs, dsv ? dsv->wined3d_view : NULL, ~0u, NULL, NULL);
5610}
5611
5613 ID3D10BlendState *blend_state, const float blend_factor[4], UINT sample_mask)
5614{
5615 struct d3d_device *device = impl_from_ID3D10Device(iface);
5616 struct d3d_blend_state *blend_state_object;
5617
5618 TRACE("iface %p, blend_state %p, blend_factor %s, sample_mask 0x%08x.\n",
5619 iface, blend_state, debug_float4(blend_factor), sample_mask);
5620
5621 blend_state_object = unsafe_impl_from_ID3D10BlendState(blend_state);
5622 d3d11_device_context_OMSetBlendState(&device->immediate_context.ID3D11DeviceContext1_iface,
5623 blend_state_object ? (ID3D11BlendState *)&blend_state_object->ID3D11BlendState1_iface : NULL,
5624 blend_factor, sample_mask);
5625}
5626
5628 ID3D10DepthStencilState *depth_stencil_state, UINT stencil_ref)
5629{
5630 struct d3d_device *device = impl_from_ID3D10Device(iface);
5631 struct d3d_depthstencil_state *ds_state_object;
5632
5633 TRACE("iface %p, depth_stencil_state %p, stencil_ref %u.\n",
5634 iface, depth_stencil_state, stencil_ref);
5635
5636 ds_state_object = unsafe_impl_from_ID3D10DepthStencilState(depth_stencil_state);
5637 d3d11_device_context_OMSetDepthStencilState(&device->immediate_context.ID3D11DeviceContext1_iface,
5638 ds_state_object ? &ds_state_object->ID3D11DepthStencilState_iface : NULL, stencil_ref);
5639}
5640
5642 UINT target_count, ID3D10Buffer *const *targets, const UINT *offsets)
5643{
5645 struct d3d_device *device = impl_from_ID3D10Device(iface);
5646 unsigned int count, i;
5647
5648 TRACE("iface %p, target_count %u, targets %p, offsets %p.\n", iface, target_count, targets, offsets);
5649
5650 count = min(target_count, ARRAY_SIZE(outputs));
5651 for (i = 0; i < count; ++i)
5652 {
5654
5655 outputs[i].buffer = buffer ? buffer->wined3d_buffer : NULL;
5656 outputs[i].offset = offsets ? offsets[i] : 0;
5657 }
5658
5659 wined3d_device_context_set_stream_outputs(device->immediate_context.wined3d_context, outputs);
5660}
5661
5663{
5664 FIXME("iface %p stub!\n", iface);
5665}
5666
5668{
5669 struct d3d_device *device = impl_from_ID3D10Device(iface);
5670 struct d3d_rasterizer_state *rasterizer_state_object;
5671
5672 TRACE("iface %p, rasterizer_state %p.\n", iface, rasterizer_state);
5673
5674 rasterizer_state_object = unsafe_impl_from_ID3D10RasterizerState(rasterizer_state);
5675 d3d11_device_context_RSSetState(&device->immediate_context.ID3D11DeviceContext1_iface,
5676 rasterizer_state_object ? (ID3D11RasterizerState *)&rasterizer_state_object->ID3D11RasterizerState1_iface : NULL);
5677}
5678
5680 UINT viewport_count, const D3D10_VIEWPORT *viewports)
5681{
5682 struct d3d_device *device = impl_from_ID3D10Device(iface);
5683 struct wined3d_viewport wined3d_vp[WINED3D_MAX_VIEWPORTS];
5684 unsigned int i;
5685
5686 TRACE("iface %p, viewport_count %u, viewports %p.\n", iface, viewport_count, viewports);
5687
5688 if (viewport_count > ARRAY_SIZE(wined3d_vp))
5689 return;
5690
5691 for (i = 0; i < viewport_count; ++i)
5692 {
5693 wined3d_vp[i].x = viewports[i].TopLeftX;
5694 wined3d_vp[i].y = viewports[i].TopLeftY;
5695 wined3d_vp[i].width = viewports[i].Width;
5696 wined3d_vp[i].height = viewports[i].Height;
5697 wined3d_vp[i].min_z = viewports[i].MinDepth;
5698 wined3d_vp[i].max_z = viewports[i].MaxDepth;
5699 }
5700
5701 wined3d_device_context_set_viewports(device->immediate_context.wined3d_context, viewport_count, wined3d_vp);
5702}
5703
5705 UINT rect_count, const D3D10_RECT *rects)
5706{
5707 struct d3d_device *device = impl_from_ID3D10Device(iface);
5708
5709 TRACE("iface %p, rect_count %u, rects %p.\n", iface, rect_count, rects);
5710
5711 if (rect_count > WINED3D_MAX_VIEWPORTS)
5712 return;
5713
5714 wined3d_device_context_set_scissor_rects(device->immediate_context.wined3d_context, rect_count, rects);
5715}
5716
5718 ID3D10Resource *dst_resource, UINT dst_subresource_idx, UINT dst_x, UINT dst_y, UINT dst_z,
5719 ID3D10Resource *src_resource, UINT src_subresource_idx, const D3D10_BOX *src_box)
5720{
5721 struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource;
5722 struct d3d_device *device = impl_from_ID3D10Device(iface);
5723 struct wined3d_box wined3d_src_box;
5724
5725 TRACE("iface %p, dst_resource %p, dst_subresource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
5726 "src_resource %p, src_subresource_idx %u, src_box %p.\n",
5727 iface, dst_resource, dst_subresource_idx, dst_x, dst_y, dst_z,
5728 src_resource, src_subresource_idx, src_box);
5729
5730 if (!dst_resource || !src_resource)
5731 return;
5732
5733 if (src_box)
5734 wined3d_box_set(&wined3d_src_box, src_box->left, src_box->top,
5735 src_box->right, src_box->bottom, src_box->front, src_box->back);
5736
5737 wined3d_dst_resource = wined3d_resource_from_d3d10_resource(dst_resource);
5738 wined3d_src_resource = wined3d_resource_from_d3d10_resource(src_resource);
5739 wined3d_device_context_copy_sub_resource_region(device->immediate_context.wined3d_context,
5740 wined3d_dst_resource, dst_subresource_idx, dst_x, dst_y, dst_z,
5741 wined3d_src_resource, src_subresource_idx, src_box ? &wined3d_src_box : NULL, 0);
5742}
5743
5745 ID3D10Resource *dst_resource, ID3D10Resource *src_resource)
5746{
5747 struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource;
5748 struct d3d_device *device = impl_from_ID3D10Device(iface);
5749
5750 TRACE("iface %p, dst_resource %p, src_resource %p.\n", iface, dst_resource, src_resource);
5751
5752 wined3d_dst_resource = wined3d_resource_from_d3d10_resource(dst_resource);
5753 wined3d_src_resource = wined3d_resource_from_d3d10_resource(src_resource);
5754 wined3d_device_context_copy_resource(device->immediate_context.wined3d_context,
5755 wined3d_dst_resource, wined3d_src_resource);
5756}
5757
5759 ID3D10Resource *resource, UINT subresource_idx, const D3D10_BOX *box,
5760 const void *data, UINT row_pitch, UINT depth_pitch)
5761{
5762 struct d3d_device *device = impl_from_ID3D10Device(iface);
5763 ID3D11Resource *d3d11_resource;
5764
5765 TRACE("iface %p, resource %p, subresource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u.\n",
5766 iface, resource, subresource_idx, box, data, row_pitch, depth_pitch);
5767
5768 ID3D10Resource_QueryInterface(resource, &IID_ID3D11Resource, (void **)&d3d11_resource);
5769 d3d11_device_context_UpdateSubresource(&device->immediate_context.ID3D11DeviceContext1_iface,
5770 d3d11_resource, subresource_idx, (const D3D11_BOX *)box, data, row_pitch, depth_pitch);
5771 ID3D11Resource_Release(d3d11_resource);
5772}
5773
5775 ID3D10RenderTargetView *render_target_view, const float color_rgba[4])
5776{
5777 struct d3d_device *device = impl_from_ID3D10Device(iface);
5779 const struct wined3d_color color = {color_rgba[0], color_rgba[1], color_rgba[2], color_rgba[3]};
5780 HRESULT hr;
5781
5782 TRACE("iface %p, render_target_view %p, color_rgba %s.\n",
5783 iface, render_target_view, debug_float4(color_rgba));
5784
5785 if (!view)
5786 return;
5787
5788 if (FAILED(hr = wined3d_device_context_clear_rendertarget_view(device->immediate_context.wined3d_context,
5789 view->wined3d_view, NULL, WINED3DCLEAR_TARGET, &color, 0.0f, 0)))
5790 ERR("Failed to clear view, hr %#lx.\n", hr);
5791}
5792
5794 ID3D10DepthStencilView *depth_stencil_view, UINT flags, FLOAT depth, UINT8 stencil)
5795{
5796 struct d3d_device *device = impl_from_ID3D10Device(iface);
5798 DWORD wined3d_flags;
5799 HRESULT hr;
5800
5801 TRACE("iface %p, depth_stencil_view %p, flags %#x, depth %.8e, stencil %u.\n",
5802 iface, depth_stencil_view, flags, depth, stencil);
5803
5804 if (!view)
5805 return;
5806
5808
5809 if (FAILED(hr = wined3d_device_context_clear_rendertarget_view(device->immediate_context.wined3d_context,
5810 view->wined3d_view, NULL, wined3d_flags, NULL, depth, stencil)))
5811 ERR("Failed to clear view, hr %#lx.\n", hr);
5812}
5813
5816{
5817 struct d3d_device *device = impl_from_ID3D10Device(iface);
5819
5820 TRACE("iface %p, view %p.\n", iface, view);
5821
5822 wined3d_device_context_generate_mipmaps(device->immediate_context.wined3d_context, srv->wined3d_view);
5823}
5824
5826 ID3D10Resource *dst_resource, UINT dst_subresource_idx,
5827 ID3D10Resource *src_resource, UINT src_subresource_idx, DXGI_FORMAT format)
5828{
5829 struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource;
5830 struct d3d_device *device = impl_from_ID3D10Device(iface);
5832
5833 TRACE("iface %p, dst_resource %p, dst_subresource_idx %u, "
5834 "src_resource %p, src_subresource_idx %u, format %s.\n",
5835 iface, dst_resource, dst_subresource_idx,
5836 src_resource, src_subresource_idx, debug_dxgi_format(format));
5837
5838 wined3d_dst_resource = wined3d_resource_from_d3d10_resource(dst_resource);
5839 wined3d_src_resource = wined3d_resource_from_d3d10_resource(src_resource);
5841 wined3d_device_context_resolve_sub_resource(device->immediate_context.wined3d_context,
5842 wined3d_dst_resource, dst_subresource_idx,
5843 wined3d_src_resource, src_subresource_idx, wined3d_format);
5844}
5845
5847 UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers)
5848{
5849 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
5850 iface, start_slot, buffer_count, buffers);
5851
5853 buffers);
5854}
5855
5857 UINT start_slot, UINT view_count, ID3D10ShaderResourceView **views)
5858{
5859 struct d3d_device *device = impl_from_ID3D10Device(iface);
5860 unsigned int i;
5861
5862 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
5863 iface, start_slot, view_count, views);
5864
5866 for (i = 0; i < view_count; ++i)
5867 {
5868 struct wined3d_shader_resource_view *wined3d_view;
5869 struct d3d_shader_resource_view *view_impl;
5870
5872 device->immediate_context.wined3d_context, WINED3D_SHADER_TYPE_PIXEL, start_slot + i)))
5873 {
5874 views[i] = NULL;
5875 continue;
5876 }
5877
5880 ID3D10ShaderResourceView_AddRef(views[i]);
5881 }
5883}
5884
5886{
5887 struct d3d_device *device = impl_from_ID3D10Device(iface);
5888 struct d3d_pixel_shader *shader_impl;
5890
5891 TRACE("iface %p, shader %p.\n", iface, shader);
5892
5894 if (!(wined3d_shader = wined3d_device_context_get_shader(device->immediate_context.wined3d_context,
5896 {
5898 *shader = NULL;
5899 return;
5900 }
5901
5904 *shader = &shader_impl->ID3D10PixelShader_iface;
5905 ID3D10PixelShader_AddRef(*shader);
5906}
5907
5909 UINT start_slot, UINT sampler_count, ID3D10SamplerState **samplers)
5910{
5911 struct d3d_device *device = impl_from_ID3D10Device(iface);
5912 unsigned int i;
5913
5914 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
5915 iface, start_slot, sampler_count, samplers);
5916
5918 for (i = 0; i < sampler_count; ++i)
5919 {
5920 struct d3d_sampler_state *sampler_impl;
5922
5924 device->immediate_context.wined3d_context, WINED3D_SHADER_TYPE_PIXEL, start_slot + i)))
5925 {
5926 samplers[i] = NULL;
5927 continue;
5928 }
5929
5931 samplers[i] = &sampler_impl->ID3D10SamplerState_iface;
5932 ID3D10SamplerState_AddRef(samplers[i]);
5933 }
5935}
5936
5938{
5939 struct d3d_device *device = impl_from_ID3D10Device(iface);
5940 struct d3d_vertex_shader *shader_impl;
5942
5943 TRACE("iface %p, shader %p.\n", iface, shader);
5944
5946 if (!(wined3d_shader = wined3d_device_context_get_shader(device->immediate_context.wined3d_context,
5948 {
5950 *shader = NULL;
5951 return;
5952 }
5953
5956 *shader = &shader_impl->ID3D10VertexShader_iface;
5957 ID3D10VertexShader_AddRef(*shader);
5958}
5959
5961 UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers)
5962{
5963 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
5964 iface, start_slot, buffer_count, buffers);
5965
5967 buffers);
5968}
5969
5971{
5972 struct d3d_device *device = impl_from_ID3D10Device(iface);
5973 struct wined3d_vertex_declaration *wined3d_declaration;
5974 struct d3d_input_layout *input_layout_impl;
5975
5976 TRACE("iface %p, input_layout %p.\n", iface, input_layout);
5977
5979 if (!(wined3d_declaration = wined3d_device_context_get_vertex_declaration(
5980 device->immediate_context.wined3d_context)))
5981 {
5983 *input_layout = NULL;
5984 return;
5985 }
5986
5987 input_layout_impl = wined3d_vertex_declaration_get_parent(wined3d_declaration);
5989 *input_layout = &input_layout_impl->ID3D10InputLayout_iface;
5990 ID3D10InputLayout_AddRef(*input_layout);
5991}
5992
5994 UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers, UINT *strides, UINT *offsets)
5995{
5996 struct d3d_device *device = impl_from_ID3D10Device(iface);
5997 unsigned int i;
5998
5999 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p, strides %p, offsets %p.\n",
6000 iface, start_slot, buffer_count, buffers, strides, offsets);
6001
6003 for (i = 0; i < buffer_count; ++i)
6004 {
6006 struct d3d_buffer *buffer_impl;
6007
6008 if (FAILED(wined3d_device_context_get_stream_source(device->immediate_context.wined3d_context, start_slot + i,
6009 &wined3d_buffer, &offsets[i], &strides[i])))
6010 ERR("Failed to get vertex buffer.\n");
6011
6012 if (!wined3d_buffer)
6013 {
6014 buffers[i] = NULL;
6015 continue;
6016 }
6017
6019 buffers[i] = &buffer_impl->ID3D10Buffer_iface;
6020 ID3D10Buffer_AddRef(buffers[i]);
6021 }
6023}
6024
6027{
6028 struct d3d_device *device = impl_from_ID3D10Device(iface);
6031 struct d3d_buffer *buffer_impl;
6032
6033 TRACE("iface %p, buffer %p, format %p, offset %p.\n", iface, buffer, format, offset);
6034
6037 device->immediate_context.wined3d_context, &wined3d_format, offset);
6039 if (!wined3d_buffer)
6040 {
6042 *buffer = NULL;
6043 return;
6044 }
6045
6048 *buffer = &buffer_impl->ID3D10Buffer_iface;
6049 ID3D10Buffer_AddRef(*buffer);
6050}
6051
6053 UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers)
6054{
6055 TRACE("iface %p, start_slot %u, buffer_count %u, buffers %p.\n",
6056 iface, start_slot, buffer_count, buffers);
6057
6059 buffers);
6060}
6061
6063{
6064 struct d3d_device *device = impl_from_ID3D10Device(iface);
6065 struct d3d_geometry_shader *shader_impl;
6067
6068 TRACE("iface %p, shader %p.\n", iface, shader);
6069
6071 if (!(wined3d_shader = wined3d_device_context_get_shader(device->immediate_context.wined3d_context,
6073 {
6075 *shader = NULL;
6076 return;
6077 }
6078
6081 *shader = &shader_impl->ID3D10GeometryShader_iface;
6082 ID3D10GeometryShader_AddRef(*shader);
6083}
6084
6086 D3D10_PRIMITIVE_TOPOLOGY *topology)
6087{
6088 struct d3d_device *device = impl_from_ID3D10Device(iface);
6089
6090 TRACE("iface %p, topology %p.\n", iface, topology);
6091
6093 wined3d_device_context_get_primitive_type(device->immediate_context.wined3d_context,
6094 (enum wined3d_primitive_type *)topology, NULL);
6096}
6097
6099 UINT start_slot, UINT view_count, ID3D10ShaderResourceView **views)
6100{
6101 struct d3d_device *device = impl_from_ID3D10Device(iface);
6102 unsigned int i;
6103
6104 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
6105 iface, start_slot, view_count, views);
6106
6108 for (i = 0; i < view_count; ++i)
6109 {
6110 struct wined3d_shader_resource_view *wined3d_view;
6111 struct d3d_shader_resource_view *view_impl;
6112
6114 device->immediate_context.wined3d_context, WINED3D_SHADER_TYPE_VERTEX, start_slot + i)))
6115 {
6116 views[i] = NULL;
6117 continue;
6118 }
6119
6122 ID3D10ShaderResourceView_AddRef(views[i]);
6123 }
6125}
6126
6128 UINT start_slot, UINT sampler_count, ID3D10SamplerState **samplers)
6129{
6130 struct d3d_device *device = impl_from_ID3D10Device(iface);
6131 unsigned int i;
6132
6133 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
6134 iface, start_slot, sampler_count, samplers);
6135
6137 for (i = 0; i < sampler_count; ++i)
6138 {
6139 struct d3d_sampler_state *sampler_impl;
6141
6143 device->immediate_context.wined3d_context, WINED3D_SHADER_TYPE_VERTEX, start_slot + i)))
6144 {
6145 samplers[i] = NULL;
6146 continue;
6147 }
6148
6150 samplers[i] = &sampler_impl->ID3D10SamplerState_iface;
6151 ID3D10SamplerState_AddRef(samplers[i]);
6152 }
6154}
6155
6157 ID3D10Predicate **predicate, BOOL *value)
6158{
6159 struct d3d_device *device = impl_from_ID3D10Device(iface);
6160 struct wined3d_query *wined3d_predicate;
6161 struct d3d_query *predicate_impl;
6162
6163 TRACE("iface %p, predicate %p, value %p.\n", iface, predicate, value);
6164
6166 if (!(wined3d_predicate = wined3d_device_context_get_predication(device->immediate_context.wined3d_context, value)))
6167 {
6169 *predicate = NULL;
6170 return;
6171 }
6172
6173 predicate_impl = wined3d_query_get_parent(wined3d_predicate);
6175 *predicate = (ID3D10Predicate *)&predicate_impl->ID3D10Query_iface;
6176 ID3D10Predicate_AddRef(*predicate);
6177}
6178
6180 UINT start_slot, UINT view_count, ID3D10ShaderResourceView **views)
6181{
6182 struct d3d_device *device = impl_from_ID3D10Device(iface);
6183 unsigned int i;
6184
6185 TRACE("iface %p, start_slot %u, view_count %u, views %p.\n",
6186 iface, start_slot, view_count, views);
6187
6189 for (i = 0; i < view_count; ++i)
6190 {
6191 struct wined3d_shader_resource_view *wined3d_view;
6192 struct d3d_shader_resource_view *view_impl;
6193
6195 device->immediate_context.wined3d_context, WINED3D_SHADER_TYPE_GEOMETRY, start_slot + i)))
6196 {
6197 views[i] = NULL;
6198 continue;
6199 }
6200
6203 ID3D10ShaderResourceView_AddRef(views[i]);
6204 }
6206}
6207
6209 UINT start_slot, UINT sampler_count, ID3D10SamplerState **samplers)
6210{
6211 struct d3d_device *device = impl_from_ID3D10Device(iface);
6212 unsigned int i;
6213
6214 TRACE("iface %p, start_slot %u, sampler_count %u, samplers %p.\n",
6215 iface, start_slot, sampler_count, samplers);
6216
6218 for (i = 0; i < sampler_count; ++i)
6219 {
6220 struct d3d_sampler_state *sampler_impl;
6222
6224 device->immediate_context.wined3d_context, WINED3D_SHADER_TYPE_GEOMETRY, start_slot + i)))
6225 {
6226 samplers[i] = NULL;
6227 continue;
6228 }
6229
6231 samplers[i] = &sampler_impl->ID3D10SamplerState_iface;
6232 ID3D10SamplerState_AddRef(samplers[i]);
6233 }
6235}
6236
6238 UINT view_count, ID3D10RenderTargetView **render_target_views, ID3D10DepthStencilView **depth_stencil_view)
6239{
6240 struct d3d_device *device = impl_from_ID3D10Device(iface);
6241 struct wined3d_rendertarget_view *wined3d_view;
6242
6243 TRACE("iface %p, view_count %u, render_target_views %p, depth_stencil_view %p.\n",
6244 iface, view_count, render_target_views, depth_stencil_view);
6245
6247 if (render_target_views)
6248 {
6249 struct d3d_rendertarget_view *view_impl;
6250 unsigned int i;
6251
6252 for (i = 0; i < view_count; ++i)
6253 {
6255 device->immediate_context.wined3d_context, i))
6257 {
6258 render_target_views[i] = NULL;
6259 continue;
6260 }
6261
6262 render_target_views[i] = &view_impl->ID3D10RenderTargetView_iface;
6263 ID3D10RenderTargetView_AddRef(render_target_views[i]);
6264 }
6265 }
6266
6267 if (depth_stencil_view)
6268 {
6269 struct d3d_depthstencil_view *view_impl;
6270
6271 if (!(wined3d_view = wined3d_device_context_get_depth_stencil_view(device->immediate_context.wined3d_context))
6273 {
6274 *depth_stencil_view = NULL;
6275 }
6276 else
6277 {
6278 *depth_stencil_view = &view_impl->ID3D10DepthStencilView_iface;
6279 ID3D10DepthStencilView_AddRef(*depth_stencil_view);
6280 }
6281 }
6283}
6284
6286 ID3D10BlendState **blend_state, FLOAT blend_factor[4], UINT *sample_mask)
6287{
6288 struct d3d_device *device = impl_from_ID3D10Device(iface);
6289 ID3D11BlendState *d3d11_blend_state;
6290
6291 TRACE("iface %p, blend_state %p, blend_factor %p, sample_mask %p.\n",
6292 iface, blend_state, blend_factor, sample_mask);
6293
6294 d3d11_device_context_OMGetBlendState(&device->immediate_context.ID3D11DeviceContext1_iface,
6295 &d3d11_blend_state, blend_factor, sample_mask);
6296
6297 if (blend_state)
6298 {
6299 if (d3d11_blend_state)
6300 {
6302 (ID3D11BlendState1 *)d3d11_blend_state)->ID3D10BlendState1_iface;
6303 ID3D10BlendState_AddRef(*blend_state);
6304 }
6305 else
6306 *blend_state = NULL;
6307 }
6308
6309 if (d3d11_blend_state)
6310 ID3D11BlendState_Release(d3d11_blend_state);
6311}
6312
6314 ID3D10DepthStencilState **depth_stencil_state, UINT *stencil_ref)
6315{
6316 struct d3d_device *device = impl_from_ID3D10Device(iface);
6317 ID3D11DepthStencilState *d3d11_iface = NULL;
6318
6319 TRACE("iface %p, depth_stencil_state %p, stencil_ref %p.\n",
6320 iface, depth_stencil_state, stencil_ref);
6321
6322 d3d11_device_context_OMGetDepthStencilState(&device->immediate_context.ID3D11DeviceContext1_iface,
6323 &d3d11_iface, stencil_ref);
6324
6325 if (depth_stencil_state)
6326 {
6327 if (d3d11_iface)
6328 {
6329 *depth_stencil_state = &impl_from_ID3D11DepthStencilState(d3d11_iface)->ID3D10DepthStencilState_iface;
6330 ID3D10DepthStencilState_AddRef(*depth_stencil_state);
6331 }
6332 else
6333 *depth_stencil_state = NULL;
6334 }
6335
6336 if (d3d11_iface)
6337 ID3D11DepthStencilState_Release(d3d11_iface);
6338}
6339
6342{
6343 struct d3d_device *device = impl_from_ID3D10Device(iface);
6344 unsigned int i;
6345
6346 TRACE("iface %p, buffer_count %u, buffers %p, offsets %p.\n",
6347 iface, buffer_count, buffers, offsets);
6348
6350 for (i = 0; i < buffer_count; ++i)
6351 {
6353 struct d3d_buffer *buffer_impl;
6354
6356 device->immediate_context.wined3d_context, i, &offsets[i])))
6357 {
6358 buffers[i] = NULL;
6359 continue;
6360 }
6361
6363 buffers[i] = &buffer_impl->ID3D10Buffer_iface;
6364 ID3D10Buffer_AddRef(buffers[i]);
6365 }
6367}
6368
6370{
6371 struct d3d_device *device = impl_from_ID3D10Device(iface);
6372 struct d3d_rasterizer_state *rasterizer_state_impl;
6374
6375 TRACE("iface %p, rasterizer_state %p.\n", iface, rasterizer_state);
6376
6378 if ((wined3d_state = wined3d_device_context_get_rasterizer_state(device->immediate_context.wined3d_context)))
6379 {
6380 rasterizer_state_impl = wined3d_rasterizer_state_get_parent(wined3d_state);
6381 ID3D10RasterizerState_AddRef(*rasterizer_state = &rasterizer_state_impl->ID3D10RasterizerState_iface);
6382 }
6383 else
6384 {
6385 *rasterizer_state = NULL;
6386 }
6388}
6389
6391 UINT *viewport_count, D3D10_VIEWPORT *viewports)
6392{
6393 struct d3d_device *device = impl_from_ID3D10Device(iface);
6394 struct wined3d_viewport wined3d_vp[WINED3D_MAX_VIEWPORTS];
6395 unsigned int actual_count = ARRAY_SIZE(wined3d_vp), i;
6396
6397 TRACE("iface %p, viewport_count %p, viewports %p.\n", iface, viewport_count, viewports);
6398
6399 if (!viewport_count)
6400 return;
6401
6403 wined3d_device_context_get_viewports(device->immediate_context.wined3d_context,
6404 &actual_count, viewports ? wined3d_vp : NULL);
6406
6407 if (!viewports)
6408 {
6409 *viewport_count = actual_count;
6410 return;
6411 }
6412
6413 if (*viewport_count > actual_count)
6414 memset(&viewports[actual_count], 0, (*viewport_count - actual_count) * sizeof(*viewports));
6415
6416 *viewport_count = min(actual_count, *viewport_count);
6417 for (i = 0; i < *viewport_count; ++i)
6418 {
6419 viewports[i].TopLeftX = wined3d_vp[i].x;
6420 viewports[i].TopLeftY = wined3d_vp[i].y;
6421 viewports[i].Width = wined3d_vp[i].width;
6422 viewports[i].Height = wined3d_vp[i].height;
6423 viewports[i].MinDepth = wined3d_vp[i].min_z;
6424 viewports[i].MaxDepth = wined3d_vp[i].max_z;
6425 }
6426}
6427
6429{
6430 struct d3d_device *device = impl_from_ID3D10Device(iface);
6431 unsigned int actual_count;
6432
6433 TRACE("iface %p, rect_count %p, rects %p.\n", iface, rect_count, rects);
6434
6435 if (!rect_count)
6436 return;
6437
6438 actual_count = *rect_count;
6439
6441 wined3d_device_context_get_scissor_rects(device->immediate_context.wined3d_context, &actual_count, rects);
6443
6444 if (!rects)
6445 {
6446 *rect_count = actual_count;
6447 return;
6448 }
6449
6450 if (*rect_count > actual_count)
6451 memset(&rects[actual_count], 0, (*rect_count - actual_count) * sizeof(*rects));
6452}
6453
6455{
6456 TRACE("iface %p.\n", iface);
6457
6458 /* In the current implementation the device is never removed, so we can
6459 * just return S_OK here. */
6460
6461 return S_OK;
6462}
6463
6465{
6466 FIXME("iface %p, flags %#x stub!\n", iface, flags);
6467
6468 return E_NOTIMPL;
6469}
6470
6472{
6473 FIXME("iface %p stub!\n", iface);
6474
6475 return 0;
6476}
6477
6479 REFGUID guid, UINT *data_size, void *data)
6480{
6481 struct d3d_device *device = impl_from_ID3D10Device(iface);
6482
6483 TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
6484
6485 return d3d11_device_GetPrivateData(&device->ID3D11Device2_iface, guid, data_size, data);
6486}
6487
6489 REFGUID guid, UINT data_size, const void *data)
6490{
6491 struct d3d_device *device = impl_from_ID3D10Device(iface);
6492
6493 TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
6494
6495 return d3d11_device_SetPrivateData(&device->ID3D11Device2_iface, guid, data_size, data);
6496}
6497
6499 REFGUID guid, const IUnknown *data)
6500{
6501 struct d3d_device *device = impl_from_ID3D10Device(iface);
6502
6503 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
6504
6505 return d3d11_device_SetPrivateDataInterface(&device->ID3D11Device2_iface, guid, data);
6506}
6507
6509{
6510 struct d3d_device *device = impl_from_ID3D10Device(iface);
6511
6512 TRACE("iface %p.\n", iface);
6513
6514 d3d11_device_context_ClearState(&device->immediate_context.ID3D11DeviceContext1_iface);
6515}
6516
6518{
6519 struct d3d_device *device = impl_from_ID3D10Device(iface);
6520
6521 TRACE("iface %p.\n", iface);
6522
6523 wined3d_device_context_flush(device->immediate_context.wined3d_context);
6524}
6525
6528{
6529 struct d3d_device *device = impl_from_ID3D10Device(iface);
6530 D3D11_BUFFER_DESC d3d11_desc;
6531 struct d3d_buffer *object;
6532 HRESULT hr;
6533
6534 TRACE("iface %p, desc %p, data %p, buffer %p.\n", iface, desc, data, buffer);
6535
6536 d3d11_desc.ByteWidth = desc->ByteWidth;
6537 d3d11_desc.Usage = d3d11_usage_from_d3d10_usage(desc->Usage);
6538 d3d11_desc.BindFlags = d3d11_bind_flags_from_d3d10_bind_flags(desc->BindFlags);
6539 d3d11_desc.CPUAccessFlags = d3d11_cpu_access_flags_from_d3d10_cpu_access_flags(desc->CPUAccessFlags);
6540 d3d11_desc.MiscFlags = d3d11_resource_misc_flags_from_d3d10_resource_misc_flags(desc->MiscFlags);
6541 d3d11_desc.StructureByteStride = 0;
6542
6543 if (FAILED(hr = d3d_buffer_create(device, &d3d11_desc, (const D3D11_SUBRESOURCE_DATA *)data, &object)))
6544 return hr;
6545
6546 *buffer = &object->ID3D10Buffer_iface;
6547
6548 return S_OK;
6549}
6550
6553{
6554 struct d3d_device *device = impl_from_ID3D10Device(iface);
6555 D3D11_TEXTURE1D_DESC d3d11_desc;
6556 struct d3d_texture1d *object;
6557 HRESULT hr;
6558
6559 TRACE("iface %p, desc %p, data %p, texture %p.\n", iface, desc, data, texture);
6560
6561 d3d11_desc.Width = desc->Width;
6562 d3d11_desc.MipLevels = desc->MipLevels;
6563 d3d11_desc.ArraySize = desc->ArraySize;
6564 d3d11_desc.Format = desc->Format;
6565 d3d11_desc.Usage = d3d11_usage_from_d3d10_usage(desc->Usage);
6566 d3d11_desc.BindFlags = d3d11_bind_flags_from_d3d10_bind_flags(desc->BindFlags);
6567 d3d11_desc.CPUAccessFlags = d3d11_cpu_access_flags_from_d3d10_cpu_access_flags(desc->CPUAccessFlags);
6568 d3d11_desc.MiscFlags = d3d11_resource_misc_flags_from_d3d10_resource_misc_flags(desc->MiscFlags);
6569
6570 if (FAILED(hr = d3d_texture1d_create(device, &d3d11_desc, (const D3D11_SUBRESOURCE_DATA *)data, &object)))
6571 return hr;
6572
6573 *texture = &object->ID3D10Texture1D_iface;
6574
6575 return S_OK;
6576}
6577
6581{
6582 struct d3d_device *device = impl_from_ID3D10Device(iface);
6583 D3D11_TEXTURE2D_DESC d3d11_desc;
6584 struct d3d_texture2d *object;
6585 HRESULT hr;
6586
6587 TRACE("iface %p, desc %p, data %p, texture %p.\n", iface, desc, data, texture);
6588
6589 d3d11_desc.Width = desc->Width;
6590 d3d11_desc.Height = desc->Height;
6591 d3d11_desc.MipLevels = desc->MipLevels;
6592 d3d11_desc.ArraySize = desc->ArraySize;
6593 d3d11_desc.Format = desc->Format;
6594 d3d11_desc.SampleDesc = desc->SampleDesc;
6595 d3d11_desc.Usage = d3d11_usage_from_d3d10_usage(desc->Usage);
6596 d3d11_desc.BindFlags = d3d11_bind_flags_from_d3d10_bind_flags(desc->BindFlags);
6597 d3d11_desc.CPUAccessFlags = d3d11_cpu_access_flags_from_d3d10_cpu_access_flags(desc->CPUAccessFlags);
6598 d3d11_desc.MiscFlags = d3d11_resource_misc_flags_from_d3d10_resource_misc_flags(desc->MiscFlags);
6599
6600 if (FAILED(hr = d3d_texture2d_create(device, &d3d11_desc, NULL, (const D3D11_SUBRESOURCE_DATA *)data, &object)))
6601 return hr;
6602
6603 *texture = &object->ID3D10Texture2D_iface;
6604
6605 return S_OK;
6606}
6607
6611{
6612 struct d3d_device *device = impl_from_ID3D10Device(iface);
6613 D3D11_TEXTURE3D_DESC d3d11_desc;
6614 struct d3d_texture3d *object;
6615 HRESULT hr;
6616
6617 TRACE("iface %p, desc %p, data %p, texture %p.\n", iface, desc, data, texture);
6618
6619 d3d11_desc.Width = desc->Width;
6620 d3d11_desc.Height = desc->Height;
6621 d3d11_desc.Depth = desc->Depth;
6622 d3d11_desc.MipLevels = desc->MipLevels;
6623 d3d11_desc.Format = desc->Format;
6624 d3d11_desc.Usage = d3d11_usage_from_d3d10_usage(desc->Usage);
6625 d3d11_desc.BindFlags = d3d11_bind_flags_from_d3d10_bind_flags(desc->BindFlags);
6626 d3d11_desc.CPUAccessFlags = d3d11_cpu_access_flags_from_d3d10_cpu_access_flags(desc->CPUAccessFlags);
6627 d3d11_desc.MiscFlags = d3d11_resource_misc_flags_from_d3d10_resource_misc_flags(desc->MiscFlags);
6628
6629 if (FAILED(hr = d3d_texture3d_create(device, &d3d11_desc, (const D3D11_SUBRESOURCE_DATA *)data, &object)))
6630 return hr;
6631
6632 *texture = &object->ID3D10Texture3D_iface;
6633
6634 return S_OK;
6635}
6636
6639{
6640 struct d3d_device *device = impl_from_ID3D10Device(iface);
6642 ID3D11Resource *d3d11_resource;
6643 HRESULT hr;
6644
6645 TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
6646
6647 *view = NULL;
6648
6649 if (!resource)
6650 return E_INVALIDARG;
6651
6652 if (FAILED(hr = ID3D10Resource_QueryInterface(resource, &IID_ID3D11Resource, (void **)&d3d11_resource)))
6653 {
6654 ERR("Resource does not implement ID3D11Resource.\n");
6655 return E_FAIL;
6656 }
6657
6658 hr = d3d_shader_resource_view_create(device, d3d11_resource, (const D3D11_SHADER_RESOURCE_VIEW_DESC *)desc,
6659 &object);
6660 ID3D11Resource_Release(d3d11_resource);
6661 if (FAILED(hr))
6662 return hr;
6663
6664 *view = &object->ID3D10ShaderResourceView1_iface;
6665
6666 return S_OK;
6667}
6668
6671{
6672 TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
6673
6676}
6677
6680{
6681 struct d3d_device *device = impl_from_ID3D10Device(iface);
6683 ID3D11Resource *d3d11_resource;
6684 HRESULT hr;
6685
6686 TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
6687
6688 *view = NULL;
6689
6690 if (!resource)
6691 return E_INVALIDARG;
6692
6693 if (FAILED(hr = ID3D10Resource_QueryInterface(resource, &IID_ID3D11Resource, (void **)&d3d11_resource)))
6694 {
6695 ERR("Resource does not implement ID3D11Resource.\n");
6696 return E_FAIL;
6697 }
6698
6699 hr = d3d_rendertarget_view_create(device, d3d11_resource, (const D3D11_RENDER_TARGET_VIEW_DESC *)desc, &object);
6700 ID3D11Resource_Release(d3d11_resource);
6701 if (FAILED(hr))
6702 return hr;
6703
6704 *view = &object->ID3D10RenderTargetView_iface;
6705
6706 return S_OK;
6707}
6708
6710{
6711 return (D3D11_DSV_DIMENSION)dim;
6712}
6713
6716{
6717 struct d3d_device *device = impl_from_ID3D10Device(iface);
6718 D3D11_DEPTH_STENCIL_VIEW_DESC d3d11_desc;
6720 ID3D11Resource *d3d11_resource;
6721 HRESULT hr;
6722
6723 TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
6724
6725 *view = NULL;
6726
6727 if (desc)
6728 {
6729 d3d11_desc.Format = desc->Format;
6730 d3d11_desc.ViewDimension = d3d11_dsv_dimension_from_d3d10(desc->ViewDimension);
6731 d3d11_desc.Flags = 0;
6732 memcpy(&d3d11_desc.u, &desc->u, sizeof(d3d11_desc.u));
6733 }
6734
6735 if (FAILED(hr = ID3D10Resource_QueryInterface(resource, &IID_ID3D11Resource, (void **)&d3d11_resource)))
6736 {
6737 ERR("Resource does not implement ID3D11Resource.\n");
6738 return E_FAIL;
6739 }
6740
6741 hr = d3d_depthstencil_view_create(device, d3d11_resource, desc ? &d3d11_desc : NULL, &object);
6742 ID3D11Resource_Release(d3d11_resource);
6743 if (FAILED(hr))
6744 return hr;
6745
6746 *view = &object->ID3D10DepthStencilView_iface;
6747
6748 return S_OK;
6749}
6750
6752 const D3D10_INPUT_ELEMENT_DESC *element_descs, UINT element_count,
6753 const void *shader_byte_code, SIZE_T shader_byte_code_length,
6754 ID3D10InputLayout **input_layout)
6755{
6756 struct d3d_device *device = impl_from_ID3D10Device(iface);
6757 struct d3d_input_layout *object;
6758 HRESULT hr;
6759
6760 TRACE("iface %p, element_descs %p, element_count %u, shader_byte_code %p, "
6761 "shader_byte_code_length %Iu, input_layout %p.\n",
6762 iface, element_descs, element_count, shader_byte_code,
6763 shader_byte_code_length, input_layout);
6764
6766 shader_byte_code, shader_byte_code_length, &object)))
6767 return hr;
6768
6769 *input_layout = &object->ID3D10InputLayout_iface;
6770
6771 return S_OK;
6772}
6773
6775 const void *byte_code, SIZE_T byte_code_length, ID3D10VertexShader **shader)
6776{
6777 struct d3d_device *device = impl_from_ID3D10Device(iface);
6778 struct d3d_vertex_shader *object;
6779 HRESULT hr;
6780
6781 TRACE("iface %p, byte_code %p, byte_code_length %Iu, shader %p.\n",
6782 iface, byte_code, byte_code_length, shader);
6783
6784 *shader = NULL;
6785
6786 if (FAILED(hr = d3d_vertex_shader_create(device, byte_code, byte_code_length, &object)))
6787 return hr;
6788
6789 *shader = &object->ID3D10VertexShader_iface;
6790
6791 return S_OK;
6792}
6793
6795 const void *byte_code, SIZE_T byte_code_length, ID3D10GeometryShader **shader)
6796{
6797 struct d3d_device *device = impl_from_ID3D10Device(iface);
6799 HRESULT hr;
6800
6801 TRACE("iface %p, byte_code %p, byte_code_length %Iu, shader %p.\n",
6802 iface, byte_code, byte_code_length, shader);
6803
6804 *shader = NULL;
6805
6806 if (FAILED(hr = d3d_geometry_shader_create(device, byte_code, byte_code_length,
6807 NULL, 0, NULL, 0, 0, &object)))
6808 return hr;
6809
6810 *shader = &object->ID3D10GeometryShader_iface;
6811
6812 return S_OK;
6813}
6814
6816 const void *byte_code, SIZE_T byte_code_length, const D3D10_SO_DECLARATION_ENTRY *output_stream_decls,
6817 UINT output_stream_decl_count, UINT output_stream_stride, ID3D10GeometryShader **shader)
6818{
6819 struct d3d_device *device = impl_from_ID3D10Device(iface);
6820 D3D11_SO_DECLARATION_ENTRY *so_entries = NULL;
6822 unsigned int i, stride_count = 1;
6823 HRESULT hr;
6824
6825 TRACE("iface %p, byte_code %p, byte_code_length %Iu, output_stream_decls %p, "
6826 "output_stream_decl_count %u, output_stream_stride %u, shader %p.\n",
6827 iface, byte_code, byte_code_length, output_stream_decls,
6828 output_stream_decl_count, output_stream_stride, shader);
6829
6830 *shader = NULL;
6831
6832 if (!output_stream_decl_count && output_stream_stride)
6833 {
6834 WARN("Stride must be 0 when declaration entry count is 0.\n");
6835 return E_INVALIDARG;
6836 }
6837
6838 if (output_stream_decl_count
6839 && !(so_entries = calloc(output_stream_decl_count, sizeof(*so_entries))))
6840 {
6841 ERR("Failed to allocate D3D11 SO declaration array memory.\n");
6842 return E_OUTOFMEMORY;
6843 }
6844
6845 for (i = 0; i < output_stream_decl_count; ++i)
6846 {
6847 so_entries[i].Stream = 0;
6848 so_entries[i].SemanticName = output_stream_decls[i].SemanticName;
6849 so_entries[i].SemanticIndex = output_stream_decls[i].SemanticIndex;
6850 so_entries[i].StartComponent = output_stream_decls[i].StartComponent;
6851 so_entries[i].ComponentCount = output_stream_decls[i].ComponentCount;
6852 so_entries[i].OutputSlot = output_stream_decls[i].OutputSlot;
6853
6854 if (output_stream_decls[i].OutputSlot)
6855 {
6856 stride_count = 0;
6857 if (output_stream_stride)
6858 {
6859 WARN("Stride must be 0 when multiple output slots are used.\n");
6860 free(so_entries);
6861 return E_INVALIDARG;
6862 }
6863 }
6864 }
6865
6866 hr = d3d_geometry_shader_create(device, byte_code, byte_code_length,
6867 so_entries, output_stream_decl_count, &output_stream_stride, stride_count, 0, &object);
6868 free(so_entries);
6869 if (FAILED(hr))
6870 return hr;
6871
6872 *shader = &object->ID3D10GeometryShader_iface;
6873
6874 return hr;
6875}
6876
6878 const void *byte_code, SIZE_T byte_code_length, ID3D10PixelShader **shader)
6879{
6880 struct d3d_device *device = impl_from_ID3D10Device(iface);
6881 struct d3d_pixel_shader *object;
6882 HRESULT hr;
6883
6884 TRACE("iface %p, byte_code %p, byte_code_length %Iu, shader %p.\n",
6885 iface, byte_code, byte_code_length, shader);
6886
6887 *shader = NULL;
6888
6889 if (FAILED(hr = d3d_pixel_shader_create(device, byte_code, byte_code_length, &object)))
6890 return hr;
6891
6892 *shader = &object->ID3D10PixelShader_iface;
6893
6894 return S_OK;
6895}
6896
6898 const D3D10_BLEND_DESC1 *desc, ID3D10BlendState1 **blend_state)
6899{
6900 struct d3d_device *device = impl_from_ID3D10Device(iface);
6901 ID3D11BlendState *object;
6902 HRESULT hr;
6903
6904 TRACE("iface %p, desc %p, blend_state %p.\n", iface, desc, blend_state);
6905
6906 if (FAILED(hr = d3d11_device_CreateBlendState(&device->ID3D11Device2_iface, (const D3D11_BLEND_DESC *)desc, &object)))
6907 return hr;
6908
6909 *blend_state = &impl_from_ID3D11BlendState1((ID3D11BlendState1 *)object)->ID3D10BlendState1_iface;
6910 return S_OK;
6911}
6912
6914 const D3D10_BLEND_DESC *desc, ID3D10BlendState **blend_state)
6915{
6916 D3D10_BLEND_DESC1 d3d10_1_desc;
6917 unsigned int i;
6918
6919 TRACE("iface %p, desc %p, blend_state %p.\n", iface, desc, blend_state);
6920
6921 if (!desc)
6922 return E_INVALIDARG;
6923
6924 d3d10_1_desc.AlphaToCoverageEnable = desc->AlphaToCoverageEnable;
6925 d3d10_1_desc.IndependentBlendEnable = FALSE;
6926 for (i = 0; i < D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT - 1; ++i)
6927 {
6928 if (desc->BlendEnable[i] != desc->BlendEnable[i + 1]
6929 || desc->RenderTargetWriteMask[i] != desc->RenderTargetWriteMask[i + 1])
6930 d3d10_1_desc.IndependentBlendEnable = TRUE;
6931 }
6932
6934 {
6935 d3d10_1_desc.RenderTarget[i].BlendEnable = desc->BlendEnable[i];
6936 d3d10_1_desc.RenderTarget[i].SrcBlend = desc->SrcBlend;
6937 d3d10_1_desc.RenderTarget[i].DestBlend = desc->DestBlend;
6938 d3d10_1_desc.RenderTarget[i].BlendOp = desc->BlendOp;
6939 d3d10_1_desc.RenderTarget[i].SrcBlendAlpha = desc->SrcBlendAlpha;
6940 d3d10_1_desc.RenderTarget[i].DestBlendAlpha = desc->DestBlendAlpha;
6941 d3d10_1_desc.RenderTarget[i].BlendOpAlpha = desc->BlendOpAlpha;
6942 d3d10_1_desc.RenderTarget[i].RenderTargetWriteMask = desc->RenderTargetWriteMask[i];
6943 }
6944
6945 return d3d10_device_CreateBlendState1(iface, &d3d10_1_desc, (ID3D10BlendState1 **)blend_state);
6946}
6947
6949 const D3D10_DEPTH_STENCIL_DESC *desc, ID3D10DepthStencilState **depth_stencil_state)
6950{
6951 struct d3d_device *device = impl_from_ID3D10Device(iface);
6953 HRESULT hr;
6954
6955 TRACE("iface %p, desc %p, depth_stencil_state %p.\n", iface, desc, depth_stencil_state);
6956
6957 if (FAILED(hr = d3d_depthstencil_state_create(device, (const D3D11_DEPTH_STENCIL_DESC *)desc, &object)))
6958 return hr;
6959
6960 *depth_stencil_state = &object->ID3D10DepthStencilState_iface;
6961
6962 return S_OK;
6963}
6964
6966 const D3D10_RASTERIZER_DESC *desc, ID3D10RasterizerState **rasterizer_state)
6967{
6968 struct d3d_device *device = impl_from_ID3D10Device(iface);
6971 HRESULT hr;
6972
6973 TRACE("iface %p, desc %p, rasterizer_state %p.\n", iface, desc, rasterizer_state);
6974
6975 if (!desc)
6976 return E_INVALIDARG;
6977
6978 memcpy(&desc1, desc, sizeof(*desc));
6979 desc1.ForcedSampleCount = 0;
6980
6981 if (FAILED(hr = d3d_rasterizer_state_create(device, &desc1, &object)))
6982 return hr;
6983
6984 *rasterizer_state = &object->ID3D10RasterizerState_iface;
6985
6986 return S_OK;
6987}
6988
6990 const D3D10_SAMPLER_DESC *desc, ID3D10SamplerState **sampler_state)
6991{
6992 struct d3d_device *device = impl_from_ID3D10Device(iface);
6993 struct d3d_sampler_state *object;
6994 HRESULT hr;
6995
6996 TRACE("iface %p, desc %p, sampler_state %p.\n", iface, desc, sampler_state);
6997
6998 if (FAILED(hr = d3d_sampler_state_create(device, (const D3D11_SAMPLER_DESC *)desc, &object)))
6999 return hr;
7000
7001 *sampler_state = &object->ID3D10SamplerState_iface;
7002
7003 return S_OK;
7004}
7005
7008{
7009 struct d3d_device *device = impl_from_ID3D10Device(iface);
7010 struct d3d_query *object;
7011 HRESULT hr;
7012
7013 TRACE("iface %p, desc %p, query %p.\n", iface, desc, query);
7014
7015 if (FAILED(hr = d3d_query_create(device, (const D3D11_QUERY_DESC *)desc, FALSE, &object)))
7016 return hr;
7017
7018 if (query)
7019 {
7020 *query = &object->ID3D10Query_iface;
7021 return S_OK;
7022 }
7023
7024 ID3D10Query_Release(&object->ID3D10Query_iface);
7025 return S_FALSE;
7026}
7027
7030{
7031 struct d3d_device *device = impl_from_ID3D10Device(iface);
7032 struct d3d_query *object;
7033 HRESULT hr;
7034
7035 TRACE("iface %p, desc %p, predicate %p.\n", iface, desc, predicate);
7036
7037 if (FAILED(hr = d3d_query_create(device, (const D3D11_QUERY_DESC *)desc, TRUE, &object)))
7038 return hr;
7039
7040 if (predicate)
7041 {
7042 *predicate = (ID3D10Predicate *)&object->ID3D10Query_iface;
7043 return S_OK;
7044 }
7045
7046 ID3D10Query_Release(&object->ID3D10Query_iface);
7047 return S_FALSE;
7048}
7049
7052{
7053 FIXME("iface %p, desc %p, counter %p stub!\n", iface, desc, counter);
7054
7055 return E_NOTIMPL;
7056}
7057
7059 DXGI_FORMAT format, UINT *format_support)
7060{
7061 struct d3d_device *device = impl_from_ID3D10Device(iface);
7062
7063 TRACE("iface %p, format %s, format_support %p.\n",
7064 iface, debug_dxgi_format(format), format_support);
7065
7066 return d3d11_device_CheckFormatSupport(&device->ID3D11Device2_iface, format, format_support);
7067}
7068
7070 DXGI_FORMAT format, UINT sample_count, UINT *quality_level_count)
7071{
7072 struct d3d_device *device = impl_from_ID3D10Device(iface);
7073
7074 TRACE("iface %p, format %s, sample_count %u, quality_level_count %p.\n",
7075 iface, debug_dxgi_format(format), sample_count, quality_level_count);
7076
7077 return d3d11_device_CheckMultisampleQualityLevels(&device->ID3D11Device2_iface, format,
7078 sample_count, quality_level_count);
7079}
7080
7082{
7083 FIXME("iface %p, counter_info %p stub!\n", iface, counter_info);
7084}
7085
7087 const D3D10_COUNTER_DESC *desc, D3D10_COUNTER_TYPE *type, UINT *active_counters, char *name,
7088 UINT *name_length, char *units, UINT *units_length, char *description, UINT *description_length)
7089{
7090 FIXME("iface %p, desc %p, type %p, active_counters %p, name %p, name_length %p, "
7091 "units %p, units_length %p, description %p, description_length %p stub!\n",
7092 iface, desc, type, active_counters, name, name_length,
7093 units, units_length, description, description_length);
7094
7095 return E_NOTIMPL;
7096}
7097
7099{
7100 FIXME("iface %p stub!\n", iface);
7101
7102 return 0;
7103}
7104
7106 HANDLE resource_handle, REFIID guid, void **resource)
7107{
7108 FIXME("iface %p, resource_handle %p, guid %s, resource %p stub!\n",
7109 iface, resource_handle, debugstr_guid(guid), resource);
7110
7111 return E_NOTIMPL;
7112}
7113
7115{
7116 FIXME("iface %p, width %u, height %u stub!\n", iface, width, height);
7117}
7118
7120{
7121 FIXME("iface %p, width %p, height %p stub!\n", iface, width, height);
7122}
7123
7125{
7127}
7128
7130{
7131 struct d3d_device *device = impl_from_ID3D10Device(iface);
7132
7133 TRACE("iface %p.\n", iface);
7134
7135 return d3d10_feature_level1_from_d3d_feature_level(device->state->feature_level);
7136}
7137
7138static const struct ID3D10Device1Vtbl d3d10_device1_vtbl =
7139{
7140 /* IUnknown methods */
7144 /* ID3D10Device methods */
7243};
7244
7245static const struct IUnknownVtbl d3d_device_inner_unknown_vtbl =
7246{
7247 /* IUnknown methods */
7251};
7252
7253/* ID3D10Multithread methods */
7254
7256{
7258}
7259
7261{
7263
7264 TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
7265
7266 return IUnknown_QueryInterface(device->outer_unk, iid, out);
7267}
7268
7270{
7272
7273 TRACE("iface %p.\n", iface);
7274
7275 return IUnknown_AddRef(device->outer_unk);
7276}
7277
7279{
7281
7282 TRACE("iface %p.\n", iface);
7283
7284 return IUnknown_Release(device->outer_unk);
7285}
7286
7288{
7289 TRACE("iface %p.\n", iface);
7290
7292}
7293
7295{
7296 TRACE("iface %p.\n", iface);
7297
7299}
7300
7302{
7303 FIXME("iface %p, enable %#x stub!\n", iface, enable);
7304
7305 return TRUE;
7306}
7307
7309{
7310 FIXME("iface %p stub!\n", iface);
7311
7312 return TRUE;
7313}
7314
7315static const struct ID3D10MultithreadVtbl d3d10_multithread_vtbl =
7316{
7324};
7325
7327{
7329}
7330
7332 REFIID iid, void **out)
7333{
7335 return IUnknown_QueryInterface(device->outer_unk, iid, out);
7336}
7337
7339{
7341 return IUnknown_AddRef(device->outer_unk);
7342}
7343
7345{
7347 return IUnknown_Release(device->outer_unk);
7348}
7349
7351 const D3D11_VIDEO_DECODER_DESC *desc, const D3D11_VIDEO_DECODER_CONFIG *config, ID3D11VideoDecoder **decoder)
7352{
7354 struct d3d_video_decoder *object;
7355 HRESULT hr;
7356
7357 FIXME("iface %p, desc %p, config %p, decoder %p, stub!\n", iface, desc, config, decoder);
7358
7360 return hr;
7361
7362 *decoder = &object->ID3D11VideoDecoder_iface;
7363 return S_OK;
7364}
7365
7367 ID3D11VideoProcessorEnumerator *enumerator, UINT rate_conversion_index, ID3D11VideoProcessor **processor)
7368{
7369 FIXME("iface %p, enumerator %p, rate_conversion_index %u, processor %p, stub!\n",
7370 iface, enumerator, rate_conversion_index, processor);
7371 return E_NOTIMPL;
7372}
7373
7375 D3D11_AUTHENTICATED_CHANNEL_TYPE type, ID3D11AuthenticatedChannel **channel)
7376{
7377 FIXME("iface %p, type %#x, channel %p, stub!\n", iface, type, channel);
7378 return E_NOTIMPL;
7379}
7380
7382 const GUID *encryption_type, const GUID *profile, const GUID *key_exchange_type,
7383 ID3D11CryptoSession **session)
7384{
7385 FIXME("iface %p, encryption_type %s, profile %s, key_exchange_type %s, session %p, stub!\n",
7386 iface, debugstr_guid(encryption_type), debugstr_guid(profile), debugstr_guid(key_exchange_type), session);
7387 return E_NOTIMPL;
7388}
7389
7391 ID3D11Resource *resource, const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *desc, ID3D11VideoDecoderOutputView **view)
7392{
7395 HRESULT hr;
7396
7397 TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
7398
7399 *view = NULL;
7400
7401 if (!resource)
7402 return E_INVALIDARG;
7403
7405 return hr;
7406
7407 *view = &object->ID3D11VideoDecoderOutputView_iface;
7408
7409 return S_OK;
7410}
7411
7413 ID3D11VideoDevice1 *iface, ID3D11Resource *resource, ID3D11VideoProcessorEnumerator *enumerator,
7414 const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *desc, ID3D11VideoProcessorInputView **view)
7415{
7416 FIXME("iface %p, resource %p, enumerator %p, desc %p, view %p, stub!\n", iface, resource, enumerator, desc, view);
7417 return E_NOTIMPL;
7418}
7419
7421 ID3D11VideoDevice1 *iface, ID3D11Resource *resource, ID3D11VideoProcessorEnumerator *enumerator,
7422 const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *desc, ID3D11VideoProcessorOutputView **view)
7423{
7424 FIXME("iface %p, resource %p, enumerator %p, desc %p, view %p, stub!\n", iface, resource, enumerator, desc, view);
7425 return E_NOTIMPL;
7426}
7427
7429 const D3D11_VIDEO_PROCESSOR_CONTENT_DESC *desc, ID3D11VideoProcessorEnumerator **enumerator)
7430{
7431 FIXME("iface %p, desc %p, enumerator %p, stub!\n", iface, desc, enumerator);
7432 return E_NOTIMPL;
7433}
7434
7436{
7437 FIXME("iface %p, stub!\n", iface);
7438 return 0;
7439}
7440
7443{
7444 FIXME("iface %p, index %u, profile %p, stub!\n", iface, index, profile);
7445 return E_NOTIMPL;
7446}
7447
7449 ID3D11VideoDevice1 *iface, const GUID *profile, DXGI_FORMAT format, BOOL *supported)
7450{
7451 FIXME("iface %p, profile %s, format %#x, supported %p, stub!\n", iface, debugstr_guid(profile), format, supported);
7452 return E_NOTIMPL;
7453}
7454
7456 const D3D11_VIDEO_DECODER_DESC *desc, UINT *count)
7457{
7458 FIXME("iface %p, desc %p, count %p, stub!\n", iface, desc, count);
7459 return E_NOTIMPL;
7460}
7461
7463 const D3D11_VIDEO_DECODER_DESC *desc, UINT index, D3D11_VIDEO_DECODER_CONFIG *config)
7464{
7465 FIXME("iface %p, desc %p, index %u, config %p, stub!\n", iface, desc, index, config);
7466 return E_NOTIMPL;
7467}
7468
7470 const GUID *encryption_type, const GUID *profile, D3D11_VIDEO_CONTENT_PROTECTION_CAPS *caps)
7471{
7472 FIXME("iface %p, encryption_type %s, profile %s, caps %p, stub!\n",
7473 iface, debugstr_guid(encryption_type), debugstr_guid(profile), caps);
7474 return E_NOTIMPL;
7475}
7476
7478 const GUID *encryption_type, const GUID *profile, UINT index, GUID *key_exchange_type)
7479{
7480 FIXME("iface %p, encryption_type %s, profile %s, index %u, key_exchange_type %p, stub!\n",
7481 iface, debugstr_guid(encryption_type), debugstr_guid(profile), index, key_exchange_type);
7482 return E_NOTIMPL;
7483}
7484
7486 ID3D11VideoDevice1 *iface, REFGUID guid, UINT size, const void *data)
7487{
7488 TRACE("iface %p, guid %s, size %u, data %p.\n", iface, debugstr_guid(guid), size, data);
7489 return E_NOTIMPL;
7490}
7491
7494{
7495 TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data);
7496 return E_NOTIMPL;
7497}
7498
7500 ID3D11VideoDevice1 *iface, const GUID *encryption_type, const GUID *profile,
7501 const GUID *key_exchange_type, UINT *input_size, UINT *output_size)
7502{
7503 FIXME("iface %p, encryption_type %s, profile %s, key_exchange_type %s, input_size %p, output_size %p, stub!\n",
7504 iface, debugstr_guid(encryption_type), debugstr_guid(profile),
7505 debugstr_guid(key_exchange_type), input_size, output_size);
7506 return E_NOTIMPL;
7507}
7508
7511 const DXGI_RATIONAL *framerate, UINT bitrate, const GUID *encryption_type, UINT *caps)
7512{
7513 TRACE("iface %p, profile %s, width %u, height %u, framerate %u/%u, bitrate %u, encryption_type %s, caps %p, stub!\n",
7514 iface, debugstr_guid(profile), width, height, framerate->Numerator, framerate->Denominator,
7515 bitrate, debugstr_guid(encryption_type), caps);
7516 return E_NOTIMPL;
7517}
7518
7520 const D3D11_VIDEO_DECODER_DESC *input_desc, DXGI_COLOR_SPACE_TYPE input_colour_space,
7521 const D3D11_VIDEO_DECODER_CONFIG *config, const DXGI_RATIONAL *framerate,
7522 const D3D11_VIDEO_SAMPLE_DESC *output_desc, BOOL *supported, BOOL *real_time_hint)
7523{
7524 TRACE("iface %p, input_desc %p, input_colour_space %#x, config %p,"
7525 " framerate %u/%u, output_desc %p, supported %p, real_time_hint %p, stub!\n",
7526 iface, input_desc, input_colour_space, config,
7527 framerate->Numerator, framerate->Denominator, output_desc, supported, real_time_hint);
7528 return E_NOTIMPL;
7529}
7530
7532 const D3D11_VIDEO_DECODER_DESC *input_desc, DXGI_COLOR_SPACE_TYPE input_colour_space,
7533 const D3D11_VIDEO_DECODER_CONFIG *config, const DXGI_RATIONAL *framerate,
7534 D3D11_VIDEO_SAMPLE_DESC *output_desc)
7535{
7536 TRACE("iface %p, input_desc %p, input_colour_space %#x, config %p, framerate %u/%u, output_desc %p, stub!\n",
7537 iface, input_desc, input_colour_space, config, framerate->Numerator, framerate->Denominator, output_desc);
7538 return E_NOTIMPL;
7539}
7540
7541static const struct ID3D11VideoDevice1Vtbl d3d11_video_device1_vtbl =
7542{
7567};
7568
7569/* IWineDXGIDeviceParent IUnknown methods */
7570
7572{
7574}
7575
7577 REFIID iid, void **out)
7578{
7580 return IUnknown_QueryInterface(device->outer_unk, iid, out);
7581}
7582
7584{
7586 return IUnknown_AddRef(device->outer_unk);
7587}
7588
7590{
7592 return IUnknown_Release(device->outer_unk);
7593}
7594
7596 IWineDXGIDeviceParent *iface)
7597{
7599 return &device->device_parent;
7600}
7601
7603 struct wined3d_texture *wined3d_texture, unsigned int texture_flags, IDXGISurface **ret_surface)
7604{
7606 struct wined3d_resource_desc wined3d_desc;
7607 struct d3d_texture2d *object;
7608 D3D11_TEXTURE2D_DESC desc;
7609 HRESULT hr;
7610
7612
7613 desc.Width = wined3d_desc.width;
7614 desc.Height = wined3d_desc.height;
7615 desc.MipLevels = 1;
7616 desc.ArraySize = 1;
7617 desc.Format = dxgi_format_from_wined3dformat(wined3d_desc.format);
7618 desc.SampleDesc.Count = wined3d_desc.multisample_type ? wined3d_desc.multisample_type : 1;
7619 desc.SampleDesc.Quality = wined3d_desc.multisample_quality;
7620 desc.Usage = D3D11_USAGE_DEFAULT;
7621 desc.BindFlags = d3d11_bind_flags_from_wined3d(wined3d_desc.bind_flags);
7622 desc.CPUAccessFlags = 0;
7623 desc.MiscFlags = 0;
7624
7625 if (texture_flags & WINED3D_TEXTURE_CREATE_GET_DC)
7626 {
7628 texture_flags &= ~WINED3D_TEXTURE_CREATE_GET_DC;
7629 }
7630
7631 if (texture_flags)
7632 FIXME("Unhandled flags %#x.\n", texture_flags);
7633
7635 return hr;
7636
7637 hr = IUnknown_QueryInterface(object->dxgi_resource, &IID_IDXGISurface, (void **)ret_surface);
7638 ID3D11Texture2D_Release(&object->ID3D11Texture2D_iface);
7639 return hr;
7640}
7641
7642static const struct IWineDXGIDeviceParentVtbl d3d_dxgi_device_parent_vtbl =
7643{
7644 /* IUnknown methods */
7648 /* IWineDXGIDeviceParent methods */
7651};
7652
7654{
7656}
7657
7660{
7665
7666 TRACE("device_parent %p, wined3d_device %p.\n", device_parent, wined3d_device);
7667
7669 device->wined3d_device = wined3d_device;
7670 device->immediate_context.wined3d_context = wined3d_device_get_immediate_context(wined3d_device);
7671
7674
7675 if (!(state = calloc(1, sizeof(*state))))
7676 {
7677 ERR("Failed to create the initial device context state.\n");
7678 return;
7679 }
7680
7682 device->d3d11_only ? &IID_ID3D11Device2 : &IID_ID3D10Device1);
7683
7684 device->state = state;
7686 ERR("Failed to add entry for wined3d state %p, device %p.\n", wined3d_state, device);
7687
7689 ID3DDeviceContextState_Release(&state->ID3DDeviceContextState_iface);
7690}
7691
7693{
7694 TRACE("device_parent %p.\n", device_parent);
7695}
7696
7697static void CDECL device_parent_activate(struct wined3d_device_parent *device_parent, BOOL activate)
7698{
7699 TRACE("device_parent %p, activate %#x.\n", device_parent, activate);
7700}
7701
7703 enum wined3d_resource_type type, struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx,
7704 void **parent, const struct wined3d_parent_ops **parent_ops)
7705{
7706 TRACE("device_parent %p, type %#x, wined3d_texture %p, sub_resource_idx %u, parent %p, parent_ops %p.\n",
7707 device_parent, type, wined3d_texture, sub_resource_idx, parent, parent_ops);
7708
7709 *parent = NULL;
7710 *parent_ops = &d3d_null_wined3d_parent_ops;
7711
7712 return S_OK;
7713}
7714
7716{
7721};
7722
7723static int d3d_sampler_state_compare(const void *key, const struct wine_rb_entry *entry)
7724{
7725 const D3D11_SAMPLER_DESC *ka = key;
7726 const D3D11_SAMPLER_DESC *kb = &WINE_RB_ENTRY_VALUE(entry, const struct d3d_sampler_state, entry)->desc;
7727
7728 return memcmp(ka, kb, sizeof(*ka));
7729}
7730
7731static int d3d_blend_state_compare(const void *key, const struct wine_rb_entry *entry)
7732{
7733 const D3D11_BLEND_DESC1 *ka = key;
7734 const D3D11_BLEND_DESC1 *kb = &WINE_RB_ENTRY_VALUE(entry, const struct d3d_blend_state, entry)->desc;
7735
7736 return memcmp(ka, kb, sizeof(*ka));
7737}
7738
7739static int d3d_depthstencil_state_compare(const void *key, const struct wine_rb_entry *entry)
7740{
7741 const D3D11_DEPTH_STENCIL_DESC *ka = key;
7742 const D3D11_DEPTH_STENCIL_DESC *kb = &WINE_RB_ENTRY_VALUE(entry,
7743 const struct d3d_depthstencil_state, entry)->desc;
7744
7745 return memcmp(ka, kb, sizeof(*ka));
7746}
7747
7748static int d3d_rasterizer_state_compare(const void *key, const struct wine_rb_entry *entry)
7749{
7750 const D3D11_RASTERIZER_DESC1 *ka = key;
7752
7753 return memcmp(ka, kb, sizeof(*ka));
7754}
7755
7756void d3d_device_init(struct d3d_device *device, void *outer_unknown)
7757{
7758 device->IUnknown_inner.lpVtbl = &d3d_device_inner_unknown_vtbl;
7759 device->ID3D11Device2_iface.lpVtbl = &d3d11_device_vtbl;
7760 device->ID3D10Device1_iface.lpVtbl = &d3d10_device1_vtbl;
7761 device->ID3D10Multithread_iface.lpVtbl = &d3d10_multithread_vtbl;
7762 device->ID3D11VideoDevice1_iface.lpVtbl = &d3d11_video_device1_vtbl;
7763 device->IWineDXGIDeviceParent_iface.lpVtbl = &d3d_dxgi_device_parent_vtbl;
7764 device->device_parent.ops = &d3d_wined3d_device_parent_ops;
7765 device->refcount = 1;
7766 /* COM aggregation always takes place */
7767 device->outer_unk = outer_unknown;
7768 device->d3d11_only = FALSE;
7769 device->state = NULL;
7770
7772 ID3D11DeviceContext1_Release(&device->immediate_context.ID3D11DeviceContext1_iface);
7773
7775 wine_rb_init(&device->depthstencil_states, d3d_depthstencil_state_compare);
7776 wine_rb_init(&device->rasterizer_states, d3d_rasterizer_state_compare);
7778}
unsigned char UINT8
Definition: actypes.h:128
_Check_return_ _Ret_maybenull_ _In_ size_t alignment
Definition: align.cpp:48
static int state
Definition: maze.c:121
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
unsigned int rate
Definition: audiorecord.c:87
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
const GUID IID_IUnknown
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
Definition: list.h:39
RECT rect
Definition: combotst.c:67
void CDECL wined3d_device_context_dispatch_indirect(struct wined3d_device_context *context, struct wined3d_buffer *buffer, unsigned int offset)
Definition: cs.c:1049
void CDECL wined3d_deferred_context_destroy(struct wined3d_device_context *context)
Definition: cs.c:4472
void CDECL wined3d_device_context_draw_indirect(struct wined3d_device_context *context, struct wined3d_buffer *buffer, unsigned int offset, bool indexed)
Definition: cs.c:1191
void CDECL wined3d_device_context_dispatch(struct wined3d_device_context *context, unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z)
Definition: cs.c:1030
ULONG CDECL wined3d_command_list_decref(struct wined3d_command_list *list)
Definition: cs.c:4651
HRESULT CDECL wined3d_deferred_context_create(struct wined3d_device *device, struct wined3d_device_context **context)
Definition: cs.c:4443
HRESULT CDECL wined3d_deferred_context_record_command_list(struct wined3d_device_context *context, bool restore, struct wined3d_command_list **list)
Definition: cs.c:4520
const unsigned int D3D10_COMMONSHADER_SAMPLER_SLOT_COUNT
Definition: d3d10.idl:98
const unsigned int D3D10_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT
Definition: d3d10.idl:93
D3D10_DSV_DIMENSION
Definition: d3d10.idl:603
D3D10_COUNTER_TYPE
Definition: d3d10.idl:439
const unsigned int D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT
Definition: d3d10.idl:203
const unsigned int D3D10_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT
Definition: d3d10.idl:75
const unsigned int D3D10_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT
Definition: d3d10.idl:147
D3D10_FEATURE_LEVEL1
Definition: d3d10_1.idl:53
D3D11_VIDEO_PROCESSOR_STEREO_FORMAT
Definition: d3d11.idl:357
@ D3D11_TILED_RESOURCES_NOT_SUPPORTED
Definition: d3d11.idl:758
const UINT D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT
Definition: d3d11.idl:168
D3D11_VIDEO_DECODER_BUFFER_TYPE
Definition: d3d11.idl:329
const UINT D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT
Definition: d3d11.idl:175
D3D11_DEVICE_CONTEXT_TYPE
Definition: d3d11.idl:643
@ D3D11_DEVICE_CONTEXT_DEFERRED
Definition: d3d11.idl:645
@ D3D11_DEVICE_CONTEXT_IMMEDIATE
Definition: d3d11.idl:644
const UINT D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT
Definition: d3d11.idl:71
D3D11_FEATURE
Definition: d3d11.idl:660
@ D3D11_FEATURE_D3D11_OPTIONS
Definition: d3d11.idl:666
@ D3D11_FEATURE_FORMAT_SUPPORT
Definition: d3d11.idl:663
@ D3D11_FEATURE_THREADING
Definition: d3d11.idl:661
@ D3D11_FEATURE_ARCHITECTURE_INFO
Definition: d3d11.idl:667
@ D3D11_FEATURE_DOUBLES
Definition: d3d11.idl:662
@ D3D11_FEATURE_D3D11_OPTIONS1
Definition: d3d11.idl:671
@ D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS
Definition: d3d11.idl:665
@ D3D11_FEATURE_D3D11_OPTIONS3
Definition: d3d11.idl:676
@ D3D11_FEATURE_D3D9_OPTIONS
Definition: d3d11.idl:668
@ D3D11_FEATURE_D3D11_OPTIONS2
Definition: d3d11.idl:675
const UINT D3D11_KEEP_UNORDERED_ACCESS_VIEWS
Definition: d3d11.idl:182
@ D3D11_RESOURCE_MISC_GDI_COMPATIBLE
Definition: d3d11.idl:1042
const unsigned int D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT
Definition: d3d11.idl:172
D3D11_DSV_DIMENSION
Definition: d3d11.idl:649
const UINT D3D11_PS_CS_UAV_REGISTER_COUNT
Definition: d3d11.idl:195
@ D3D11_CONSERVATIVE_RASTERIZATION_NOT_SUPPORTED
Definition: d3d11.idl:792
const UINT D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT
Definition: d3d11.idl:66
const UINT D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL
Definition: d3d11.idl:181
D3D11_VIDEO_PROCESSOR_OUTPUT_RATE
Definition: d3d11.idl:350
D3D11_VIDEO_PROCESSOR_ROTATION
Definition: d3d11.idl:376
const UINT D3D11_COMMONSHADER_CONSTANT_BUFFER_PARTIAL_UPDATE_EXTENTS_BYTE_ALIGNMENT
Definition: d3d11.idl:51
D3D11_COUNTER_TYPE
Definition: d3d11.idl:616
D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE
Definition: d3d11.idl:342
D3D11_MAP
Definition: d3d11.idl:971
@ D3D11_MAP_WRITE_NO_OVERWRITE
Definition: d3d11.idl:976
@ D3D11_MAP_WRITE_DISCARD
Definition: d3d11.idl:975
D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE
Definition: d3d11.idl:369
const UINT D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT
Definition: d3d11.idl:47
@ D3D11_LOGIC_OP_COPY
Definition: d3d11_1.idl:29
HRESULT d3d_blend_state_create(struct d3d_device *device, const D3D11_BLEND_DESC1 *desc, struct d3d_blend_state **state)
Definition: state.c:346
UINT d3d11_bind_flags_from_d3d10_bind_flags(UINT bind_flags)
Definition: utils.c:485
struct wined3d_resource * wined3d_resource_from_d3d11_resource(ID3D11Resource *resource)
Definition: utils.c:680
HRESULT d3d11_domain_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length, struct d3d11_domain_shader **shader)
Definition: shader.c:671
struct d3d11_unordered_access_view * unsafe_impl_from_ID3D11UnorderedAccessView(ID3D11UnorderedAccessView *iface)
Definition: view.c:2575
static struct d3d_depthstencil_state * impl_from_ID3D11DepthStencilState(ID3D11DepthStencilState *iface)
struct d3d_rendertarget_view * unsafe_impl_from_ID3D11RenderTargetView(ID3D11RenderTargetView *iface)
Definition: view.c:1778
struct d3d_vertex_shader * unsafe_impl_from_ID3D10VertexShader(ID3D10VertexShader *iface)
Definition: shader.c:318
HRESULT d3d_geometry_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length, const D3D11_SO_DECLARATION_ENTRY *so_entries, unsigned int so_entry_count, const unsigned int *buffer_strides, unsigned int buffer_stride_count, unsigned int rasterizer_stream, struct d3d_geometry_shader **shader)
Definition: shader.c:1156
const char * debug_dxgi_format(DXGI_FORMAT format)
Definition: utils.c:46
struct d3d11_compute_shader * unsafe_impl_from_ID3D11ComputeShader(ID3D11ComputeShader *iface)
Definition: shader.c:1676
const char * debug_float4(const float *values)
Definition: utils.c:161
enum wined3d_format_id wined3dformat_from_dxgi_format(DXGI_FORMAT format)
Definition: utils.c:323
struct d3d_rasterizer_state * unsafe_impl_from_ID3D11RasterizerState(ID3D11RasterizerState *iface)
Definition: state.c:1269
HRESULT d3d_video_decoder_create(struct d3d_device *device, const D3D11_VIDEO_DECODER_DESC *desc, const D3D11_VIDEO_DECODER_CONFIG *config, struct d3d_video_decoder **decoder)
Definition: decoder.c:142
struct d3d_sampler_state * unsafe_impl_from_ID3D11SamplerState(ID3D11SamplerState *iface)
Definition: state.c:1682
UINT d3d11_cpu_access_flags_from_d3d10_cpu_access_flags(UINT cpu_access_flags)
Definition: utils.c:522
struct d3d11_domain_shader * unsafe_impl_from_ID3D11DomainShader(ID3D11DomainShader *iface)
Definition: shader.c:692
struct d3d11_hull_shader * unsafe_impl_from_ID3D11HullShader(ID3D11HullShader *iface)
Definition: shader.c:505
HRESULT d3d_input_layout_create(struct d3d_device *device, const D3D11_INPUT_ELEMENT_DESC *element_descs, UINT element_count, const void *shader_byte_code, SIZE_T shader_byte_code_length, struct d3d_input_layout **layout)
Definition: inputlayout.c:385
struct d3d_vertex_shader * unsafe_impl_from_ID3D11VertexShader(ID3D11VertexShader *iface)
Definition: shader.c:309
HRESULT d3d_get_private_data(struct wined3d_private_store *store, REFGUID guid, UINT *data_size, void *data)
Definition: utils.c:803
struct d3d_depthstencil_view * unsafe_impl_from_ID3D11DepthStencilView(ID3D11DepthStencilView *iface)
Definition: view.c:1337
static struct d3d_blend_state * impl_from_ID3D11BlendState1(ID3D11BlendState1 *iface)
static struct d3d_device * impl_from_ID3D10Device(ID3D10Device1 *iface)
struct d3d_depthstencil_view * unsafe_impl_from_ID3D10DepthStencilView(ID3D10DepthStencilView *iface)
Definition: view.c:1346
HRESULT d3d_texture2d_create(struct d3d_device *device, const D3D11_TEXTURE2D_DESC *desc, struct wined3d_texture *wined3d_texture, const D3D11_SUBRESOURCE_DATA *data, struct d3d_texture2d **out)
Definition: texture.c:964
HRESULT d3d_rasterizer_state_create(struct d3d_device *device, const D3D11_RASTERIZER_DESC1 *desc, struct d3d_rasterizer_state **state)
Definition: state.c:1228
void d3d11_primitive_topology_from_wined3d_primitive_type(enum wined3d_primitive_type primitive_type, unsigned int patch_vertex_count, D3D11_PRIMITIVE_TOPOLOGY *topology)
Definition: utils.c:169
struct d3d_pixel_shader * unsafe_impl_from_ID3D11PixelShader(ID3D11PixelShader *iface)
Definition: shader.c:1482
struct d3d_blend_state * unsafe_impl_from_ID3D11BlendState(ID3D11BlendState *iface)
Definition: state.c:469
struct d3d_geometry_shader * unsafe_impl_from_ID3D10GeometryShader(ID3D10GeometryShader *iface)
Definition: shader.c:1190
HRESULT d3d_texture1d_create(struct d3d_device *device, const D3D11_TEXTURE1D_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, struct d3d_texture1d **texture)
Definition: texture.c:440
struct d3d_rasterizer_state * unsafe_impl_from_ID3D10RasterizerState(ID3D10RasterizerState *iface)
Definition: state.c:1278
DWORD wined3d_map_flags_from_d3d11_map_type(D3D11_MAP map_type)
Definition: utils.c:740
static struct d3d_device * impl_from_ID3D11Device2(ID3D11Device2 *iface)
void wined3d_primitive_type_from_d3d11_primitive_topology(D3D11_PRIMITIVE_TOPOLOGY topology, enum wined3d_primitive_type *type, unsigned int *patch_vertex_count)
Definition: utils.c:187
struct wined3d_resource * wined3d_resource_from_d3d10_resource(ID3D10Resource *resource)
Definition: utils.c:710
HRESULT d3d_shader_resource_view_create(struct d3d_device *device, ID3D11Resource *resource, const D3D11_SHADER_RESOURCE_VIEW_DESC *desc, struct d3d_shader_resource_view **view)
Definition: view.c:2250
struct d3d_input_layout * unsafe_impl_from_ID3D10InputLayout(ID3D10InputLayout *iface)
Definition: inputlayout.c:421
HRESULT d3d11_class_linkage_create(struct d3d_device *device, struct d3d11_class_linkage **class_linkage)
Definition: shader.c:1818
HRESULT d3d_video_decoder_output_view_create(struct d3d_device *device, ID3D11Resource *resource, const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *desc, struct d3d_video_decoder_output_view **view)
Definition: view.c:2729
HRESULT d3d_texture3d_create(struct d3d_device *device, const D3D11_TEXTURE3D_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, struct d3d_texture3d **texture)
Definition: texture.c:1514
unsigned int wined3d_getdata_flags_from_d3d11_async_getdata_flags(unsigned int d3d11_flags)
Definition: utils.c:436
HRESULT d3d_vertex_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length, struct d3d_vertex_shader **shader)
Definition: shader.c:287
struct d3d_geometry_shader * unsafe_impl_from_ID3D11GeometryShader(ID3D11GeometryShader *iface)
Definition: shader.c:1181
struct d3d_rendertarget_view * unsafe_impl_from_ID3D10RenderTargetView(ID3D10RenderTargetView *iface)
Definition: view.c:1787
enum D3D11_USAGE d3d11_usage_from_d3d10_usage(enum D3D10_USAGE usage)
Definition: utils.c:457
DWORD wined3d_clear_flags_from_d3d11_clear_flags(UINT clear_flags)
Definition: utils.c:770
struct d3d_depthstencil_state * unsafe_impl_from_ID3D11DepthStencilState(ID3D11DepthStencilState *iface)
Definition: state.c:870
struct d3d_shader_resource_view * unsafe_impl_from_ID3D10ShaderResourceView(ID3D10ShaderResourceView *iface)
Definition: view.c:2280
struct d3d_depthstencil_state * unsafe_impl_from_ID3D10DepthStencilState(ID3D10DepthStencilState *iface)
Definition: state.c:879
HRESULT d3d_sampler_state_create(struct d3d_device *device, const D3D11_SAMPLER_DESC *desc, struct d3d_sampler_state **state)
Definition: state.c:1627
HRESULT d3d_set_private_data_interface(struct wined3d_private_store *store, REFGUID guid, const IUnknown *object)
Definition: utils.c:867
HRESULT d3d_pixel_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length, struct d3d_pixel_shader **shader)
Definition: shader.c:1460
struct d3d_input_layout * unsafe_impl_from_ID3D11InputLayout(ID3D11InputLayout *iface)
Definition: inputlayout.c:412
HRESULT d3d11_unordered_access_view_create(struct d3d_device *device, ID3D11Resource *resource, const D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, struct d3d11_unordered_access_view **view)
Definition: view.c:2553
HRESULT d3d_depthstencil_view_create(struct d3d_device *device, ID3D11Resource *resource, const D3D11_DEPTH_STENCIL_VIEW_DESC *desc, struct d3d_depthstencil_view **view)
Definition: view.c:1315
HRESULT d3d11_hull_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length, struct d3d11_hull_shader **shader)
Definition: shader.c:484
HRESULT d3d_rendertarget_view_create(struct d3d_device *device, ID3D11Resource *resource, const D3D11_RENDER_TARGET_VIEW_DESC *desc, struct d3d_rendertarget_view **view)
Definition: view.c:1756
static UINT d3d11_bind_flags_from_wined3d(unsigned int bind_flags)
struct d3d_blend_state * unsafe_impl_from_ID3D10BlendState(ID3D10BlendState *iface)
Definition: state.c:478
UINT d3d11_resource_misc_flags_from_d3d10_resource_misc_flags(UINT resource_misc_flags)
Definition: utils.c:546
HRESULT d3d_set_private_data(struct wined3d_private_store *store, REFGUID guid, UINT data_size, const void *data)
Definition: utils.c:841
struct d3d_pixel_shader * unsafe_impl_from_ID3D10PixelShader(ID3D10PixelShader *iface)
Definition: shader.c:1491
HRESULT d3d11_compute_shader_create(struct d3d_device *device, const void *byte_code, SIZE_T byte_code_length, struct d3d11_compute_shader **shader)
Definition: shader.c:1655
struct d3d_sampler_state * unsafe_impl_from_ID3D10SamplerState(ID3D10SamplerState *iface)
Definition: state.c:1691
HRESULT d3d_depthstencil_state_create(struct d3d_device *device, const D3D11_DEPTH_STENCIL_DESC *desc, struct d3d_depthstencil_state **state)
Definition: state.c:751
struct d3d_shader_resource_view * unsafe_impl_from_ID3D11ShaderResourceView(ID3D11ShaderResourceView *iface)
Definition: view.c:2272
DXGI_FORMAT dxgi_format_from_wined3dformat(enum wined3d_format_id format)
Definition: utils.c:210
const char * debug_d3d10_primitive_topology(D3D10_PRIMITIVE_TOPOLOGY topology)
Definition: utils.c:26
D3D_FEATURE_LEVEL
Definition: d3dcommon.idl:102
@ D3D_FEATURE_LEVEL_10_0
Definition: d3dcommon.idl:107
@ D3D_FEATURE_LEVEL_10_1
Definition: d3dcommon.idl:108
D3D_PRIMITIVE_TOPOLOGY
Definition: d3dcommon.idl:384
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define realloc
Definition: debug_ros.c:6
#define free
Definition: debug_ros.c:5
HRESULT hr
Definition: delayimp.cpp:582
struct d3d_query * unsafe_impl_from_ID3D11Query(ID3D11Query *iface)
Definition: async.c:191
struct d3d_query * unsafe_impl_from_ID3D10Query(ID3D10Query *iface)
Definition: async.c:398
HRESULT d3d_query_create(struct d3d_device *device, const D3D11_QUERY_DESC *desc, BOOL predicate, struct d3d_query **query)
Definition: async.c:465
struct d3d_query * unsafe_impl_from_ID3D11Asynchronous(ID3D11Asynchronous *iface)
Definition: async.c:199
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static struct d2d_device_context * impl_from_IUnknown(IUnknown *iface)
Definition: device.c:207
struct d3d_buffer * unsafe_impl_from_ID3D10Buffer(ID3D10Buffer *iface)
Definition: buffer.c:386
struct d3d_buffer * unsafe_impl_from_ID3D11Buffer(ID3D11Buffer *iface)
Definition: buffer.c:214
HRESULT d3d_buffer_create(struct d3d_device *device, const D3D11_BUFFER_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, struct d3d_buffer **buffer)
Definition: buffer.c:504
static HRESULT STDMETHODCALLTYPE d3d11_video_device_GetVideoDecoderConfig(ID3D11VideoDevice1 *iface, const D3D11_VIDEO_DECODER_DESC *desc, UINT index, D3D11_VIDEO_DECODER_CONFIG *config)
Definition: device.c:7462
static HRESULT STDMETHODCALLTYPE d3d10_device_CheckCounter(ID3D10Device1 *iface, const D3D10_COUNTER_DESC *desc, D3D10_COUNTER_TYPE *type, UINT *active_counters, char *name, UINT *name_length, char *units, UINT *units_length, char *description, UINT *description_length)
Definition: device.c:7086
static void STDMETHODCALLTYPE d3d11_device_context_CopySubresourceRegion(ID3D11DeviceContext1 *iface, ID3D11Resource *dst_resource, UINT dst_subresource_idx, UINT dst_x, UINT dst_y, UINT dst_z, ID3D11Resource *src_resource, UINT src_subresource_idx, const D3D11_BOX *src_box)
Definition: device.c:1336
static HRESULT STDMETHODCALLTYPE d3d10_device_OpenSharedResource(ID3D10Device1 *iface, HANDLE resource_handle, REFIID guid, void **resource)
Definition: device.c:7105
static UINT STDMETHODCALLTYPE d3d11_video_device_GetVideoDecoderProfileCount(ID3D11VideoDevice1 *iface)
Definition: device.c:7435
static const struct wined3d_parent_ops d3d_null_wined3d_parent_ops
Definition: device.c:54
static void STDMETHODCALLTYPE d3d11_device_context_RSSetViewports(ID3D11DeviceContext1 *iface, UINT viewport_count, const D3D11_VIEWPORT *viewports)
Definition: device.c:1298
static ULONG STDMETHODCALLTYPE d3d_device_context_state_AddRef(ID3DDeviceContextState *iface)
Definition: device.c:107
static D3D_FEATURE_LEVEL d3d_feature_level_from_wined3d(enum wined3d_feature_level level)
Definition: device.c:66
static void STDMETHODCALLTYPE d3d11_device_context_CopySubresourceRegion1(ID3D11DeviceContext1 *iface, ID3D11Resource *dst_resource, UINT dst_subresource_idx, UINT dst_x, UINT dst_y, UINT dst_z, ID3D11Resource *src_resource, UINT src_subresource_idx, const D3D11_BOX *src_box, UINT flags)
Definition: device.c:2735
static ULONG STDMETHODCALLTYPE d3d_device_context_state_Release(ID3DDeviceContextState *iface)
Definition: device.c:167
static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFeatureSupport(ID3D11Device2 *iface, D3D11_FEATURE feature, void *feature_support_data, UINT feature_support_data_size)
Definition: device.c:4568
static void STDMETHODCALLTYPE d3d10_device_RSGetScissorRects(ID3D10Device1 *iface, UINT *rect_count, D3D10_RECT *rects)
Definition: device.c:6428
static void d3d10_device_set_shader_resource_views(ID3D10Device1 *iface, enum wined3d_shader_type type, unsigned int start_slot, unsigned int count, ID3D10ShaderResourceView *const *views)
Definition: device.c:5284
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamRotation(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable, D3D11_VIDEO_PROCESSOR_ROTATION rotation)
Definition: device.c:3570
static HRESULT STDMETHODCALLTYPE d3d11_command_list_QueryInterface(ID3D11CommandList *iface, REFIID iid, void **out)
Definition: device.c:340
static void STDMETHODCALLTYPE d3d11_device_context_RSSetScissorRects(ID3D11DeviceContext1 *iface, UINT rect_count, const D3D11_RECT *rects)
Definition: device.c:1323
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateGeometryShader(ID3D10Device1 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D10GeometryShader **shader)
Definition: device.c:6794
static void STDMETHODCALLTYPE d3d11_device_context_GSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
Definition: device.c:1068
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetOutputStereoMode(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL enable)
Definition: device.c:3246
static void STDMETHODCALLTYPE d3d10_device_GSGetShaderResources(ID3D10Device1 *iface, UINT start_slot, UINT view_count, ID3D10ShaderResourceView **views)
Definition: device.c:6179
static void STDMETHODCALLTYPE d3d10_device_GetTextFilterSize(ID3D10Device1 *iface, UINT *width, UINT *height)
Definition: device.c:7119
static void STDMETHODCALLTYPE d3d11_device_context_IAGetInputLayout(ID3D11DeviceContext1 *iface, ID3D11InputLayout **input_layout)
Definition: device.c:1828
static HRESULT STDMETHODCALLTYPE d3d11_video_device_CheckVideoDecoderDownsampling(ID3D11VideoDevice1 *iface, const D3D11_VIDEO_DECODER_DESC *input_desc, DXGI_COLOR_SPACE_TYPE input_colour_space, const D3D11_VIDEO_DECODER_CONFIG *config, const DXGI_RATIONAL *framerate, const D3D11_VIDEO_SAMPLE_DESC *output_desc, BOOL *supported, BOOL *real_time_hint)
Definition: device.c:7519
static HRESULT STDMETHODCALLTYPE d3d11_video_device_CreateVideoProcessorOutputView(ID3D11VideoDevice1 *iface, ID3D11Resource *resource, ID3D11VideoProcessorEnumerator *enumerator, const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC *desc, ID3D11VideoProcessorOutputView **view)
Definition: device.c:7420
static void STDMETHODCALLTYPE d3d10_device_GSGetShader(ID3D10Device1 *iface, ID3D10GeometryShader **shader)
Definition: device.c:6062
static struct d3d_device_context_state_entry * d3d_device_context_state_get_entry(struct d3d_device_context_state *state, struct d3d_device *device)
Definition: device.c:237
static void STDMETHODCALLTYPE d3d10_device_PSGetConstantBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers)
Definition: device.c:5960
static HRESULT STDMETHODCALLTYPE d3d11_video_device_GetVideoDecoderCaps(ID3D11VideoDevice1 *iface, const GUID *profile, UINT width, UINT height, const DXGI_RATIONAL *framerate, UINT bitrate, const GUID *encryption_type, UINT *caps)
Definition: device.c:7509
static void STDMETHODCALLTYPE d3d11_device_context_OMSetBlendState(ID3D11DeviceContext1 *iface, ID3D11BlendState *blend_state, const float blend_factor[4], UINT sample_mask)
Definition: device.c:1169
static void STDMETHODCALLTYPE d3d11_device_context_DSGetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
Definition: device.c:2506
static void STDMETHODCALLTYPE d3d10_device_VSSetConstantBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers)
Definition: device.c:5332
static void STDMETHODCALLTYPE d3d11_device_context_UpdateSubresource(ID3D11DeviceContext1 *iface, ID3D11Resource *resource, UINT subresource_idx, const D3D11_BOX *box, const void *data, UINT row_pitch, UINT depth_pitch)
Definition: device.c:1375
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetOutputTargetRect(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL *enabled, RECT *rect)
Definition: device.c:3260
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamPixelAspectRatio(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable, const DXGI_RATIONAL *src_ratio, const DXGI_RATIONAL *dst_ratio)
Definition: device.c:3352
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamDestRect(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable, const RECT *rect)
Definition: device.c:3331
static void STDMETHODCALLTYPE d3d11_device_context_PSGetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
Definition: device.c:1706
static BOOL d3d_device_is_d3d10_active(struct d3d_device *device)
Definition: device.c:59
static void STDMETHODCALLTYPE d3d10_device_GSSetSamplers(ID3D10Device1 *iface, UINT start_slot, UINT sampler_count, ID3D10SamplerState *const *samplers)
Definition: device.c:5574
static HRESULT d3d11_deferred_context_create(struct d3d_device *device, UINT flags, struct d3d11_device_context **context)
Definition: device.c:4352
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateCounter(ID3D10Device1 *iface, const D3D10_COUNTER_DESC *desc, ID3D10Counter **counter)
Definition: device.c:7050
static struct d3d_device * impl_from_ID3D11VideoDevice1(ID3D11VideoDevice1 *iface)
Definition: device.c:7326
static ULONG STDMETHODCALLTYPE d3d10_multithread_AddRef(ID3D10Multithread *iface)
Definition: device.c:7269
static HRESULT STDMETHODCALLTYPE d3d11_video_device_CreateVideoProcessorInputView(ID3D11VideoDevice1 *iface, ID3D11Resource *resource, ID3D11VideoProcessorEnumerator *enumerator, const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC *desc, ID3D11VideoProcessorInputView **view)
Definition: device.c:7412
static void STDMETHODCALLTYPE d3d10_device_VSGetShader(ID3D10Device1 *iface, ID3D10VertexShader **shader)
Definition: device.c:5937
static void STDMETHODCALLTYPE d3d10_device_VSSetShaderResources(ID3D10Device1 *iface, UINT start_slot, UINT view_count, ID3D10ShaderResourceView *const *views)
Definition: device.c:5535
static HRESULT STDMETHODCALLTYPE d3d11_device_SetPrivateDataInterface(ID3D11Device2 *iface, REFGUID guid, const IUnknown *data)
Definition: device.c:4824
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture1D(ID3D11Device2 *iface, const D3D11_TEXTURE1D_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, ID3D11Texture1D **texture)
Definition: device.c:3855
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamFrameFormat(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, D3D11_VIDEO_FRAME_FORMAT format)
Definition: device.c:3304
static void CDECL device_parent_mode_changed(struct wined3d_device_parent *device_parent)
Definition: device.c:7692
static ULONG STDMETHODCALLTYPE d3d11_video_context_Release(ID3D11VideoContext *iface)
Definition: device.c:3135
static void STDMETHODCALLTYPE d3d10_device_ClearRenderTargetView(ID3D10Device1 *iface, ID3D10RenderTargetView *render_target_view, const float color_rgba[4])
Definition: device.c:5774
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamOutputRate(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, D3D11_VIDEO_PROCESSOR_OUTPUT_RATE *rate, BOOL *repeat, DXGI_RATIONAL *custom_rate)
Definition: device.c:3410
static void STDMETHODCALLTYPE d3d11_device_context_IAGetVertexBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *strides, UINT *offsets)
Definition: device.c:1851
static void STDMETHODCALLTYPE d3d11_device_context_IAGetPrimitiveTopology(ID3D11DeviceContext1 *iface, D3D11_PRIMITIVE_TOPOLOGY *topology)
Definition: device.c:1950
static ULONG STDMETHODCALLTYPE dxgi_device_parent_AddRef(IWineDXGIDeviceParent *iface)
Definition: device.c:7583
static void STDMETHODCALLTYPE d3d11_device_context_CSSetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
Definition: device.c:1625
static HRESULT STDMETHODCALLTYPE d3d_device_context_state_SetPrivateDataInterface(ID3DDeviceContextState *iface, REFGUID guid, const IUnknown *data)
Definition: device.c:213
static HRESULT STDMETHODCALLTYPE d3d11_video_context_SetPrivateData(ID3D11VideoContext *iface, REFGUID guid, UINT size, const void *data)
Definition: device.c:3157
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetOutputBackgroundColor(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL yuv, const D3D11_VIDEO_COLOR *color)
Definition: device.c:3221
static HRESULT STDMETHODCALLTYPE d3d11_device_context_GetPrivateData(ID3D11DeviceContext1 *iface, REFGUID guid, UINT *data_size, void *data)
Definition: device.c:679
static void STDMETHODCALLTYPE d3d10_device_PSGetShaderResources(ID3D10Device1 *iface, UINT start_slot, UINT view_count, ID3D10ShaderResourceView **views)
Definition: device.c:5856
static void STDMETHODCALLTYPE d3d10_device_IASetIndexBuffer(ID3D10Device1 *iface, ID3D10Buffer *buffer, DXGI_FORMAT format, UINT offset)
Definition: device.c:5460
static void d3d11_device_context_set_constant_buffers(ID3D11DeviceContext1 *iface, enum wined3d_shader_type type, unsigned int start_slot, unsigned int buffer_count, ID3D11Buffer *const *buffers, const unsigned int *offsets, const unsigned int *counts)
Definition: device.c:576
static void STDMETHODCALLTYPE d3d10_device_OMSetBlendState(ID3D10Device1 *iface, ID3D10BlendState *blend_state, const float blend_factor[4], UINT sample_mask)
Definition: device.c:5612
static int d3d_blend_state_compare(const void *key, const struct wine_rb_entry *entry)
Definition: device.c:7731
static HRESULT STDMETHODCALLTYPE d3d11_video_context_ReleaseDecoderBuffer(ID3D11VideoContext *iface, ID3D11VideoDecoder *decoder, D3D11_VIDEO_DECODER_BUFFER_TYPE type)
Definition: device.c:3180
static void STDMETHODCALLTYPE d3d11_device_context_OMSetDepthStencilState(ID3D11DeviceContext1 *iface, ID3D11DepthStencilState *depth_stencil_state, UINT stencil_ref)
Definition: device.c:1190
static void STDMETHODCALLTYPE d3d11_device_context_DSSetShader(ID3D11DeviceContext1 *iface, ID3D11DomainShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
Definition: device.c:1590
static HRESULT STDMETHODCALLTYPE d3d11_video_device_SetPrivateDataInterface(ID3D11VideoDevice1 *iface, REFGUID guid, const IUnknown *data)
Definition: device.c:7492
static ULONG STDMETHODCALLTYPE d3d11_command_list_AddRef(ID3D11CommandList *iface)
Definition: device.c:359
static void STDMETHODCALLTYPE d3d11_device_context_GSGetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
Definition: device.c:2074
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture2D(ID3D11Device2 *iface, const D3D11_TEXTURE2D_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, ID3D11Texture2D **texture)
Definition: device.c:3872
static void STDMETHODCALLTYPE d3d11_device_context_VSGetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
Definition: device.c:1696
static void STDMETHODCALLTYPE d3d11_device_context_ClearRenderTargetView(ID3D11DeviceContext1 *iface, ID3D11RenderTargetView *render_target_view, const float color_rgba[4])
Definition: device.c:1411
static HRESULT STDMETHODCALLTYPE d3d11_video_context_DecoderEndFrame(ID3D11VideoContext *iface, ID3D11VideoDecoder *decoder)
Definition: device.c:3194
static HRESULT STDMETHODCALLTYPE d3d11_video_context_GetPrivateData(ID3D11VideoContext *iface, REFGUID guid, UINT *size, void *data)
Definition: device.c:3149
static void STDMETHODCALLTYPE d3d10_device_IASetVertexBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers, const UINT *strides, const UINT *offsets)
Definition: device.c:5429
static void STDMETHODCALLTYPE d3d11_device_context_OMGetRenderTargets(ID3D11DeviceContext1 *iface, UINT render_target_view_count, ID3D11RenderTargetView **render_target_views, ID3D11DepthStencilView **depth_stencil_view)
Definition: device.c:2103
static void STDMETHODCALLTYPE d3d10_device_DrawIndexed(ID3D10Device1 *iface, UINT index_count, UINT start_index_location, INT base_vertex_location)
Definition: device.c:5384
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetOutputAlphaFillMode(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE mode, UINT stream_idx)
Definition: device.c:3234
static void STDMETHODCALLTYPE d3d11_device_context_CSGetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
Definition: device.c:2544
static HRESULT STDMETHODCALLTYPE d3d10_device_QueryInterface(ID3D10Device1 *iface, REFIID iid, void **out)
Definition: device.c:5209
static void STDMETHODCALLTYPE d3d10_device_OMGetRenderTargets(ID3D10Device1 *iface, UINT view_count, ID3D10RenderTargetView **render_target_views, ID3D10DepthStencilView **depth_stencil_view)
Definition: device.c:6237
static void STDMETHODCALLTYPE d3d11_device_context_Unmap(ID3D11DeviceContext1 *iface, ID3D11Resource *resource, UINT subresource_idx)
Definition: device.c:825
static int STDMETHODCALLTYPE d3d11_user_defined_annotation_BeginEvent(ID3DUserDefinedAnnotation *iface, const WCHAR *name)
Definition: device.c:3763
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetOutputConstriction(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL enable, SIZE size)
Definition: device.c:3240
static void STDMETHODCALLTYPE d3d11_device_context_UpdateSubresource1(ID3D11DeviceContext1 *iface, ID3D11Resource *resource, UINT subresource_idx, const D3D11_BOX *box, const void *data, UINT row_pitch, UINT depth_pitch, UINT flags)
Definition: device.c:2761
static void STDMETHODCALLTYPE d3d10_device_PSSetShaderResources(ID3D10Device1 *iface, UINT start_slot, UINT view_count, ID3D10ShaderResourceView *const *views)
Definition: device.c:5342
static HRESULT STDMETHODCALLTYPE d3d_device_context_state_GetPrivateData(ID3DDeviceContextState *iface, REFGUID guid, UINT *data_size, void *data)
Definition: device.c:193
static void STDMETHODCALLTYPE d3d10_device_IAGetIndexBuffer(ID3D10Device1 *iface, ID3D10Buffer **buffer, DXGI_FORMAT *format, UINT *offset)
Definition: device.c:6025
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateQuery(ID3D10Device1 *iface, const D3D10_QUERY_DESC *desc, ID3D10Query **query)
Definition: device.c:7006
static HRESULT STDMETHODCALLTYPE d3d11_video_context_NegotiateCryptoSessionKeyExchange(ID3D11VideoContext *iface, ID3D11CryptoSession *session, UINT size, void *data)
Definition: device.c:3502
static void STDMETHODCALLTYPE d3d11_device_context_DrawInstancedIndirect(ID3D11DeviceContext1 *iface, ID3D11Buffer *buffer, UINT offset)
Definition: device.c:1247
static HRESULT STDMETHODCALLTYPE d3d10_device_SetPrivateDataInterface(ID3D10Device1 *iface, REFGUID guid, const IUnknown *data)
Definition: device.c:6498
static const struct IWineDXGIDeviceParentVtbl d3d_dxgi_device_parent_vtbl
Definition: device.c:7642
static HRESULT STDMETHODCALLTYPE d3d11_video_context_QueryInterface(ID3D11VideoContext *iface, REFIID iid, void **out)
Definition: device.c:3120
static HRESULT STDMETHODCALLTYPE d3d11_video_device_CreateVideoDecoder(ID3D11VideoDevice1 *iface, const D3D11_VIDEO_DECODER_DESC *desc, const D3D11_VIDEO_DECODER_CONFIG *config, ID3D11VideoDecoder **decoder)
Definition: device.c:7350
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBlendState1(ID3D10Device1 *iface, const D3D10_BLEND_DESC1 *desc, ID3D10BlendState1 **blend_state)
Definition: device.c:6897
static int STDMETHODCALLTYPE d3d11_user_defined_annotation_EndEvent(ID3DUserDefinedAnnotation *iface)
Definition: device.c:3771
static HRESULT STDMETHODCALLTYPE d3d11_video_context_QueryAuthenticatedChannel(ID3D11VideoContext *iface, ID3D11AuthenticatedChannel *channel, UINT input_size, const void *input, UINT output_size, void *output)
Definition: device.c:3553
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDepthStencilView(ID3D11Device2 *iface, ID3D11Resource *resource, const D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3D11DepthStencilView **view)
Definition: device.c:3969
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateClassLinkage(ID3D11Device2 *iface, ID3D11ClassLinkage **class_linkage)
Definition: device.c:4178
static ULONG STDMETHODCALLTYPE d3d10_multithread_Release(ID3D10Multithread *iface)
Definition: device.c:7278
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamStereoFormat(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enabled, D3D11_VIDEO_PROCESSOR_STEREO_FORMAT *format, BOOL *left_view_frame0, BOOL *base_view_frame0, D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE *flip_mode, int *mono_offset)
Definition: device.c:3461
static void STDMETHODCALLTYPE d3d11_device_context_PSSetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
Definition: device.c:719
static void STDMETHODCALLTYPE d3d11_device_context_CSSetConstantBuffers1(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *first_constant, const UINT *num_constants)
Definition: device.c:2847
static void STDMETHODCALLTYPE d3d10_device_IAGetPrimitiveTopology(ID3D10Device1 *iface, D3D10_PRIMITIVE_TOPOLOGY *topology)
Definition: device.c:6085
static void STDMETHODCALLTYPE d3d11_device_context_CSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
Definition: device.c:1677
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateRasterizerState1(ID3D11Device2 *iface, const D3D11_RASTERIZER_DESC1 *desc, ID3D11RasterizerState1 **state)
Definition: device.c:4915
static BOOL d3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
Definition: device.c:26
static BOOL STDMETHODCALLTYPE d3d11_multithread_GetMultithreadProtected(ID3D11Multithread *iface)
Definition: device.c:3710
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateBuffer(ID3D11Device2 *iface, const D3D11_BUFFER_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, ID3D11Buffer **buffer)
Definition: device.c:3838
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateGeometryShaderWithStreamOutput(ID3D11Device2 *iface, const void *byte_code, SIZE_T byte_code_length, const D3D11_SO_DECLARATION_ENTRY *so_entries, UINT entry_count, const UINT *buffer_strides, UINT strides_count, UINT rasterizer_stream, ID3D11ClassLinkage *class_linkage, ID3D11GeometryShader **shader)
Definition: device.c:4056
static void STDMETHODCALLTYPE d3d11_device_context_ClearState(ID3D11DeviceContext1 *iface)
Definition: device.c:2662
static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext(ID3D11Device2 *iface, ID3D11DeviceContext **immediate_context)
Definition: device.c:4863
static void STDMETHODCALLTYPE d3d10_device_RSSetState(ID3D10Device1 *iface, ID3D10RasterizerState *rasterizer_state)
Definition: device.c:5667
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateGeometryShader(ID3D11Device2 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11GeometryShader **shader)
Definition: device.c:4032
static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResource1(ID3D11Device2 *iface, HANDLE handle, REFIID iid, void **resource)
Definition: device.c:5004
static void STDMETHODCALLTYPE d3d11_device_context_DrawIndexed(ID3D11DeviceContext1 *iface, UINT index_count, UINT start_index_location, INT base_vertex_location)
Definition: device.c:769
static HRESULT STDMETHODCALLTYPE d3d11_user_defined_annotation_QueryInterface(ID3DUserDefinedAnnotation *iface, REFIID iid, void **out)
Definition: device.c:3735
static void STDMETHODCALLTYPE d3d10_device_VSGetShaderResources(ID3D10Device1 *iface, UINT start_slot, UINT view_count, ID3D10ShaderResourceView **views)
Definition: device.c:6098
static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext2(ID3D11Device2 *iface, ID3D11DeviceContext2 **context)
Definition: device.c:5021
static void STDMETHODCALLTYPE d3d11_device_context_GSSetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
Definition: device.c:1060
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetOutputAlphaFillMode(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE *mode, UINT *stream_idx)
Definition: device.c:3278
static void STDMETHODCALLTYPE d3d11_device_context_HSSetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
Definition: device.c:1537
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateTexture3D(ID3D11Device2 *iface, const D3D11_TEXTURE3D_DESC *desc, const D3D11_SUBRESOURCE_DATA *data, ID3D11Texture3D **texture)
Definition: device.c:3889
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateShaderResourceView(ID3D10Device1 *iface, ID3D10Resource *resource, const D3D10_SHADER_RESOURCE_VIEW_DESC *desc, ID3D10ShaderResourceView **view)
Definition: device.c:6669
static void STDMETHODCALLTYPE d3d10_device_Draw(ID3D10Device1 *iface, UINT vertex_count, UINT start_vertex_location)
Definition: device.c:5396
static void STDMETHODCALLTYPE d3d10_device_GSSetConstantBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers)
Definition: device.c:5503
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateGeometryShaderWithStreamOutput(ID3D10Device1 *iface, const void *byte_code, SIZE_T byte_code_length, const D3D10_SO_DECLARATION_ENTRY *output_stream_decls, UINT output_stream_decl_count, UINT output_stream_stride, ID3D10GeometryShader **shader)
Definition: device.c:6815
static void STDMETHODCALLTYPE d3d10_device_PSGetSamplers(ID3D10Device1 *iface, UINT start_slot, UINT sampler_count, ID3D10SamplerState **samplers)
Definition: device.c:5908
static void STDMETHODCALLTYPE d3d11_device_context_ClearUnorderedAccessViewUint(ID3D11DeviceContext1 *iface, ID3D11UnorderedAccessView *unordered_access_view, const UINT values[4])
Definition: device.c:1430
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateHullShader(ID3D11Device2 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11HullShader **shader)
Definition: device.c:4109
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext2(ID3D11Device2 *iface, UINT flags, ID3D11DeviceContext2 **context)
Definition: device.c:5027
static HRESULT STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetOutputExtension(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, const GUID *guid, UINT size, void *data)
Definition: device.c:3252
static void STDMETHODCALLTYPE d3d10_device_OMSetDepthStencilState(ID3D10Device1 *iface, ID3D10DepthStencilState *depth_stencil_state, UINT stencil_ref)
Definition: device.c:5627
static UINT STDMETHODCALLTYPE d3d11_device_GetExceptionMode(ID3D11Device2 *iface)
Definition: device.c:4881
static HRESULT STDMETHODCALLTYPE d3d10_device_SetExceptionMode(ID3D10Device1 *iface, UINT flags)
Definition: device.c:6464
static HRESULT STDMETHODCALLTYPE d3d10_device_SetPrivateData(ID3D10Device1 *iface, REFGUID guid, UINT data_size, const void *data)
Definition: device.c:6488
static void STDMETHODCALLTYPE d3d11_device_context_SetResourceMinLOD(ID3D11DeviceContext1 *iface, ID3D11Resource *resource, FLOAT min_lod)
Definition: device.c:1490
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateInputLayout(ID3D11Device2 *iface, const D3D11_INPUT_ELEMENT_DESC *element_descs, UINT element_count, const void *shader_byte_code, SIZE_T shader_byte_code_length, ID3D11InputLayout **input_layout)
Definition: device.c:3988
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamColorSpace(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, D3D11_VIDEO_PROCESSOR_COLOR_SPACE *space)
Definition: device.c:3404
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateUnorderedAccessView(ID3D11Device2 *iface, ID3D11Resource *resource, const D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, ID3D11UnorderedAccessView **view)
Definition: device.c:3928
static void STDMETHODCALLTYPE d3d10_device_SetTextFilterSize(ID3D10Device1 *iface, UINT width, UINT height)
Definition: device.c:7114
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device2 *iface, UINT flags, ID3D11DeviceContext **context)
Definition: device.c:4378
static void STDMETHODCALLTYPE d3d11_device_context_Begin(ID3D11DeviceContext1 *iface, ID3D11Asynchronous *asynchronous)
Definition: device.c:989
static HRESULT STDMETHODCALLTYPE d3d11_video_device_GetVideoDecoderProfile(ID3D11VideoDevice1 *iface, UINT index, GUID *profile)
Definition: device.c:7441
static struct d3d_device_context_state * impl_from_ID3DDeviceContextState(ID3DDeviceContextState *iface)
Definition: device.c:73
static void STDMETHODCALLTYPE d3d10_device_SetPredication(ID3D10Device1 *iface, ID3D10Predicate *predicate, BOOL value)
Definition: device.c:5553
static HRESULT STDMETHODCALLTYPE d3d10_device_CreatePredicate(ID3D10Device1 *iface, const D3D10_QUERY_DESC *desc, ID3D10Predicate **predicate)
Definition: device.c:7028
static BOOL d3d_device_context_state_add_entry(struct d3d_device_context_state *state, struct d3d_device *device, struct wined3d_state *wined3d_state)
Definition: device.c:251
static HRESULT STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamExtension(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, const GUID *guid, UINT size, void *data)
Definition: device.c:3485
static void STDMETHODCALLTYPE d3d10_device_PSGetShader(ID3D10Device1 *iface, ID3D10PixelShader **shader)
Definition: device.c:5885
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamOutputRate(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, D3D11_VIDEO_PROCESSOR_OUTPUT_RATE rate, BOOL repeat, const DXGI_RATIONAL *custom_rate)
Definition: device.c:3316
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamPixelAspectRatio(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enabled, DXGI_RATIONAL *src_ratio, DXGI_RATIONAL *dst_ratio)
Definition: device.c:3446
static void STDMETHODCALLTYPE d3d11_device_context_DispatchIndirect(ID3D11DeviceContext1 *iface, ID3D11Buffer *buffer, UINT offset)
Definition: device.c:1272
static HRESULT STDMETHODCALLTYPE d3d11_command_list_GetPrivateData(ID3D11CommandList *iface, REFGUID guid, UINT *data_size, void *data)
Definition: device.c:397
static UINT STDMETHODCALLTYPE d3d11_command_list_GetContextFlags(ID3D11CommandList *iface)
Definition: device.c:427
static HRESULT STDMETHODCALLTYPE d3d11_device_QueryInterface(ID3D11Device2 *iface, REFIID iid, void **out)
Definition: device.c:3820
static HRESULT STDMETHODCALLTYPE dxgi_device_parent_register_swapchain_texture(IWineDXGIDeviceParent *iface, struct wined3d_texture *wined3d_texture, unsigned int texture_flags, IDXGISurface **ret_surface)
Definition: device.c:7602
static void STDMETHODCALLTYPE d3d10_device_IAGetVertexBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers, UINT *strides, UINT *offsets)
Definition: device.c:5993
static void STDMETHODCALLTYPE d3d11_device_context_HSGetShader(ID3D11DeviceContext1 *iface, ID3D11HullShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
Definition: device.c:2388
static ULONG STDMETHODCALLTYPE d3d11_device_Release(ID3D11Device2 *iface)
Definition: device.c:3832
static void STDMETHODCALLTYPE d3d11_device_context_VSSetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
Definition: device.c:972
static void STDMETHODCALLTYPE d3d11_device_context_IAGetIndexBuffer(ID3D11DeviceContext1 *iface, ID3D11Buffer **buffer, DXGI_FORMAT *format, UINT *offset)
Definition: device.c:1888
static ULONG STDMETHODCALLTYPE d3d11_video_context_AddRef(ID3D11VideoContext *iface)
Definition: device.c:3128
static HRESULT STDMETHODCALLTYPE d3d11_video_device_GetContentProtectionCaps(ID3D11VideoDevice1 *iface, const GUID *encryption_type, const GUID *profile, D3D11_VIDEO_CONTENT_PROTECTION_CAPS *caps)
Definition: device.c:7469
static HRESULT STDMETHODCALLTYPE d3d11_video_context_VideoProcessorBlt(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, ID3D11VideoProcessorOutputView *view, UINT frame_idx, UINT stream_count, const D3D11_VIDEO_PROCESSOR_STREAM *streams)
Definition: device.c:3493
static void STDMETHODCALLTYPE d3d11_device_context_HSGetConstantBuffers1(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
Definition: device.c:2868
static ULONG STDMETHODCALLTYPE d3d10_device_Release(ID3D10Device1 *iface)
Definition: device.c:5222
static void STDMETHODCALLTYPE d3d11_device_context_ExecuteCommandList(ID3D11DeviceContext1 *iface, ID3D11CommandList *command_list, BOOL restore_state)
Definition: device.c:1526
static void STDMETHODCALLTYPE d3d10_device_DrawAuto(ID3D10Device1 *iface)
Definition: device.c:5662
static void STDMETHODCALLTYPE d3d11_device_context_CSSetShader(ID3D11DeviceContext1 *iface, ID3D11ComputeShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
Definition: device.c:1661
static void STDMETHODCALLTYPE d3d11_device_context_PSSetConstantBuffers1(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *first_constant, const UINT *num_constants)
Definition: device.c:2836
static void STDMETHODCALLTYPE d3d10_device_CheckCounterInfo(ID3D10Device1 *iface, D3D10_COUNTER_INFO *counter_info)
Definition: device.c:7081
static void STDMETHODCALLTYPE d3d10_device_ResolveSubresource(ID3D10Device1 *iface, ID3D10Resource *dst_resource, UINT dst_subresource_idx, ID3D10Resource *src_resource, UINT src_subresource_idx, DXGI_FORMAT format)
Definition: device.c:5825
static void STDMETHODCALLTYPE d3d11_device_context_GSGetShader(ID3D11DeviceContext1 *iface, ID3D11GeometryShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
Definition: device.c:1923
static void STDMETHODCALLTYPE d3d11_device_context_VSSetConstantBuffers1(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *first_constant, const UINT *num_constants)
Definition: device.c:2792
static struct d3d11_device_context * impl_from_ID3D11DeviceContext1(ID3D11DeviceContext1 *iface)
Definition: device.c:464
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetOutputStereoMode(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL *enabled)
Definition: device.c:3290
static void STDMETHODCALLTYPE d3d11_device_context_DrawAuto(ID3D11DeviceContext1 *iface)
Definition: device.c:1229
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamPalette(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, UINT entry_count, const UINT *entries)
Definition: device.c:3345
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateInputLayout(ID3D10Device1 *iface, const D3D10_INPUT_ELEMENT_DESC *element_descs, UINT element_count, const void *shader_byte_code, SIZE_T shader_byte_code_length, ID3D10InputLayout **input_layout)
Definition: device.c:6751
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBlendState(ID3D10Device1 *iface, const D3D10_BLEND_DESC *desc, ID3D10BlendState **blend_state)
Definition: device.c:6913
static HRESULT STDMETHODCALLTYPE d3d11_video_context_ConfigureAuthenticatedChannel(ID3D11VideoContext *iface, ID3D11AuthenticatedChannel *channel, UINT input_size, const void *input, D3D11_AUTHENTICATED_CONFIGURE_OUTPUT *output)
Definition: device.c:3561
static HRESULT STDMETHODCALLTYPE d3d11_video_device_CreateCryptoSession(ID3D11VideoDevice1 *iface, const GUID *encryption_type, const GUID *profile, const GUID *key_exchange_type, ID3D11CryptoSession **session)
Definition: device.c:7381
static void STDMETHODCALLTYPE d3d11_device_context_GSGetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
Definition: device.c:2046
static D3D_FEATURE_LEVEL STDMETHODCALLTYPE d3d11_device_GetFeatureLevel(ID3D11Device2 *iface)
Definition: device.c:4840
static void STDMETHODCALLTYPE d3d11_device_context_ClearView(ID3D11DeviceContext1 *iface, ID3D11View *view, const FLOAT color[4], const D3D11_RECT *rect, UINT num_rects)
Definition: device.c:2961
static void STDMETHODCALLTYPE d3d10_device_SOSetTargets(ID3D10Device1 *iface, UINT target_count, ID3D10Buffer *const *targets, const UINT *offsets)
Definition: device.c:5641
static void STDMETHODCALLTYPE d3d11_video_context_FinishSessionKeyRefresh(ID3D11VideoContext *iface, ID3D11CryptoSession *session)
Definition: device.c:3533
static HRESULT STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetOutputExtension(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, const GUID *guid, UINT size, void *data)
Definition: device.c:3296
static void d3d11_device_context_set_samplers(ID3D11DeviceContext1 *iface, enum wined3d_shader_type type, unsigned int start_slot, unsigned int count, ID3D11SamplerState *const *samplers)
Definition: device.c:646
static void STDMETHODCALLTYPE d3d10_device_ClearState(ID3D10Device1 *iface)
Definition: device.c:6508
static BOOL STDMETHODCALLTYPE d3d10_multithread_GetMultithreadProtected(ID3D10Multithread *iface)
Definition: device.c:7308
static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext1(ID3D11Device2 *iface, ID3D11DeviceContext1 **immediate_context)
Definition: device.c:4888
static const struct IUnknownVtbl d3d_device_inner_unknown_vtbl
Definition: device.c:7245
static void STDMETHODCALLTYPE d3d11_device_context_PSGetShader(ID3D11DeviceContext1 *iface, ID3D11PixelShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
Definition: device.c:1735
static void STDMETHODCALLTYPE d3d11_device_context_PSSetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
Definition: device.c:838
static void STDMETHODCALLTYPE d3d11_device_context_VSSetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
Definition: device.c:709
static void STDMETHODCALLTYPE d3d11_video_context_GetDevice(ID3D11VideoContext *iface, ID3D11Device **device)
Definition: device.c:3142
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeviceContextState(ID3D11Device2 *iface, UINT flags, const D3D_FEATURE_LEVEL *feature_levels, UINT feature_level_count, UINT sdk_version, REFIID emulated_interface, D3D_FEATURE_LEVEL *chosen_feature_level, ID3DDeviceContextState **state)
Definition: device.c:4935
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateComputeShader(ID3D11Device2 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11ComputeShader **shader)
Definition: device.c:4155
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetOutputColorSpace(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, D3D11_VIDEO_PROCESSOR_COLOR_SPACE *space)
Definition: device.c:3272
static ULONG STDMETHODCALLTYPE d3d11_user_defined_annotation_AddRef(ID3DUserDefinedAnnotation *iface)
Definition: device.c:3745
static void STDMETHODCALLTYPE d3d10_device_RSSetScissorRects(ID3D10Device1 *iface, UINT rect_count, const D3D10_RECT *rects)
Definition: device.c:5704
static int d3d_depthstencil_state_compare(const void *key, const struct wine_rb_entry *entry)
Definition: device.c:7739
static HRESULT STDMETHODCALLTYPE d3d11_video_context_SubmitDecoderBuffers(ID3D11VideoContext *iface, ID3D11VideoDecoder *decoder, UINT count, const D3D11_VIDEO_DECODER_BUFFER_DESC *buffers)
Definition: device.c:3201
static UINT STDMETHODCALLTYPE d3d11_device_context_GetContextFlags(ID3D11DeviceContext1 *iface)
Definition: device.c:2689
static ULONG STDMETHODCALLTYPE d3d11_command_list_Release(ID3D11CommandList *iface)
Definition: device.c:369
static void STDMETHODCALLTYPE d3d11_device_context_OMGetRenderTargetsAndUnorderedAccessViews(ID3D11DeviceContext1 *iface, UINT render_target_view_count, ID3D11RenderTargetView **render_target_views, ID3D11DepthStencilView **depth_stencil_view, UINT unordered_access_view_start_slot, UINT unordered_access_view_count, ID3D11UnorderedAccessView **unordered_access_views)
Definition: device.c:2151
static void STDMETHODCALLTYPE d3d11_device_context_SOSetTargets(ID3D11DeviceContext1 *iface, UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *offsets)
Definition: device.c:1208
static HRESULT STDMETHODCALLTYPE d3d11_video_device_CreateVideoProcessor(ID3D11VideoDevice1 *iface, ID3D11VideoProcessorEnumerator *enumerator, UINT rate_conversion_index, ID3D11VideoProcessor **processor)
Definition: device.c:7366
static void STDMETHODCALLTYPE d3d11_device_context_GSSetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
Definition: device.c:932
static HRESULT STDMETHODCALLTYPE d3d11_device_context_QueryInterface(ID3D11DeviceContext1 *iface, REFIID iid, void **out)
Definition: device.c:469
static D3D11_DEVICE_CONTEXT_TYPE STDMETHODCALLTYPE d3d11_device_context_GetType(ID3D11DeviceContext1 *iface)
Definition: device.c:2680
static void STDMETHODCALLTYPE d3d11_device_context_CSSetUnorderedAccessViews(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11UnorderedAccessView *const *views, const UINT *initial_counts)
Definition: device.c:1634
static void STDMETHODCALLTYPE d3d11_device_context_RSGetScissorRects(ID3D11DeviceContext1 *iface, UINT *rect_count, D3D11_RECT *rects)
Definition: device.c:2339
static void d3d11_device_context_cleanup(struct d3d11_device_context *context)
Definition: device.c:457
static HRESULT STDMETHODCALLTYPE d3d11_video_device_CheckVideoDecoderFormat(ID3D11VideoDevice1 *iface, const GUID *profile, DXGI_FORMAT format, BOOL *supported)
Definition: device.c:7448
static ULONG STDMETHODCALLTYPE d3d11_device_AddRef(ID3D11Device2 *iface)
Definition: device.c:3826
static void STDMETHODCALLTYPE d3d11_video_context_StartSessionKeyRefresh(ID3D11VideoContext *iface, ID3D11CryptoSession *session, UINT random_number_size, void *random_number)
Definition: device.c:3526
static HRESULT STDMETHODCALLTYPE d3d10_device_GetPrivateData(ID3D10Device1 *iface, REFGUID guid, UINT *data_size, void *data)
Definition: device.c:6478
static void STDMETHODCALLTYPE d3d10_device_PSSetConstantBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer *const *buffers)
Definition: device.c:5407
static void STDMETHODCALLTYPE d3d11_device_context_VSGetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
Definition: device.c:1966
static void STDMETHODCALLTYPE d3d10_device_GSSetShaderResources(ID3D10Device1 *iface, UINT start_slot, UINT view_count, ID3D10ShaderResourceView *const *views)
Definition: device.c:5565
static HRESULT STDMETHODCALLTYPE d3d11_video_context_GetDecoderBuffer(ID3D11VideoContext *iface, ID3D11VideoDecoder *decoder, D3D11_VIDEO_DECODER_BUFFER_TYPE type, UINT *size, void **buffer)
Definition: device.c:3173
static HRESULT STDMETHODCALLTYPE d3d11_video_device_CreateAuthenticatedChannel(ID3D11VideoDevice1 *iface, D3D11_AUTHENTICATED_CHANNEL_TYPE type, ID3D11AuthenticatedChannel **channel)
Definition: device.c:7374
static void STDMETHODCALLTYPE d3d11_device_context_ResolveSubresource(ID3D11DeviceContext1 *iface, ID3D11Resource *dst_resource, UINT dst_subresource_idx, ID3D11Resource *src_resource, UINT src_subresource_idx, DXGI_FORMAT format)
Definition: device.c:1504
static HRESULT STDMETHODCALLTYPE d3d11_device_GetPrivateData(ID3D11Device2 *iface, REFGUID guid, UINT *data_size, void *data)
Definition: device.c:4792
static int d3d_sampler_state_compare(const void *key, const struct wine_rb_entry *entry)
Definition: device.c:7723
static void STDMETHODCALLTYPE d3d10_device_CopyResource(ID3D10Device1 *iface, ID3D10Resource *dst_resource, ID3D10Resource *src_resource)
Definition: device.c:5744
static void d3d11_device_context_set_shader_resource_views(ID3D11DeviceContext1 *iface, enum wined3d_shader_type type, unsigned int start_slot, unsigned int count, ID3D11ShaderResourceView *const *views)
Definition: device.c:622
void d3d_device_init(struct d3d_device *device, void *outer_unknown)
Definition: device.c:7756
static HRESULT STDMETHODCALLTYPE d3d11_video_device_QueryInterface(ID3D11VideoDevice1 *iface, REFIID iid, void **out)
Definition: device.c:7331
static HRESULT STDMETHODCALLTYPE d3d11_device_context_Map(ID3D11DeviceContext1 *iface, ID3D11Resource *resource, UINT subresource_idx, D3D11_MAP map_type, UINT map_flags, D3D11_MAPPED_SUBRESOURCE *mapped_subresource)
Definition: device.c:792
static HRESULT STDMETHODCALLTYPE d3d11_video_device_SetPrivateData(ID3D11VideoDevice1 *iface, REFGUID guid, UINT size, const void *data)
Definition: device.c:7485
static void STDMETHODCALLTYPE d3d11_device_context_GSSetConstantBuffers1(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *first_constant, const UINT *num_constants)
Definition: device.c:2825
static HRESULT STDMETHODCALLTYPE d3d_device_inner_QueryInterface(IUnknown *iface, REFIID riid, void **out)
Definition: device.c:5124
static ULONG STDMETHODCALLTYPE d3d11_device_context_AddRef(ID3D11DeviceContext1 *iface)
Definition: device.c:506
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateBlendState1(ID3D11Device2 *iface, const D3D11_BLEND_DESC1 *desc, ID3D11BlendState1 **state)
Definition: device.c:4195
static void STDMETHODCALLTYPE d3d10_device_CopySubresourceRegion(ID3D10Device1 *iface, ID3D10Resource *dst_resource, UINT dst_subresource_idx, UINT dst_x, UINT dst_y, UINT dst_z, ID3D10Resource *src_resource, UINT src_subresource_idx, const D3D10_BOX *src_box)
Definition: device.c:5717
static HRESULT STDMETHODCALLTYPE d3d10_device_CheckMultisampleQualityLevels(ID3D10Device1 *iface, DXGI_FORMAT format, UINT sample_count, UINT *quality_level_count)
Definition: device.c:7069
static void CDECL device_parent_activate(struct wined3d_device_parent *device_parent, BOOL activate)
Definition: device.c:7697
static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResourceByName(ID3D11Device2 *iface, const WCHAR *name, DWORD access, REFIID iid, void **resource)
Definition: device.c:5012
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateShaderResourceView1(ID3D10Device1 *iface, ID3D10Resource *resource, const D3D10_SHADER_RESOURCE_VIEW_DESC1 *desc, ID3D10ShaderResourceView1 **view)
Definition: device.c:6637
static void STDMETHODCALLTYPE d3d11_device_context_IASetVertexBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *strides, const UINT *offsets)
Definition: device.c:859
static void STDMETHODCALLTYPE d3d11_device_context_DSGetShader(ID3D11DeviceContext1 *iface, ID3D11DomainShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
Definition: device.c:2480
static struct d3d_device * device_from_wined3d_device_parent(struct wined3d_device_parent *device_parent)
Definition: device.c:7653
static HRESULT STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamExtension(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, const GUID *guid, UINT size, void *data)
Definition: device.c:3390
static void STDMETHODCALLTYPE d3d11_device_context_PSGetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
Definition: device.c:1762
static void STDMETHODCALLTYPE d3d11_device_context_GenerateMips(ID3D11DeviceContext1 *iface, ID3D11ShaderResourceView *view)
Definition: device.c:1479
static void STDMETHODCALLTYPE d3d10_device_GSGetConstantBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers)
Definition: device.c:6052
static const struct ID3D11MultithreadVtbl d3d11_multithread_vtbl
Definition: device.c:3717
static const ID3D11VideoContextVtbl d3d11_video_context_vtbl
Definition: device.c:3584
static struct d3d11_device_context * impl_from_ID3D11Multithread(ID3D11Multithread *iface)
Definition: device.c:3655
static void STDMETHODCALLTYPE d3d10_device_UpdateSubresource(ID3D10Device1 *iface, ID3D10Resource *resource, UINT subresource_idx, const D3D10_BOX *box, const void *data, UINT row_pitch, UINT depth_pitch)
Definition: device.c:5758
static void STDMETHODCALLTYPE d3d10_device_VSGetConstantBuffers(ID3D10Device1 *iface, UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers)
Definition: device.c:5846
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamLumaKey(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable, float lower, float upper)
Definition: device.c:3361
static void STDMETHODCALLTYPE d3d11_device_context_SetPredication(ID3D11DeviceContext1 *iface, ID3D11Predicate *predicate, BOOL value)
Definition: device.c:1047
static void STDMETHODCALLTYPE d3d10_device_Flush(ID3D10Device1 *iface)
Definition: device.c:6517
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamAlpha(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable, float alpha)
Definition: device.c:3338
static const struct ID3DDeviceContextStateVtbl d3d_device_context_state_vtbl
Definition: device.c:223
static HRESULT STDMETHODCALLTYPE d3d11_video_device_CreateVideoDecoderOutputView(ID3D11VideoDevice1 *iface, ID3D11Resource *resource, const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC *desc, ID3D11VideoDecoderOutputView **view)
Definition: device.c:7390
static void STDMETHODCALLTYPE d3d11_device_context_PSGetConstantBuffers1(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
Definition: device.c:2898
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamLumaKey(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enabled, float *lower, float *upper)
Definition: device.c:3454
static struct wined3d_state * d3d_device_context_state_get_wined3d_state(struct d3d_device_context_state *state, struct d3d_device *device)
Definition: device.c:295
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture2D(ID3D10Device1 *iface, const D3D10_TEXTURE2D_DESC *desc, const D3D10_SUBRESOURCE_DATA *data, ID3D10Texture2D **texture)
Definition: device.c:6578
static void STDMETHODCALLTYPE d3d10_device_SOGetTargets(ID3D10Device1 *iface, UINT buffer_count, ID3D10Buffer **buffers, UINT *offsets)
Definition: device.c:6340
static ULONG STDMETHODCALLTYPE d3d11_user_defined_annotation_Release(ID3DUserDefinedAnnotation *iface)
Definition: device.c:3754
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture3D(ID3D10Device1 *iface, const D3D10_TEXTURE3D_DESC *desc, const D3D10_SUBRESOURCE_DATA *data, ID3D10Texture3D **texture)
Definition: device.c:6608
static HRESULT STDMETHODCALLTYPE d3d11_video_device_CreateVideoProcessorEnumerator(ID3D11VideoDevice1 *iface, const D3D11_VIDEO_PROCESSOR_CONTENT_DESC *desc, ID3D11VideoProcessorEnumerator **enumerator)
Definition: device.c:7428
static void d3d_device_remove_context_state(struct d3d_device *device, struct d3d_device_context_state *state)
Definition: device.c:123
static ULONG STDMETHODCALLTYPE d3d11_device_context_Release(ID3D11DeviceContext1 *iface)
Definition: device.c:521
static HRESULT STDMETHODCALLTYPE d3d_device_context_state_SetPrivateData(ID3DDeviceContextState *iface, REFGUID guid, UINT data_size, const void *data)
Definition: device.c:203
static HRESULT STDMETHODCALLTYPE d3d11_multithread_QueryInterface(ID3D11Multithread *iface, REFIID iid, void **out)
Definition: device.c:3660
static void STDMETHODCALLTYPE d3d10_device_GenerateMips(ID3D10Device1 *iface, ID3D10ShaderResourceView *view)
Definition: device.c:5814
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamFilter(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, D3D11_VIDEO_PROCESSOR_FILTER filter, BOOL enable, int level)
Definition: device.c:3383
static void STDMETHODCALLTYPE d3d11_device_context_GSSetShader(ID3D11DeviceContext1 *iface, ID3D11GeometryShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
Definition: device.c:942
static void STDMETHODCALLTYPE d3d11_device_context_VSGetShader(ID3D11DeviceContext1 *iface, ID3D11VertexShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
Definition: device.c:1791
static HRESULT STDMETHODCALLTYPE dxgi_device_parent_QueryInterface(IWineDXGIDeviceParent *iface, REFIID iid, void **out)
Definition: device.c:7576
static void STDMETHODCALLTYPE d3d11_device_context_DSSetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView *const *views)
Definition: device.c:1581
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamAutoProcessingMode(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable)
Definition: device.c:3377
static void STDMETHODCALLTYPE d3d11_device_context_HSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
Definition: device.c:1562
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilView(ID3D10Device1 *iface, ID3D10Resource *resource, const D3D10_DEPTH_STENCIL_VIEW_DESC *desc, ID3D10DepthStencilView **view)
Definition: device.c:6714
static void STDMETHODCALLTYPE d3d11_device_context_DrawInstanced(ID3D11DeviceContext1 *iface, UINT instance_vertex_count, UINT instance_count, UINT start_vertex_location, UINT start_instance_location)
Definition: device.c:918
static void STDMETHODCALLTYPE d3d11_device_context_CSGetUnorderedAccessViews(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11UnorderedAccessView **views)
Definition: device.c:2571
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetOutputBackgroundColor(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL *yuv, D3D11_VIDEO_COLOR *color)
Definition: device.c:3266
static ULONG STDMETHODCALLTYPE d3d_device_inner_AddRef(IUnknown *iface)
Definition: device.c:5166
static void STDMETHODCALLTYPE d3d10_device_PSSetShader(ID3D10Device1 *iface, ID3D10PixelShader *shader)
Definition: device.c:5351
static void STDMETHODCALLTYPE d3d11_device_context_Dispatch(ID3D11DeviceContext1 *iface, UINT thread_group_count_x, UINT thread_group_count_y, UINT thread_group_count_z)
Definition: device.c:1260
static void STDMETHODCALLTYPE d3d11_device_context_DSSetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
Definition: device.c:1615
static void STDMETHODCALLTYPE d3d11_device_context_OMGetBlendState(ID3D11DeviceContext1 *iface, ID3D11BlendState **blend_state, FLOAT blend_factor[4], UINT *sample_mask)
Definition: device.c:2193
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamColorSpace(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *space)
Definition: device.c:3310
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetOutputConstriction(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL *enabled, SIZE *size)
Definition: device.c:3284
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateSamplerState(ID3D11Device2 *iface, const D3D11_SAMPLER_DESC *desc, ID3D11SamplerState **sampler_state)
Definition: device.c:4283
static void STDMETHODCALLTYPE d3d_null_wined3d_object_destroyed(void *parent)
Definition: device.c:52
static HRESULT STDMETHODCALLTYPE d3d11_device_CreatePixelShader(ID3D11Device2 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11PixelShader **shader)
Definition: device.c:4086
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDepthStencilState(ID3D11Device2 *iface, const D3D11_DEPTH_STENCIL_DESC *desc, ID3D11DepthStencilState **depth_stencil_state)
Definition: device.c:4242
static void STDMETHODCALLTYPE d3d11_device_context_DrawIndexedInstancedIndirect(ID3D11DeviceContext1 *iface, ID3D11Buffer *buffer, UINT offset)
Definition: device.c:1234
static void STDMETHODCALLTYPE d3d11_device_context_PSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
Definition: device.c:744
static void STDMETHODCALLTYPE d3d11_device_context_ClearDepthStencilView(ID3D11DeviceContext1 *iface, ID3D11DepthStencilView *depth_stencil_view, UINT flags, FLOAT depth, UINT8 stencil)
Definition: device.c:1458
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamSourceRect(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable, const RECT *rect)
Definition: device.c:3324
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamFilter(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, D3D11_VIDEO_PROCESSOR_FILTER filter, BOOL *enabled, int *level)
Definition: device.c:3477
static HRESULT STDMETHODCALLTYPE d3d10_device_GetDeviceRemovedReason(ID3D10Device1 *iface)
Definition: device.c:6454
static HRESULT STDMETHODCALLTYPE d3d11_device_context_SetPrivateDataInterface(ID3D11DeviceContext1 *iface, REFGUID guid, const IUnknown *data)
Definition: device.c:699
static void STDMETHODCALLTYPE d3d11_device_context_IASetInputLayout(ID3D11DeviceContext1 *iface, ID3D11InputLayout *input_layout)
Definition: device.c:848
static HRESULT STDMETHODCALLTYPE d3d11_video_context_DecoderExtension(ID3D11VideoContext *iface, ID3D11VideoDecoder *decoder, const D3D11_VIDEO_DECODER_EXTENSION *extension)
Definition: device.c:3208
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRasterizerState(ID3D10Device1 *iface, const D3D10_RASTERIZER_DESC *desc, ID3D10RasterizerState **rasterizer_state)
Definition: device.c:6965
static HRESULT STDMETHODCALLTYPE d3d11_device_GetDeviceRemovedReason(ID3D11Device2 *iface)
Definition: device.c:4856
static void STDMETHODCALLTYPE d3d10_device_OMGetDepthStencilState(ID3D10Device1 *iface, ID3D10DepthStencilState **depth_stencil_state, UINT *stencil_ref)
Definition: device.c:6313
static void STDMETHODCALLTYPE d3d11_device_context_HSSetConstantBuffers1(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *first_constant, const UINT *num_constants)
Definition: device.c:2803
static void STDMETHODCALLTYPE d3d11_device_context_Draw(ID3D11DeviceContext1 *iface, UINT vertex_count, UINT start_vertex_location)
Definition: device.c:781
static ULONG STDMETHODCALLTYPE d3d10_device_AddRef(ID3D10Device1 *iface)
Definition: device.c:5216
static struct wined3d_device_parent *STDMETHODCALLTYPE dxgi_device_parent_get_wined3d_device_parent(IWineDXGIDeviceParent *iface)
Definition: device.c:7595
static const struct ID3DUserDefinedAnnotationVtbl d3d11_user_defined_annotation_vtbl
Definition: device.c:3791
static ULONG STDMETHODCALLTYPE d3d11_multithread_AddRef(ID3D11Multithread *iface)
Definition: device.c:3670
static HRESULT STDMETHODCALLTYPE d3d11_video_device_GetCryptoSessionPrivateDataSize(ID3D11VideoDevice1 *iface, const GUID *encryption_type, const GUID *profile, const GUID *key_exchange_type, UINT *input_size, UINT *output_size)
Definition: device.c:7499
static const struct ID3D11VideoDevice1Vtbl d3d11_video_device1_vtbl
Definition: device.c:7541
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateDepthStencilState(ID3D10Device1 *iface, const D3D10_DEPTH_STENCIL_DESC *desc, ID3D10DepthStencilState **depth_stencil_state)
Definition: device.c:6948
static HRESULT STDMETHODCALLTYPE d3d11_command_list_SetPrivateData(ID3D11CommandList *iface, REFGUID guid, UINT data_size, const void *data)
Definition: device.c:407
static void STDMETHODCALLTYPE d3d10_device_DrawIndexedInstanced(ID3D10Device1 *iface, UINT instance_index_count, UINT instance_count, UINT start_index_location, INT base_vertex_location, UINT start_instance_location)
Definition: device.c:5474
static void STDMETHODCALLTYPE d3d11_device_context_ClearUnorderedAccessViewFloat(ID3D11DeviceContext1 *iface, ID3D11UnorderedAccessView *unordered_access_view, const float values[4])
Definition: device.c:1444
static void STDMETHODCALLTYPE d3d10_device_OMGetBlendState(ID3D10Device1 *iface, ID3D10BlendState **blend_state, FLOAT blend_factor[4], UINT *sample_mask)
Definition: device.c:6285
static D3D10_FEATURE_LEVEL1 STDMETHODCALLTYPE d3d10_device_GetFeatureLevel(ID3D10Device1 *iface)
Definition: device.c:7129
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetOutputColorSpace(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, const D3D11_VIDEO_PROCESSOR_COLOR_SPACE *space)
Definition: device.c:3228
static void STDMETHODCALLTYPE d3d11_device_context_OMGetDepthStencilState(ID3D11DeviceContext1 *iface, ID3D11DepthStencilState **depth_stencil_state, UINT *stencil_ref)
Definition: device.c:2223
static void STDMETHODCALLTYPE d3d10_device_OMSetRenderTargets(ID3D10Device1 *iface, UINT rtv_count, ID3D10RenderTargetView *const *rtvs, ID3D10DepthStencilView *depth_stencil_view)
Definition: device.c:5583
static const struct wined3d_device_parent_ops d3d_wined3d_device_parent_ops
Definition: device.c:7715
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetOutputTargetRect(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, BOOL enable, const RECT *rect)
Definition: device.c:3215
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateShaderResourceView(ID3D11Device2 *iface, ID3D11Resource *resource, const D3D11_SHADER_RESOURCE_VIEW_DESC *desc, ID3D11ShaderResourceView **view)
Definition: device.c:3906
static void STDMETHODCALLTYPE d3d11_device_context_RSGetState(ID3D11DeviceContext1 *iface, ID3D11RasterizerState **rasterizer_state)
Definition: device.c:2279
static HRESULT STDMETHODCALLTYPE d3d11_video_context_SetPrivateDataInterface(ID3D11VideoContext *iface, REFGUID guid, const IUnknown *data)
Definition: device.c:3165
static void d3d10_device_get_constant_buffers(ID3D10Device1 *iface, enum wined3d_shader_type type, UINT start_slot, UINT buffer_count, ID3D10Buffer **buffers)
Definition: device.c:5230
static void STDMETHODCALLTYPE d3d10_device_GSGetSamplers(ID3D10Device1 *iface, UINT start_slot, UINT sampler_count, ID3D10SamplerState **samplers)
Definition: device.c:6208
static void STDMETHODCALLTYPE d3d11_device_context_CSGetConstantBuffers1(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
Definition: device.c:2908
static void STDMETHODCALLTYPE d3d11_device_context_VSSetShader(ID3D11DeviceContext1 *iface, ID3D11VertexShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
Definition: device.c:753
static HRESULT STDMETHODCALLTYPE d3d11_device_CreatePredicate(ID3D11Device2 *iface, const D3D11_QUERY_DESC *desc, ID3D11Predicate **predicate)
Definition: device.c:4322
static void STDMETHODCALLTYPE d3d11_device_context_GetPredication(ID3D11DeviceContext1 *iface, ID3D11Predicate **predicate, BOOL *value)
Definition: device.c:2023
static ULONG STDMETHODCALLTYPE dxgi_device_parent_Release(IWineDXGIDeviceParent *iface)
Definition: device.c:7589
static int d3d_rasterizer_state_compare(const void *key, const struct wine_rb_entry *entry)
Definition: device.c:7748
static const struct ID3D11CommandListVtbl d3d11_command_list_vtbl
Definition: device.c:434
static struct d3d11_command_list * unsafe_impl_from_ID3D11CommandList(ID3D11CommandList *iface)
Definition: device.c:449
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDomainShader(ID3D11Device2 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11DomainShader **shader)
Definition: device.c:4132
static void d3d11_device_context_init(struct d3d11_device_context *context, struct d3d_device *device, D3D11_DEVICE_CONTEXT_TYPE type)
Definition: device.c:3802
static HRESULT STDMETHODCALLTYPE d3d11_device_context_FinishCommandList(ID3D11DeviceContext1 *iface, BOOL restore, ID3D11CommandList **command_list)
Definition: device.c:2696
static void STDMETHODCALLTYPE d3d11_device_context_VSGetConstantBuffers1(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
Definition: device.c:2858
static UINT STDMETHODCALLTYPE d3d11_device_GetCreationFlags(ID3D11Device2 *iface)
Definition: device.c:4849
static void STDMETHODCALLTYPE d3d11_device_context_RSSetState(ID3D11DeviceContext1 *iface, ID3D11RasterizerState *rasterizer_state)
Definition: device.c:1285
static HRESULT STDMETHODCALLTYPE d3d11_device_CheckCounter(ID3D11Device2 *iface, const D3D11_COUNTER_DESC *desc, D3D11_COUNTER_TYPE *type, UINT *active_counter_count, char *name, UINT *name_length, char *units, UINT *units_length, char *description, UINT *description_length)
Definition: device.c:4556
static void d3d_device_context_state_remove_entry(struct d3d_device_context_state *state, struct d3d_device *device)
Definition: device.c:273
static void STDMETHODCALLTYPE d3d10_device_RSGetState(ID3D10Device1 *iface, ID3D10RasterizerState **rasterizer_state)
Definition: device.c:6369
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorSetStreamStereoFormat(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL enable, D3D11_VIDEO_PROCESSOR_STEREO_FORMAT format, BOOL left_view_frame0, BOOL base_view_frame0, D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE flip_mode, int mono_offset)
Definition: device.c:3368
static void STDMETHODCALLTYPE d3d11_device_context_HSGetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
Definition: device.c:2442
static BOOL STDMETHODCALLTYPE d3d10_multithread_SetMultithreadProtected(ID3D10Multithread *iface, BOOL enable)
Definition: device.c:7301
static void STDMETHODCALLTYPE d3d11_device_context_PSSetShader(ID3D11DeviceContext1 *iface, ID3D11PixelShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
Definition: device.c:728
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateBlendState(ID3D11Device2 *iface, const D3D11_BLEND_DESC *desc, ID3D11BlendState **blend_state)
Definition: device.c:4212
static void STDMETHODCALLTYPE d3d10_multithread_Enter(ID3D10Multithread *iface)
Definition: device.c:7287
static HRESULT STDMETHODCALLTYPE d3d10_device_CreatePixelShader(ID3D10Device1 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D10PixelShader **shader)
Definition: device.c:6877
static struct d3d_device * device_from_dxgi_device_parent(IWineDXGIDeviceParent *iface)
Definition: device.c:7571
static void STDMETHODCALLTYPE d3d11_device_context_CSSetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
Definition: device.c:1686
static HRESULT STDMETHODCALLTYPE d3d11_command_list_SetPrivateDataInterface(ID3D11CommandList *iface, REFGUID guid, const IUnknown *data)
Definition: device.c:417
static void STDMETHODCALLTYPE d3d11_device_context_GetDevice(ID3D11DeviceContext1 *iface, ID3D11Device **device)
Definition: device.c:669
static struct d3d11_device_context * impl_from_ID3D11VideoContext(ID3D11VideoContext *iface)
Definition: device.c:3115
static HRESULT STDMETHODCALLTYPE d3d11_device_SetPrivateData(ID3D11Device2 *iface, REFGUID guid, UINT data_size, const void *data)
Definition: device.c:4808
static void STDMETHODCALLTYPE d3d10_device_VSSetShader(ID3D10Device1 *iface, ID3D10VertexShader *shader)
Definition: device.c:5372
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateRenderTargetView(ID3D11Device2 *iface, ID3D11Resource *resource, const D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3D11RenderTargetView **view)
Definition: device.c:3947
static HRESULT STDMETHODCALLTYPE d3d11_video_device_CheckCryptoKeyExchange(ID3D11VideoDevice1 *iface, const GUID *encryption_type, const GUID *profile, UINT index, GUID *key_exchange_type)
Definition: device.c:7477
static HRESULT STDMETHODCALLTYPE d3d11_video_device_RecommendVideoDecoderDownsampleParameters(ID3D11VideoDevice1 *iface, const D3D11_VIDEO_DECODER_DESC *input_desc, DXGI_COLOR_SPACE_TYPE input_colour_space, const D3D11_VIDEO_DECODER_CONFIG *config, const DXGI_RATIONAL *framerate, D3D11_VIDEO_SAMPLE_DESC *output_desc)
Definition: device.c:7531
static void STDMETHODCALLTYPE d3d11_device_context_DiscardView1(ID3D11DeviceContext1 *iface, ID3D11View *view, const D3D11_RECT *rects, UINT num_rects)
Definition: device.c:2967
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateRasterizerState(ID3D11Device2 *iface, const D3D11_RASTERIZER_DESC *desc, ID3D11RasterizerState **rasterizer_state)
Definition: device.c:4259
static void STDMETHODCALLTYPE d3d11_device_context_DrawIndexedInstanced(ID3D11DeviceContext1 *iface, UINT instance_index_count, UINT instance_count, UINT start_index_location, INT base_vertex_location, UINT start_instance_location)
Definition: device.c:903
static void STDMETHODCALLTYPE d3d11_device_context_Flush(ID3D11DeviceContext1 *iface)
Definition: device.c:2671
static BOOL STDMETHODCALLTYPE d3d11_multithread_SetMultithreadProtected(ID3D11Multithread *iface, BOOL enable)
Definition: device.c:3702
static HRESULT STDMETHODCALLTYPE d3d10_device_CheckFormatSupport(ID3D10Device1 *iface, DXGI_FORMAT format, UINT *format_support)
Definition: device.c:7058
static ULONG STDMETHODCALLTYPE d3d11_multithread_Release(ID3D11Multithread *iface)
Definition: device.c:3679
static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResource(ID3D11Device2 *iface, HANDLE resource, REFIID iid, void **out)
Definition: device.c:4394
static void STDMETHODCALLTYPE d3d11_device_context_IASetIndexBuffer(ID3D11DeviceContext1 *iface, ID3D11Buffer *buffer, DXGI_FORMAT format, UINT offset)
Definition: device.c:889
static void STDMETHODCALLTYPE d3d11_device_context_DSGetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
Definition: device.c:2452
static void d3d_device_context_state_init(struct d3d_device_context_state *state, struct d3d_device *device, D3D_FEATURE_LEVEL feature_level, REFIID emulated_interface)
Definition: device.c:317
static HRESULT STDMETHODCALLTYPE d3d11_device_CheckMultisampleQualityLevels1(ID3D11Device2 *iface, DXGI_FORMAT format, UINT sample_count, UINT flags, UINT *quality_level_count)
Definition: device.c:5046
static void STDMETHODCALLTYPE d3d11_user_defined_annotation_SetMarker(ID3DUserDefinedAnnotation *iface, const WCHAR *name)
Definition: device.c:3778
static HRESULT STDMETHODCALLTYPE d3d11_video_device_GetVideoDecoderConfigCount(ID3D11VideoDevice1 *iface, const D3D11_VIDEO_DECODER_DESC *desc, UINT *count)
Definition: device.c:7455
static void STDMETHODCALLTYPE d3d11_device_context_CSGetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
Definition: device.c:2652
static void STDMETHODCALLTYPE d3d11_device_context_SOGetTargets(ID3D11DeviceContext1 *iface, UINT buffer_count, ID3D11Buffer **buffers)
Definition: device.c:2252
static void STDMETHODCALLTYPE d3d11_device_CheckCounterInfo(ID3D11Device2 *iface, D3D11_COUNTER_INFO *info)
Definition: device.c:4551
static ULONG STDMETHODCALLTYPE d3d_device_inner_Release(IUnknown *iface)
Definition: device.c:5176
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamAutoProcessingMode(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enabled)
Definition: device.c:3471
static void d3d_device_context_state_private_release(struct d3d_device_context_state *state)
Definition: device.c:139
static void STDMETHODCALLTYPE d3d11_device_context_DSGetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
Definition: device.c:2534
static void STDMETHODCALLTYPE d3d11_device_context_DiscardResource(ID3D11DeviceContext1 *iface, ID3D11Resource *resource)
Definition: device.c:2781
static void STDMETHODCALLTYPE d3d11_device_context_CopyResource(ID3D11DeviceContext1 *iface, ID3D11Resource *dst_resource, ID3D11Resource *src_resource)
Definition: device.c:1362
static BOOL STDMETHODCALLTYPE d3d11_user_defined_annotation_GetStatus(ID3DUserDefinedAnnotation *iface)
Definition: device.c:3784
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamAlpha(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enabled, float *alpha)
Definition: device.c:3432
static void STDMETHODCALLTYPE d3d11_device_context_OMSetRenderTargetsAndUnorderedAccessViews(ID3D11DeviceContext1 *iface, UINT render_target_view_count, ID3D11RenderTargetView *const *render_target_views, ID3D11DepthStencilView *depth_stencil_view, UINT uav_start_idx, UINT uav_count, ID3D11UnorderedAccessView *const *uavs, const UINT *initial_counts)
Definition: device.c:1106
static const struct ID3D11Device2Vtbl d3d11_device_vtbl
Definition: device.c:5055
static void STDMETHODCALLTYPE d3d11_device_context_DiscardView(ID3D11DeviceContext1 *iface, ID3D11View *view)
Definition: device.c:2787
static ULONG d3d_device_context_state_private_addref(struct d3d_device_context_state *state)
Definition: device.c:98
static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFormatSupport(ID3D11Device2 *iface, DXGI_FORMAT format, UINT *format_support)
Definition: device.c:4402
static void STDMETHODCALLTYPE d3d10_device_GetPredication(ID3D10Device1 *iface, ID3D10Predicate **predicate, BOOL *value)
Definition: device.c:6156
static HRESULT STDMETHODCALLTYPE d3d11_video_context_NegotiateAuthenticatedChannelKeyExchange(ID3D11VideoContext *iface, ID3D11AuthenticatedChannel *channel, UINT size, void *data)
Definition: device.c:3546
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateVertexShader(ID3D10Device1 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D10VertexShader **shader)
Definition: device.c:6774
static void d3d11_device_context_get_constant_buffers(ID3D11DeviceContext1 *iface, enum wined3d_shader_type type, unsigned int start_slot, unsigned int buffer_count, ID3D11Buffer **buffers, unsigned int *offsets, unsigned int *counts)
Definition: device.c:543
static void STDMETHODCALLTYPE d3d11_multithread_Leave(ID3D11Multithread *iface)
Definition: device.c:3695
static D3D11_DSV_DIMENSION d3d11_dsv_dimension_from_d3d10(D3D10_DSV_DIMENSION dim)
Definition: device.c:6709
static void STDMETHODCALLTYPE d3d11_device_context_PSGetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
Definition: device.c:1818
static void STDMETHODCALLTYPE d3d11_device_context_IASetPrimitiveTopology(ID3D11DeviceContext1 *iface, D3D11_PRIMITIVE_TOPOLOGY topology)
Definition: device.c:958
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateVertexShader(ID3D11Device2 *iface, const void *byte_code, SIZE_T byte_code_length, ID3D11ClassLinkage *class_linkage, ID3D11VertexShader **shader)
Definition: device.c:4009
static void STDMETHODCALLTYPE d3d11_device_context_End(ID3D11DeviceContext1 *iface, ID3D11Asynchronous *asynchronous)
Definition: device.c:1000
static UINT STDMETHODCALLTYPE d3d10_device_GetCreationFlags(ID3D10Device1 *iface)
Definition: device.c:7098
static struct d3d11_command_list * impl_from_ID3D11CommandList(ID3D11CommandList *iface)
Definition: device.c:335
static HRESULT STDMETHODCALLTYPE d3d11_device_SetExceptionMode(ID3D11Device2 *iface, UINT flags)
Definition: device.c:4874
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device2 *iface, const D3D11_COUNTER_DESC *desc, ID3D11Counter **counter)
Definition: device.c:4344
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateQuery(ID3D11Device2 *iface, const D3D11_QUERY_DESC *desc, ID3D11Query **query)
Definition: device.c:4300
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateBuffer(ID3D10Device1 *iface, const D3D10_BUFFER_DESC *desc, const D3D10_SUBRESOURCE_DATA *data, ID3D10Buffer **buffer)
Definition: device.c:6526
static void STDMETHODCALLTYPE d3d10_device_PSSetSamplers(ID3D10Device1 *iface, UINT start_slot, UINT sampler_count, ID3D10SamplerState *const *samplers)
Definition: device.c:5363
static void STDMETHODCALLTYPE d3d11_device_context_RSGetViewports(ID3D11DeviceContext1 *iface, UINT *viewport_count, D3D11_VIEWPORT *viewports)
Definition: device.c:2302
static struct d3d11_device_context * impl_from_ID3DUserDefinedAnnotation(ID3DUserDefinedAnnotation *iface)
Definition: device.c:3730
static HRESULT STDMETHODCALLTYPE d3d11_device_context_SetPrivateData(ID3D11DeviceContext1 *iface, REFGUID guid, UINT data_size, const void *data)
Definition: device.c:689
static struct d3d_device * impl_from_ID3D10Multithread(ID3D10Multithread *iface)
Definition: device.c:7255
static void STDMETHODCALLTYPE d3d10_device_IASetPrimitiveTopology(ID3D10Device1 *iface, D3D10_PRIMITIVE_TOPOLOGY topology)
Definition: device.c:5524
static ULONG STDMETHODCALLTYPE d3d11_video_device_AddRef(ID3D11VideoDevice1 *iface)
Definition: device.c:7338
static void STDMETHODCALLTYPE d3d11_device_context_HSGetShaderResources(ID3D11DeviceContext1 *iface, UINT start_slot, UINT view_count, ID3D11ShaderResourceView **views)
Definition: device.c:2361
static void STDMETHODCALLTYPE d3d10_device_VSGetSamplers(ID3D10Device1 *iface, UINT start_slot, UINT sampler_count, ID3D10SamplerState **samplers)
Definition: device.c:6127
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateSamplerState(ID3D10Device1 *iface, const D3D10_SAMPLER_DESC *desc, ID3D10SamplerState **sampler_state)
Definition: device.c:6989
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamFrameFormat(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, D3D11_VIDEO_FRAME_FORMAT *format)
Definition: device.c:3398
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture1D(ID3D10Device1 *iface, const D3D10_TEXTURE1D_DESC *desc, const D3D10_SUBRESOURCE_DATA *data, ID3D10Texture1D **texture)
Definition: device.c:6551
static HRESULT CDECL device_parent_texture_sub_resource_created(struct wined3d_device_parent *device_parent, enum wined3d_resource_type type, struct wined3d_texture *wined3d_texture, unsigned int sub_resource_idx, void **parent, const struct wined3d_parent_ops **parent_ops)
Definition: device.c:7702
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamRotation(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enable, D3D11_VIDEO_PROCESSOR_ROTATION *rotation)
Definition: device.c:3577
static HRESULT STDMETHODCALLTYPE d3d_device_context_state_QueryInterface(ID3DDeviceContextState *iface, REFIID iid, void **out)
Definition: device.c:78
static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRenderTargetView(ID3D10Device1 *iface, ID3D10Resource *resource, const D3D10_RENDER_TARGET_VIEW_DESC *desc, ID3D10RenderTargetView **view)
Definition: device.c:6678
static void STDMETHODCALLTYPE d3d10_device_VSSetSamplers(ID3D10Device1 *iface, UINT start_slot, UINT sampler_count, ID3D10SamplerState *const *samplers)
Definition: device.c:5544
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamPalette(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, UINT count, UINT *entries)
Definition: device.c:3439
static void STDMETHODCALLTYPE d3d10_device_GSSetShader(ID3D10Device1 *iface, ID3D10GeometryShader *shader)
Definition: device.c:5513
static void STDMETHODCALLTYPE d3d11_device_context_CSGetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
Definition: device.c:2624
static const struct ID3D11DeviceContext1Vtbl d3d11_device_context_vtbl
Definition: device.c:2973
static void STDMETHODCALLTYPE d3d11_device_context_HSSetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
Definition: device.c:1571
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamSourceRect(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enabled, RECT *rect)
Definition: device.c:3418
static void d3d10_device_set_samplers(ID3D10Device1 *iface, enum wined3d_shader_type type, unsigned int start_slot, unsigned int count, ID3D10SamplerState *const *samplers)
Definition: device.c:5308
static HRESULT STDMETHODCALLTYPE d3d11_device_context_GetData(ID3D11DeviceContext1 *iface, ID3D11Asynchronous *asynchronous, void *data, UINT data_size, UINT data_flags)
Definition: device.c:1011
static void STDMETHODCALLTYPE d3d11_multithread_Enter(ID3D11Multithread *iface)
Definition: device.c:3688
static void STDMETHODCALLTYPE d3d_device_context_state_GetDevice(ID3DDeviceContextState *iface, ID3D11Device **device)
Definition: device.c:183
static void STDMETHODCALLTYPE d3d11_video_context_EncryptionBlt(ID3D11VideoContext *iface, ID3D11CryptoSession *session, ID3D11Texture2D *src_surface, ID3D11Texture2D *dst_surface, UINT iv_size, void *iv)
Definition: device.c:3509
static void STDMETHODCALLTYPE d3d11_video_context_VideoProcessorGetStreamDestRect(ID3D11VideoContext *iface, ID3D11VideoProcessor *processor, UINT stream_idx, BOOL *enabled, RECT *rect)
Definition: device.c:3425
static void STDMETHODCALLTYPE d3d11_device_context_GSGetConstantBuffers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers)
Definition: device.c:1913
static void STDMETHODCALLTYPE d3d10_device_RSGetViewports(ID3D10Device1 *iface, UINT *viewport_count, D3D10_VIEWPORT *viewports)
Definition: device.c:6390
static const struct ID3D10Device1Vtbl d3d10_device1_vtbl
Definition: device.c:7138
static void STDMETHODCALLTYPE d3d11_device_context_DSGetConstantBuffers1(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
Definition: device.c:2878
static void STDMETHODCALLTYPE d3d11_video_context_DecryptionBlt(ID3D11VideoContext *iface, ID3D11CryptoSession *session, ID3D11Texture2D *src_surface, ID3D11Texture2D *dst_surface, D3D11_ENCRYPTED_BLOCK_INFO *block_info, UINT key_size, const void *key, UINT iv_size, void *iv)
Definition: device.c:3517
static void STDMETHODCALLTYPE d3d11_command_list_GetDevice(ID3D11CommandList *iface, ID3D11Device **device)
Definition: device.c:387
static void STDMETHODCALLTYPE d3d10_device_IASetInputLayout(ID3D10Device1 *iface, ID3D10InputLayout *input_layout)
Definition: device.c:5417
static const struct ID3D10MultithreadVtbl d3d10_multithread_vtbl
Definition: device.c:7315
static void STDMETHODCALLTYPE d3d10_device_IAGetInputLayout(ID3D10Device1 *iface, ID3D10InputLayout **input_layout)
Definition: device.c:5970
static HRESULT STDMETHODCALLTYPE d3d11_device_CheckMultisampleQualityLevels(ID3D11Device2 *iface, DXGI_FORMAT format, UINT sample_count, UINT *quality_level_count)
Definition: device.c:4509
static UINT STDMETHODCALLTYPE d3d10_device_GetExceptionMode(ID3D10Device1 *iface)
Definition: device.c:6471
static void STDMETHODCALLTYPE d3d11_device_context_GSGetConstantBuffers1(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer **buffers, UINT *first_constant, UINT *num_constants)
Definition: device.c:2888
static ULONG STDMETHODCALLTYPE d3d11_video_device_Release(ID3D11VideoDevice1 *iface)
Definition: device.c:7344
static void STDMETHODCALLTYPE d3d11_device_context_DSSetConstantBuffers1(ID3D11DeviceContext1 *iface, UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers, const UINT *first_constant, const UINT *num_constants)
Definition: device.c:2814
static void STDMETHODCALLTYPE d3d10_multithread_Leave(ID3D10Multithread *iface)
Definition: device.c:7294
static void STDMETHODCALLTYPE d3d10_device_RSSetViewports(ID3D10Device1 *iface, UINT viewport_count, const D3D10_VIEWPORT *viewports)
Definition: device.c:5679
static HRESULT STDMETHODCALLTYPE d3d11_video_context_GetEncryptionBltKey(ID3D11VideoContext *iface, ID3D11CryptoSession *session, UINT size, void *key)
Definition: device.c:3539
static void STDMETHODCALLTYPE d3d10_device_DrawInstanced(ID3D10Device1 *iface, UINT instance_vertex_count, UINT instance_count, UINT start_vertex_location, UINT start_instance_location)
Definition: device.c:5489
static void STDMETHODCALLTYPE d3d11_device_context_HSSetShader(ID3D11DeviceContext1 *iface, ID3D11HullShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
Definition: device.c:1546
static void STDMETHODCALLTYPE d3d11_device_context_HSGetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
Definition: device.c:2414
static void STDMETHODCALLTYPE d3d11_device_context_CSGetShader(ID3D11DeviceContext1 *iface, ID3D11ComputeShader **shader, ID3D11ClassInstance **class_instances, UINT *class_instance_count)
Definition: device.c:2598
static void STDMETHODCALLTYPE d3d11_device_context_VSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
Definition: device.c:980
static void STDMETHODCALLTYPE d3d11_device_context_OMSetRenderTargets(ID3D11DeviceContext1 *iface, UINT rtv_count, ID3D11RenderTargetView *const *rtvs, ID3D11DepthStencilView *depth_stencil_view)
Definition: device.c:1077
static HRESULT STDMETHODCALLTYPE d3d10_multithread_QueryInterface(ID3D10Multithread *iface, REFIID iid, void **out)
Definition: device.c:7260
static void STDMETHODCALLTYPE d3d11_device_context_DSSetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState *const *samplers)
Definition: device.c:1606
static void STDMETHODCALLTYPE d3d11_device_context_SwapDeviceContextState(ID3D11DeviceContext1 *iface, ID3DDeviceContextState *state, ID3DDeviceContextState **prev)
Definition: device.c:2918
static void STDMETHODCALLTYPE d3d11_device_context_VSGetSamplers(ID3D11DeviceContext1 *iface, UINT start_slot, UINT sampler_count, ID3D11SamplerState **samplers)
Definition: device.c:1994
static void CDECL device_parent_wined3d_device_created(struct wined3d_device_parent *device_parent, struct wined3d_device *wined3d_device)
Definition: device.c:7658
static void STDMETHODCALLTYPE d3d11_device_GetResourceTiling(ID3D11Device2 *iface, ID3D11Resource *resource, UINT *tile_count, D3D11_PACKED_MIP_DESC *mip_desc, D3D11_TILE_SHAPE *tile_shape, UINT *subresource_tiling_count, UINT first_subresource_tiling, D3D11_SUBRESOURCE_TILING *subresource_tiling)
Definition: device.c:5035
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext1(ID3D11Device2 *iface, UINT flags, ID3D11DeviceContext1 **context)
Definition: device.c:4899
static void STDMETHODCALLTYPE d3d11_device_context_CopyStructureCount(ID3D11DeviceContext1 *iface, ID3D11Buffer *dst_buffer, UINT dst_offset, ID3D11UnorderedAccessView *src_view)
Definition: device.c:1394
static D3D10_FEATURE_LEVEL1 d3d10_feature_level1_from_d3d_feature_level(D3D_FEATURE_LEVEL level)
Definition: device.c:7124
static void STDMETHODCALLTYPE d3d10_device_ClearDepthStencilView(ID3D10Device1 *iface, ID3D10DepthStencilView *depth_stencil_view, UINT flags, FLOAT depth, UINT8 stencil)
Definition: device.c:5793
static HRESULT STDMETHODCALLTYPE d3d11_video_context_DecoderBeginFrame(ID3D11VideoContext *iface, ID3D11VideoDecoder *decoder, ID3D11VideoDecoderOutputView *view, UINT key_size, const void *key)
Definition: device.c:3187
static FLOAT STDMETHODCALLTYPE d3d11_device_context_GetResourceMinLOD(ID3D11DeviceContext1 *iface, ID3D11Resource *resource)
Definition: device.c:1496
static void d3d10_device_set_constant_buffers(ID3D10Device1 *iface, enum wined3d_shader_type type, unsigned int start_slot, unsigned int buffer_count, ID3D10Buffer *const *buffers)
Definition: device.c:5258
void *CDECL wined3d_buffer_get_parent(const struct wined3d_buffer *buffer)
Definition: buffer.c:476
void CDECL wined3d_device_context_draw(struct wined3d_device_context *context, unsigned int start_vertex, unsigned int vertex_count, unsigned int start_instance, unsigned int instance_count)
Definition: device.c:2635
void CDECL wined3d_device_context_set_rasterizer_state(struct wined3d_device_context *context, struct wined3d_rasterizer_state *rasterizer_state)
Definition: device.c:2101
void CDECL wined3d_device_context_set_primitive_type(struct wined3d_device_context *context, enum wined3d_primitive_type primitive_type, unsigned int patch_vertex_count)
Definition: device.c:3779
void CDECL wined3d_device_context_set_depth_stencil_state(struct wined3d_device_context *context, struct wined3d_depth_stencil_state *depth_stencil_state, unsigned int stencil_ref)
Definition: device.c:2077
struct wined3d_depth_stencil_state *CDECL wined3d_device_context_get_depth_stencil_state(const struct wined3d_device_context *context, unsigned int *stencil_ref)
Definition: device.c:1871
void CDECL wined3d_device_context_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type, struct wined3d_shader *shader)
Definition: device.c:1984
void CDECL wined3d_device_context_clear_uav_uint(struct wined3d_device_context *context, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value)
Definition: device.c:4525
struct wined3d_shader *CDECL wined3d_device_context_get_shader(const struct wined3d_device_context *context, enum wined3d_shader_type type)
Definition: device.c:2007
void CDECL wined3d_device_get_creation_parameters(const struct wined3d_device *device, struct wined3d_device_creation_parameters *parameters)
Definition: device.c:5274
struct wined3d_sampler *CDECL wined3d_device_context_get_sampler(const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx)
Definition: device.c:2689
void CDECL wined3d_device_context_set_blend_state(struct wined3d_device_context *context, struct wined3d_blend_state *blend_state, const struct wined3d_color *blend_factor, unsigned int sample_mask)
Definition: device.c:2050
struct wined3d_rasterizer_state *CDECL wined3d_device_context_get_rasterizer_state(struct wined3d_device_context *context)
Definition: device.c:1882
struct wined3d_buffer *CDECL wined3d_device_context_get_index_buffer(const struct wined3d_device_context *context, enum wined3d_format_id *format, unsigned int *offset)
Definition: device.c:1831
HRESULT CDECL wined3d_device_context_unmap(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx)
Definition: device.c:4627
void CDECL wined3d_device_context_resolve_sub_resource(struct wined3d_device_context *context, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, enum wined3d_format_id format_id)
Definition: device.c:4417
void CDECL wined3d_device_context_set_vertex_declaration(struct wined3d_device_context *context, struct wined3d_vertex_declaration *declaration)
Definition: device.c:2588
void CDECL wined3d_device_context_clear_uav_float(struct wined3d_device_context *context, struct wined3d_unordered_access_view *view, const struct wined3d_vec4 *clear_value)
Definition: device.c:4509
struct wined3d_rendertarget_view *CDECL wined3d_device_context_get_depth_stencil_view(const struct wined3d_device_context *context)
Definition: device.c:4676
HRESULT CDECL wined3d_device_context_map(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, unsigned int flags)
Definition: device.c:4570
void CDECL wined3d_device_context_set_shader_resource_views(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, struct wined3d_shader_resource_view *const *const views)
Definition: device.c:2181
struct wined3d_query *CDECL wined3d_device_context_get_predication(struct wined3d_device_context *context, BOOL *value)
Definition: device.c:3768
HRESULT CDECL wined3d_device_context_copy_sub_resource_region(struct wined3d_device_context *context, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z, struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, unsigned int flags)
Definition: device.c:4220
struct wined3d_state *CDECL wined3d_device_get_state(struct wined3d_device *device)
Definition: device.c:1962
HRESULT CDECL wined3d_device_context_set_stream_sources(struct wined3d_device_context *context, unsigned int start_idx, unsigned int count, const struct wined3d_stream_state *streams)
Definition: device.c:2510
HRESULT CDECL wined3d_device_context_get_stream_source(const struct wined3d_device_context *context, unsigned int stream_idx, struct wined3d_buffer **buffer, unsigned int *offset, unsigned int *stride)
Definition: device.c:1786
struct wined3d_unordered_access_view *CDECL wined3d_device_context_get_unordered_access_view(const struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int idx)
Definition: device.c:2703
void CDECL wined3d_device_context_execute_command_list(struct wined3d_device_context *context, struct wined3d_command_list *list, bool restore_state)
Definition: device.c:4649
ULONG CDECL wined3d_device_decref(struct wined3d_device *device)
Definition: device.c:251
void CDECL wined3d_device_context_get_scissor_rects(const struct wined3d_device_context *context, unsigned int *rect_count, RECT *rects)
Definition: device.c:1890
void *CDECL wined3d_blend_state_get_parent(const struct wined3d_blend_state *state)
Definition: device.c:301
void CDECL wined3d_device_context_generate_mipmaps(struct wined3d_device_context *context, struct wined3d_shader_resource_view *view)
Definition: device.c:4684
void CDECL wined3d_device_context_set_constant_buffers(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, const struct wined3d_constant_buffer_state *buffers)
Definition: device.c:2015
struct wined3d_rendertarget_view *CDECL wined3d_device_context_get_rendertarget_view(const struct wined3d_device_context *context, unsigned int view_idx)
Definition: device.c:4659
void CDECL wined3d_device_context_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count, const struct wined3d_viewport *viewports)
Definition: device.c:2124
void CDECL wined3d_device_context_get_primitive_type(const struct wined3d_device_context *context, enum wined3d_primitive_type *primitive_type, unsigned int *patch_vertex_count)
Definition: device.c:3793
void CDECL wined3d_device_context_flush(struct wined3d_device_context *context)
Definition: device.c:4946
HRESULT CDECL wined3d_device_context_clear_rendertarget_view(struct wined3d_device_context *context, struct wined3d_rendertarget_view *view, const RECT *rect, unsigned int flags, const struct wined3d_color *color, float depth, unsigned int stencil)
Definition: device.c:4468
void CDECL wined3d_device_context_get_viewports(const struct wined3d_device_context *context, unsigned int *viewport_count, struct wined3d_viewport *viewports)
Definition: device.c:1844
void CDECL wined3d_device_context_update_sub_resource(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int depth_pitch, unsigned int flags)
Definition: device.c:4376
void CDECL wined3d_device_context_copy_uav_counter(struct wined3d_device_context *context, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav)
Definition: device.c:4102
struct wined3d_device_context *CDECL wined3d_device_get_immediate_context(struct wined3d_device *device)
Definition: device.c:1969
void *CDECL wined3d_depth_stencil_state_get_parent(const struct wined3d_depth_stencil_state *state)
Definition: device.c:376
void CDECL wined3d_device_context_set_unordered_access_views(struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int start_idx, unsigned int count, struct wined3d_unordered_access_view *const *uavs, const unsigned int *initial_counts)
Definition: device.c:2277
void CDECL wined3d_device_context_set_samplers(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, struct wined3d_sampler *const *samplers)
Definition: device.c:2243
void CDECL wined3d_device_context_set_state(struct wined3d_device_context *context, struct wined3d_state *state)
Definition: device.c:1915
struct wined3d_buffer *CDECL wined3d_device_context_get_stream_output(struct wined3d_device_context *context, unsigned int idx, unsigned int *offset)
Definition: device.c:1770
void CDECL wined3d_device_context_draw_indexed(struct wined3d_device_context *context, int base_vertex_index, unsigned int start_index, unsigned int index_count, unsigned int start_instance, unsigned int instance_count)
Definition: device.c:2649
struct wined3d *CDECL wined3d_device_get_wined3d(const struct wined3d_device *device)
Definition: device.c:5282
void CDECL wined3d_device_context_reset_state(struct wined3d_device_context *context)
Definition: device.c:1904
HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device, struct wined3d_caps *caps)
Definition: device.c:3679
void CDECL wined3d_device_context_issue_query(struct wined3d_device_context *context, struct wined3d_query *query, unsigned int flags)
Definition: device.c:4639
struct wined3d_vertex_declaration *CDECL wined3d_device_context_get_vertex_declaration(const struct wined3d_device_context *context)
Definition: device.c:1976
void CDECL wined3d_device_context_set_render_targets_and_unordered_access_views(struct wined3d_device_context *context, unsigned int rtv_count, struct wined3d_rendertarget_view *const *render_target_views, struct wined3d_rendertarget_view *depth_stencil_view, UINT uav_count, struct wined3d_unordered_access_view *const *unordered_access_views, const unsigned int *initial_counts)
Definition: device.c:2313
void CDECL wined3d_device_context_copy_resource(struct wined3d_device_context *context, struct wined3d_resource *dst_resource, struct wined3d_resource *src_resource)
Definition: device.c:4131
void CDECL wined3d_device_context_set_stream_outputs(struct wined3d_device_context *context, const struct wined3d_stream_output outputs[WINED3D_MAX_STREAM_OUTPUT_BUFFERS])
Definition: device.c:2611
struct wined3d_shader_resource_view *CDECL wined3d_device_context_get_shader_resource_view(const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx)
Definition: device.c:2677
void *CDECL wined3d_rasterizer_state_get_parent(const struct wined3d_rasterizer_state *state)
Definition: device.c:463
ULONG CDECL wined3d_device_incref(struct wined3d_device *device)
Definition: device.c:161
struct wined3d_blend_state *CDECL wined3d_device_context_get_blend_state(const struct wined3d_device_context *context, struct wined3d_color *blend_factor, unsigned int *sample_mask)
Definition: device.c:1859
void CDECL wined3d_device_context_set_predication(struct wined3d_device_context *context, struct wined3d_query *predicate, BOOL value)
Definition: device.c:2487
void CDECL wined3d_device_context_set_scissor_rects(struct wined3d_device_context *context, unsigned int rect_count, const RECT *rects)
Definition: device.c:2149
void CDECL wined3d_device_context_set_index_buffer(struct wined3d_device_context *context, struct wined3d_buffer *buffer, enum wined3d_format_id format_id, unsigned int offset)
Definition: device.c:2557
void CDECL wined3d_device_context_get_constant_buffer(const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx, struct wined3d_constant_buffer_state *state)
Definition: device.c:2663
HRESULT CDECL wined3d_query_get_data(struct wined3d_query *query, void *data, UINT data_size, uint32_t flags)
Definition: query.c:452
void *CDECL wined3d_query_get_parent(const struct wined3d_query *query)
Definition: query.c:570
UINT CDECL wined3d_query_get_data_size(const struct wined3d_query *query)
Definition: query.c:491
void CDECL wined3d_resource_get_desc(const struct wined3d_resource *resource, struct wined3d_resource_desc *desc)
Definition: resource.c:280
void *CDECL wined3d_shader_get_parent(const struct wined3d_shader *shader)
Definition: shader.c:2605
struct wined3d_resource *CDECL wined3d_texture_get_resource(struct wined3d_texture *texture)
Definition: texture.c:1649
void *CDECL wined3d_shader_resource_view_get_parent(const struct wined3d_shader_resource_view *view)
Definition: view.c:1016
void *CDECL wined3d_rendertarget_view_get_parent(const struct wined3d_rendertarget_view *view)
Definition: view.c:400
void *CDECL wined3d_unordered_access_view_get_parent(const struct wined3d_unordered_access_view *view)
Definition: view.c:1557
#define CDECL
Definition: compat.h:29
GUID guid
Definition: version.c:147
#define assert(_expr)
Definition: assert.h:32
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
r parent
Definition: btrfs.c:3010
DXGI_COLOR_SPACE_TYPE
Definition: dxgicommon.idl:27
DXGI_FORMAT
Definition: dxgiformat.idl:22
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
static const FxOffsetAndName offsets[]
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
GLint level
Definition: gl.h:1546
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLclampf GLclampf GLclampf alpha
Definition: gl.h:1740
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLint GLint GLsizei width
Definition: gl.h:1546
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:7750
GLenum GLuint texture
Definition: glext.h:6295
GLuint * samplers
Definition: glext.h:7280
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLintptr offset
Definition: glext.h:5920
GLuint color
Definition: glext.h:6243
GLuint sampler
Definition: glext.h:7283
GLuint shader
Definition: glext.h:6030
GLuint index
Definition: glext.h:6031
GLenum mode
Definition: glext.h:6217
GLenum const GLfloat * params
Definition: glext.h:5645
GLfloat units
Definition: glext.h:11727
GLboolean GLenum GLenum GLvoid * values
Definition: glext.h:5666
GLbitfield flags
Definition: glext.h:7161
GLuint GLint GLboolean GLint GLenum access
Definition: glext.h:7866
GLboolean enable
Definition: glext.h:11120
const GLuint * buffers
Definition: glext.h:5916
GLenum GLenum GLenum input
Definition: glext.h:9031
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
GLint GLfloat GLint stencil
Definition: glext.h:6260
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
unsigned int UINT
Definition: sysinfo.c:13
static D3D_DRIVER_TYPE HMODULE UINT const D3D_FEATURE_LEVEL UINT UINT sdk_version
Definition: hlsl_d3d11.c:29
static D3D_DRIVER_TYPE HMODULE UINT const D3D_FEATURE_LEVEL * feature_levels
Definition: hlsl_d3d11.c:28
static D3D_DRIVER_TYPE HMODULE UINT const D3D_FEATURE_LEVEL UINT UINT ID3D11Device D3D_FEATURE_LEVEL ID3D11DeviceContext ** immediate_context
Definition: hlsl_d3d11.c:30
#define ds
Definition: i386-dis.c:443
#define cs
Definition: i386-dis.c:442
#define gs
Definition: i386-dis.c:445
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
uint32_t entry
Definition: isohybrid.c:63
#define debugstr_guid
Definition: kernel32.h:35
#define profile
Definition: kernel32.h:12
#define debugstr_w
Definition: kernel32.h:32
static VARTYPE map_type(struct string_t *str)
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
int vertex_count
Definition: d3drm.c:3528
static ULONG ** element_count
Definition: exception.c:124
static vector_t * vs
Definition: server.c:146
INTERNETFEATURELIST feature
Definition: misc.c:1807
#define min(a, b)
Definition: monoChain.cc:55
short WCHAR
Definition: pedump.c:58
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
unsigned random_number(size_t range)
#define calloc
Definition: rosglue.h:14
void *CDECL wined3d_sampler_get_parent(const struct wined3d_sampler *sampler)
Definition: sampler.c:51
#define wine_rb_entry
Definition: rbtree.h:404
#define WINE_RB_ENTRY_VALUE
Definition: rbtree.h:414
#define wine_rb_init
Definition: rbtree.h:406
#define wine_rb_destroy
Definition: rbtree.h:408
#define memset(x, y, z)
Definition: compat.h:39
#define TRACE(s)
Definition: solgame.cpp:4
D3D10_RENDER_TARGET_BLEND_DESC1 RenderTarget[D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT]
Definition: d3d10_1.idl:77
BOOL AlphaToCoverageEnable
Definition: d3d10_1.idl:75
BOOL IndependentBlendEnable
Definition: d3d10_1.idl:76
UINT back
Definition: d3d10.idl:806
UINT left
Definition: d3d10.idl:801
UINT top
Definition: d3d10.idl:802
UINT front
Definition: d3d10.idl:803
UINT right
Definition: d3d10.idl:804
UINT bottom
Definition: d3d10.idl:805
Definition: d3d10.idl:816
BYTE ComponentCount
Definition: d3d10.idl:820
BYTE StartComponent
Definition: d3d10.idl:819
UINT SemanticIndex
Definition: d3d10.idl:818
const char * SemanticName
Definition: d3d10.idl:817
BYTE OutputSlot
Definition: d3d10.idl:821
FLOAT MinDepth
Definition: d3d10.idl:867
FLOAT MaxDepth
Definition: d3d10.idl:868
BOOL AlphaToCoverageEnable
Definition: d3d11_1.idl:96
BOOL IndependentBlendEnable
Definition: d3d11_1.idl:97
D3D11_RENDER_TARGET_BLEND_DESC1 RenderTarget[D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT]
Definition: d3d11_1.idl:98
UINT top
Definition: d3d11.idl:524
UINT left
Definition: d3d11.idl:523
UINT front
Definition: d3d11.idl:525
UINT back
Definition: d3d11.idl:528
UINT right
Definition: d3d11.idl:526
UINT bottom
Definition: d3d11.idl:527
Definition: dcommon.idl:28
Definition: scsiwmi.h:51
Definition: palette.c:466
Definition: http.c:7252
ID3D11CommandList ID3D11CommandList_iface
struct wined3d_command_list * wined3d_list
ID3D11ComputeShader ID3D11ComputeShader_iface
ID3DUserDefinedAnnotation ID3DUserDefinedAnnotation_iface
ID3D11VideoContext ID3D11VideoContext_iface
ID3D11DeviceContext1 ID3D11DeviceContext1_iface
ID3D11Multithread ID3D11Multithread_iface
ID3D11DomainShader ID3D11DomainShader_iface
struct wined3d_shader * wined3d_shader
ID3D11HullShader ID3D11HullShader_iface
ID3D11UnorderedAccessView ID3D11UnorderedAccessView_iface
struct wined3d_unordered_access_view * wined3d_view
struct wined3d_blend_state * wined3d_state
ID3D11BlendState1 ID3D11BlendState1_iface
ID3D10Buffer ID3D10Buffer_iface
struct wined3d_buffer * wined3d_buffer
ID3D11Buffer ID3D11Buffer_iface
struct wined3d_depth_stencil_state * wined3d_state
ID3D11DepthStencilState ID3D11DepthStencilState_iface
struct wined3d_rendertarget_view * wined3d_view
ID3D11DepthStencilView ID3D11DepthStencilView_iface
ID3D10DepthStencilView ID3D10DepthStencilView_iface
struct wined3d_state * wined3d_state
struct d3d_device * device
ID3DDeviceContextState ID3DDeviceContextState_iface
struct wined3d_device_parent device_parent
IWineDXGIDeviceParent IWineDXGIDeviceParent_iface
IUnknown IUnknown_inner
ID3D10Multithread ID3D10Multithread_iface
ID3D11VideoDevice1 ID3D11VideoDevice1_iface
ID3D11GeometryShader ID3D11GeometryShader_iface
ID3D10GeometryShader ID3D10GeometryShader_iface
struct wined3d_vertex_declaration * wined3d_decl
ID3D10InputLayout ID3D10InputLayout_iface
ID3D11InputLayout ID3D11InputLayout_iface
struct wined3d_shader * wined3d_shader
ID3D10PixelShader ID3D10PixelShader_iface
ID3D11PixelShader ID3D11PixelShader_iface
ID3D10Query ID3D10Query_iface
ID3D11Query ID3D11Query_iface
BOOL predicate
ID3D10RasterizerState ID3D10RasterizerState_iface
struct wined3d_rasterizer_state * wined3d_state
ID3D11RasterizerState1 ID3D11RasterizerState1_iface
struct wined3d_rendertarget_view * wined3d_view
ID3D10RenderTargetView ID3D10RenderTargetView_iface
ID3D11RenderTargetView ID3D11RenderTargetView_iface
ID3D10SamplerState ID3D10SamplerState_iface
ID3D11SamplerState ID3D11SamplerState_iface
ID3D10ShaderResourceView1 ID3D10ShaderResourceView1_iface
struct wined3d_shader_resource_view * wined3d_view
ID3D11ShaderResourceView ID3D11ShaderResourceView_iface
ID3D11VertexShader ID3D11VertexShader_iface
ID3D10VertexShader ID3D10VertexShader_iface
Definition: devices.h:37
Definition: filter.c:165
Definition: copy.c:22
Definition: name.c:39
BOOL viewport_array_index_any_shader
Definition: wined3d.h:2002
BOOL stencil_export
Definition: wined3d.h:2003
DWORD TextureCaps
Definition: wined3d.h:1935
enum wined3d_feature_level max_feature_level
Definition: wined3d.h:2005
BOOL shader_double_precision
Definition: wined3d.h:2001
struct wined3d_buffer * buffer
Definition: wined3d.h:2209
unsigned int width
Definition: wined3d.h:1798
unsigned int height
Definition: wined3d.h:1799
enum wined3d_multisample_type multisample_type
Definition: wined3d.h:1793
unsigned int multisample_quality
Definition: wined3d.h:1794
unsigned int bind_flags
Definition: wined3d.h:1796
enum wined3d_format_id format
Definition: wined3d.h:1792
enum wined3d_feature_level feature_level
unsigned int offset
Definition: wined3d.h:2204
struct wined3d_buffer * buffer
Definition: wined3d.h:2203
struct wined3d_buffer * buffer
Definition: wined3d.h:2160
#define max(a, b)
Definition: svc.c:63
float FLOAT
Definition: typedefs.h:69
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
Definition: pdh_main.c:64
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, const struct wined3d_adapter *adapter, enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, uint32_t usage, unsigned int bind_flags, enum wined3d_resource_type resource_type, enum wined3d_format_id check_format_id)
Definition: directx.c:1972
HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d_adapter *adapter, enum wined3d_device_type device_type, enum wined3d_format_id surface_format_id, BOOL windowed, enum wined3d_multisample_type multisample_type, unsigned int *quality_levels)
Definition: directx.c:1898
struct wined3d_adapter *CDECL wined3d_get_adapter(const struct wined3d *wined3d, unsigned int idx)
Definition: directx.c:1009
void CDECL wined3d_state_destroy(struct wined3d_state *state)
Definition: stateblock.c:2385
HRESULT CDECL wined3d_state_create(struct wined3d_device *device, const enum wined3d_feature_level *levels, unsigned int level_count, struct wined3d_state **state)
Definition: stateblock.c:2357
enum wined3d_feature_level CDECL wined3d_state_get_feature_level(const struct wined3d_state *state)
Definition: stateblock.c:2378
void *CDECL wined3d_vertex_declaration_get_parent(const struct wined3d_vertex_declaration *declaration)
#define WINED3DISSUE_BEGIN
Definition: wined3d.h:781
#define WINED3DCLEAR_TARGET
Definition: wined3d.h:1008
@ WINED3D_MULTISAMPLE_8_SAMPLES
Definition: wined3d.h:581
@ WINED3D_MULTISAMPLE_4_SAMPLES
Definition: wined3d.h:577
static void wined3d_private_store_cleanup(struct wined3d_private_store *store)
Definition: wined3d.h:2636
wined3d_primitive_type
Definition: wined3d.h:74
#define WINED3D_OK
Definition: wined3d.h:33
#define WINED3D_BIND_VERTEX_BUFFER
Definition: wined3d.h:909
#define WINED3D_MAX_STREAM_OUTPUT_BUFFERS
Definition: wined3d.h:1576
wined3d_resource_type
Definition: wined3d.h:716
@ WINED3D_RTYPE_TEXTURE_2D
Definition: wined3d.h:720
@ WINED3D_RTYPE_TEXTURE_1D
Definition: wined3d.h:719
@ WINED3D_RTYPE_NONE
Definition: wined3d.h:717
@ WINED3D_RTYPE_BUFFER
Definition: wined3d.h:718
@ WINED3D_RTYPE_TEXTURE_3D
Definition: wined3d.h:721
#define WINED3D_MAX_VIEWPORTS
Definition: wined3d.h:1590
#define WINED3D_MAX_CONSTANT_BUFFER_SIZE
Definition: wined3d.h:1607
#define WINED3D_BIND_UNORDERED_ACCESS
Definition: wined3d.h:916
#define WINED3DERR_NOTAVAILABLE
Definition: wined3d.h:42
#define WINED3DPTEXTURECAPS_POW2
Definition: wined3d.h:1248
#define WINED3D_BIND_SHADER_RESOURCE
Definition: wined3d.h:912
#define WINED3DUSAGE_QUERY_WRAPANDMIP
Definition: wined3d.h:948
wined3d_format_id
Definition: wined3d.h:126
@ WINED3DFMT_UNKNOWN
Definition: wined3d.h:127
#define WINED3DISSUE_END
Definition: wined3d.h:782
#define WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING
Definition: wined3d.h:944
@ WINED3D_PIPELINE_COMPUTE
Definition: wined3d.h:856
@ WINED3D_PIPELINE_GRAPHICS
Definition: wined3d.h:855
#define WINED3D_BIND_DEPTH_STENCIL
Definition: wined3d.h:915
static void wined3d_box_set(struct wined3d_box *box, unsigned int left, unsigned int top, unsigned int right, unsigned int bottom, unsigned int front, unsigned int back)
Definition: wined3d.h:3006
static void wined3d_private_store_init(struct wined3d_private_store *store)
Definition: wined3d.h:2607
static bool wined3d_bound_range(unsigned int start, unsigned int count, unsigned int limit)
Definition: wined3d.h:2995
wined3d_feature_level
Definition: wined3d.h:98
@ WINED3D_FEATURE_LEVEL_11
Definition: wined3d.h:109
wined3d_shader_type
Definition: wined3d.h:840
@ WINED3D_SHADER_TYPE_HULL
Definition: wined3d.h:844
@ WINED3D_SHADER_TYPE_PIXEL
Definition: wined3d.h:841
@ WINED3D_SHADER_TYPE_GEOMETRY
Definition: wined3d.h:843
@ WINED3D_SHADER_TYPE_DOMAIN
Definition: wined3d.h:845
@ WINED3D_SHADER_TYPE_COMPUTE
Definition: wined3d.h:848
@ WINED3D_SHADER_TYPE_VERTEX
Definition: wined3d.h:842
#define WINED3D_BIND_RENDER_TARGET
Definition: wined3d.h:914
#define WINED3DUSAGE_QUERY_GENMIPMAP
Definition: wined3d.h:941
#define WINED3DERR_INVALIDCALL
Definition: wined3d.h:44
#define WINED3D_TEXTURE_CREATE_GET_DC
Definition: wined3d.h:1565
#define WINED3D_BIND_INDEX_BUFFER
Definition: wined3d.h:910
#define WINED3DOK_NOMIPGEN
Definition: wined3d.h:37
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:544
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:539
#define S_FALSE
Definition: winerror.h:3451
#define E_NOINTERFACE
Definition: winerror.h:3479
#define DXGI_ERROR_INVALID_CALL
Definition: winerror.h:7120
size_t const buffer_count
Definition: xtoa.cpp:36