]>
Commit | Line | Data |
---|---|---|
8faf50e0 XL |
1 | // Licensed under the Apache License, Version 2.0 |
2 | // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
3 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. | |
4 | // All files in the project carrying such notice may not be copied, modified, or distributed | |
5 | // except according to those terms. | |
6 | //! Mappings for the contents of dxgi1_6.h | |
0bf4aa26 | 7 | use ctypes::c_void; |
8faf50e0 XL |
8 | use shared::basetsd::SIZE_T; |
9 | use shared::dxgi1_2::{ | |
10 | DXGI_COMPUTE_PREEMPTION_GRANULARITY, DXGI_GRAPHICS_PREEMPTION_GRANULARITY, | |
11 | }; | |
12 | use shared::dxgi1_4::{IDXGIAdapter3, IDXGIAdapter3Vtbl}; | |
0bf4aa26 | 13 | use shared::dxgi1_5::{IDXGIFactory5, IDXGIFactory5Vtbl, IDXGIOutput5, IDXGIOutput5Vtbl}; |
8faf50e0 | 14 | use shared::dxgitype::{DXGI_COLOR_SPACE_TYPE, DXGI_MODE_ROTATION}; |
0bf4aa26 | 15 | use shared::guiddef::REFIID; |
8faf50e0 XL |
16 | use shared::minwindef::{BOOL, FLOAT, UINT}; |
17 | use shared::windef::{HMONITOR, RECT}; | |
18 | use um::winnt::{HRESULT, LUID, WCHAR}; | |
19 | ENUM!{enum DXGI_ADAPTER_FLAG3 { | |
20 | DXGI_ADAPTER_FLAG3_NONE = 0, | |
21 | DXGI_ADAPTER_FLAG3_REMOTE = 1, | |
22 | DXGI_ADAPTER_FLAG3_SOFTWARE = 2, | |
23 | DXGI_ADAPTER_FLAG3_ACG_COMPATIBLE = 4, | |
24 | DXGI_ADAPTER_FLAG3_SUPPORT_MONITORED_FENCES = 8, | |
25 | DXGI_ADAPTER_FLAG3_SUPPORT_NON_MONITORED_FENCES = 0x10, | |
26 | DXGI_ADAPTER_FLAG3_KEYED_MUTEX_CONFORMANCE = 0x20, | |
27 | DXGI_ADAPTER_FLAG3_FORCE_DWORD = 0xFFFFFFFF, | |
28 | }} | |
29 | STRUCT!{struct DXGI_ADAPTER_DESC3 { | |
30 | Description: [WCHAR; 128], | |
31 | VendorID: UINT, | |
32 | DeviceID: UINT, | |
33 | SubSysID: UINT, | |
34 | Revision: UINT, | |
35 | DedicatedVideoMemory: SIZE_T, | |
36 | DedicatedSystemMemory: SIZE_T, | |
37 | SharedSystemMemory: SIZE_T, | |
38 | AdapterLuid: LUID, | |
39 | Flags: DXGI_ADAPTER_FLAG3, | |
40 | GraphicsPreemptionGranularity: DXGI_GRAPHICS_PREEMPTION_GRANULARITY, | |
41 | ComputePreemptionGranularity: DXGI_COMPUTE_PREEMPTION_GRANULARITY, | |
42 | }} | |
0bf4aa26 | 43 | RIDL!{#[uuid(0x3c8d99d1, 0x4fbf, 0x4181, 0xa8, 0x2c, 0xaf, 0x66, 0xbf, 0x7b, 0xd2, 0x4e)] |
8faf50e0 XL |
44 | interface IDXGIAdapter4(IDXGIAdapter4Vtbl): IDXGIAdapter3(IDXGIAdapter3Vtbl) { |
45 | fn GetDesc3( | |
46 | pDesc: *mut DXGI_ADAPTER_DESC3, | |
47 | ) -> HRESULT, | |
0bf4aa26 | 48 | }} |
8faf50e0 XL |
49 | STRUCT!{struct DXGI_OUTPUT_DESC1 { |
50 | DeviceName: [WCHAR; 32], | |
51 | DesktopCoordinates: RECT, | |
52 | AttachedToDesktop: BOOL, | |
53 | Rotation: DXGI_MODE_ROTATION, | |
54 | Monitor: HMONITOR, | |
55 | BitsPerColor: UINT, | |
56 | ColorSpace: DXGI_COLOR_SPACE_TYPE, | |
57 | RedPrimary: [FLOAT; 2], | |
58 | GreenPrimary: [FLOAT; 2], | |
59 | BluePrimary: [FLOAT; 2], | |
60 | WhitePoint: [FLOAT; 2], | |
61 | MinLuminance: FLOAT, | |
62 | MaxLuminance: FLOAT, | |
63 | MaxFullFrameLuminance: FLOAT, | |
64 | }} | |
65 | ENUM!{enum DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS { | |
66 | DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_FULLSCREEN = 1, | |
67 | DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_WINDOWED = 2, | |
68 | DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_CURSOR_STRETCHED = 4, | |
69 | }} | |
0bf4aa26 | 70 | RIDL!{#[uuid(0x068346e8, 0xaaec, 0x4b84, 0xad, 0xd7, 0x13, 0x7f, 0x51, 0x3f, 0x77, 0xa1)] |
8faf50e0 XL |
71 | interface IDXGIOutput6(IDXGIOutput6Vtbl): IDXGIOutput5(IDXGIOutput5Vtbl) { |
72 | fn GetDesc1( | |
73 | pDesc: *mut DXGI_OUTPUT_DESC1, | |
74 | ) -> HRESULT, | |
75 | fn CheckHardwareCompositionSupport( | |
76 | pFlags: *mut UINT, | |
77 | ) -> HRESULT, | |
0bf4aa26 XL |
78 | }} |
79 | ENUM!{enum DXGI_GPU_PREFERENCE { | |
80 | DXGI_GPU_PREFERENCE_UNSPECIFIED = 0, | |
81 | DXGI_GPU_PREFERENCE_MINIMUM_POWER = 1, | |
82 | DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE = 2, | |
83 | }} | |
84 | RIDL!{#[uuid(0xc1b6694f, 0xff09, 0x44a9, 0xb0, 0x3c, 0x77, 0x90, 0x0a, 0x0a, 0x1d, 0x17)] | |
85 | interface IDXGIFactory6(IDXGIFactory6Vtbl): IDXGIFactory5(IDXGIFactory5Vtbl) { | |
86 | fn EnumAdapterByGpuPreference( | |
87 | Adapter: UINT, | |
88 | GpuPreference: DXGI_GPU_PREFERENCE, | |
89 | riid: REFIID, | |
90 | ppvAdapter: *mut *mut c_void, | |
91 | ) -> HRESULT, | |
92 | }} | |
8faf50e0 XL |
93 | DEFINE_GUID!{IID_IDXGIAdapter4, |
94 | 0x3c8d99d1, 0x4fbf, 0x4181, 0xa8, 0x2c, 0xaf, 0x66, 0xbf, 0x7b, 0xd2, 0x4e} | |
95 | DEFINE_GUID!{IID_IDXGIOutput6, | |
96 | 0x068346e8, 0xaaec, 0x4b84, 0xad, 0xd7, 0x13, 0x7f, 0x51, 0x3f, 0x77, 0xa1} | |
0bf4aa26 XL |
97 | DEFINE_GUID!{IID_IDXGIFactory6, |
98 | 0xc1b6694f, 0xff09, 0x44a9, 0xb0, 0x3c, 0x77, 0x90, 0x0a, 0x0a, 0x1d, 0x17} |