2 * Copyright 2014 Jacek Caban for CodeWeavers
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.
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.
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
21 typedef enum _DXGI_OFFER_RESOURCE_PRIORITY
{
22 DXGI_OFFER_RESOURCE_PRIORITY_LOW
= 1,
23 DXGI_OFFER_RESOURCE_PRIORITY_NORMAL
,
24 DXGI_OFFER_RESOURCE_PRIORITY_HIGH
25 } DXGI_OFFER_RESOURCE_PRIORITY
;
27 typedef enum DXGI_ALPHA_MODE
{
28 DXGI_ALPHA_MODE_UNSPECIFIED
= 0,
29 DXGI_ALPHA_MODE_PREMULTIPLIED
= 1,
30 DXGI_ALPHA_MODE_STRAIGHT
= 2,
31 DXGI_ALPHA_MODE_IGNORE
= 3,
32 DXGI_ALPHA_MODE_FORCE_DWORD
= 0xffffffff
37 uuid(05008617-fbfd
-4051-a790
-144884b4f6a9
),
39 pointer_default(unique)
41 interface IDXGIDevice2
: IDXGIDevice1
43 HRESULT OfferResources
(
44 [in] UINT NumResources
,
45 [in, size_is(NumResources
)] IDXGIResource
*const *ppResources
,
46 [in] DXGI_OFFER_RESOURCE_PRIORITY Priority
);
48 HRESULT ReclaimResources
(
49 [in] UINT NumResources
,
50 [in, size_is(NumResources
)] IDXGIResource
*const *ppResources
,
51 [out, size_is(NumResources
)] BOOL
*pDiscarded
);
53 HRESULT EnqueueSetEvent
(
57 typedef enum DXGI_SCALING
{
58 DXGI_SCALING_STRETCH
= 0,
62 typedef struct DXGI_SWAP_CHAIN_DESC1
{
67 DXGI_SAMPLE_DESC SampleDesc
;
68 DXGI_USAGE BufferUsage
;
71 DXGI_SWAP_EFFECT SwapEffect
;
72 DXGI_ALPHA_MODE AlphaMode
;
74 } DXGI_SWAP_CHAIN_DESC1
;
76 typedef struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC
{
77 DXGI_RATIONAL RefreshRate
;
78 DXGI_MODE_SCANLINE_ORDER ScanlineOrdering
;
79 DXGI_MODE_SCALING Scaling
;
81 } DXGI_SWAP_CHAIN_FULLSCREEN_DESC
;
83 typedef struct DXGI_PRESENT_PARAMETERS
{
88 } DXGI_PRESENT_PARAMETERS
;
92 uuid(790a45f7
-0d42
-4876-983a
-0a55cfe6f4aa
),
94 pointer_default(unique)
96 interface IDXGISwapChain1
: IDXGISwapChain
99 [out] DXGI_SWAP_CHAIN_DESC1
*pDesc
);
101 HRESULT GetFullscreenDesc
(
102 [out] DXGI_SWAP_CHAIN_FULLSCREEN_DESC
*pDesc
);
107 HRESULT GetCoreWindow
(
112 [in] UINT SyncInterval
,
113 [in] UINT PresentFlags
,
114 [in] const DXGI_PRESENT_PARAMETERS
*pPresentParameters
);
116 BOOL IsTemporaryMonoSupported
();
118 HRESULT GetRestrictToOutput
(
119 [out] IDXGIOutput
**ppRestrictToOutput
);
121 HRESULT SetBackgroundColor
(
122 [in] const DXGI_RGBA
*pColor
);
124 HRESULT GetBackgroundColor
(
125 [out] DXGI_RGBA
*pColor
);
128 [in] DXGI_MODE_ROTATION Rotation
);
131 [out] DXGI_MODE_ROTATION
*pRotation
);
136 uuid(50c83a1c
-e072
-4c48
-87b0
-3630fa36a6d0
),
138 pointer_default(unique)
140 interface IDXGIFactory2
: IDXGIFactory1
142 BOOL IsWindowedStereoEnabled
();
144 HRESULT CreateSwapChainForHwnd
(
145 [in] IUnknown
*pDevice
,
147 [in] const DXGI_SWAP_CHAIN_DESC1
*pDesc
,
148 [in] const DXGI_SWAP_CHAIN_FULLSCREEN_DESC
*pFullscreenDesc
,
149 [in] IDXGIOutput
*pRestrictToOutput
,
150 [out] IDXGISwapChain1
**ppSwapChain
);
152 HRESULT CreateSwapChainForCoreWindow
(
153 [in] IUnknown
*pDevice
,
154 [in] IUnknown
*pWindow
,
155 [in] const DXGI_SWAP_CHAIN_DESC1
*pDesc
,
156 [in] IDXGIOutput
*pRestrictToOutput
,
157 [out] IDXGISwapChain1
**ppSwapChain
);
159 HRESULT GetSharedResourceAdapterLuid
(
160 [in] HANDLE hResource
,
163 HRESULT RegisterOcclusionStatusWindow
(
164 [in] HWND WindowHandle
,
166 [out] DWORD
*pdwCookie
);
168 HRESULT RegisterStereoStatusEvent
(
170 [out] DWORD
*pdwCookie
);
172 void UnregisterStereoStatus
(
173 [in] DWORD dwCookie
);
175 HRESULT RegisterStereoStatusWindow
(
176 [in] HWND WindowHandle
,
178 [out] DWORD
*pdwCookie
);
180 HRESULT RegisterOcclusionStatusEvent
(
182 [out] DWORD
*pdwCookie
);
184 void UnregisterOcclusionStatus
(
185 [in] DWORD dwCookie
);
187 HRESULT CreateSwapChainForComposition
(
188 [in] IUnknown
*pDevice
,
189 [in] const DXGI_SWAP_CHAIN_DESC1
*pDesc
,
190 [in] IDXGIOutput
*pRestrictToOutput
,
191 [out] IDXGISwapChain1
**ppSwapChain
);
194 typedef enum DXGI_GRAPHICS_PREEMPTION_GRANULARITY
{
195 DXGI_GRAPHICS_PREEMPTION_DMA_BUFFER_BOUNDARY
,
196 DXGI_GRAPHICS_PREEMPTION_PRIMITIVE_BOUNDARY
,
197 DXGI_GRAPHICS_PREEMPTION_TRIANGLE_BOUNDARY
,
198 DXGI_GRAPHICS_PREEMPTION_PIXEL_BOUNDARY
,
199 DXGI_GRAPHICS_PREEMPTION_INSTRUCTION_BOUNDARY
200 } DXGI_GRAPHICS_PREEMPTION_GRANULARITY
;
202 typedef enum DXGI_COMPUTE_PREEMPTION_GRANULARITY
{
203 DXGI_COMPUTE_PREEMPTION_DMA_BUFFER_BOUNDARY
,
204 DXGI_COMPUTE_PREEMPTION_DISPATCH_BOUNDARY
,
205 DXGI_COMPUTE_PREEMPTION_THREAD_GROUP_BOUNDARY
,
206 DXGI_COMPUTE_PREEMPTION_THREAD_BOUNDARY
,
207 DXGI_COMPUTE_PREEMPTION_INSTRUCTION_BOUNDARY
208 } DXGI_COMPUTE_PREEMPTION_GRANULARITY
;
210 typedef struct DXGI_ADAPTER_DESC2
{
211 WCHAR Description
[128];
216 SIZE_T DedicatedVideoMemory
;
217 SIZE_T DedicatedSystemMemory
;
218 SIZE_T SharedSystemMemory
;
221 DXGI_GRAPHICS_PREEMPTION_GRANULARITY GraphicsPreemptionGranularity
;
222 DXGI_COMPUTE_PREEMPTION_GRANULARITY ComputePreemptionGranularity
;
223 } DXGI_ADAPTER_DESC2
;
227 uuid(0aa1ae0a
-fa0e
-4b84
-8644-e05ff8e5acb5
),
229 pointer_default(unique)
231 interface IDXGIAdapter2
: IDXGIAdapter1
233 HRESULT GetDesc2
([out] DXGI_ADAPTER_DESC2
*pDesc
);