]> git.proxmox.com Git - rustc.git/blame - vendor/winapi/src/shared/dxgi1_6.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / vendor / winapi / src / shared / dxgi1_6.rs
CommitLineData
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 7use ctypes::c_void;
8faf50e0
XL
8use shared::basetsd::SIZE_T;
9use shared::dxgi1_2::{
10 DXGI_COMPUTE_PREEMPTION_GRANULARITY, DXGI_GRAPHICS_PREEMPTION_GRANULARITY,
11};
12use shared::dxgi1_4::{IDXGIAdapter3, IDXGIAdapter3Vtbl};
0bf4aa26 13use shared::dxgi1_5::{IDXGIFactory5, IDXGIFactory5Vtbl, IDXGIOutput5, IDXGIOutput5Vtbl};
8faf50e0 14use shared::dxgitype::{DXGI_COLOR_SPACE_TYPE, DXGI_MODE_ROTATION};
0bf4aa26 15use shared::guiddef::REFIID;
8faf50e0
XL
16use shared::minwindef::{BOOL, FLOAT, UINT};
17use shared::windef::{HMONITOR, RECT};
18use um::winnt::{HRESULT, LUID, WCHAR};
19ENUM!{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}}
29STRUCT!{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 43RIDL!{#[uuid(0x3c8d99d1, 0x4fbf, 0x4181, 0xa8, 0x2c, 0xaf, 0x66, 0xbf, 0x7b, 0xd2, 0x4e)]
8faf50e0
XL
44interface IDXGIAdapter4(IDXGIAdapter4Vtbl): IDXGIAdapter3(IDXGIAdapter3Vtbl) {
45 fn GetDesc3(
46 pDesc: *mut DXGI_ADAPTER_DESC3,
47 ) -> HRESULT,
0bf4aa26 48}}
8faf50e0
XL
49STRUCT!{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}}
65ENUM!{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 70RIDL!{#[uuid(0x068346e8, 0xaaec, 0x4b84, 0xad, 0xd7, 0x13, 0x7f, 0x51, 0x3f, 0x77, 0xa1)]
8faf50e0
XL
71interface 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}}
79ENUM!{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}}
84RIDL!{#[uuid(0xc1b6694f, 0xff09, 0x44a9, 0xb0, 0x3c, 0x77, 0x90, 0x0a, 0x0a, 0x1d, 0x17)]
85interface 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
93DEFINE_GUID!{IID_IDXGIAdapter4,
94 0x3c8d99d1, 0x4fbf, 0x4181, 0xa8, 0x2c, 0xaf, 0x66, 0xbf, 0x7b, 0xd2, 0x4e}
95DEFINE_GUID!{IID_IDXGIOutput6,
96 0x068346e8, 0xaaec, 0x4b84, 0xad, 0xd7, 0x13, 0x7f, 0x51, 0x3f, 0x77, 0xa1}
0bf4aa26
XL
97DEFINE_GUID!{IID_IDXGIFactory6,
98 0xc1b6694f, 0xff09, 0x44a9, 0xb0, 0x3c, 0x77, 0x90, 0x0a, 0x0a, 0x1d, 0x17}