• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright 2017 Ihsan Akmal
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
19import "dxgi1_3.idl";
20
21typedef enum DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG
22{
23    DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1,
24    DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_OVERLAY_PRESENT = 0x2,
25} DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG;
26
27typedef enum DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG
28{
29    DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG_PRESENT = 0x1,
30} DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG;
31
32typedef enum DXGI_MEMORY_SEGMENT_GROUP
33{
34    DXGI_MEMORY_SEGMENT_GROUP_LOCAL = 0x0,
35    DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL = 0x1,
36} DXGI_MEMORY_SEGMENT_GROUP;
37
38typedef struct DXGI_QUERY_VIDEO_MEMORY_INFO
39{
40    UINT64 Budget;
41    UINT64 CurrentUsage;
42    UINT64 AvailableForReservation;
43    UINT64 CurrentReservation;
44} DXGI_QUERY_VIDEO_MEMORY_INFO;
45
46[
47    object,
48    uuid(94d99bdb-f1f8-4ab0-b236-7da0170edab1),
49    local,
50    pointer_default(unique)
51]
52interface IDXGISwapChain3 : IDXGISwapChain2
53{
54    UINT GetCurrentBackBufferIndex();
55    HRESULT CheckColorSpaceSupport(
56        [in] DXGI_COLOR_SPACE_TYPE colour_space,
57        [out] UINT *colour_space_support
58    );
59    HRESULT SetColorSpace1(
60        [in] DXGI_COLOR_SPACE_TYPE colour_space
61    );
62    HRESULT ResizeBuffers1(
63        [in] UINT buffer_count,
64        [in] UINT width,
65        [in] UINT height,
66        [in] DXGI_FORMAT format,
67        [in] UINT flags,
68        [in] const UINT *node_mask,
69        [in] IUnknown *const *present_queue
70    );
71}
72
73[
74    object,
75    uuid(dc7dca35-2196-414d-9F53-617884032a60),
76    local,
77    pointer_default(unique)
78]
79interface IDXGIOutput4 : IDXGIOutput3
80{
81    HRESULT CheckOverlayColorSpaceSupport(
82        [in] DXGI_FORMAT format,
83        [in] DXGI_COLOR_SPACE_TYPE colour_space,
84        [in] IUnknown *device,
85        [out] UINT *flags
86    );
87}
88
89[
90    object,
91    uuid(1bc6ea02-ef36-464f-bf0c-21ca39e5168a),
92    local,
93    pointer_default(unique)
94]
95interface IDXGIFactory4 : IDXGIFactory3
96{
97    HRESULT EnumAdapterByLuid(
98        [in] LUID luid,
99        [in] REFIID iid,
100        [out] void **adapter
101    );
102    HRESULT EnumWarpAdapter(
103        [in] REFIID iid,
104        [out] void **adapter
105    );
106}
107
108[
109    object,
110    uuid(645967a4-1392-4310-a798-8053ce3e93fd),
111    local,
112    pointer_default(unique)
113]
114interface IDXGIAdapter3 : IDXGIAdapter2
115{
116    HRESULT RegisterHardwareContentProtectionTeardownStatusEvent(
117        [in] HANDLE event,
118        [out] DWORD *cookie
119    );
120    void UnregisterHardwareContentProtectionTeardownStatus(
121        [in] DWORD cookie
122    );
123    HRESULT QueryVideoMemoryInfo(
124        [in] UINT node_index,
125        [in] DXGI_MEMORY_SEGMENT_GROUP segment_group,
126        [out] DXGI_QUERY_VIDEO_MEMORY_INFO *memory_info
127    );
128    HRESULT SetVideoMemoryReservation(
129        [in] UINT node_index,
130        [in] DXGI_MEMORY_SEGMENT_GROUP segment_group,
131        [in] UINT64 reservation
132    );
133    HRESULT RegisterVideoMemoryBudgetChangeNotificationEvent(
134        [in] HANDLE event,
135        [out] DWORD *cookie
136    );
137    void UnregisterVideoMemoryBudgetChangeNotification(
138        [in] DWORD cookie
139    );
140}
141