1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
// Copyright © 2015; Dmitry Roschin
// Licensed under the MIT License <LICENSE.md>
//! Mappings for the contents of dxgi1_4.h

ENUM!{ enum DXGI_MEMORY_SEGMENT_GROUP {
    DXGI_MEMORY_SEGMENT_GROUP_LOCAL = 0,
    DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL = 1,
}}

FLAGS!{ enum DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG {
    DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1,
}}

FLAGS!{ enum DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG {
    DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1,
    DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT = 0x2,
}}

STRUCT!{struct DXGI_QUERY_VIDEO_MEMORY_INFO {
    Budget: ::UINT64,
    CurrentUsage: ::UINT64,
    AvailableForReservation: ::UINT64,
    CurrentReservation: ::UINT64,
}}

RIDL!(
interface IDXGIAdapter3(IDXGIAdapter3Vtbl): IDXGIAdapter2(IDXGIAdapter2Vtbl) {
    fn RegisterHardwareContentProtectionTeardownStatusEvent(
        &mut self, hEvent: ::HANDLE, pdwCookie: *mut ::DWORD
    ) -> ::HRESULT,
    fn UnregisterHardwareContentProtectionTeardownStatus(
        &mut self, dwCookie: ::DWORD
    ) -> (),
    fn QueryVideoMemoryInfo(
        &mut self, NodeIndex: ::UINT, MemorySegmentGroup: ::DXGI_MEMORY_SEGMENT_GROUP,
        pVideoMemoryInfo: *mut ::DXGI_QUERY_VIDEO_MEMORY_INFO
    ) -> ::HRESULT,
    fn SetVideoMemoryReservation(
        &mut self, NodeIndex: ::UINT, MemorySegmentGroup: ::DXGI_MEMORY_SEGMENT_GROUP,
        Reservation: ::UINT64
    ) -> ::HRESULT,
    fn RegisterVideoMemoryBudgetChangeNotificationEvent(
        &mut self, hEvent: ::HANDLE, pdwCookie: *mut ::DWORD
    ) -> ::HRESULT,
    fn UnregisterVideoMemoryBudgetChangeNotification(
        &mut self, dwCookie: ::DWORD
    ) -> ()
});

RIDL!(
interface IDXGIFactory4(IDXGIFactory4Vtbl): IDXGIFactory3(IDXGIFactory3Vtbl) {
    fn EnumAdapterByLuid(
        &mut self, AdapterLuid: ::LUID, riid: ::REFGUID, ppvAdapter: *mut *mut ::c_void
    ) -> ::HRESULT,
    fn EnumWarpAdapter(
        &mut self, riid: ::REFGUID, ppvAdapter: *mut *mut ::c_void
    ) -> ::HRESULT
});

RIDL!(
interface IDXGIOutput4(IDXGIOutput4Vtbl): IDXGIOutput3(IDXGIOutput3Vtbl) {
    fn CheckOverlayColorSpaceSupport(
        &mut self, Format: ::DXGI_FORMAT, ColorSpace: ::DXGI_COLOR_SPACE_TYPE,
        pConcernedDevice: *mut ::IUnknown, pFlags: *mut ::UINT
    ) -> ::HRESULT
});

RIDL!(
interface IDXGISwapChain3(IDXGISwapChain3Vtbl): IDXGISwapChain2(IDXGISwapChain2Vtbl) {
    fn GetCurrentBackBufferIndex(&mut self) -> ::UINT,
    fn CheckColorSpaceSupport(
        &mut self, ColorSpace: ::DXGI_COLOR_SPACE_TYPE, pColorSpaceSupport: *mut ::UINT
    ) -> ::HRESULT,
    fn SetColorSpace1(
        &mut self, ColorSpace: ::DXGI_COLOR_SPACE_TYPE
    ) -> ::HRESULT,
    fn ResizeBuffers1(
        &mut self, BufferCount: ::UINT, Width: ::UINT, Height: ::UINT, Format: ::DXGI_FORMAT,
        SwapChainFlags: ::UINT, pCreationNodeMask: *const ::UINT,
        ppPresentQueue: *mut *mut ::IUnknown
    ) -> ::HRESULT
});