RetroArch
dxgi_common.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <retro_inline.h>
4 
5 #ifdef __MINGW32__
6 #define __REQUIRED_RPCNDR_H_VERSION__ 475
7 /* Pointer parameters */
8 #define _In_
9 #define _Out_
10 #define _Inout_
11 #define _In_z_
12 #define _Inout_z_
13 #define _In_reads_(s)
14 #define _In_reads_bytes_(s)
15 #define _In_reads_z_(s)
16 #define _In_reads_or_z_(s)
17 #define _Out_writes_(s)
18 #define _Out_writes_bytes_(s)
19 #define _Out_writes_z_(s)
20 #define _Inout_updates_(s)
21 #define _Inout_updates_bytes_(s)
22 #define _Inout_updates_z_(s)
23 #define _Out_writes_to_(s,c)
24 #define _Out_writes_bytes_to_(s, c)
25 #define _Out_writes_all_(s)
26 #define _Out_writes_bytes_all_(s)
27 #define _Inout_updates_to_(s, c)
28 #define _Inout_updates_bytes_to_(s, c)
29 #define _Inout_updates_all_(s)
30 #define _Inout_updates_bytes_all_(s)
31 #define _In_reads_to_ptr_(p)
32 #define _In_reads_to_ptr_z_(p)
33 #define _Out_writes_to_ptr_(p)
34 #define _Out_writes_to_ptr_z(p)
35 
36 /* Optional pointer parameters */
37 #define __in_opt
38 #define __out_opt
39 #define __inout_opt
40 #define _In_opt_
41 #define _Out_opt_
42 #define _Inout_opt_
43 #define _In_opt_z_
44 #define _Inout_opt_z_
45 #define _In_reads_opt_(s)
46 #define _In_reads_bytes_opt_(s)
47 #define _In_reads_opt_z_(s)
48 
49 #define _Out_writes_opt_(s)
50 #define _Out_writes_opt_z_(s)
51 #define _Inout_updates_opt_(s)
52 #define _Inout_updates_bytes_opt_(s)
53 #define _Inout_updates_opt_z_(s)
54 #define _Out_writes_to_opt_(s, c)
55 #define _Out_writes_bytes_to_opt_(s, c)
56 #define _Out_writes_all_opt_(s)
57 #define _Out_writes_bytes_all_opt_(s)
58 
59 #define _Inout_updates_to_opt_(s, c)
60 #define _Inout_updates_bytes_to_opt_(s, c)
61 #define _Inout_updates_all_opt_(s)
62 #define _Inout_updates_bytes_all_opt_(s)
63 #define _In_reads_to_ptr_opt_(p)
64 #define _In_reads_to_ptr_opt_z_(p)
65 #define _Out_writes_to_ptr_opt_(p)
66 #define _Out_writes_to_ptr_opt_z_(p)
67 
68 /* Output pointer parameters */
69 #define _Outptr_
70 #define _Outptr_opt_
71 #define _Outptr_result_maybenull_
72 #define _Outptr_opt_result_maybenull_
73 #define _Outptr_result_z_
74 #define _Outptr_opt_result_z_
75 #define _Outptr_result_maybenull_z_
76 #define _Outptr_opt_result_maybenull_z_
77 #define _COM_Outptr_
78 #define _COM_Outptr_opt_
79 #define _COM_Outptr_result_maybenull_
80 #define _COM_Outptr_opt_result_maybenull_
81 #define _Outptr_result_buffer_(s)
82 #define _Outptr_result_bytebuffer_(s)
83 #define _Outptr_opt_result_buffer_(s)
84 #define _Outptr_opt_result_bytebuffer_(s)
85 #define _Outptr_result_buffer_to_(s, c)
86 #define _Outptr_result_bytebuffer_to_(s, c)
87 #define _Outptr_result_bytebuffer_maybenull_(s)
88 #define _Outptr_opt_result_buffer_to_(s, c)
89 #define _Outptr_opt_result_bytebuffer_to_(s, c)
90 #define _Result_nullonfailure_
91 #define _Result_zeroonfailure_
92 #define _Outptr_result_nullonfailure_
93 #define _Outptr_opt_result_nullonfailure_
94 #define _Outref_result_nullonfailure_
95 
96 /* Output reference parameters */
97 #define _Outref_
98 #define _Outref_result_maybenull_
99 #define _Outref_result_buffer_(s)
100 #define _Outref_result_bytebuffer_(s)
101 #define _Outref_result_buffer_to_(s, c)
102 #define _Outref_result_bytebuffer_to_(s, c)
103 #define _Outref_result_buffer_all_(s)
104 #define _Outref_result_bytebuffer_all_(s)
105 #define _Outref_result_buffer_maybenull_(s)
106 #define _Outref_result_bytebuffer_maybenull_(s)
107 #define _Outref_result_buffer_to_maybenull_(s, c)
108 #define _Outref_result_bytebuffer_to_maybenull_(s, c)
109 #define _Outref_result_buffer_all_maybenull_(s)
110 #define _Outref_result_bytebuffer_all_maybenull_(s)
111 
112 /* Return values */
113 #define _Ret_z_
114 #define _Ret_writes_(s)
115 #define _Ret_writes_bytes_(s)
116 #define _Ret_writes_z_(s)
117 #define _Ret_writes_bytes_to_(s, c)
118 #define _Ret_writes_maybenull_(s)
119 #define _Ret_writes_to_maybenull_(s, c)
120 #define _Ret_writes_maybenull_z_(s)
121 #define _Ret_maybenull_
122 #define _Ret_maybenull_z_
123 #define _Ret_null_
124 #define _Ret_notnull_
125 #define _Ret_writes_bytes_to_(s, c)
126 #define _Ret_writes_bytes_maybenull_(s)
127 #define _Ret_writes_bytes_to_maybenull_(s, c)
128 
129 /* Other common annotations */
130 #define _In_range_(low, hi)
131 #define _Out_range_(low, hi)
132 #define _Ret_range_(low, hi)
133 #define _Deref_in_range_(low, hi)
134 #define _Deref_out_range_(low, hi)
135 #define _Deref_inout_range_(low, hi)
136 #define _Pre_equal_to_(expr)
137 #define _Post_equal_to_(expr)
138 #define _Struct_size_bytes_(size)
139 
140 /* Function annotations */
141 #define _Called_from_function_class_(name)
142 #define _Check_return_ __checkReturn
143 #define _Function_class_(name)
144 #define _Raises_SEH_exception_
145 #define _Maybe_raises_SEH_exception_
146 #define _Must_inspect_result_
147 #define _Use_decl_annotations_
148 
149 /* Success/failure annotations */
150 #define _Always_(anno_list)
151 #define _On_failure_(anno_list)
152 #define _Return_type_success_(expr)
153 #define _Success_(expr)
154 
155 #define _Reserved_
156 #define _Const_
157 
158 /* Buffer properties */
159 #define _Readable_bytes_(s)
160 #define _Readable_elements_(s)
161 #define _Writable_bytes_(s)
162 #define _Writable_elements_(s)
163 #define _Null_terminated_
164 #define _NullNull_terminated_
165 #define _Pre_readable_size_(s)
166 #define _Pre_writable_size_(s)
167 #define _Pre_readable_byte_size_(s)
168 #define _Pre_writable_byte_size_(s)
169 #define _Post_readable_size_(s)
170 #define _Post_writable_size_(s)
171 #define _Post_readable_byte_size_(s)
172 #define _Post_writable_byte_size_(s)
173 
174 /* Field properties */
175 #define _Field_size_(s)
176 #define _Field_size_full_(s)
177 #define _Field_size_full_opt_(s)
178 #define _Field_size_opt_(s)
179 #define _Field_size_part_(s, c)
180 #define _Field_size_part_opt_(s, c)
181 #define _Field_size_bytes_(size)
182 #define _Field_size_bytes_full_(size)
183 #define _Field_size_bytes_full_opt_(s)
184 #define _Field_size_bytes_opt_(s)
185 #define _Field_size_bytes_part_(s, c)
186 #define _Field_size_bytes_part_opt_(s, c)
187 #define _Field_z_
188 #define _Field_range_(min, max)
189 
190 /* Structural annotations */
191 #define _At_(e, a)
192 #define _At_buffer_(e, i, c, a)
193 #define _Group_(a)
194 #define _When_(e, a)
195 
196 /* printf/scanf annotations */
197 #define _Printf_format_string_
198 #define _Scanf_format_string_
199 #define _Scanf_s_format_string_
200 #define _Format_string_impl_(kind,where)
201 #define _Printf_format_string_params_(x)
202 #define _Scanf_format_string_params_(x)
203 #define _Scanf_s_format_string_params_(x)
204 
205 /* Analysis */
206 #define _Analysis_assume_(expr)
207 #define _Analysis_assume_nullterminated_(expr)
208 
209 #define __in
210 #define __out
211 
212 #define __in_bcount(size)
213 #define __in_ecount(size)
214 #define __out_bcount(size)
215 #define __out_bcount_part(size, length)
216 #define __out_ecount(size)
217 #define __inout
218 #define __deref_out_ecount(size)
219 #define __in_ecount_opt(s)
220 
221 #define _In_
222 #define _In_opt_
223 #define _Null_
224 
225 #define _Out_writes_bytes_opt_(s)
226 #define _Out_writes_bytes_(s)
227 #define _In_reads_bytes_(s)
228 #define _Inout_opt_bytecount_(s)
229 
230 #ifndef __cplusplus
231 #define static_assert _Static_assert
232 #endif
233 #endif
234 
235 #include <assert.h>
236 #include <dxgi1_5.h>
237 
238 #ifndef countof
239 #define countof(a) (sizeof(a) / sizeof(*a))
240 #endif
241 
242 #ifndef uuidof
243 #if defined(__cplusplus)
244 #define uuidof(type) IID_##type
245 #else
246 #define uuidof(type) &IID_##type
247 #endif
248 #endif
249 
250 #if !defined(__cplusplus) || defined(CINTERFACE)
251 #ifndef COM_RELEASE_DECLARED
252 #define COM_RELEASE_DECLARED
253 static INLINE ULONG Release(void* object)
254 {
255  if (object)
256  return ((IUnknown*)object)->lpVtbl->Release((IUnknown*)object);
257 
258  return 0;
259 }
260 #endif
261 #endif
262 
263 /* auto-generated */
264 
273 #ifdef __WINRT__
274 typedef IDXGIFactory2* DXGIFactory2;
275 #endif
283 
284 #if !defined(__cplusplus) || defined(CINTERFACE)
286 {
287  return device_sub_object->lpVtbl->Release(device_sub_object);
288 }
289 static INLINE HRESULT DXGIGetSharedHandle(void* resource, HANDLE* shared_handle)
290 {
291  return ((IDXGIResource*)resource)->lpVtbl->GetSharedHandle((IDXGIResource*)resource, shared_handle);
292 }
293 static INLINE HRESULT DXGIGetUsage(void* resource, DXGI_USAGE* usage)
294 {
295  return ((IDXGIResource*)resource)->lpVtbl->GetUsage((IDXGIResource*)resource, usage);
296 }
297 static INLINE HRESULT DXGISetEvictionPriority(void* resource, UINT eviction_priority)
298 {
299  return ((IDXGIResource*)resource)->lpVtbl->SetEvictionPriority((IDXGIResource*)resource, eviction_priority);
300 }
301 static INLINE HRESULT DXGIGetEvictionPriority(void* resource, UINT* eviction_priority)
302 {
303  return ((IDXGIResource*)resource)->lpVtbl->GetEvictionPriority((IDXGIResource*)resource, eviction_priority);
304 }
305 static INLINE ULONG DXGIReleaseKeyedMutex(DXGIKeyedMutex keyed_mutex)
306 {
307  return keyed_mutex->lpVtbl->Release(keyed_mutex);
308 }
309 static INLINE HRESULT DXGIAcquireSync(DXGIKeyedMutex keyed_mutex, UINT64 key, DWORD dw_milliseconds)
310 {
311  return keyed_mutex->lpVtbl->AcquireSync(keyed_mutex, key, dw_milliseconds);
312 }
314 {
315  return keyed_mutex->lpVtbl->ReleaseSync(keyed_mutex, key);
316 }
317 static INLINE ULONG DXGIReleaseSurface(DXGISurface surface)
318 {
319  return surface->lpVtbl->Release(surface);
320 }
321 static INLINE HRESULT DXGIMap(DXGISurface surface, DXGI_MAPPED_RECT* locked_rect, UINT map_flags)
322 {
323  return surface->lpVtbl->Map(surface, locked_rect, map_flags);
324 }
325 static INLINE HRESULT DXGIUnmap(DXGISurface surface) { return surface->lpVtbl->Unmap(surface); }
326 static INLINE HRESULT DXGIGetDC(DXGISurface surface, BOOL discard, HDC* hdc)
327 {
328  return surface->lpVtbl->GetDC(surface, discard, hdc);
329 }
330 static INLINE HRESULT DXGIReleaseDC(DXGISurface surface, RECT* dirty_rect)
331 {
332  return surface->lpVtbl->ReleaseDC(surface, dirty_rect);
333 }
334 static INLINE ULONG DXGIReleaseOutput(DXGIOutput output) { return output->lpVtbl->Release(output); }
336  DXGIOutput output, DXGI_FORMAT enum_format, UINT flags, UINT* num_modes, DXGI_MODE_DESC* desc)
337 {
338  return output->lpVtbl->GetDisplayModeList(output, enum_format, flags, num_modes, desc);
339 }
342  DXGI_MODE_DESC* mode_to_match,
343  DXGI_MODE_DESC* closest_match,
344  void* concerned_device)
345 {
346  return output->lpVtbl->FindClosestMatchingMode(
347  output, mode_to_match, closest_match, (IUnknown*)concerned_device);
348 }
350 {
351  return output->lpVtbl->WaitForVBlank(output);
352 }
354 {
355  return output->lpVtbl->TakeOwnership(output, (IUnknown*)device, exclusive);
356 }
358 {
359  output->lpVtbl->ReleaseOwnership(output);
360 }
361 static INLINE HRESULT
363 {
364  return output->lpVtbl->GetGammaControlCapabilities(output, gamma_caps);
365 }
367 {
368  return output->lpVtbl->SetGammaControl(output, array);
369 }
371 {
372  return output->lpVtbl->GetGammaControl(output, array);
373 }
375 {
376  return output->lpVtbl->SetDisplaySurface(output, (IDXGISurface*)scanout_surface);
377 }
379 {
380  return output->lpVtbl->GetDisplaySurfaceData(output, (IDXGISurface*)destination);
381 }
382 static INLINE ULONG DXGIReleaseDevice(DXGIDevice device) { return device->lpVtbl->Release(device); }
385  DXGI_SURFACE_DESC* desc,
386  UINT num_surfaces,
388  DXGI_SHARED_RESOURCE* shared_resource,
389  DXGISurface* surface)
390 {
391  return device->lpVtbl->CreateSurface(
392  device, desc, num_surfaces, usage, shared_resource, (IDXGISurface**)surface);
393 }
395 {
396  return device->lpVtbl->SetGPUThreadPriority(device, priority);
397 }
399 {
400  return device->lpVtbl->GetGPUThreadPriority(device, priority);
401 }
402 static INLINE ULONG DXGIReleaseFactory(DXGIFactory factory)
403 {
404  return factory->lpVtbl->Release(factory);
405 }
406 static INLINE HRESULT DXGIMakeWindowAssociation(DXGIFactory factory, HWND window_handle, UINT flags)
407 {
408  return factory->lpVtbl->MakeWindowAssociation(factory, window_handle, flags);
409 }
410 static INLINE HRESULT DXGIGetWindowAssociation(DXGIFactory factory, HWND* window_handle)
411 {
412  return factory->lpVtbl->GetWindowAssociation(factory, window_handle);
413 }
415  DXGIFactory factory, void* device, DXGI_SWAP_CHAIN_DESC* desc, DXGISwapChain* swap_chain)
416 {
417  return factory->lpVtbl->CreateSwapChain(
418  factory, (IUnknown*)device, desc, (IDXGISwapChain**)swap_chain);
419 }
420 #ifdef __WINRT__
421 static INLINE HRESULT DXGICreateSwapChainForCoreWindow(
422  DXGIFactory2 factory, void* device, void* corewindow, DXGI_SWAP_CHAIN_DESC1* desc, DXGIOutput restrict_to, DXGISwapChain* swap_chain)
423 {
424  return factory->lpVtbl->CreateSwapChainForCoreWindow(
425  factory, (IUnknown*)device, (IUnknown*)corewindow, desc, restrict_to, (IDXGISwapChain1**)swap_chain);
426 }
427 #endif
428 static INLINE HRESULT
430 {
431  return factory->lpVtbl->CreateSoftwareAdapter(factory, module, (IDXGIAdapter**)adapter);
432 }
434 {
435  return factory->lpVtbl->EnumAdapters1(factory, id, adapter);
436 }
437 #ifdef __WINRT__
438 static INLINE HRESULT DXGIEnumAdapters2(DXGIFactory2 factory, UINT id, DXGIAdapter* adapter)
439 {
440  return factory->lpVtbl->EnumAdapters1(factory, id, adapter);
441 }
442 #endif
444 {
445  return factory->lpVtbl->IsCurrent(factory);
446 }
447 static INLINE ULONG DXGIReleaseAdapter(DXGIAdapter adapter)
448 {
449  return adapter->lpVtbl->Release(adapter);
450 }
452 {
453  return adapter->lpVtbl->EnumOutputs(adapter, id, output);
454 }
455 static INLINE HRESULT
456 DXGICheckInterfaceSupport(DXGIAdapter adapter, REFGUID interface_name, LARGE_INTEGER* u_m_d_version)
457 {
458  return adapter->lpVtbl->CheckInterfaceSupport(adapter, interface_name, u_m_d_version);
459 }
461 {
462  return adapter->lpVtbl->GetDesc1(adapter, desc);
463 }
464 #ifndef __WINRT__
466 {
467  return display_control->lpVtbl->Release(display_control);
468 }
470 {
471  return display_control->lpVtbl->IsStereoEnabled(display_control);
472 }
474 {
475  display_control->lpVtbl->SetStereoEnabled(display_control, enabled);
476 }
478 {
479  return output_duplication->lpVtbl->Release(output_duplication);
480 }
482  DXGIOutputDuplication output_duplication,
483  UINT timeout_in_milliseconds,
484  DXGI_OUTDUPL_FRAME_INFO* frame_info,
485  void* desktop_resource)
486 {
487  return output_duplication->lpVtbl->AcquireNextFrame(
488  output_duplication, timeout_in_milliseconds, frame_info,
489  (IDXGIResource**)desktop_resource);
490 }
492  DXGIOutputDuplication output_duplication,
493  UINT dirty_rects_buffer_size,
494  RECT* dirty_rects_buffer,
495  UINT* dirty_rects_buffer_size_required)
496 {
497  return output_duplication->lpVtbl->GetFrameDirtyRects(
498  output_duplication, dirty_rects_buffer_size, dirty_rects_buffer,
499  dirty_rects_buffer_size_required);
500 }
502  DXGIOutputDuplication output_duplication,
503  UINT move_rects_buffer_size,
504  DXGI_OUTDUPL_MOVE_RECT* move_rect_buffer,
505  UINT* move_rects_buffer_size_required)
506 {
507  return output_duplication->lpVtbl->GetFrameMoveRects(
508  output_duplication, move_rects_buffer_size, move_rect_buffer,
509  move_rects_buffer_size_required);
510 }
512  DXGIOutputDuplication output_duplication,
513  UINT pointer_shape_buffer_size,
514  void* pointer_shape_buffer,
515  UINT* pointer_shape_buffer_size_required,
516  DXGI_OUTDUPL_POINTER_SHAPE_INFO* pointer_shape_info)
517 {
518  return output_duplication->lpVtbl->GetFramePointerShape(
519  output_duplication, pointer_shape_buffer_size, pointer_shape_buffer,
520  pointer_shape_buffer_size_required, pointer_shape_info);
521 }
522 static INLINE HRESULT
524 {
525  return output_duplication->lpVtbl->MapDesktopSurface(output_duplication, locked_rect);
526 }
528 {
529  return output_duplication->lpVtbl->UnMapDesktopSurface(output_duplication);
530 }
532 {
533  return output_duplication->lpVtbl->ReleaseFrame(output_duplication);
534 }
536 {
537  return decode_swap_chain->lpVtbl->Release(decode_swap_chain);
538 }
540  DXGIDecodeSwapChain decode_swap_chain, UINT buffer_to_present, UINT sync_interval, UINT flags)
541 {
542  return decode_swap_chain->lpVtbl->PresentBuffer(
543  decode_swap_chain, buffer_to_present, sync_interval, flags);
544 }
545 static INLINE HRESULT DXGISetSourceRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
546 {
547  return decode_swap_chain->lpVtbl->SetSourceRect(decode_swap_chain, rect);
548 }
549 static INLINE HRESULT DXGISetTargetRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
550 {
551  return decode_swap_chain->lpVtbl->SetTargetRect(decode_swap_chain, rect);
552 }
553 static INLINE HRESULT
555 {
556  return decode_swap_chain->lpVtbl->SetDestSize(decode_swap_chain, width, height);
557 }
558 static INLINE HRESULT DXGIGetSourceRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
559 {
560  return decode_swap_chain->lpVtbl->GetSourceRect(decode_swap_chain, rect);
561 }
562 static INLINE HRESULT DXGIGetTargetRect(DXGIDecodeSwapChain decode_swap_chain, RECT* rect)
563 {
564  return decode_swap_chain->lpVtbl->GetTargetRect(decode_swap_chain, rect);
565 }
566 static INLINE HRESULT
568 {
569  return decode_swap_chain->lpVtbl->GetDestSize(decode_swap_chain, width, height);
570 }
573 {
574  return decode_swap_chain->lpVtbl->SetColorSpace(decode_swap_chain, color_space);
575 }
578 {
579  return decode_swap_chain->lpVtbl->GetColorSpace(decode_swap_chain);
580 }
582 {
583  return factory_media->lpVtbl->Release(factory_media);
584 }
586  DXGIFactoryMedia factory_media,
587  void* device,
588  HANDLE h_surface,
589  DXGI_SWAP_CHAIN_DESC1* desc,
590  DXGIOutput restrict_to_output,
591  DXGISwapChain* swap_chain)
592 {
593  return factory_media->lpVtbl->CreateSwapChainForCompositionSurfaceHandle(
594  factory_media, (IUnknown*)device, h_surface, desc, restrict_to_output,
595  (IDXGISwapChain1**)swap_chain);
596 }
598  DXGIFactoryMedia factory_media,
599  void* device,
600  HANDLE h_surface,
602  void* yuv_decode_buffers,
603  DXGIOutput restrict_to_output,
604  DXGIDecodeSwapChain* swap_chain)
605 {
606  return factory_media->lpVtbl->CreateDecodeSwapChainForCompositionSurfaceHandle(
607  factory_media, (IUnknown*)device, h_surface, desc, (IDXGIResource*)yuv_decode_buffers,
608  restrict_to_output, swap_chain);
609 }
611 {
612  return swap_chain_media->lpVtbl->Release(swap_chain_media);
613 }
614 static INLINE HRESULT
616 {
617  return swap_chain_media->lpVtbl->GetFrameStatisticsMedia(swap_chain_media, stats);
618 }
619 static INLINE HRESULT DXGISetPresentDuration(DXGISwapChainMedia swap_chain_media, UINT duration)
620 {
621  return swap_chain_media->lpVtbl->SetPresentDuration(swap_chain_media, duration);
622 }
624  DXGISwapChainMedia swap_chain_media,
625  UINT desired_present_duration,
626  UINT* closest_smaller_present_duration,
627  UINT* closest_larger_present_duration)
628 {
629  return swap_chain_media->lpVtbl->CheckPresentDurationSupport(
630  swap_chain_media, desired_present_duration, closest_smaller_present_duration,
631  closest_larger_present_duration);
632 }
633 #endif
634 static INLINE ULONG DXGIReleaseSwapChain(DXGISwapChain swap_chain)
635 {
636  return swap_chain->lpVtbl->Release(swap_chain);
637 }
638 static INLINE HRESULT DXGIPresent(DXGISwapChain swap_chain, UINT sync_interval, UINT flags)
639 {
640  return swap_chain->lpVtbl->Present(swap_chain, sync_interval, flags);
641 }
643 {
644  return swap_chain->lpVtbl->GetBuffer(swap_chain, buffer, uuidof(IDXGISurface), (void**)out);
645 }
646 static INLINE HRESULT
648 {
649  return swap_chain->lpVtbl->SetFullscreenState(swap_chain, fullscreen, target);
650 }
651 static INLINE HRESULT
653 {
654  return swap_chain->lpVtbl->GetFullscreenState(swap_chain, fullscreen, target);
655 }
657  DXGISwapChain swap_chain,
658  UINT buffer_count,
659  UINT width,
660  UINT height,
661  DXGI_FORMAT new_format,
662  UINT swap_chain_flags)
663 {
664  return swap_chain->lpVtbl->ResizeBuffers(
665  swap_chain, buffer_count, width, height, new_format, swap_chain_flags);
666 }
667 static INLINE HRESULT
668 DXGIResizeTarget(DXGISwapChain swap_chain, DXGI_MODE_DESC* new_target_parameters)
669 {
670  return swap_chain->lpVtbl->ResizeTarget(swap_chain, new_target_parameters);
671 }
673 {
674  return swap_chain->lpVtbl->GetContainingOutput(swap_chain, output);
675 }
677 {
678  return swap_chain->lpVtbl->GetFrameStatistics(swap_chain, stats);
679 }
680 static INLINE HRESULT DXGIGetLastPresentCount(DXGISwapChain swap_chain, UINT* last_present_count)
681 {
682  return swap_chain->lpVtbl->GetLastPresentCount(swap_chain, last_present_count);
683 }
685 {
686  return swap_chain->lpVtbl->GetDesc1(swap_chain, desc);
687 }
688 static INLINE HRESULT
690 {
691  return swap_chain->lpVtbl->GetFullscreenDesc(swap_chain, desc);
692 }
693 static INLINE HRESULT DXGIGetHwnd(DXGISwapChain swap_chain, HWND* hwnd)
694 {
695  return swap_chain->lpVtbl->GetHwnd(swap_chain, hwnd);
696 }
698  DXGISwapChain swap_chain,
699  UINT sync_interval,
700  UINT present_flags,
701  DXGI_PRESENT_PARAMETERS* present_parameters)
702 {
703  return swap_chain->lpVtbl->Present1(
704  swap_chain, sync_interval, present_flags, present_parameters);
705 }
707 {
708  return swap_chain->lpVtbl->IsTemporaryMonoSupported(swap_chain);
709 }
710 static INLINE HRESULT
711 DXGIGetRestrictToOutput(DXGISwapChain swap_chain, DXGIOutput* restrict_to_output)
712 {
713  return swap_chain->lpVtbl->GetRestrictToOutput(swap_chain, restrict_to_output);
714 }
716 {
717  return swap_chain->lpVtbl->SetBackgroundColor(swap_chain, color);
718 }
720 {
721  return swap_chain->lpVtbl->GetBackgroundColor(swap_chain, color);
722 }
724 {
725  return swap_chain->lpVtbl->SetRotation(swap_chain, rotation);
726 }
728 {
729  return swap_chain->lpVtbl->GetRotation(swap_chain, rotation);
730 }
732 {
733  return swap_chain->lpVtbl->SetSourceSize(swap_chain, width, height);
734 }
736 {
737  return swap_chain->lpVtbl->GetSourceSize(swap_chain, width, height);
738 }
740 {
741  return swap_chain->lpVtbl->SetMaximumFrameLatency(swap_chain, max_latency);
742 }
744 {
745  return swap_chain->lpVtbl->GetMaximumFrameLatency(swap_chain, max_latency);
746 }
748 {
749  return swap_chain->lpVtbl->GetFrameLatencyWaitableObject(swap_chain);
750 }
752 {
753  return swap_chain->lpVtbl->SetMatrixTransform(swap_chain, matrix);
754 }
756 {
757  return swap_chain->lpVtbl->GetMatrixTransform(swap_chain, matrix);
758 }
760 {
761  return swap_chain->lpVtbl->GetCurrentBackBufferIndex(swap_chain);
762 }
764  DXGISwapChain swap_chain, DXGI_COLOR_SPACE_TYPE color_space, UINT* color_space_support)
765 {
766  return swap_chain->lpVtbl->CheckColorSpaceSupport(swap_chain, color_space, color_space_support);
767 }
768 static INLINE HRESULT
770 {
771  return swap_chain->lpVtbl->SetColorSpace1(swap_chain, color_space);
772 }
773 #endif
774 /* end of auto-generated */
775 
777 {
778  return CreateDXGIFactory1(uuidof(IDXGIFactory1), (void**)factory);
779 }
780 #ifdef __WINRT__
781 static INLINE HRESULT DXGICreateFactory2(DXGIFactory2* factory)
782 {
783  return CreateDXGIFactory1(uuidof(IDXGIFactory2), (void**)factory);
784 }
785 #endif
786 
787 /* internal */
788 
789 #include "../video_driver.h"
790 #include "../drivers_shader/glslang_util.h"
791 
792 #define DXGI_COLOR_RGBA(r, g, b, a) (((UINT32)(a) << 24) | ((UINT32)(b) << 16) | ((UINT32)(g) << 8) | ((UINT32)(r) << 0))
793 
794 typedef enum {
797 
798 typedef struct
799 {
800  float x;
801  float y;
802  float z;
803  float w;
804 } float4_t;
805 
807 
809 
810 void dxgi_copy(
811  int width,
812  int height,
813  DXGI_FORMAT src_format,
814  int src_pitch,
815  const void* src_data,
816  DXGI_FORMAT dst_format,
817  int dst_pitch,
818  void* dst_data);
819 
821 
823 
825 
826 #if 1
827 #include "../../performance_counters.h"
828 
829 #ifndef PERF_START
830 #define PERF_START() \
831  { \
832  static struct retro_perf_counter perfcounter = { __FUNCTION__ }; \
833  LARGE_INTEGER start, stop; \
834  rarch_perf_register(&perfcounter); \
835  perfcounter.call_cnt++; \
836  QueryPerformanceCounter(&start)
837 
838 #define PERF_STOP() \
839  QueryPerformanceCounter(&stop); \
840  perfcounter.total += stop.QuadPart - start.QuadPart; \
841  }
842 #endif
843 #else
844 #define PERF_START()
845 #define PERF_STOP()
846 #endif
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:6559
interface IDXGIKeyedMutex IDXGIKeyedMutex
Definition: dxgi.h:65
static INLINE HRESULT DXGIGetFullscreenState(DXGISwapChain swap_chain, BOOL *fullscreen, DXGIOutput *target)
Definition: dxgi_common.h:652
static INLINE HRESULT DXGIReleaseFrame(DXGIOutputDuplication output_duplication)
Definition: dxgi_common.h:531
interface IDXGIDeviceSubObject IDXGIDeviceSubObject
Definition: dxgi.h:51
static INLINE HRESULT DXGISetRotation(DXGISwapChain swap_chain, DXGI_MODE_ROTATION rotation)
Definition: dxgi_common.h:723
static INLINE void DXGIReleaseOwnership(DXGIOutput output)
Definition: dxgi_common.h:357
static INLINE HRESULT DXGICreateSwapChainForCompositionSurfaceHandle(DXGIFactoryMedia factory_media, void *device, HANDLE h_surface, DXGI_SWAP_CHAIN_DESC1 *desc, DXGIOutput restrict_to_output, DXGISwapChain *swap_chain)
Definition: dxgi_common.h:585
static INLINE UINT DXGIGetCurrentBackBufferIndex(DXGISwapChain swap_chain)
Definition: dxgi_common.h:759
IDXGIDecodeSwapChain * DXGIDecodeSwapChain
Definition: dxgi_common.h:279
static INLINE ULONG DXGIReleaseOutputDuplication(DXGIOutputDuplication output_duplication)
Definition: dxgi_common.h:477
static INLINE HRESULT DXGIGetFullscreenDesc(DXGISwapChain swap_chain, DXGI_SWAP_CHAIN_FULLSCREEN_DESC *desc)
Definition: dxgi_common.h:689
Definition: dxgi_common.h:795
#define INLINE
Definition: retro_inline.h:35
void dxgi_copy(int width, int height, DXGI_FORMAT src_format, int src_pitch, const void *src_data, DXGI_FORMAT dst_format, int dst_pitch, void *dst_data)
Definition: dxgi_common.c:273
float y
Definition: dxgi_common.h:801
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
IDXGIObject * DXGIObject
Definition: dxgi_common.h:265
static INLINE HRESULT DXGICreateSoftwareAdapter(DXGIFactory factory, HMODULE module, DXGIAdapter *adapter)
Definition: dxgi_common.h:429
static INLINE HRESULT DXGIUnMapDesktopSurface(DXGIOutputDuplication output_duplication)
Definition: dxgi_common.h:527
IDXGIResource * DXGIResource
Definition: dxgi_common.h:267
interface IDXGIFactory1 IDXGIFactory1
Definition: dxgi.h:121
static INLINE HRESULT DXGISetColorSpace(DXGIDecodeSwapChain decode_swap_chain, DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS color_space)
Definition: dxgi_common.h:571
interface IDXGIOutputDuplication IDXGIOutputDuplication
Definition: dxgi1_2.h:51
static INLINE HRESULT DXGISetSourceRect(DXGIDecodeSwapChain decode_swap_chain, RECT *rect)
Definition: dxgi_common.h:545
static INLINE HRESULT DXGIGetSourceSize(DXGISwapChain swap_chain, UINT *width, UINT *height)
Definition: dxgi_common.h:735
static INLINE HRESULT DXGIGetDisplaySurfaceData(DXGIOutput output, DXGISurface destination)
Definition: dxgi_common.h:378
Definition: dxgi_common.h:798
interface IDXGIResource IDXGIResource
Definition: dxgi.h:58
static INLINE ULONG DXGIReleaseDisplayControl(DXGIDisplayControl display_control)
Definition: dxgi_common.h:465
rotation
Definition: video_defines.h:62
static INLINE HRESULT DXGIAcquireSync(DXGIKeyedMutex keyed_mutex, UINT64 key, DWORD dw_milliseconds)
Definition: dxgi_common.h:309
static INLINE HRESULT DXGISetDestSize(DXGIDecodeSwapChain decode_swap_chain, UINT width, UINT height)
Definition: dxgi_common.h:554
#define uuidof(type)
Definition: dxgi_common.h:246
static INLINE HRESULT DXGIGetDC(DXGISurface surface, BOOL discard, HDC *hdc)
Definition: dxgi_common.h:326
static INLINE HRESULT DXGISetTargetRect(DXGIDecodeSwapChain decode_swap_chain, RECT *rect)
Definition: dxgi_common.h:549
uint64_t UINT64
Definition: coretypes.h:8
static INLINE HRESULT DXGISetSourceSize(DXGISwapChain swap_chain, UINT width, UINT height)
Definition: dxgi_common.h:731
interface IDXGIDecodeSwapChain IDXGIDecodeSwapChain
Definition: dxgi1_3.h:72
IDXGIOutput * DXGIOutput
Definition: dxgi_common.h:270
#define color_space
Definition: ps3_defines.h:298
static INLINE HRESULT DXGIGetBuffer(DXGISwapChain swap_chain, UINT buffer, IDXGISurface **out)
Definition: dxgi_common.h:642
GLuint GLenum matrix
Definition: glext.h:10314
float z
Definition: dxgi_common.h:802
static INLINE HRESULT DXGIMapDesktopSurface(DXGIOutputDuplication output_duplication, DXGI_MAPPED_RECT *locked_rect)
Definition: dxgi_common.h:523
static INLINE BOOL DXGIIsTemporaryMonoSupported(DXGISwapChain swap_chain)
Definition: dxgi_common.h:706
float w
Definition: dxgi_common.h:803
struct passwd out
Definition: missing_libc_functions.c:51
Definition: dxgi.h:178
static INLINE HANDLE DXGIGetFrameLatencyWaitableObject(DXGISwapChain swap_chain)
Definition: dxgi_common.h:747
static const bool fullscreen
Definition: config.def.h:108
Definition: dxgitype.h:75
static INLINE HRESULT DXGIUnmap(DXGISurface surface)
Definition: dxgi_common.h:325
typedef HRESULT(WINAPI *PFN_D3D12_SERIALIZE_ROOT_SIGNATURE)(_In_ const D3D12_ROOT_SIGNATURE_DESC *pRootSignature
static INLINE HRESULT DXGIGetContainingOutput(DXGISwapChain swap_chain, DXGIOutput *output)
Definition: dxgi_common.h:672
glslang_format
Definition: glslang_util.h:22
interface IDXGIDevice IDXGIDevice
Definition: dxgi.h:114
interface IDXGISwapChainMedia IDXGISwapChainMedia
Definition: dxgi1_3.h:86
static INLINE HRESULT DXGIMakeWindowAssociation(DXGIFactory factory, HWND window_handle, UINT flags)
Definition: dxgi_common.h:406
interface IDXGIDisplayControl IDXGIDisplayControl
Definition: dxgi1_2.h:44
interface IDXGIFactoryMedia IDXGIFactoryMedia
Definition: dxgi1_3.h:79
UINT DXGI_USAGE
Definition: dxgi.h:167
HRESULT WINAPI CreateDXGIFactory1(REFIID riid, _COM_Outptr_ void **ppFactory)
static INLINE ULONG DXGIReleaseAdapter(DXGIAdapter adapter)
Definition: dxgi_common.h:447
static INLINE HRESULT DXGISetColorSpace1(DXGISwapChain swap_chain, DXGI_COLOR_SPACE_TYPE color_space)
Definition: dxgi_common.h:769
Definition: dxgi1_3.h:343
static INLINE HRESULT DXGISetPresentDuration(DXGISwapChainMedia swap_chain_media, UINT duration)
Definition: dxgi_common.h:619
Definition: dxgi.h:2376
static INLINE HRESULT DXGIGetGPUThreadPriority(DXGIDevice device, INT *priority)
Definition: dxgi_common.h:398
static INLINE HRESULT DXGIGetHwnd(DXGISwapChain swap_chain, HWND *hwnd)
Definition: dxgi_common.h:693
Definition: dxgi.h:285
IDXGIKeyedMutex * DXGIKeyedMutex
Definition: dxgi_common.h:268
static INLINE HRESULT DXGIEnumAdapters(DXGIFactory factory, UINT id, DXGIAdapter *adapter)
Definition: dxgi_common.h:433
static INLINE HRESULT DXGISetMaximumFrameLatency(DXGISwapChain swap_chain, UINT max_latency)
Definition: dxgi_common.h:739
Definition: ibxm.h:39
static INLINE HRESULT DXGIEnumOutputs(DXGIAdapter adapter, UINT id, DXGIOutput *output)
Definition: dxgi_common.h:451
static INLINE HRESULT DXGICreateFactory(DXGIFactory *factory)
Definition: dxgi_common.h:776
static INLINE ULONG DXGIReleaseSwapChainMedia(DXGISwapChainMedia swap_chain_media)
Definition: dxgi_common.h:610
static INLINE ULONG DXGIReleaseDecodeSwapChain(DXGIDecodeSwapChain decode_swap_chain)
Definition: dxgi_common.h:535
static INLINE BOOL DXGIIsStereoEnabled(DXGIDisplayControl display_control)
Definition: dxgi_common.h:469
Definition: video_driver.h:405
DXGI_FORMAT
Definition: dxgiformat.h:10
static INLINE HRESULT DXGIMap(DXGISurface surface, DXGI_MAPPED_RECT *locked_rect, UINT map_flags)
Definition: dxgi_common.h:321
static INLINE HRESULT DXGIGetRotation(DXGISwapChain swap_chain, DXGI_MODE_ROTATION *rotation)
Definition: dxgi_common.h:727
IDXGIDeviceSubObject * DXGIDeviceSubObject
Definition: dxgi_common.h:266
interface IDXGISurface IDXGISurface
Definition: d2d1.h:53
static INLINE DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS DXGIGetColorSpace(DXGIDecodeSwapChain decode_swap_chain)
Definition: dxgi_common.h:577
GLenum GLenum GLsizei const GLuint GLboolean enabled
Definition: glext.h:8417
Definition: dxgi1_2.h:1209
IDXGIDisplayControl * DXGIDisplayControl
Definition: dxgi_common.h:277
IDXGIFactory1 * DXGIFactory
Definition: dxgi_common.h:272
static INLINE HRESULT DXGIGetBackgroundColor(DXGISwapChain swap_chain, DXGI_RGBA *color)
Definition: dxgi_common.h:719
IDXGIOutputDuplication * DXGIOutputDuplication
Definition: dxgi_common.h:278
static INLINE ULONG DXGIReleaseKeyedMutex(DXGIKeyedMutex keyed_mutex)
Definition: dxgi_common.h:305
static INLINE HRESULT DXGICreateSwapChain(DXGIFactory factory, void *device, DXGI_SWAP_CHAIN_DESC *desc, DXGISwapChain *swap_chain)
Definition: dxgi_common.h:414
static INLINE HRESULT DXGISetGammaControl(DXGIOutput output, DXGI_GAMMA_CONTROL *array)
Definition: dxgi_common.h:366
RETRO_BEGIN_DECLS DXGI_FORMAT * dxgi_get_format_fallback_list(DXGI_FORMAT format)
Definition: dxgi_common.c:58
interface IDXGISwapChain1 IDXGISwapChain1
Definition: dxgi1_2.h:79
static INLINE HRESULT DXGIGetTargetRect(DXGIDecodeSwapChain decode_swap_chain, RECT *rect)
Definition: dxgi_common.h:562
static INLINE HRESULT DXGIGetSharedHandle(void *resource, HANDLE *shared_handle)
Definition: dxgi_common.h:289
interface IDXGISwapChain IDXGISwapChain
Definition: dxgi.h:100
IDXGIFactoryMedia * DXGIFactoryMedia
Definition: dxgi_common.h:280
Definition: dxgitype.h:115
Definition: dxgi1_2.h:251
Definition: video_driver.h:332
Definition: dxgi.h:169
interface IDXGIAdapter1 IDXGIAdapter1
Definition: dxgi.h:128
Definition: dxgi1_3.h:1662
DXGI_FORMAT glslang_format_to_dxgi(glslang_format fmt)
Definition: dxgi_common.c:341
static INLINE HRESULT DXGIGetMatrixTransform(DXGISwapChain swap_chain, DXGI_MATRIX_3X2_F *matrix)
Definition: dxgi_common.h:755
static INLINE HRESULT DXGIResizeTarget(DXGISwapChain swap_chain, DXGI_MODE_DESC *new_target_parameters)
Definition: dxgi_common.h:668
Definition: dxgi1_3.h:1328
static INLINE HRESULT DXGIGetSwapChainDesc1(DXGISwapChain swap_chain, DXGI_SWAP_CHAIN_DESC1 *desc)
Definition: dxgi_common.h:684
static INLINE HRESULT DXGIGetUsage(void *resource, DXGI_USAGE *usage)
Definition: dxgi_common.h:293
static INLINE HRESULT DXGICheckInterfaceSupport(DXGIAdapter adapter, REFGUID interface_name, LARGE_INTEGER *u_m_d_version)
Definition: dxgi_common.h:456
static INLINE HRESULT DXGISetMatrixTransform(DXGISwapChain swap_chain, DXGI_MATRIX_3X2_F *matrix)
Definition: dxgi_common.h:751
interface IDXGIFactory2 IDXGIFactory2
Definition: dxgi1_2.h:86
static const struct @104 priority[]
static INLINE HRESULT DXGIReleaseSync(DXGIKeyedMutex keyed_mutex, UINT64 key)
Definition: dxgi_common.h:313
static INLINE HRESULT DXGIResizeBuffers(DXGISwapChain swap_chain, UINT buffer_count, UINT width, UINT height, DXGI_FORMAT new_format, UINT swap_chain_flags)
Definition: dxgi_common.h:656
static INLINE BOOL DXGIIsCurrent(DXGIFactory factory)
Definition: dxgi_common.h:443
interface IDXGISwapChain3 IDXGISwapChain3
Definition: dxgi1_4.h:44
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
static INLINE ULONG DXGIReleaseFactoryMedia(DXGIFactoryMedia factory_media)
Definition: dxgi_common.h:581
interface IDXGISurface1 IDXGISurface1
Definition: dxgi.h:79
Definition: dxgi.h:250
static INLINE HRESULT DXGIGetFrameStatisticsMedia(DXGISwapChainMedia swap_chain_media, DXGI_FRAME_STATISTICS_MEDIA *stats)
Definition: dxgi_common.h:615
static INLINE ULONG DXGIReleaseFactory(DXGIFactory factory)
Definition: dxgi_common.h:402
static INLINE HRESULT DXGIGetDisplayModeList(DXGIOutput output, DXGI_FORMAT enum_format, UINT flags, UINT *num_modes, DXGI_MODE_DESC *desc)
Definition: dxgi_common.h:335
static INLINE HRESULT DXGIGetGammaControl(DXGIOutput output, DXGI_GAMMA_CONTROL *array)
Definition: dxgi_common.h:370
Definition: dxgitype.h:82
static INLINE ULONG Release(void *object)
Definition: dxgi_common.h:253
Definition: dxgi1_2.h:242
IDXGIDevice * DXGIDevice
Definition: dxgi_common.h:271
unsigned int BOOL
Definition: gctypes.h:51
Definition: dxgi1_2.h:215
static INLINE ULONG DXGIReleaseDeviceSubObject(DXGIDeviceSubObject device_sub_object)
Definition: dxgi_common.h:285
std::string output
Definition: Config.FromFile.cpp:44
static INLINE HRESULT DXGIGetLastPresentCount(DXGISwapChain swap_chain, UINT *last_present_count)
Definition: dxgi_common.h:680
static INLINE HRESULT DXGIGetFrameDirtyRects(DXGIOutputDuplication output_duplication, UINT dirty_rects_buffer_size, RECT *dirty_rects_buffer, UINT *dirty_rects_buffer_size_required)
Definition: dxgi_common.h:491
GLuint color
Definition: glext.h:6883
static INLINE HRESULT DXGIPresent1(DXGISwapChain swap_chain, UINT sync_interval, UINT present_flags, DXGI_PRESENT_PARAMETERS *present_parameters)
Definition: dxgi_common.h:697
static INLINE ULONG DXGIReleaseSwapChain(DXGISwapChain swap_chain)
Definition: dxgi_common.h:634
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:6293
static INLINE HRESULT DXGIGetWindowAssociation(DXGIFactory factory, HWND *window_handle)
Definition: dxgi_common.h:410
Definition: dxgi1_2.h:1201
GLint GLint GLsizei width
Definition: glext.h:6293
interface IDXGIOutput IDXGIOutput
Definition: dxgi.h:93
Definition: glslang_tab.cpp:135
IDXGISwapChainMedia * DXGISwapChainMedia
Definition: dxgi_common.h:281
static INLINE HRESULT DXGIPresent(DXGISwapChain swap_chain, UINT sync_interval, UINT flags)
Definition: dxgi_common.h:638
Definition: dxgi.h:227
Definition: ffmpeg_fft.c:36
static INLINE HRESULT DXGISetGPUThreadPriority(DXGIDevice device, INT priority)
Definition: dxgi_common.h:394
Definition: glslang_tab.cpp:136
static INLINE HRESULT DXGIGetGammaControlCapabilities(DXGIOutput output, DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps)
Definition: dxgi_common.h:362
static INLINE HRESULT DXGICreateSurface(DXGIDevice device, DXGI_SURFACE_DESC *desc, UINT num_surfaces, DXGI_USAGE usage, DXGI_SHARED_RESOURCE *shared_resource, DXGISurface *surface)
Definition: dxgi_common.h:383
static INLINE HRESULT DXGICheckPresentDurationSupport(DXGISwapChainMedia swap_chain_media, UINT desired_present_duration, UINT *closest_smaller_present_duration, UINT *closest_larger_present_duration)
Definition: dxgi_common.h:623
static INLINE void DXGISetStereoEnabled(DXGIDisplayControl display_control, BOOL enabled)
Definition: dxgi_common.h:473
DXGI_COLOR_SPACE_TYPE
Definition: dxgicommon.h:25
static INLINE HRESULT DXGIGetSourceRect(DXGIDecodeSwapChain decode_swap_chain, RECT *rect)
Definition: dxgi_common.h:558
IDXGIAdapter1 * DXGIAdapter
Definition: dxgi_common.h:276
DXGI_MODE_ROTATION
Definition: dxgitype.h:106
static INLINE HRESULT DXGISetFullscreenState(DXGISwapChain swap_chain, BOOL fullscreen, DXGIOutput target)
Definition: dxgi_common.h:647
interface IDXGIAdapter IDXGIAdapter
Definition: dxgi.h:86
DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS
Definition: dxgi1_3.h:1333
static INLINE HRESULT DXGIGetEvictionPriority(void *resource, UINT *eviction_priority)
Definition: dxgi_common.h:301
static INLINE ULONG DXGIReleaseOutput(DXGIOutput output)
Definition: dxgi_common.h:334
IDXGISurface1 * DXGISurface
Definition: dxgi_common.h:269
DXGI_FORMAT_EX
Definition: dxgi_common.h:794
static INLINE HRESULT DXGIReleaseDC(DXGISurface surface, RECT *dirty_rect)
Definition: dxgi_common.h:330
static INLINE HRESULT DXGIPresentBuffer(DXGIDecodeSwapChain decode_swap_chain, UINT buffer_to_present, UINT sync_interval, UINT flags)
Definition: dxgi_common.h:539
static INLINE HRESULT DXGIGetFrameStatistics(DXGISwapChain swap_chain, DXGI_FRAME_STATISTICS *stats)
Definition: dxgi_common.h:676
static INLINE ULONG DXGIReleaseSurface(DXGISurface surface)
Definition: dxgi_common.h:317
static INLINE HRESULT DXGIGetFrameMoveRects(DXGIOutputDuplication output_duplication, UINT move_rects_buffer_size, DXGI_OUTDUPL_MOVE_RECT *move_rect_buffer, UINT *move_rects_buffer_size_required)
Definition: dxgi_common.h:501
static INLINE HRESULT DXGIGetDestSize(DXGIDecodeSwapChain decode_swap_chain, UINT *width, UINT *height)
Definition: dxgi_common.h:567
static INLINE HRESULT DXGIGetMaximumFrameLatency(DXGISwapChain swap_chain, UINT *max_latency)
Definition: dxgi_common.h:743
static INLINE HRESULT DXGIGetFramePointerShape(DXGIOutputDuplication output_duplication, UINT pointer_shape_buffer_size, void *pointer_shape_buffer, UINT *pointer_shape_buffer_size_required, DXGI_OUTDUPL_POINTER_SHAPE_INFO *pointer_shape_info)
Definition: dxgi_common.h:511
Definition: dxgi1_2.h:1186
Definition: video4linux2.c:51
static INLINE HRESULT DXGISetBackgroundColor(DXGISwapChain swap_chain, DXGI_RGBA *color)
Definition: dxgi_common.h:715
float x
Definition: dxgi_common.h:800
static INLINE HRESULT DXGISetDisplaySurface(DXGIOutput output, DXGISurface scanout_surface)
Definition: dxgi_common.h:374
GLbitfield flags
Definition: glext.h:7828
void dxgi_update_title(video_frame_info_t *video_info)
Definition: dxgi_common.c:305
static INLINE HRESULT DXGIGetRestrictToOutput(DXGISwapChain swap_chain, DXGIOutput *restrict_to_output)
Definition: dxgi_common.h:711
static INLINE HRESULT DXGITakeOwnership(DXGIOutput output, void *device, BOOL exclusive)
Definition: dxgi_common.h:353
struct nk_device device
Definition: nk_common.c:44
IDXGISwapChain3 * DXGISwapChain
Definition: dxgi_common.h:282
static INLINE HRESULT DXGICheckColorSpaceSupport(DXGISwapChain swap_chain, DXGI_COLOR_SPACE_TYPE color_space, UINT *color_space_support)
Definition: dxgi_common.h:763
static INLINE HRESULT DXGIWaitForVBlank(DXGIOutput output)
Definition: dxgi_common.h:349
The text renderer interface represents a set of application-defined callbacks that perform rendering ...
Definition: d3d8types.h:57
static INLINE HRESULT DXGIFindClosestMatchingMode(DXGIOutput output, DXGI_MODE_DESC *mode_to_match, DXGI_MODE_DESC *closest_match, void *concerned_device)
Definition: dxgi_common.h:340
static INLINE HRESULT DXGISetEvictionPriority(void *resource, UINT eviction_priority)
Definition: dxgi_common.h:297
interface IDXGIObject IDXGIObject
Definition: dxgi.h:44
static INLINE HRESULT DXGIAcquireNextFrame(DXGIOutputDuplication output_duplication, UINT timeout_in_milliseconds, DXGI_OUTDUPL_FRAME_INFO *frame_info, void *desktop_resource)
Definition: dxgi_common.h:481
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293
static INLINE HRESULT DXGIGetAdapterDesc1(DXGIAdapter adapter, DXGI_ADAPTER_DESC1 *desc)
Definition: dxgi_common.h:460
static INLINE HRESULT DXGICreateDecodeSwapChainForCompositionSurfaceHandle(DXGIFactoryMedia factory_media, void *device, HANDLE h_surface, DXGI_DECODE_SWAP_CHAIN_DESC *desc, void *yuv_decode_buffers, DXGIOutput restrict_to_output, DXGIDecodeSwapChain *swap_chain)
Definition: dxgi_common.h:597
static INLINE ULONG DXGIReleaseDevice(DXGIDevice device)
Definition: dxgi_common.h:382