ReactOS 0.4.17-dev-784-g3812a95
d3dukmdt.h
Go to the documentation of this file.
1/******************************Module*Header************************************\
2*
3* Module Name: d3dukmdt.h
4*
5* Content: Windows Display Driver Model (WDDM) user/kernel mode
6* shared data type definitions.
7*
8* Copyright (c) Microsoft Corporation.
9* Licensed under the MIT License.
10*
11\*******************************************************************************/
12#ifndef _D3DUKMDT_H_
13#define _D3DUKMDT_H_
14#include <winapifamily.h>
15
16#pragma region Desktop Family
17#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
18
19#if !defined(_D3DKMDT_H) && \
20 !defined(_D3DKMTHK_H_) && \
21 !defined(_D3DUMDDI_H_) && \
22 !defined(__DXGKRNLETW_H__)
23 #error This header should not be included directly!
24#endif
25
26#pragma warning(push)
27#pragma warning(disable:4201) // anonymous unions warning
28#pragma warning(disable:4214) // nonstandard extension used: bit field types other than int
29
30
31//
32// WDDM DDI Interface Version
33//
34
35#define DXGKDDI_INTERFACE_VERSION_VISTA 0x1052
36#define DXGKDDI_INTERFACE_VERSION_VISTA_SP1 0x1053
37#define DXGKDDI_INTERFACE_VERSION_WIN7 0x2005
38#define DXGKDDI_INTERFACE_VERSION_WIN8 0x300E
39#define DXGKDDI_INTERFACE_VERSION_WDDM1_3 0x4002
40#define DXGKDDI_INTERFACE_VERSION_WDDM1_3_PATH_INDEPENDENT_ROTATION 0x4003
41#define DXGKDDI_INTERFACE_VERSION_WDDM2_0 0x5023
42#define DXGKDDI_INTERFACE_VERSION_WDDM2_1 0x6003
43#define DXGKDDI_INTERFACE_VERSION_WDDM2_1_5 0x6010 // Used in RS1.7 for GPU-P
44#define DXGKDDI_INTERFACE_VERSION_WDDM2_1_6 0x6011 // Used in RS1.8 for GPU-P
45#define DXGKDDI_INTERFACE_VERSION_WDDM2_2 0x700A
46#define DXGKDDI_INTERFACE_VERSION_WDDM2_3 0x8001
47#define DXGKDDI_INTERFACE_VERSION_WDDM2_4 0x9006
48#define DXGKDDI_INTERFACE_VERSION_WDDM2_5 0xA00B
49#define DXGKDDI_INTERFACE_VERSION_WDDM2_6 0xB004
50#define DXGKDDI_INTERFACE_VERSION_WDDM2_7 0xC004
51#define DXGKDDI_INTERFACE_VERSION_WDDM2_8 0xD001
52#define DXGKDDI_INTERFACE_VERSION_WDDM2_9 0xE003
53#define DXGKDDI_INTERFACE_VERSION_WDDM3_0 0xF003
54#define DXGKDDI_INTERFACE_VERSION_WDDM3_1 0x10002
55
56
57#define IS_OFFICIAL_DDI_INTERFACE_VERSION(version) \
58 (((version) == DXGKDDI_INTERFACE_VERSION_VISTA) || \
59 ((version) == DXGKDDI_INTERFACE_VERSION_VISTA_SP1) || \
60 ((version) == DXGKDDI_INTERFACE_VERSION_WIN7) || \
61 ((version) == DXGKDDI_INTERFACE_VERSION_WIN8) || \
62 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM1_3) || \
63 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM1_3_PATH_INDEPENDENT_ROTATION) || \
64 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_0) || \
65 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_1) || \
66 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_1_5) || \
67 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_1_6) || \
68 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_2) || \
69 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_3) || \
70 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_4) || \
71 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_5) || \
72 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_6) || \
73 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_7) || \
74 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_8) || \
75 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_9) || \
76 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM3_0) || \
77 ((version) == DXGKDDI_INTERFACE_VERSION_WDDM3_1) \
78 )
79
80#if !defined(DXGKDDI_INTERFACE_VERSION)
81#define DXGKDDI_INTERFACE_VERSION DXGKDDI_INTERFACE_VERSION_WDDM3_0
82#endif // !defined(DXGKDDI_INTERFACE_VERSION)
83
84#define D3D_UMD_INTERFACE_VERSION_VISTA 0x000C
85#define D3D_UMD_INTERFACE_VERSION_WIN7 0x2003
86#define D3D_UMD_INTERFACE_VERSION_WIN8_M3 0x3001
87#define D3D_UMD_INTERFACE_VERSION_WIN8_CP 0x3002
88#define D3D_UMD_INTERFACE_VERSION_WIN8_RC 0x3003
89#define D3D_UMD_INTERFACE_VERSION_WIN8 0x3004
90#define D3D_UMD_INTERFACE_VERSION_WDDM1_3 0x4002
91
92#define D3D_UMD_INTERFACE_VERSION_WDDM2_0_M1 0x5000
93#define D3D_UMD_INTERFACE_VERSION_WDDM2_0_M1_3 0x5001
94#define D3D_UMD_INTERFACE_VERSION_WDDM2_0_M2_2 0x5002
95#define D3D_UMD_INTERFACE_VERSION_WDDM2_0 0x5002
96
97#define D3D_UMD_INTERFACE_VERSION_WDDM2_1_1 0x6000
98#define D3D_UMD_INTERFACE_VERSION_WDDM2_1_2 0x6001
99#define D3D_UMD_INTERFACE_VERSION_WDDM2_1_3 0x6002
100#define D3D_UMD_INTERFACE_VERSION_WDDM2_1_4 0x6003
101#define D3D_UMD_INTERFACE_VERSION_WDDM2_1 D3D_UMD_INTERFACE_VERSION_WDDM2_1_4
102
103#define D3D_UMD_INTERFACE_VERSION_WDDM2_2_1 0x7000
104#define D3D_UMD_INTERFACE_VERSION_WDDM2_2_2 0x7001
105#define D3D_UMD_INTERFACE_VERSION_WDDM2_2 D3D_UMD_INTERFACE_VERSION_WDDM2_2_2
106
107#define D3D_UMD_INTERFACE_VERSION_WDDM2_3_1 0x8000
108#define D3D_UMD_INTERFACE_VERSION_WDDM2_3_2 0x8001
109#define D3D_UMD_INTERFACE_VERSION_WDDM2_3 D3D_UMD_INTERFACE_VERSION_WDDM2_3_2
110
111#define D3D_UMD_INTERFACE_VERSION_WDDM2_4_1 0x9000
112#define D3D_UMD_INTERFACE_VERSION_WDDM2_4_2 0x9001
113#define D3D_UMD_INTERFACE_VERSION_WDDM2_4 D3D_UMD_INTERFACE_VERSION_WDDM2_4_2
114
115#define D3D_UMD_INTERFACE_VERSION_WDDM2_5_1 0xA000
116#define D3D_UMD_INTERFACE_VERSION_WDDM2_5_2 0xA001
117#define D3D_UMD_INTERFACE_VERSION_WDDM2_5_3 0xA002
118#define D3D_UMD_INTERFACE_VERSION_WDDM2_5 D3D_UMD_INTERFACE_VERSION_WDDM2_5_3
119
120#define D3D_UMD_INTERFACE_VERSION_WDDM2_6_1 0xB000
121#define D3D_UMD_INTERFACE_VERSION_WDDM2_6_2 0xB001
122#define D3D_UMD_INTERFACE_VERSION_WDDM2_6_3 0xB002
123#define D3D_UMD_INTERFACE_VERSION_WDDM2_6_4 0xB003
124#define D3D_UMD_INTERFACE_VERSION_WDDM2_6 D3D_UMD_INTERFACE_VERSION_WDDM2_6_4
125
126#define D3D_UMD_INTERFACE_VERSION_WDDM2_7_1 0xC000
127#define D3D_UMD_INTERFACE_VERSION_WDDM2_7_2 0xC001
128#define D3D_UMD_INTERFACE_VERSION_WDDM2_7 D3D_UMD_INTERFACE_VERSION_WDDM2_7_2
129
130#define D3D_UMD_INTERFACE_VERSION_WDDM2_8_1 0xD000
131#define D3D_UMD_INTERFACE_VERSION_WDDM2_8 D3D_UMD_INTERFACE_VERSION_WDDM2_8_1
132
133#define D3D_UMD_INTERFACE_VERSION_WDDM2_9_1 0xE000
134#define D3D_UMD_INTERFACE_VERSION_WDDM2_9 D3D_UMD_INTERFACE_VERSION_WDDM2_9_1
135
136#define D3D_UMD_INTERFACE_VERSION_WDDM3_0_1 0xF000
137#define D3D_UMD_INTERFACE_VERSION_WDDM3_0 D3D_UMD_INTERFACE_VERSION_WDDM3_0_1
138
139// Components which depend on D3D_UMD_INTERFACE_VERSION need to be updated, static assert validation present.
140// Search for D3D_UMD_INTERFACE_VERSION across all depots to ensure all dependencies are updated.
141
142#if !defined(D3D_UMD_INTERFACE_VERSION)
143#define D3D_UMD_INTERFACE_VERSION D3D_UMD_INTERFACE_VERSION_WDDM3_0
144#endif // !defined(D3D_UMD_INTERFACE_VERSION)
145
146//
147// These macros are used to enable non-Windows 32-bit usermode to fill out a fixed-size
148// structure for D3DKMT structures, so that they can be sent to a 64-bit kernel
149// without a thunking layer for translation.
150//
151// Note that a thunking layer is still used for wchar_t translation, where Windows uses
152// 16-bit characters and non-Windows uses 32-bit characters.
153//
154// If brace initialization is used (e.g. D3DKMT_FOO foo = { a, b, c }), be aware that for
155// non-Windows, pointers will be unioned such that a 64-bit integer is the member that is
156// initialized. It is not possible to achieve both type safety and proper zero-initialization
157// of the high bits of pointers with brace initialization in this model. Use D3DKMT_PTR_INIT(ptr)
158// to appropriately cast to a 64-bit integer for non-Windows, or to pass the pointer unchanged for
159// Windows. To maintain type safety, manually assign the fields after zero-initializing the struct.
160//
161#ifdef _WIN32
162// For Windows, don't enforce any unnatural alignment or data sizes/types.
163// The WOW64 thunking layer will handle translation.
164#define D3DKMT_ALIGN64
165#define D3DKMT_PTR_HELPER(Name)
166#define D3DKMT_PTR(Type, Name) Type Name
167#define D3DKMT_PTR_INIT(x) (x)
168typedef SIZE_T D3DKMT_SIZE_T;
169typedef UINT_PTR D3DKMT_UINT_PTR;
170typedef ULONG_PTR D3DKMT_ULONG_PTR;
171typedef HANDLE D3DKMT_PTR_TYPE;
172#else
173// For other platforms, struct layout should be fixed-size, x64-compatible
174#if __cplusplus >= 201103L
175 #define D3DKMT_ALIGN64 alignas(8)
176#else
177 #define D3DKMT_ALIGN64 __attribute__((aligned(8)))
178#endif
179#define D3DKMT_PTR_HELPER(Name) D3DKMT_ALIGN64 UINT64 Name;
180#define D3DKMT_PTR(Type, Name) \
181union D3DKMT_ALIGN64 \
182{ \
183 D3DKMT_PTR_HELPER(Name##_Align) \
184 Type Name; \
185}
186#define D3DKMT_PTR_INIT(x) { (UINT64)(SIZE_T)(x) }
187typedef UINT64 D3DKMT_SIZE_T, D3DKMT_UINT_PTR, D3DKMT_ULONG_PTR;
188typedef union _D3DKMT_PTR_TYPE
189{
190 D3DKMT_PTR_HELPER(Ptr_Align);
191 HANDLE Ptr;
192} D3DKMT_PTR_TYPE;
193#endif
194
195//
196// Available only for Vista (LONGHORN) and later and for
197// multiplatform tools such as debugger extensions
198//
199#if defined(__REACTOS__) || ((NTDDI_VERSION >= NTDDI_LONGHORN) || defined(D3DKMDT_SPECIAL_MULTIPLATFORM_TOOL))
200
202typedef ULONGLONG D3DGPU_SIZE_T;
203#define D3DGPU_UNIQUE_DRIVER_PROTECTION 0x8000000000000000ULL
204
205#define DXGK_MAX_PAGE_TABLE_LEVEL_COUNT 6
206#define DXGK_MIN_PAGE_TABLE_LEVEL_COUNT 2
207
208//
209// IOCTL_GPUP_DRIVER_ESCAPE - The user mode emulation DLL calls this IOCTL
210// to exchange information with the kernel mode driver.
211//
212#define IOCTL_GPUP_DRIVER_ESCAPE CTL_CODE(FILE_DEVICE_UNKNOWN, (8 + 0x910), METHOD_BUFFERED, FILE_READ_DATA)
213typedef struct _GPUP_DRIVER_ESCAPE_INPUT
214{
215 LUID vfLUID; //LUID that was returned from SET_PARTITION_DETAILS
216} GPUP_DRIVER_ESCAPE_INPUT, *PGPUP_DRIVER_ESCAPE_INPUT;
217
218typedef enum _DXGKVGPU_ESCAPE_TYPE
219{
220 DXGKVGPU_ESCAPE_TYPE_READ_PCI_CONFIG = 0,
221 DXGKVGPU_ESCAPE_TYPE_WRITE_PCI_CONFIG = 1,
222 DXGKVGPU_ESCAPE_TYPE_INITIALIZE = 2,
223 DXGKVGPU_ESCAPE_TYPE_RELEASE = 3,
224 DXGKVGPU_ESCAPE_TYPE_GET_VGPU_TYPE = 4,
225 DXGKVGPU_ESCAPE_TYPE_POWERTRANSITIONCOMPLETE = 5,
226} DXGKVGPU_ESCAPE_TYPE;
227
228typedef struct _DXGKVGPU_ESCAPE_HEAD
229{
230 GPUP_DRIVER_ESCAPE_INPUT Luid;
231 DXGKVGPU_ESCAPE_TYPE Type;
232} DXGKVGPU_ESCAPE_HEAD;
233
234typedef struct _DXGKVGPU_ESCAPE_READ_PCI_CONFIG
235{
236 DXGKVGPU_ESCAPE_HEAD Header;
237
238 UINT Offset; // Offset in bytes in the PCI config space
239 UINT Size; // Size in bytes to read
240} DXGKVGPU_ESCAPE_READ_PCI_CONFIG;
241
242typedef struct _DXGKVGPU_ESCAPE_WRITE_PCI_CONFIG
243{
244 DXGKVGPU_ESCAPE_HEAD Header;
245
246 UINT Offset; // Offset in bytes in the PCI config space
247 UINT Size; // Size in bytes to write
248 // "Size" number of bytes follow
249} DXGKVGPU_ESCAPE_WRITE_PCI_CONFIG;
250
251typedef struct _DXGKVGPU_ESCAPE_READ_VGPU_TYPE
252{
253 DXGKVGPU_ESCAPE_HEAD Header;
254} DXGKVGPU_ESCAPE_READ_VGPU_TYPE;
255
256typedef struct _DXGKVGPU_ESCAPE_POWERTRANSITIONCOMPLETE
257{
258 DXGKVGPU_ESCAPE_HEAD Header;
260} DXGKVGPU_ESCAPE_POWERTRANSITIONCOMPLETE;
261
262typedef struct _DXGKVGPU_ESCAPE_INITIALIZE
263{
264 DXGKVGPU_ESCAPE_HEAD Header;
265 GUID VmGuid;
266} DXGKVGPU_ESCAPE_INITIALIZE;
267
268typedef struct _DXGKVGPU_ESCAPE_RELEASE
269{
270 DXGKVGPU_ESCAPE_HEAD Header;
271} DXGKVGPU_ESCAPE_RELEASE;
272
273
274typedef enum _DXGK_PTE_PAGE_SIZE
275{
276 DXGK_PTE_PAGE_TABLE_PAGE_4KB = 0,
277 DXGK_PTE_PAGE_TABLE_PAGE_64KB = 1,
278} DXGK_PTE_PAGE_SIZE;
279
280//
281// Page Table Entry structure. Contains segment/physical address pointing to a page
282//
283
284typedef struct _DXGK_PTE
285{
286 union
287 {
288 struct
289 {
290 ULONGLONG Valid : 1;
291 ULONGLONG Zero : 1;
292 ULONGLONG CacheCoherent : 1;
294 ULONGLONG NoExecute : 1;
295 ULONGLONG Segment : 5;
296 ULONGLONG LargePage : 1;
297 ULONGLONG PhysicalAdapterIndex : 6;
298 ULONGLONG PageTablePageSize : 2; // DXGK_PTE_PAGE_SIZE
299 ULONGLONG SystemReserved0 : 1;
300 ULONGLONG Reserved : 44;
301 };
303 };
304 union
305 {
306 ULONGLONG PageAddress; // High 52 bits of 64 bit physical address. Low 12 bits are zero.
307 ULONGLONG PageTableAddress; // High 52 bits of 64 bit physical address. Low 12 bits are zero.
308 };
309} DXGK_PTE;
310
311#define D3DGPU_NULL 0
312#define D3DDDI_MAX_WRITTEN_PRIMARIES 16
313#define D3DDDI_MAX_MPO_PRESENT_DIRTY_RECTS 0xFFF
314
315typedef struct _D3DGPU_PHYSICAL_ADDRESS
316{
317 UINT SegmentId;
318 UINT Padding;
319 UINT64 SegmentOffset;
320} D3DGPU_PHYSICAL_ADDRESS;
321
323// Purpose: Video present source unique identification number descriptor type
324//
325
327
329// Purpose: Video present source unique identification number descriptor type.
330//
332
333//
334// DDI level handle that represents a kernel mode object (allocation, device, etc)
335//
336typedef UINT D3DKMT_HANDLE;
337
339// Purpose: Video present target mode fractional frequency descriptor type.
340//
341// Remarks: Fractional value used to represent vertical and horizontal frequencies of a video mode
342// (i.e. VSync and HSync). Vertical frequencies are stored in Hz. Horizontal frequencies
343// are stored in Hz.
344// The dynamic range of this encoding format, given 10^-7 resolution is {0..(2^32 - 1) / 10^7},
345// which translates to {0..428.4967296} [Hz] for vertical frequencies and {0..428.4967296} [Hz]
346// for horizontal frequencies. This sub-microseconds precision range should be acceptable even
347// for a pro-video application (error in one microsecond for video signal synchronization would
348// imply a time drift with a cycle of 10^7/(60*60*24) = 115.741 days.
349//
350// If rational number with a finite fractional sequence, use denominator of form 10^(length of fractional sequence).
351// If rational number without a finite fractional sequence, or a sequence exceeding the precision allowed by the
352// dynamic range of the denominator, or an irrational number, use an appropriate ratio of integers which best
353// represents the value.
354//
355typedef struct _D3DDDI_RATIONAL
356{
357 UINT Numerator;
358 UINT Denominator;
359} D3DDDI_RATIONAL;
360
361typedef struct _D3DDDI_ALLOCATIONINFO
362{
363 D3DKMT_HANDLE hAllocation; // out: Private driver data for allocation
364 D3DKMT_PTR(CONST VOID*, pSystemMem); // in: Pointer to pre-allocated sysmem
365 D3DKMT_PTR(VOID*, pPrivateDriverData); // in(out optional): Private data for each allocation
366 UINT PrivateDriverDataSize; // in: Size of the private data
367 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; // in: VidPN source ID if this is a primary
368 union
369 {
370 struct
371 {
372 UINT Primary : 1; // 0x00000001
373#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) || \
374 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WIN8))
375 UINT Stereo : 1; // 0x00000002
376 UINT Reserved :30; // 0xFFFFFFFC
377#else
378 UINT Reserved :31; // 0xFFFFFFFE
379#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8)
380 };
381 UINT Value;
382 } Flags;
384
385#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN7) || \
386 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WIN7))
387
388typedef struct _D3DDDI_ALLOCATIONINFO2
389{
390 D3DKMT_HANDLE hAllocation; // out: Private driver data for allocation
391 union D3DKMT_ALIGN64
392 {
393 D3DKMT_PTR_HELPER(pSystemMem_hSection_Align)
394 HANDLE hSection; // in: Handle to valid section object
395 CONST VOID* pSystemMem; // in: Pointer to pre-allocated sysmem
396 };
397 D3DKMT_PTR(VOID*, pPrivateDriverData); // in(out optional): Private data for each allocation
398 UINT PrivateDriverDataSize; // in: Size of the private data
399 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; // in: VidPN source ID if this is a primary
400 union
401 {
402 struct
403 {
404 UINT Primary : 1; // 0x00000001
405#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) || \
406 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WIN8))
407 UINT Stereo : 1; // 0x00000002
408#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2) || \
409 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_2))
410 UINT OverridePriority : 1; // 0x00000004
411 UINT Reserved : 29; // 0xFFFFFFF8
412#else
413 UINT Reserved : 30; // 0xFFFFFFFC
414#endif
415#else
416 UINT Reserved :31; // 0xFFFFFFFE
417#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8)
418 };
419 UINT Value;
420 } Flags;
421 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS GpuVirtualAddress; // out: GPU Virtual address of the allocation created.
422#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2) || \
423 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_2))
424 union
425 {
426 UINT Priority; // in: priority of allocation
427 D3DKMT_ALIGN64 ULONG_PTR Unused;
428 };
429 D3DKMT_ALIGN64 ULONG_PTR Reserved[5]; // Reserved
430#else
431 D3DKMT_ALIGN64 ULONG_PTR Reserved[6]; // Reserved
432#endif
434
435#endif
436
437typedef struct _D3DDDI_OPENALLOCATIONINFO
438{
439 D3DKMT_HANDLE hAllocation; // in: Handle for this allocation in this process
440 D3DKMT_PTR(CONST VOID*, pPrivateDriverData); // in: Ptr to driver private buffer for this allocations
441 UINT PrivateDriverDataSize; // in: Size in bytes of driver private buffer for this allocations
442
444
445#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN7) || \
446 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WIN7))
447
448typedef struct _D3DDDI_OPENALLOCATIONINFO2
449{
450 D3DKMT_HANDLE hAllocation; // in: Handle for this allocation in this process
451 D3DKMT_PTR(CONST VOID*, pPrivateDriverData);// in: Ptr to driver private buffer for this allocations
452 UINT PrivateDriverDataSize; // in: Size in bytes of driver private buffer for this allocations
453 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS GpuVirtualAddress; // out: GPU Virtual address of the allocation opened.
454 D3DKMT_ALIGN64 ULONG_PTR Reserved[6]; // Reserved
456
457#endif
458
459#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) || \
460 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WIN8))
461
462typedef enum _D3DDDI_OFFER_PRIORITY
463{
464 D3DDDI_OFFER_PRIORITY_NONE=0, // Do not offer
465 D3DDDI_OFFER_PRIORITY_LOW=1, // Content is not useful
466 D3DDDI_OFFER_PRIORITY_NORMAL, // Content is useful but easy to regenerate
467 D3DDDI_OFFER_PRIORITY_HIGH, // Content is useful and difficult to regenerate
468 D3DDDI_OFFER_PRIORITY_AUTO, // Let VidMm decide offer priority based on eviction priority
469} D3DDDI_OFFER_PRIORITY;
470
471#endif
472
473typedef struct _D3DDDI_ALLOCATIONLIST
474{
476 union
477 {
478 struct
479 {
480 UINT WriteOperation : 1; // 0x00000001
481 UINT DoNotRetireInstance : 1; // 0x00000002
482
483#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) || \
484 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WIN8))
485 UINT OfferPriority : 3; // 0x0000001C D3DDDI_OFFER_PRIORITY
486 UINT Reserved :27; // 0xFFFFFFE0
487#else
488 UINT Reserved :30; // 0xFFFFFFFC
489#endif
490 };
491 UINT Value;
492 };
494
495typedef struct _D3DDDI_PATCHLOCATIONLIST
496{
498 union
499 {
500 struct
501 {
502 UINT SlotId : 24; // 0x00FFFFFF
503 UINT Reserved : 8; // 0xFF000000
504 };
505 UINT Value;
506 };
512
513typedef struct _D3DDDICB_LOCKFLAGS
514{
515 union
516 {
517 struct
518 {
519 UINT ReadOnly : 1; // 0x00000001
520 UINT WriteOnly : 1; // 0x00000002
521 UINT DonotWait : 1; // 0x00000004
522 UINT IgnoreSync : 1; // 0x00000008
523 UINT LockEntire : 1; // 0x00000010
524 UINT DonotEvict : 1; // 0x00000020
525 UINT AcquireAperture : 1; // 0x00000040
526 UINT Discard : 1; // 0x00000080
527 UINT NoExistingReference : 1; // 0x00000100
528 UINT UseAlternateVA : 1; // 0x00000200
529 UINT IgnoreReadSync : 1; // 0x00000400
530 UINT Reserved :21; // 0xFFFFF800
531 };
532 UINT Value;
533 };
534} D3DDDICB_LOCKFLAGS;
535
536typedef struct _D3DDDICB_LOCK2FLAGS
537{
538 union
539 {
540 struct
541 {
542 UINT Reserved : 32; // 0xFFFFFFFF
543 };
544 UINT Value;
545 };
546} D3DDDICB_LOCK2FLAGS;
547
549{
550 union
551 {
552 struct
553 {
554 UINT AssumeNotInUse : 1; // 0x00000001
555 UINT SynchronousDestroy : 1; // 0x00000002
556 UINT Reserved : 29; // 0x7FFFFFFC
557 UINT SystemUseOnly : 1; // 0x80000000 // Should not be set by the UMD
558 };
559 UINT Value;
560 };
562
563typedef struct _D3DDDI_ESCAPEFLAGS
564{
565 union
566 {
567 struct
568 {
569 UINT HardwareAccess : 1; // 0x00000001
570#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3) || \
571 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM1_3))
572 UINT DeviceStatusQuery : 1; // 0x00000002
573 UINT ChangeFrameLatency : 1; // 0x00000004
574#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0)
575 UINT NoAdapterSynchronization : 1; // 0x00000008
576#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2)
577 UINT Reserved : 1; // 0x00000010 Used internally by DisplayOnly present
578 UINT VirtualMachineData : 1; // 0x00000020 Cannot be set from user mode
579#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_5)
580 UINT DriverKnownEscape : 1; // 0x00000040 // Driver private data points to a well known structure
581 UINT DriverCommonEscape : 1; // 0x00000080 // Private data points runtime defined structure
582 UINT Reserved2 :24; // 0xFFFFFF00
583#else // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_5)
584 UINT Reserved2 :26; // 0xFFFFFFC0
585#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_5)
586#else
587 UINT Reserved :28; // 0xFFFFFFF0
588#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2)
589#else
590 UINT Reserved :29; // 0xFFFFFFF8
591#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0)
592#else
593 UINT Reserved :31; // 0xFFFFFFFE
594#endif // WDDM1_3
595 };
596 UINT Value;
597 };
599
600#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_5)
601
602typedef enum _D3DDDI_DRIVERESCAPETYPE
603{
604 D3DDDI_DRIVERESCAPETYPE_TRANSLATEALLOCATIONHANDLE = 0,
605 D3DDDI_DRIVERESCAPETYPE_TRANSLATERESOURCEHANDLE = 1,
606#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM3_0)
607 D3DDDI_DRIVERESCAPETYPE_CPUEVENTUSAGE = 2,
608#endif
609 D3DDDI_DRIVERESCAPETYPE_MAX,
610} D3DDDI_DRIVERESCAPETYPE;
611
612typedef struct _D3DDDI_DRIVERESCAPE_TRANSLATEALLOCATIONEHANDLE
613{
614 D3DDDI_DRIVERESCAPETYPE EscapeType;
615 D3DKMT_HANDLE hAllocation;
616} D3DDDI_DRIVERESCAPE_TRANSLATEALLOCATIONEHANDLE;
617
618typedef struct _D3DDDI_DRIVERESCAPE_TRANSLATERESOURCEHANDLE
619{
620 D3DDDI_DRIVERESCAPETYPE EscapeType;
621 D3DKMT_HANDLE hResource;
622} D3DDDI_DRIVERESCAPE_TRANSLATERESOURCEHANDLE;
623
624#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_5)
625
626#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM3_0)
627
628typedef struct _D3DDDI_DRIVERESCAPE_CPUEVENTUSAGE
629{
630 D3DDDI_DRIVERESCAPETYPE EscapeType;
631 D3DKMT_HANDLE hSyncObject;
632 D3DKMT_ALIGN64 UINT64 hKmdCpuEvent;
633 UINT Usage[8];
634} D3DDDI_DRIVERESCAPE_CPUEVENTUSAGE;
635
636#endif
637
638typedef struct _D3DDDI_CREATECONTEXTFLAGS
639{
640 union
641 {
642 struct
643 {
644 UINT NullRendering : 1; // 0x00000001
645 UINT InitialData : 1; // 0x00000002
646#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) || \
647 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_0))
648 UINT DisableGpuTimeout : 1; // 0x00000004
649 UINT SynchronizationOnly : 1; // 0x00000008
650#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_3) || \
651 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_3_1))
652 UINT HwQueueSupported : 1; // 0x00000010
653 UINT NoKmdAccess : 1; // 0x00000020
654 UINT Reserved :26; // 0xFFFFFFC0
655#else
656 UINT Reserved :28; // 0xFFFFFFF0
657#endif // DXGKDDI_INTERFACE_VERSION
658
659#else
660 UINT Reserved :30; // 0xFFFFFFFC
661#endif // DXGKDDI_INTERFACE_VERSION
662 };
663 UINT Value;
664 };
665} D3DDDI_CREATECONTEXTFLAGS;
666
667#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2) || \
668 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_2_1))
669
670typedef struct _D3DDDI_CREATEHWCONTEXTFLAGS
671{
672 union
673 {
674 struct
675 {
676 UINT Reserved :32; // 0xFFFFFFFF
677 };
678 UINT Value;
679 };
680} D3DDDI_CREATEHWCONTEXTFLAGS;
681
682typedef struct _D3DDDI_CREATEHWQUEUEFLAGS
683{
684 union
685 {
686 struct
687 {
688 UINT DisableGpuTimeout : 1; // 0x00000001
689 UINT NoBroadcastSignal : 1; // 0x00000002
690 UINT NoBroadcastWait : 1; // 0x00000004
691 UINT NoKmdAccess : 1; // 0x00000008
692 UINT Reserved :28; // 0xFFFFFFF0
693 };
694 UINT Value;
695 };
696} D3DDDI_CREATEHWQUEUEFLAGS;
697
698#endif // ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2)
699
700typedef struct _D3DDDI_SEGMENTPREFERENCE
701{
702 union
703 {
704 struct
705 {
706 UINT SegmentId0 : 5; // 0x0000001F
707 UINT Direction0 : 1; // 0x00000020
708 UINT SegmentId1 : 5; // 0x000007C0
709 UINT Direction1 : 1; // 0x00000800
710 UINT SegmentId2 : 5; // 0x0001F000
711 UINT Direction2 : 1; // 0x00020000
712 UINT SegmentId3 : 5; // 0x007C0000
713 UINT Direction3 : 1; // 0x00800000
714 UINT SegmentId4 : 5; // 0x1F000000
715 UINT Direction4 : 1; // 0x20000000
716 UINT Reserved : 2; // 0xC0000000
717 };
718 UINT Value;
719 };
720} D3DDDI_SEGMENTPREFERENCE;
721
722/* Formats
723 * Most of these names have the following convention:
724 * A = Alpha
725 * R = Red
726 * G = Green
727 * B = Blue
728 * X = Unused Bits
729 * P = Palette
730 * L = Luminance
731 * U = dU coordinate for BumpMap
732 * V = dV coordinate for BumpMap
733 * S = Stencil
734 * D = Depth (e.g. Z or W buffer)
735 * C = Computed from other channels (typically on certain read operations)
736 *
737 * Further, the order of the pieces are from MSB first; hence
738 * D3DFMT_A8L8 indicates that the high byte of this two byte
739 * format is alpha.
740 *
741 * D16 indicates:
742 * - An integer 16-bit value.
743 * - An app-lockable surface.
744 *
745 * All Depth/Stencil formats except D3DFMT_D16_LOCKABLE indicate:
746 * - no particular bit ordering per pixel, and
747 * - are not app lockable, and
748 * - the driver is allowed to consume more than the indicated
749 * number of bits per Depth channel (but not Stencil channel).
750 */
751#ifndef MAKEFOURCC
752 #define MAKEFOURCC(ch0, ch1, ch2, ch3) \
753 ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
754 ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
755#endif /* defined(MAKEFOURCC) */
756
757
758typedef enum _D3DDDIFORMAT
759{
760
762
763 D3DDDIFMT_R8G8B8 = 20,
766 D3DDDIFMT_R5G6B5 = 23,
770 D3DDDIFMT_R3G3B2 = 27,
771 D3DDDIFMT_A8 = 28,
777 D3DDDIFMT_G16R16 = 34,
780
781 D3DDDIFMT_A8P8 = 40,
782 D3DDDIFMT_P8 = 41,
783
784 D3DDDIFMT_L8 = 50,
785 D3DDDIFMT_A8L8 = 51,
786 D3DDDIFMT_A4L4 = 52,
787
788 D3DDDIFMT_V8U8 = 60,
789 D3DDDIFMT_L6V5U5 = 61,
792 D3DDDIFMT_V16U16 = 64,
795
796 D3DDDIFMT_UYVY = MAKEFOURCC('U', 'Y', 'V', 'Y'),
797 D3DDDIFMT_R8G8_B8G8 = MAKEFOURCC('R', 'G', 'B', 'G'),
798 D3DDDIFMT_YUY2 = MAKEFOURCC('Y', 'U', 'Y', '2'),
799 D3DDDIFMT_G8R8_G8B8 = MAKEFOURCC('G', 'R', 'G', 'B'),
800 D3DDDIFMT_DXT1 = MAKEFOURCC('D', 'X', 'T', '1'),
801 D3DDDIFMT_DXT2 = MAKEFOURCC('D', 'X', 'T', '2'),
802 D3DDDIFMT_DXT3 = MAKEFOURCC('D', 'X', 'T', '3'),
803 D3DDDIFMT_DXT4 = MAKEFOURCC('D', 'X', 'T', '4'),
804 D3DDDIFMT_DXT5 = MAKEFOURCC('D', 'X', 'T', '5'),
805
807 D3DDDIFMT_D32 = 71,
808 D3DDDIFMT_D15S1 = 73,
809 D3DDDIFMT_D24S8 = 75,
810 D3DDDIFMT_D24X8 = 77,
812 D3DDDIFMT_D16 = 80,
813
815 D3DDDIFMT_D24FS8 = 83,
816
819
820 D3DDDIFMT_S1D15 = 72,
821 D3DDDIFMT_S8D24 = 74,
822 D3DDDIFMT_X8D24 = 76,
824
825 D3DDDIFMT_L16 = 81,
826#if (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM1_3) // M1
827 D3DDDIFMT_G8R8 = 91,
828 D3DDDIFMT_R8 = 92,
829#endif
830
834
836
837 D3DDDIFMT_MULTI2_ARGB8 = MAKEFOURCC('M','E','T','1'),
838
839 // Floating point surface formats
840
841 // s10e5 formats (16-bits per channel)
842 D3DDDIFMT_R16F = 111,
843 D3DDDIFMT_G16R16F = 112,
845
846 // IEEE s23e8 formats (32-bits per channel)
847 D3DDDIFMT_R32F = 114,
848 D3DDDIFMT_G32R32F = 115,
850
851 D3DDDIFMT_CxV8U8 = 117,
852
853 // Monochrome 1 bit per pixel format
854 D3DDDIFMT_A1 = 118,
855
856 // 2.8 biased fixed point
858
859 // Decode compressed buffer formats
894
896
897 D3DDDIFMT_FORCE_UINT =0x7fffffff
899
900typedef enum D3DDDI_COLOR_SPACE_TYPE
901{
902 D3DDDI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 = 0,
903 D3DDDI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 = 1,
904 D3DDDI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709 = 2,
905 D3DDDI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020 = 3,
906 D3DDDI_COLOR_SPACE_RESERVED = 4,
907 D3DDDI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601 = 5,
908 D3DDDI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 = 6,
909 D3DDDI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601 = 7,
910 D3DDDI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 = 8,
911 D3DDDI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709 = 9,
912 D3DDDI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020 = 10,
913 D3DDDI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020 = 11,
914 D3DDDI_COLOR_SPACE_RGB_FULL_G2084_NONE_P2020 = 12,
915 D3DDDI_COLOR_SPACE_YCBCR_STUDIO_G2084_LEFT_P2020 = 13,
916 D3DDDI_COLOR_SPACE_RGB_STUDIO_G2084_NONE_P2020 = 14,
917 D3DDDI_COLOR_SPACE_YCBCR_STUDIO_G22_TOPLEFT_P2020 = 15,
918 D3DDDI_COLOR_SPACE_YCBCR_STUDIO_G2084_TOPLEFT_P2020 = 16,
919 D3DDDI_COLOR_SPACE_RGB_FULL_G22_NONE_P2020 = 17,
920 D3DDDI_COLOR_SPACE_YCBCR_STUDIO_GHLG_TOPLEFT_P2020 = 18,
921 D3DDDI_COLOR_SPACE_YCBCR_FULL_GHLG_TOPLEFT_P2020 = 19,
922 D3DDDI_COLOR_SPACE_RGB_STUDIO_G24_NONE_P709 = 20,
923 D3DDDI_COLOR_SPACE_RGB_STUDIO_G24_NONE_P2020 = 21,
924 D3DDDI_COLOR_SPACE_YCBCR_STUDIO_G24_LEFT_P709 = 22,
925 D3DDDI_COLOR_SPACE_YCBCR_STUDIO_G24_LEFT_P2020 = 23,
926 D3DDDI_COLOR_SPACE_YCBCR_STUDIO_G24_TOPLEFT_P2020 = 24,
927 D3DDDI_COLOR_SPACE_CUSTOM = 0xFFFFFFFF
928} D3DDDI_COLOR_SPACE_TYPE;
929
930//
931// Note: This enum is intended to specify the final wire signaling
932// colorspace values. Do not mix it with enum values defined in
933// D3DDDI_COLOR_SPACE_TYPE which are used to specify
934// input colorspace for MPOs and other surfaces.
935//
936typedef enum _D3DDDI_OUTPUT_WIRE_COLOR_SPACE_TYPE
937{
938 // We are using the same values for these first two enums for
939 // backward compatibility to WDDM2.2 drivers which used
940 // to get these 2 values from D3DDDI_COLOR_SPACE_TYPE
941 D3DDDI_OUTPUT_WIRE_COLOR_SPACE_G22_P709 = 0,
942 D3DDDI_OUTPUT_WIRE_COLOR_SPACE_RESERVED = 4,
943 D3DDDI_OUTPUT_WIRE_COLOR_SPACE_G2084_P2020 = 12,
944
945 // We are starting the new enum value at 30 just to make sure it
946 // is not confused with the existing D3DDDI_COLOR_SPACE_TYPE
947 // in the short term
948 D3DDDI_OUTPUT_WIRE_COLOR_SPACE_G22_P709_WCG = 30,
949
950 // OS only intend to use the _G22_P2020 value in future,
951 // for now graphics drivers should not expect it.
952 D3DDDI_OUTPUT_WIRE_COLOR_SPACE_G22_P2020 = 31,
953
954 // OS only intend to use the _G2084_P2020_HDR10PLUS value in future,
955 // for now graphics drivers should not expect it.
956 D3DDDI_OUTPUT_WIRE_COLOR_SPACE_G2084_P2020_HDR10PLUS = 32,
957
958 // OS only intend to use the _G2084_P2020_DVLL value in future,
959 // for now graphics drivers should not expect it.
960 D3DDDI_OUTPUT_WIRE_COLOR_SPACE_G2084_P2020_DVLL = 33,
961} D3DDDI_OUTPUT_WIRE_COLOR_SPACE_TYPE;
962
963typedef struct _D3DDDIRECT
964{
965 LONG left;
966 LONG top;
967 LONG right;
968 LONG bottom;
969} D3DDDIRECT;
970
971typedef struct _D3DDDI_KERNELOVERLAYINFO
972{
973 D3DKMT_HANDLE hAllocation; // in: Allocation to be displayed
974 D3DDDIRECT DstRect; // in: Dest rect
975 D3DDDIRECT SrcRect; // in: Source rect
976 D3DKMT_PTR(VOID*, pPrivateDriverData); // in: Private driver data
977 UINT PrivateDriverDataSize; // in: Size of private driver data
978} D3DDDI_KERNELOVERLAYINFO;
979
980typedef enum _D3DDDI_GAMMARAMP_TYPE
981{
982 D3DDDI_GAMMARAMP_UNINITIALIZED = 0,
983 D3DDDI_GAMMARAMP_DEFAULT = 1,
984 D3DDDI_GAMMARAMP_RGB256x3x16 = 2,
985 D3DDDI_GAMMARAMP_DXGI_1 = 3,
986#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_3)
987 D3DDDI_GAMMARAMP_MATRIX_3x4 = 4,
988#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_3)
989#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_6)
990 D3DDDI_GAMMARAMP_MATRIX_V2 = 5,
991#endif // DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_6
992} D3DDDI_GAMMARAMP_TYPE;
993
994typedef struct _D3DDDI_GAMMA_RAMP_RGB256x3x16
995{
996 USHORT Red[256];
997 USHORT Green[256];
998 USHORT Blue[256];
999} D3DDDI_GAMMA_RAMP_RGB256x3x16;
1000
1001typedef struct D3DDDI_DXGI_RGB
1002{
1003 float Red;
1004 float Green;
1005 float Blue;
1006} D3DDDI_DXGI_RGB;
1007
1008typedef struct _D3DDDI_GAMMA_RAMP_DXGI_1
1009{
1010 D3DDDI_DXGI_RGB Scale;
1011 D3DDDI_DXGI_RGB Offset;
1012 D3DDDI_DXGI_RGB GammaCurve[1025];
1013} D3DDDI_GAMMA_RAMP_DXGI_1;
1014
1015typedef struct _D3DKMDT_3X4_COLORSPACE_TRANSFORM
1016{
1017 float ColorMatrix3x4[3][4];
1018 float ScalarMultiplier;
1019 D3DDDI_DXGI_RGB LookupTable1D[4096];
1020} D3DKMDT_3x4_COLORSPACE_TRANSFORM, *PD3DDDI_3x4_COLORSPACE_TRANSFORM;
1021
1022typedef enum _D3DKMDT_COLORSPACE_TRANSFORM_STAGE_CONTROL
1023{
1024 D3DKMDT_COLORSPACE_TRANSFORM_STAGE_CONTROL_NO_CHANGE = 0,
1025 D3DKMDT_COLORSPACE_TRANSFORM_STAGE_CONTROL_ENABLE = 1,
1026 D3DKMDT_COLORSPACE_TRANSFORM_STAGE_CONTROL_BYPASS = 2,
1027}D3DKMDT_COLORSPACE_TRANSFORM_STAGE_CONTROL, *PD3DKMDT_COLORSPACE_TRANSFORM_STAGE_CONTROL;
1028
1029typedef struct _D3DKMDT_COLORSPACE_TRANSFORM_MATRIX_V2
1030{
1031 // stage of 1D Degamma.
1032 D3DKMDT_COLORSPACE_TRANSFORM_STAGE_CONTROL StageControlLookupTable1DDegamma;
1033 D3DDDI_DXGI_RGB LookupTable1DDegamma[4096];
1034
1035 // stage of 3x3 matrix
1036 D3DKMDT_COLORSPACE_TRANSFORM_STAGE_CONTROL StageControlColorMatrix3x3;
1037 float ColorMatrix3x3[3][3];
1038
1039 // stage of 1D Regamma.
1040 D3DKMDT_COLORSPACE_TRANSFORM_STAGE_CONTROL StageControlLookupTable1DRegamma;
1041 D3DDDI_DXGI_RGB LookupTable1DRegamma[4096];
1042} D3DKMDT_COLORSPACE_TRANSFORM_MATRIX_V2, *PD3DKMDT_COLORSPACE_TRANSFORM_MATRIX_V2;
1043
1044typedef enum _D3DDDI_HDR_METADATA_TYPE
1045{
1046 D3DDDI_HDR_METADATA_TYPE_NONE = 0,
1047 D3DDDI_HDR_METADATA_TYPE_HDR10 = 1,
1048 D3DDDI_HDR_METADATA_TYPE_HDR10PLUS = 2,
1049} D3DDDI_HDR_METADATA_TYPE;
1050
1051typedef struct _D3DDDI_HDR_METADATA_HDR10
1052{
1053 // Color gamut
1054 UINT16 RedPrimary[2];
1055 UINT16 GreenPrimary[2];
1056 UINT16 BluePrimary[2];
1057 UINT16 WhitePoint[2];
1058
1059 // Luminance
1060 UINT MaxMasteringLuminance;
1061 UINT MinMasteringLuminance;
1062 UINT16 MaxContentLightLevel;
1063 UINT16 MaxFrameAverageLightLevel;
1064} D3DDDI_HDR_METADATA_HDR10;
1065
1066typedef struct D3DDDI_HDR_METADATA_HDR10PLUS
1067{
1068 BYTE Data[72];
1069} D3DDDI_HDR_METADATA_HDR10PLUS;
1070
1071// Used as a value for D3DDDI_VIDEO_PRESENT_SOURCE_ID and D3DDDI_VIDEO_PRESENT_TARGET_ID types to specify
1072// that the respective video present source/target ID hasn't been initialized.
1073#define D3DDDI_ID_UNINITIALIZED (UINT)(~0)
1074
1075// TODO:[mmilirud] Define this as (UINT)(~1) to avoid collision with valid source ID equal to 0.
1076//
1077// Used as a value for D3DDDI_VIDEO_PRESENT_SOURCE_ID and D3DDDI_VIDEO_PRESENT_TARGET_ID types to specify
1078// that the respective video present source/target ID isn't applicable for the given execution context.
1079#define D3DDDI_ID_NOTAPPLICABLE (UINT)(0)
1080
1081// Indicates that a resource can be associated with "any" VidPn source, even none at all.
1082#define D3DDDI_ID_ANY (UINT)(~1)
1083
1084// Used as a value for D3DDDI_VIDEO_PRESENT_SOURCE_ID and D3DDDI_VIDEO_PRESENT_TARGET_ID types to specify
1085// that the respective video present source/target ID describes every VidPN source/target in question.
1086#define D3DDDI_ID_ALL (UINT)(~2)
1087
1088//
1089// Hardcoded VidPnSource count
1090//
1091#define D3DKMDT_MAX_VIDPN_SOURCES_BITCOUNT 4
1092#define D3DKMDT_MAX_VIDPN_SOURCES (1 << D3DKMDT_MAX_VIDPN_SOURCES_BITCOUNT)
1093
1094
1096// Purpose: Multi-sampling method descriptor type.
1097//
1098// Remarks: Driver is free to partition its quality levels for a given multi-sampling method into as many
1099// increments as it likes, with the condition that each incremental step does noticably improve
1100// quality of the presented image.
1101//
1102typedef struct _D3DDDI_MULTISAMPLINGMETHOD
1103{
1104 // Number of sub-pixels employed in this multi-sampling method (e.g. 2 for 2x and 8 for 8x multi-sampling)
1105 UINT NumSamples;
1106
1107 // Upper bound on the quality range supported for this multi-sampling method. The range starts from 0
1108 // and goes upto and including the reported maximum quality setting.
1109 UINT NumQualityLevels;
1110}
1111D3DDDI_MULTISAMPLINGMETHOD;
1112
1113
1115// Purpose: Video signal scan line ordering descriptor type.
1116//
1117// Remarks: Scan-line ordering of the video mode, specifies whether each field contains the entire
1118// content of a frame, or only half of it (i.e. even/odd lines interchangeably).
1119// Note that while for standard interlaced modes, what field comes first can be inferred
1120// from the mode, specifying this characteristic explicitly with an enum both frees up the
1121// client from having to maintain mode-based look-up tables and is extensible for future
1122// standard modes not listed in the D3DKMDT_VIDEO_SIGNAL_STANDARD enum.
1123//
1124typedef enum _D3DDDI_VIDEO_SIGNAL_SCANLINE_ORDERING
1125{
1126 D3DDDI_VSSLO_UNINITIALIZED = 0,
1127 D3DDDI_VSSLO_PROGRESSIVE = 1,
1128 D3DDDI_VSSLO_INTERLACED_UPPERFIELDFIRST = 2,
1129 D3DDDI_VSSLO_INTERLACED_LOWERFIELDFIRST = 3,
1130 D3DDDI_VSSLO_OTHER = 255
1131}
1132D3DDDI_VIDEO_SIGNAL_SCANLINE_ORDERING;
1133
1134
1135typedef enum D3DDDI_FLIPINTERVAL_TYPE
1136{
1137 D3DDDI_FLIPINTERVAL_IMMEDIATE = 0,
1138 D3DDDI_FLIPINTERVAL_ONE = 1,
1139 D3DDDI_FLIPINTERVAL_TWO = 2,
1140 D3DDDI_FLIPINTERVAL_THREE = 3,
1141 D3DDDI_FLIPINTERVAL_FOUR = 4,
1142
1143 // This value is only valid for the D3D9 runtime PresentCb SyncIntervalOverride field.
1144 // For this field, IMMEDIATE means the API semantic of sync interval 0, where
1145 // IMMEDIATE_ALLOW_TEARING is equivalent to the addition of the DXGI ALLOW_TEARING API flags.
1146 D3DDDI_FLIPINTERVAL_IMMEDIATE_ALLOW_TEARING = 5,
1147} D3DDDI_FLIPINTERVAL_TYPE;
1148
1149
1150typedef enum _D3DDDI_POOL
1151{
1152 D3DDDIPOOL_SYSTEMMEM = 1,
1153 D3DDDIPOOL_VIDEOMEMORY = 2,
1154 D3DDDIPOOL_LOCALVIDMEM = 3,
1155 D3DDDIPOOL_NONLOCALVIDMEM = 4,
1156#if (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM1_3) // M1
1157 D3DDDIPOOL_STAGINGMEM = 5,
1158#endif
1159} D3DDDI_POOL;
1160
1161
1162typedef enum _D3DDDIMULTISAMPLE_TYPE
1163{
1164 D3DDDIMULTISAMPLE_NONE = 0,
1165 D3DDDIMULTISAMPLE_NONMASKABLE = 1,
1166 D3DDDIMULTISAMPLE_2_SAMPLES = 2,
1167 D3DDDIMULTISAMPLE_3_SAMPLES = 3,
1168 D3DDDIMULTISAMPLE_4_SAMPLES = 4,
1169 D3DDDIMULTISAMPLE_5_SAMPLES = 5,
1170 D3DDDIMULTISAMPLE_6_SAMPLES = 6,
1171 D3DDDIMULTISAMPLE_7_SAMPLES = 7,
1172 D3DDDIMULTISAMPLE_8_SAMPLES = 8,
1173 D3DDDIMULTISAMPLE_9_SAMPLES = 9,
1174 D3DDDIMULTISAMPLE_10_SAMPLES = 10,
1175 D3DDDIMULTISAMPLE_11_SAMPLES = 11,
1176 D3DDDIMULTISAMPLE_12_SAMPLES = 12,
1177 D3DDDIMULTISAMPLE_13_SAMPLES = 13,
1178 D3DDDIMULTISAMPLE_14_SAMPLES = 14,
1179 D3DDDIMULTISAMPLE_15_SAMPLES = 15,
1180 D3DDDIMULTISAMPLE_16_SAMPLES = 16,
1181
1182 D3DDDIMULTISAMPLE_FORCE_UINT = 0x7fffffff
1183} D3DDDIMULTISAMPLE_TYPE;
1184
1185typedef struct _D3DDDI_RESOURCEFLAGS
1186{
1187 union
1188 {
1189 struct
1190 {
1191 UINT RenderTarget : 1; // 0x00000001
1192 UINT ZBuffer : 1; // 0x00000002
1193 UINT Dynamic : 1; // 0x00000004
1194 UINT HintStatic : 1; // 0x00000008
1195 UINT AutogenMipmap : 1; // 0x00000010
1196 UINT DMap : 1; // 0x00000020
1197 UINT WriteOnly : 1; // 0x00000040
1198 UINT NotLockable : 1; // 0x00000080
1199 UINT Points : 1; // 0x00000100
1200 UINT RtPatches : 1; // 0x00000200
1201 UINT NPatches : 1; // 0x00000400
1202 UINT SharedResource : 1; // 0x00000800
1203 UINT DiscardRenderTarget : 1; // 0x00001000
1204 UINT Video : 1; // 0x00002000
1205 UINT CaptureBuffer : 1; // 0x00004000
1206 UINT Primary : 1; // 0x00008000
1207 UINT Texture : 1; // 0x00010000
1208 UINT CubeMap : 1; // 0x00020000
1209 UINT Volume : 1; // 0x00040000
1210 UINT VertexBuffer : 1; // 0x00080000
1211 UINT IndexBuffer : 1; // 0x00100000
1212 UINT DecodeRenderTarget : 1; // 0x00200000
1213 UINT DecodeCompressedBuffer : 1; // 0x00400000
1214 UINT VideoProcessRenderTarget: 1; // 0x00800000
1215 UINT CpuOptimized : 1; // 0x01000000
1216 UINT MightDrawFromLocked : 1; // 0x02000000
1217 UINT Overlay : 1; // 0x04000000
1218 UINT MatchGdiPrimary : 1; // 0x08000000
1219 UINT InterlacedRefresh : 1; // 0x10000000
1220 UINT TextApi : 1; // 0x20000000
1221 UINT RestrictedContent : 1; // 0x40000000
1222 UINT RestrictSharedAccess : 1; // 0x80000000
1223 };
1224 UINT Value;
1225 };
1226} D3DDDI_RESOURCEFLAGS;
1227
1228typedef struct _D3DDDI_SURFACEINFO
1229{
1230 UINT Width; // in: For linear, surface and volume
1231 UINT Height; // in: For surface and volume
1232 UINT Depth; // in: For volume
1233 CONST VOID* pSysMem;
1234 UINT SysMemPitch;
1235 UINT SysMemSlicePitch;
1236} D3DDDI_SURFACEINFO;
1237
1238typedef enum _D3DDDI_ROTATION
1239{
1240 D3DDDI_ROTATION_IDENTITY = 1, // No rotation.
1241 D3DDDI_ROTATION_90 = 2, // Rotated 90 degrees.
1242 D3DDDI_ROTATION_180 = 3, // Rotated 180 degrees.
1243 D3DDDI_ROTATION_270 = 4 // Rotated 270 degrees.
1244} D3DDDI_ROTATION;
1245
1246typedef enum D3DDDI_SCANLINEORDERING
1247{
1248 D3DDDI_SCANLINEORDERING_UNKNOWN = 0,
1249 D3DDDI_SCANLINEORDERING_PROGRESSIVE = 1,
1250 D3DDDI_SCANLINEORDERING_INTERLACED = 2,
1251} D3DDDI_SCANLINEORDERING;
1252
1253typedef struct _D3DDDIARG_CREATERESOURCE
1254{
1256 D3DDDI_POOL Pool;
1257 D3DDDIMULTISAMPLE_TYPE MultisampleType;
1258 UINT MultisampleQuality;
1259 CONST D3DDDI_SURFACEINFO* pSurfList; // in: List of sub resource objects to create
1260 UINT SurfCount; // in: Number of sub resource objects
1261 UINT MipLevels;
1262 UINT Fvf; // in: FVF format for vertex buffers
1263 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; // in: VidPnSourceId on which the primary surface is created
1264 D3DDDI_RATIONAL RefreshRate; // in: RefreshRate that this primary surface is to be used with
1265 HANDLE hResource; // in/out: D3D runtime handle/UM driver handle
1266 D3DDDI_RESOURCEFLAGS Flags;
1267 D3DDDI_ROTATION Rotation; // in: The orientation of the resource. (0, 90, 180, 270)
1268} D3DDDIARG_CREATERESOURCE;
1269
1270#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) || \
1271 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WIN8))
1272
1273typedef struct _D3DDDI_RESOURCEFLAGS2
1274{
1275 union
1276 {
1277 struct
1278 {
1279 UINT VideoEncoder : 1; // 0x00000001
1280 UINT UserMemory : 1; // 0x00000002
1281#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3) || \
1282 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM1_3)) // M1
1283 UINT CrossAdapter : 1; // 0x00000004
1284#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) || \
1285 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_0))
1286 UINT IsDisplayable : 1; // 0x00000008
1287 UINT Reserved : 28;
1288#else
1289 UINT Reserved : 29;
1290#endif
1291#else
1292 UINT Reserved : 30;
1293#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3)
1294 };
1295 UINT Value;
1296 };
1297} D3DDDI_RESOURCEFLAGS2;
1298
1299
1300typedef struct _D3DDDIARG_CREATERESOURCE2
1301{
1303 D3DDDI_POOL Pool;
1304 D3DDDIMULTISAMPLE_TYPE MultisampleType;
1305 UINT MultisampleQuality;
1306 CONST D3DDDI_SURFACEINFO* pSurfList; // in: List of sub resource objects to create
1307 UINT SurfCount; // in: Number of sub resource objects
1308 UINT MipLevels;
1309 UINT Fvf; // in: FVF format for vertex buffers
1310 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; // in: VidPnSourceId on which the primary surface is created
1311 D3DDDI_RATIONAL RefreshRate; // in: RefreshRate that this primary surface is to be used with
1312 HANDLE hResource; // in/out: D3D runtime handle/UM driver handle
1313 D3DDDI_RESOURCEFLAGS Flags;
1314 D3DDDI_ROTATION Rotation; // in: The orientation of the resource. (0, 90, 180, 270)
1315 D3DDDI_RESOURCEFLAGS2 Flags2;
1316} D3DDDIARG_CREATERESOURCE2;
1317#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8)
1318
1319typedef struct _D3DDDICB_SIGNALFLAGS
1320{
1321 union
1322 {
1323 struct
1324 {
1326#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8)
1328#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0)
1330 UINT Reserved : 28;
1332#else
1333 UINT Reserved : 30;
1334#endif
1335#else
1336 UINT Reserved : 31;
1337#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8)
1338 };
1339 UINT Value;
1340 };
1342
1343#define D3DDDI_MAX_OBJECT_WAITED_ON 32
1344#define D3DDDI_MAX_OBJECT_SIGNALED 32
1345
1347{
1349 D3DDDI_SEMAPHORE = 2,
1350 D3DDDI_FENCE = 3,
1352
1353#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) || \
1354 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_0))
1356#endif // DXGKDDI_INTERFACE_VERSION
1357
1358#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2) || \
1359 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_2))
1361#endif // DXGKDDI_INTERFACE_VERSION
1362
1364
1366
1367#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) || \
1368 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_0))
1369
1370#define D3DDDI_SYNC_OBJECT_WAIT 0x1
1371#define D3DDDI_SYNC_OBJECT_SIGNAL 0x2
1372#define D3DDDI_SYNC_OBJECT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | D3DDDI_SYNC_OBJECT_WAIT | D3DDDI_SYNC_OBJECT_SIGNAL)
1373
1374#endif // DXGKDDI_INTERFACE_VERSION
1375
1376#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3)
1377
1378typedef union
1379{
1380 struct
1381 {
1382 UINT64 FrameNumber : 40;
1383 UINT64 PartNumber : 24;
1384 };
1385 UINT64 Value;
1386}DXGK_MIRACAST_CHUNK_ID;
1387
1388typedef enum _DXGK_MIRACAST_CHUNK_TYPE
1389{
1390 DXGK_MIRACAST_CHUNK_TYPE_UNKNOWN = 0,
1391 DXGK_MIRACAST_CHUNK_TYPE_COLOR_CONVERT_COMPLETE = 1,
1392 DXGK_MIRACAST_CHUNK_TYPE_ENCODE_COMPLETE = 2,
1393 DXGK_MIRACAST_CHUNK_TYPE_FRAME_START = 3,
1394 DXGK_MIRACAST_CHUNK_TYPE_FRAME_DROPPED = 4,
1395 DXGK_MIRACAST_CHUNK_TYPE_ENCODE_DRIVER_DEFINED_1 = 0x80000000,
1396 DXGK_MIRACAST_CHUNK_TYPE_ENCODE_DRIVER_DEFINED_2 = 0x80000001,
1397} DXGK_MIRACAST_CHUNK_TYPE;
1398
1399typedef struct
1400{
1401 DXGK_MIRACAST_CHUNK_TYPE ChunkType; // Type of chunk info
1402 DXGK_MIRACAST_CHUNK_ID ChunkId; // Identifier for this chunk
1403 UINT ProcessingTime; // Time the process took to complete in microsecond
1404 UINT EncodeRate; // Encode bitrate driver reported for the chunk, kilobits per second
1405} DXGK_MIRACAST_CHUNK_INFO;
1406#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3)
1407
1408#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) || \
1409 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_0))
1410
1411typedef enum D3DDDI_PAGINGQUEUE_PRIORITY
1412{
1413 D3DDDI_PAGINGQUEUE_PRIORITY_BELOW_NORMAL = -1,
1414 D3DDDI_PAGINGQUEUE_PRIORITY_NORMAL = 0,
1415 D3DDDI_PAGINGQUEUE_PRIORITY_ABOVE_NORMAL = 1,
1416} D3DDDI_PAGINGQUEUE_PRIORITY;
1417
1418typedef struct D3DDDI_MAKERESIDENT_FLAGS
1419{
1420 union
1421 {
1422 struct
1423 {
1424 UINT CantTrimFurther : 1; // When set, MakeResidentCb will succeed even if the request puts the application over the current budget.
1425 // MakeResidentCb will still fail if the request puts the application over the maximum budget.
1426 UINT MustSucceed : 1; // When set, instructs MakeResidentCb to put the device in error if the resource cannot be made resident.
1427 UINT Reserved : 30;
1428 };
1429 UINT Value;
1430 };
1431} D3DDDI_MAKERESIDENT_FLAGS;
1432
1433typedef struct D3DDDI_MAKERESIDENT
1434{
1435 D3DKMT_HANDLE hPagingQueue; // [in] Handle to the paging queue used to synchronize paging operations for this call.
1436 UINT NumAllocations; // [in/out] On input, the number of allocation handles om the AllocationList array. On output,
1437 // the number of allocations successfully made resident.
1438 D3DKMT_PTR(_Field_size_(NumAllocations)
1439 CONST D3DKMT_HANDLE*, AllocationList); // [in] An array of NumAllocations allocation handles
1440 D3DKMT_PTR(CONST UINT*, PriorityList); // [in] Residency priority array for each of the allocations in the resource or allocation list
1441 D3DDDI_MAKERESIDENT_FLAGS Flags; // [in] Residency flags
1442 D3DKMT_ALIGN64 UINT64 PagingFenceValue; // [out] Paging fence value to synchronize on before submitting the command
1443 // that uses above resources to the GPU. This value applies to the monitored fence
1444 // synchronization object associated with hPagingQueue.
1445 D3DKMT_ALIGN64 UINT64 NumBytesToTrim; // [out] When MakeResident fails due to being over budget, this value
1446 // indicates how much to trim in order for the call to succeed on a retry.
1447} D3DDDI_MAKERESIDENT;
1448
1449typedef struct D3DDDI_EVICT_FLAGS
1450{
1451 union
1452 {
1453 struct
1454 {
1455 UINT EvictOnlyIfNecessary : 1;
1456 UINT NotWrittenTo : 1;
1457 UINT Reserved : 30;
1458 };
1459 UINT Value;
1460 };
1461} D3DDDI_EVICT_FLAGS;
1462
1463typedef struct D3DDDI_TRIMRESIDENCYSET_FLAGS
1464{
1465 union
1466 {
1467 struct
1468 {
1469 UINT PeriodicTrim : 1; // When PeriodicTrim flag is set, the driver is required to performed the following operations:
1470 // a) trim all allocations that were not referenced since the previous periodic trim request
1471 // by comparing the allocation last referenced fence with the last periodic trim context fence
1472 // b) Refresh the last periodic trim context fence with the last completed context fence.
1473 UINT RestartPeriodicTrim : 1; // May not be set together with PeriodicTrim flag.
1474 // Reset the last periodic trim context fence to the last completed context fence.
1475 UINT TrimToBudget : 1; // Indicates that the application usage is over the memory budget,
1476 // and NumBytesToTrim bytes should be trimmed to fit in the new memory budget.
1477 UINT Reserved : 29;
1478 };
1479 UINT Value;
1480 };
1481} D3DDDI_TRIMRESIDENCYSET_FLAGS;
1482
1483typedef struct _D3DDDIGPUVIRTUALADDRESS_PROTECTION_TYPE
1484{
1485 union
1486 {
1487 struct
1488 {
1489 UINT64 Write : 1;
1490 UINT64 Execute : 1;
1491 UINT64 Zero : 1;
1492 UINT64 NoAccess : 1;
1493 UINT64 SystemUseOnly : 1; // Should not be set by the UMD
1494 UINT64 Reserved : 59;
1495 };
1496 D3DKMT_ALIGN64 UINT64 Value;
1497 };
1498} D3DDDIGPUVIRTUALADDRESS_PROTECTION_TYPE;
1499
1500typedef enum _D3DDDI_UPDATEGPUVIRTUALADDRESS_OPERATION_TYPE
1501{
1502 D3DDDI_UPDATEGPUVIRTUALADDRESS_MAP = 0,
1503 D3DDDI_UPDATEGPUVIRTUALADDRESS_UNMAP = 1,
1504 D3DDDI_UPDATEGPUVIRTUALADDRESS_COPY = 2,
1505 D3DDDI_UPDATEGPUVIRTUALADDRESS_MAP_PROTECT = 3,
1506} D3DDDI_UPDATEGPUVIRTUALADDRESS_OPERATION_TYPE;
1507
1508typedef struct _D3DDDI_UPDATEGPUVIRTUALADDRESS_OPERATION
1509{
1510 D3DDDI_UPDATEGPUVIRTUALADDRESS_OPERATION_TYPE OperationType;
1511 union
1512 {
1513 struct
1514 {
1515 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS BaseAddress;
1516 D3DKMT_ALIGN64 D3DGPU_SIZE_T SizeInBytes;
1517 D3DKMT_HANDLE hAllocation;
1518 D3DKMT_ALIGN64 D3DGPU_SIZE_T AllocationOffsetInBytes;
1519 D3DKMT_ALIGN64 D3DGPU_SIZE_T AllocationSizeInBytes;
1520 } Map;
1521 struct
1522 {
1523 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS BaseAddress;
1524 D3DKMT_ALIGN64 D3DGPU_SIZE_T SizeInBytes;
1525 D3DKMT_HANDLE hAllocation;
1526 D3DKMT_ALIGN64 D3DGPU_SIZE_T AllocationOffsetInBytes;
1527 D3DKMT_ALIGN64 D3DGPU_SIZE_T AllocationSizeInBytes;
1528 D3DDDIGPUVIRTUALADDRESS_PROTECTION_TYPE Protection;
1529 D3DKMT_ALIGN64 UINT64 DriverProtection;
1530 } MapProtect;
1531 struct
1532 {
1533 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS BaseAddress;
1534 D3DKMT_ALIGN64 D3DGPU_SIZE_T SizeInBytes;
1535 D3DDDIGPUVIRTUALADDRESS_PROTECTION_TYPE Protection;
1536 } Unmap; // Used for UNMAP_NOACCESS as well
1537 struct
1538 {
1540 D3DKMT_ALIGN64 D3DGPU_SIZE_T SizeInBytes;
1541 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS DestAddress;
1542 } Copy;
1543 };
1544} D3DDDI_UPDATEGPUVIRTUALADDRESS_OPERATION;
1545
1546typedef enum _D3DDDIGPUVIRTUALADDRESS_RESERVATION_TYPE
1547{
1548 D3DDDIGPUVIRTUALADDRESS_RESERVE_NO_ACCESS = 0,
1549 D3DDDIGPUVIRTUALADDRESS_RESERVE_ZERO = 1,
1550 D3DDDIGPUVIRTUALADDRESS_RESERVE_NO_COMMIT = 2 // Reserved for system use
1551} D3DDDIGPUVIRTUALADDRESS_RESERVATION_TYPE;
1552
1553typedef struct D3DDDI_MAPGPUVIRTUALADDRESS
1554{
1555 D3DKMT_HANDLE hPagingQueue; // in: Paging queue to synchronize the operation on.
1556 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS BaseAddress; // in_opt: Base virtual address to map
1557 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS MinimumAddress; // in_opt: Minimum virtual address
1558 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS MaximumAddress; // in_opt: Maximum virtual address
1559 D3DKMT_HANDLE hAllocation; // in: Allocation handle to map
1560 D3DKMT_ALIGN64 D3DGPU_SIZE_T OffsetInPages; // in: Offset in 4 KB pages from the start of the allocation
1561 D3DKMT_ALIGN64 D3DGPU_SIZE_T SizeInPages; // in: Size in 4 KB pages to map
1562 D3DDDIGPUVIRTUALADDRESS_PROTECTION_TYPE Protection; // in: Virtual address protection
1563 D3DKMT_ALIGN64 UINT64 DriverProtection; // in: Driver specific protection
1564 UINT Reserved0; // in:
1565 D3DKMT_ALIGN64 UINT64 Reserved1; // in:
1566 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS VirtualAddress; // out: Virtual address
1567 D3DKMT_ALIGN64 UINT64 PagingFenceValue; // out: Paging fence Id for synchronization
1568} D3DDDI_MAPGPUVIRTUALADDRESS;
1569
1570typedef struct D3DDDI_RESERVEGPUVIRTUALADDRESS
1571{
1572 union
1573 {
1574 D3DKMT_HANDLE hPagingQueue; // in: Paging queue to synchronize the operation on.
1575 D3DKMT_HANDLE hAdapter; // in: DXG adapter handle. (M2)
1576 };
1577 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS BaseAddress; // in_opt: Base virtual address to map
1578 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS MinimumAddress; // in_opt: Minimum virtual address
1579 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS MaximumAddress; // in_opt: Maximum virtual address
1580 D3DKMT_ALIGN64 D3DGPU_SIZE_T Size; // in: Size to reserve in bytes
1581 union
1582 {
1583 D3DDDIGPUVIRTUALADDRESS_RESERVATION_TYPE ReservationType; // in: Reservation type
1584 UINT Reserved0; // M2
1585 };
1586 union
1587 {
1588 D3DKMT_ALIGN64 UINT64 DriverProtection;// in: Driver specific protection
1589 D3DKMT_ALIGN64 UINT64 Reserved1; // M2
1590 };
1591 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS VirtualAddress; // out: Virtual address
1592 union
1593 {
1594 D3DKMT_ALIGN64 UINT64 PagingFenceValue;// out: Paging fence Id for synchronization
1595 D3DKMT_ALIGN64 UINT64 Reserved2; // M2
1596 };
1597} D3DDDI_RESERVEGPUVIRTUALADDRESS;
1598
1599typedef struct _D3DDDI_GETRESOURCEPRESENTPRIVATEDRIVERDATA
1600{
1601 D3DKMT_HANDLE hResource;
1602 UINT PrivateDriverDataSize;
1603 D3DKMT_PTR(PVOID, pPrivateDriverData);
1604} D3DDDI_GETRESOURCEPRESENTPRIVATEDRIVERDATA;
1605
1606typedef struct D3DDDI_DESTROYPAGINGQUEUE
1607{
1608 D3DKMT_HANDLE hPagingQueue; // in: handle to the paging queue to destroy
1609} D3DDDI_DESTROYPAGINGQUEUE;
1610
1611#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0)
1612
1613#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_1) || \
1614 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_1_1))
1615
1616typedef struct D3DDDI_UPDATEALLOCPROPERTY_FLAGS
1617{
1618 union
1619 {
1620 struct
1621 {
1622 UINT AccessedPhysically : 1; // The new value for AccessedPhysically on an allocation
1623 UINT Unmoveable : 1; // Indicates an allocation cannot be moved while pinned in a memory segment
1624 UINT Reserved : 30;
1625 };
1626 UINT Value;
1627 };
1628} D3DDDI_UPDATEALLOCPROPERTY_FLAGS;
1629
1630typedef struct D3DDDI_UPDATEALLOCPROPERTY
1631{
1632 D3DKMT_HANDLE hPagingQueue; // [in] Handle to the paging queue used to synchronize paging operations for this call.
1633 D3DKMT_HANDLE hAllocation; // [in] Handle to the allocation to be updated.
1634 UINT SupportedSegmentSet; // [in] New supported segment set, ignored if the same.
1635 D3DDDI_SEGMENTPREFERENCE PreferredSegment; // [in] New preferred segment set, ignored if the same.
1636 D3DDDI_UPDATEALLOCPROPERTY_FLAGS Flags; // [in] Flags to set on the allocation, ignored if the same.
1637 D3DKMT_ALIGN64 UINT64 PagingFenceValue; // [out] Paging fence value to synchronize on before using the above allocation.
1638 // This value applies to the monitored fence synchronization
1639 // object associated with hPagingQueue.
1640 union
1641 {
1642 struct
1643 {
1644 UINT SetAccessedPhysically : 1; // [in] When set to 1, will set AccessedPhysically to new value
1645 UINT SetSupportedSegmentSet : 1; // [in] When set to 1, will set SupportedSegmentSet to new value
1646 UINT SetPreferredSegment : 1; // [in] When set to 1, will set PreferredSegment to new value
1647 UINT SetUnmoveable : 1; // [in] When set to 1, will set Unmoveable to new value
1648 UINT Reserved : 28;
1649 };
1650 UINT PropertyMaskValue;
1651 };
1652} D3DDDI_UPDATEALLOCPROPERTY;
1653
1654#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_1)
1655
1656#if(D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_1_1)
1657
1658typedef struct D3DDDI_OFFER_FLAGS
1659{
1660 union
1661 {
1662 struct
1663 {
1664 UINT AllowDecommit : 1;
1665 UINT Reserved : 31;
1666 };
1667 UINT Value;
1668 };
1669} D3DDDI_OFFER_FLAGS;
1670
1671#endif // (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_1_1)
1672
1673#if(DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_1 || \
1674 D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_1)
1675
1676typedef enum _D3DDDI_RECLAIM_RESULT
1677{
1678 D3DDDI_RECLAIM_RESULT_OK = 0,
1679 D3DDDI_RECLAIM_RESULT_DISCARDED = 1,
1680 D3DDDI_RECLAIM_RESULT_NOT_COMMITTED = 2,
1681} D3DDDI_RECLAIM_RESULT;
1682
1683#endif
1684
1686{
1687 D3DDDI_SYNCHRONIZATIONOBJECT_TYPE Type; // in: Type of synchronization object to create.
1688 union
1689 {
1690 struct
1691 {
1692 BOOL InitialState; // in: Initial state of a synchronization mutex.
1694
1695 struct
1696 {
1697 UINT MaxCount; // in: Max count of the semaphore.
1698 UINT InitialCount; // in: Initial count of the semaphore.
1699 } Semaphore;
1700
1701
1702 struct
1703 {
1704 UINT Reserved[16]; // Reserved for future use.
1705 } Reserved;
1706 };
1708
1709#ifndef D3DDDI_SYNCHRONIZATIONOBJECT_FLAGS_EXT
1710#define D3DDDI_SYNCHRONIZATIONOBJECT_FLAGS_EXT
1711#define D3DDDI_SYNCHRONIZATIONOBJECT_FLAGS_RESERVED0 Reserved0
1712#endif
1713
1715{
1716 union
1717 {
1718 struct
1719 {
1720 UINT Shared : 1;
1722#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3) || \
1723 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM1_3)) // M1
1724
1725 UINT CrossAdapter : 1;
1726
1727#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) || \
1728 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_0))
1729
1730 // When set, the sync object is signaled as soon as the contents of command buffers preceding it
1731 // is entirely copied to the GPU pipeline, but not necessarily completed execution.
1732 // This flag can be set in order to start reusing command buffers as soon as possible.
1733 UINT TopOfPipeline : 1;
1734
1735 // When set, the device this sync object is created or opened on
1736 // can only submit wait commands for it.
1737 UINT NoSignal : 1;
1738
1739 // When set, the device this sync object is created or opened on
1740 // can only submit signal commands for it. This flag cannot be set
1741 // simultaneously with NoSignal.
1742 UINT NoWait : 1;
1743
1744 // When set, instructs the GPU scheduler to bypass signaling of the monitored fence
1745 // to the maximum value when the device is affected by the GPU reset.
1747
1748 // When set, the fence will not be mapped into the GPU virtual address space.
1749 // Only packet-based signal/wait operations are supported
1750 // When this is set, the fence is always stored as a 64-bit value (regardless of adapter caps)
1751 UINT NoGPUAccess : 1;
1752
1753#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM3_0)
1754 // When set, the fence can be signaled by KMD.
1755 // The flag can be used only with D3DDDI_CPU_NOTIFICATION objects.
1756 UINT SignalByKmd : 1;
1757 UINT Reserved : 22;
1758#else
1759 UINT Reserved : 23;
1760#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM3_0)
1761
1762#else
1763 UINT Reserved : 28;
1764#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0)
1765
1766#else
1767 UINT Reserved : 29;
1768#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3)
1770 };
1771 UINT Value;
1772 };
1774
1776{
1777 D3DDDI_SYNCHRONIZATIONOBJECT_TYPE Type; // in: Type of synchronization object to create.
1779 union
1780 {
1781 struct
1782 {
1783 BOOL InitialState; // in: Initial state of a synchronization mutex.
1785
1786 struct
1787 {
1788 UINT MaxCount; // in: Max count of the semaphore.
1789 UINT InitialCount; // in: Initial count of the semaphore.
1790 } Semaphore;
1791
1792 struct
1793 {
1794 D3DKMT_ALIGN64 UINT64 FenceValue; // in: inital fence value.
1795 } Fence;
1796
1797 struct
1798 {
1799 D3DKMT_PTR(HANDLE, Event); // in: Handle to the event
1801
1802#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) || \
1803 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_0))
1804 struct
1805 {
1806 D3DKMT_ALIGN64 UINT64 InitialFenceValue; // in: inital fence value.
1807 D3DKMT_PTR(VOID*, FenceValueCPUVirtualAddress); // out: Read-only mapping of the fence value for the CPU
1808 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS FenceValueGPUVirtualAddress; // out: Read/write mapping of the fence value for the GPU
1809 UINT EngineAffinity; // in: Defines physical adapters where the GPU VA will be mapped
1810 UINT Padding;
1812#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0)
1813
1814#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2) || \
1815 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_2))
1816 struct
1817 {
1818 D3DKMT_HANDLE hAdapter; // in: A handle to the adapter associated with VidPnTargetId
1819 D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId; // in: The output that the compositor wishes to receive notifications for
1820 D3DKMT_ALIGN64 UINT64 Time; // in: Represents an offset before the VSync.
1821 // The Time value may not be longer than a VSync interval. In units of 100ns.
1822 D3DKMT_PTR(VOID*, FenceValueCPUVirtualAddress); // out: Read-only mapping of the fence value for the CPU
1823 D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS FenceValueGPUVirtualAddress; // out: Read-only mapping of the fence value for the GPU
1824 UINT EngineAffinity; // in: Defines physical adapters where the GPU VA will be mapped
1825 UINT Padding;
1827#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2)
1828
1829
1830 struct
1831 {
1832 D3DKMT_ALIGN64 UINT64 Reserved[8]; // Reserved for future use.
1833 } Reserved;
1834 };
1835
1836 D3DKMT_HANDLE SharedHandle; // out: global shared handle (when requested to be shared)
1837
1839
1840#if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) || \
1841 (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_0))
1842
1843typedef struct _D3DDDI_WAITFORSYNCHRONIZATIONOBJECTFROMCPU_FLAGS
1844{
1845 union
1846 {
1847 struct
1848 {
1849 UINT WaitAny : 1; // when waiting for multiple objects, signal the wait event if any
1850 // of the wait array conditions is satisfied as opposed to all conditions.
1851 UINT Reserved : 31;
1852 };
1853 UINT Value;
1854 };
1855} D3DDDI_WAITFORSYNCHRONIZATIONOBJECTFROMCPU_FLAGS;
1856
1857#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0)
1858
1859#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_4)
1860
1861typedef struct _D3DDDI_QUERYREGISTRY_FLAGS
1862{
1863 union
1864 {
1865 struct
1866 {
1867 UINT TranslatePath : 1;
1868 UINT MutableValue : 1;
1869 UINT Reserved : 30;
1870 };
1871 UINT Value;
1872 };
1873} D3DDDI_QUERYREGISTRY_FLAGS;
1874
1875typedef enum _D3DDDI_QUERYREGISTRY_TYPE
1876{
1877 D3DDDI_QUERYREGISTRY_SERVICEKEY = 0,
1878 D3DDDI_QUERYREGISTRY_ADAPTERKEY = 1,
1879 D3DDDI_QUERYREGISTRY_DRIVERSTOREPATH = 2,
1880 D3DDDI_QUERYREGISTRY_DRIVERIMAGEPATH = 3,
1881 D3DDDI_QUERYREGISTRY_MAX,
1882} D3DDDI_QUERYREGISTRY_TYPE;
1883
1884typedef enum _D3DDDI_QUERYREGISTRY_STATUS
1885{
1886 D3DDDI_QUERYREGISTRY_STATUS_SUCCESS = 0,
1887 D3DDDI_QUERYREGISTRY_STATUS_BUFFER_OVERFLOW = 1,
1888 D3DDDI_QUERYREGISTRY_STATUS_FAIL = 2,
1889 D3DDDI_QUERYREGISTRY_STATUS_MAX,
1890} D3DDDI_QUERYREGISTRY_STATUS;
1891
1892//
1893// Output data value follows this structure.
1894// PrivateDriverSize must be sizeof(D3DDDI_QUERYREGISTRY_INFO) + (size of the the key value in bytes)
1895//
1896typedef struct _D3DDDI_QUERYREGISTRY_INFO
1897{
1898 D3DDDI_QUERYREGISTRY_TYPE QueryType; // In
1899 D3DDDI_QUERYREGISTRY_FLAGS QueryFlags; // In
1900 WCHAR ValueName[MAX_PATH]; // In
1901 ULONG ValueType; // In
1902 ULONG PhysicalAdapterIndex; // In
1903 ULONG OutputValueSize; // Out. Number of bytes written to the output value or required in case of D3DDDI_QUERYREGISTRY_STATUS_BUFFER_OVERFLOW.
1904 D3DDDI_QUERYREGISTRY_STATUS Status; // Out
1905 union {
1906 DWORD OutputDword; // Out
1907 D3DKMT_ALIGN64 UINT64 OutputQword; // Out
1908 WCHAR OutputString[1]; // Out. Dynamic array
1909 BYTE OutputBinary[1]; // Out. Dynamic array
1910 };
1911 } D3DDDI_QUERYREGISTRY_INFO;
1912
1913#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_4)
1914
1915//
1916// Defines the maximum number of context a particular command buffer can
1917// be broadcast to.
1918//
1919#define D3DDDI_MAX_BROADCAST_CONTEXT 64
1920
1921//
1922// Allocation priorities.
1923//
1924#define D3DDDI_ALLOCATIONPRIORITY_MINIMUM 0x28000000
1925#define D3DDDI_ALLOCATIONPRIORITY_LOW 0x50000000
1926#define D3DDDI_ALLOCATIONPRIORITY_NORMAL 0x78000000
1927#define D3DDDI_ALLOCATIONPRIORITY_HIGH 0xa0000000
1928#define D3DDDI_ALLOCATIONPRIORITY_MAXIMUM 0xc8000000
1929
1930#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3)
1931
1932// Cross adapter resource pitch alignment in bytes.
1933// Must be power of 2.
1934//
1935#define D3DKMT_CROSS_ADAPTER_RESOURCE_PITCH_ALIGNMENT 128
1936
1937// Cross adapter resource height alignment in rows.
1938//
1939#define D3DKMT_CROSS_ADAPTER_RESOURCE_HEIGHT_ALIGNMENT 4
1940
1941#endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3)
1942
1943#endif // (NTDDI_VERSION >= NTDDI_LONGHORN) || defined(D3DKMDT_SPECIAL_MULTIPLATFORM_TOOL)
1944
1945#pragma warning(pop)
1946
1947
1948#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
1949#pragma endregion
1950
1951#endif /* _D3DUKMDT_H_ */
1952
static _Out_opt_ PULONGLONG _Out_opt_ PULONGLONG MinimumAddress
static _Out_opt_ PULONGLONG _Out_opt_ PULONGLONG _Out_opt_ PULONGLONG MaximumAddress
Type
Definition: Type.h:7
unsigned short UINT16
Definition: actypes.h:129
COMPILER_DEPENDENT_UINT64 UINT64
Definition: actypes.h:131
static INT Execute(LPTSTR Full, LPTSTR First, LPTSTR Rest, PARSED_COMMAND *Cmd)
Definition: cmd.c:345
Definition: Header.h:9
Definition: bufpool.h:50
_Check_return_ _In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ PDXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS _Out_ UINT _Out_ UINT * Height
Definition: dispmprt.h:1445
_In_ ULONG _In_ MEMORY_CACHING_TYPE _Out_ PPHYSICAL_ADDRESS _Out_ PVOID * VirtualAddress
Definition: dispmprt.h:716
_Check_return_ _In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ PDXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS _Out_ UINT * Width
Definition: dispmprt.h:1444
_Check_return_ _In_ ULONG VidPnSourceId
Definition: dispmprt.h:1205
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ ULONG _In_ ULONG Flags
Definition: dispmprt.h:245
#define MAX_PATH
Definition: compat.h:34
VOID Copy(PVOID Src, PVOID Dst, ULONG NumBytes)
Definition: mmixer.c:126
#define MAKEFOURCC(ch0, ch1, ch2, ch3)
Definition: ddsformat.c:45
IN PVCB IN VBO IN ULONG OUT PBCB OUT PVOID IN BOOLEAN IN BOOLEAN Zero
Definition: fatprocs.h:419
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
localAdvHdr Flags2
Definition: fsrtlfuncs.h:1692
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
Status
Definition: gdiplustypes.h:24
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLdouble GLdouble right
Definition: glext.h:10859
GLint left
Definition: glext.h:7726
GLint GLint bottom
Definition: glext.h:7726
unsigned int UINT
Definition: sysinfo.c:13
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:384
UNICODE_STRING Volume
Definition: fltkernel.h:1172
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize _Pre_valid_ PVOID * BaseAddress
Definition: mmfuncs.h:408
#define _Field_size_(s)
Definition: no_sal2.h:332
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
@ WaitAny
_Must_inspect_result_ _In_ KTMOBJECT_TYPE QueryType
Definition: nttmapi.h:404
#define CONST
Definition: pedump.c:81
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
@ Reserved2
Definition: sacdrv.h:1470
@ Reserved1
Definition: sacdrv.h:1464
@ ReadOnly
Definition: arc.h:89
UINT DXGK_SIGNAL_FLAG_INTERNAL0
Definition: d3dkmthk.h:802
D3DGPU_VIRTUAL_ADDRESS GpuVirtualAddress
Definition: d3dkmthk.h:1098
union _D3DDDI_ALLOCATIONINFO2::@4320 Flags
D3DKMT_HANDLE hAllocation
Definition: d3dkmthk.h:1078
D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId
Definition: d3dkmthk.h:1086
union _D3DDDI_ALLOCATIONINFO::@4315 Flags
D3DKMT_HANDLE hAllocation
Definition: d3dkmthk.h:1059
D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId
Definition: d3dkmthk.h:1063
const void * pSystemMem
Definition: d3dkmthk.h:1060
D3DKMT_HANDLE hAllocation
Definition: d3dkmthk.h:50
D3DGPU_VIRTUAL_ADDRESS GpuVirtualAddress
Definition: d3dkmthk.h:1199
const void * pPrivateDriverData
Definition: d3dkmthk.h:1197
D3DKMT_HANDLE hAllocation
Definition: d3dkmthk.h:1196
D3DKMT_HANDLE hAllocation
Definition: d3dkmthk.h:1189
const void * pPrivateDriverData
Definition: d3dkmthk.h:1190
struct _D3DDDI_SYNCHRONIZATIONOBJECTINFO2::@4297::@4304 PeriodicMonitoredFence
struct _D3DDDI_SYNCHRONIZATIONOBJECTINFO2::@4297::@4299 SynchronizationMutex
D3DDDI_VIDEO_PRESENT_TARGET_ID VidPnTargetId
Definition: d3dkmthk.h:960
D3DDDI_SYNCHRONIZATIONOBJECT_TYPE Type
Definition: d3dkmthk.h:929
D3DGPU_VIRTUAL_ADDRESS FenceValueGPUVirtualAddress
Definition: d3dkmthk.h:954
struct _D3DDDI_SYNCHRONIZATIONOBJECTINFO2::@4297::@4300 Semaphore
struct _D3DDDI_SYNCHRONIZATIONOBJECTINFO2::@4297::@4303 MonitoredFence
D3DDDI_SYNCHRONIZATIONOBJECT_FLAGS Flags
Definition: d3dkmthk.h:930
struct _D3DDDI_SYNCHRONIZATIONOBJECTINFO2::@4297::@4301 Fence
struct _D3DDDI_SYNCHRONIZATIONOBJECTINFO2::@4297::@4302 CPUNotification
struct _D3DDDI_SYNCHRONIZATIONOBJECTINFO::@4292::@4295 Semaphore
D3DDDI_SYNCHRONIZATIONOBJECT_TYPE Type
Definition: d3dkmthk.h:901
struct _D3DDDI_SYNCHRONIZATIONOBJECTINFO::@4292::@4294 SynchronizationMutex
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint64_t ULONGLONG
Definition: typedefs.h:67
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
static BOOL Write(PBYTE Address, PBYTE Data, SIZE_T Size)
Definition: vmhorizon.c:15
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ WDF_DEVICE_POWER_STATE PowerState
Definition: wdfdevice.h:3040
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG _Out_opt_ PULONG _Out_opt_ PULONG ValueType
Definition: wdfregistry.h:282
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING ValueName
Definition: wdfregistry.h:243
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
struct _D3DDDI_ESCAPEFLAGS D3DDDI_ESCAPEFLAGS
_D3DDDIFORMAT
Definition: d3dukmdt.h:31
@ D3DDDIFMT_A8R3G3B2
Definition: d3dukmdt.h:42
@ D3DDDIFMT_A8R8G8B8
Definition: d3dukmdt.h:34
@ D3DDDIFMT_DXVA_RESERVED28
Definition: d3dukmdt.h:122
@ D3DDDIFMT_X4S4D24
Definition: d3dukmdt.h:70
@ D3DDDIFMT_A2B10G10R10_XR_BIAS
Definition: d3dukmdt.h:92
@ D3DDDIFMT_G16R16
Definition: d3dukmdt.h:47
@ D3DDDIFMT_Q16W16V16U16
Definition: d3dukmdt.h:83
@ D3DDDIFMT_DXVA_RESERVED24
Definition: d3dukmdt.h:118
@ D3DDDIFMT_G16R16F
Definition: d3dukmdt.h:85
@ D3DDDIFMT_V8U8
Definition: d3dukmdt.h:55
@ D3DDDIFMT_S1D15
Definition: d3dukmdt.h:64
@ D3DDDIFMT_DXVA_RESERVED14
Definition: d3dukmdt.h:108
@ D3DDDIFMT_A8P8
Definition: d3dukmdt.h:50
@ D3DDDIFMT_L8
Definition: d3dukmdt.h:52
@ D3DDDIFMT_VERTEXDATA
Definition: d3dukmdt.h:80
@ D3DDDIFMT_R16F
Definition: d3dukmdt.h:84
@ D3DDDIFMT_S8D24
Definition: d3dukmdt.h:66
@ D3DDDIFMT_BINARYBUFFER
Definition: d3dukmdt.h:127
@ D3DDDIFMT_D32
Definition: d3dukmdt.h:63
@ D3DDDIFMT_DXT2
Definition: d3dukmdt.h:129
@ D3DDDIFMT_DXVA_RESERVED18
Definition: d3dukmdt.h:112
@ D3DDDIFMT_DXVA_RESERVED19
Definition: d3dukmdt.h:113
@ D3DDDIFMT_A8
Definition: d3dukmdt.h:41
@ D3DDDIFMT_P8
Definition: d3dukmdt.h:51
@ D3DDDIFMT_BITSTREAMDATA
Definition: d3dukmdt.h:100
@ D3DDDIFMT_A16B16G16R16
Definition: d3dukmdt.h:49
@ D3DDDIFMT_A8B8G8R8
Definition: d3dukmdt.h:45
@ D3DDDIFMT_A2R10G10B10
Definition: d3dukmdt.h:48
@ D3DDDIFMT_DXVA_RESERVED20
Definition: d3dukmdt.h:114
@ D3DDDIFMT_G8R8_G8B8
Definition: d3dukmdt.h:133
@ D3DDDIFMT_R5G6B5
Definition: d3dukmdt.h:36
@ D3DDDIFMT_R8G8B8
Definition: d3dukmdt.h:33
@ D3DDDIFMT_INDEX32
Definition: d3dukmdt.h:82
@ D3DDDIFMT_DXVA_RESERVED16
Definition: d3dukmdt.h:110
@ D3DDDIFMT_A2W10V10U10
Definition: d3dukmdt.h:61
@ D3DDDIFMT_L6V5U5
Definition: d3dukmdt.h:56
@ D3DDDIFMT_D32F_LOCKABLE
Definition: d3dukmdt.h:74
@ D3DDDIFMT_A8L8
Definition: d3dukmdt.h:53
@ D3DDDIFMT_DXVA_RESERVED25
Definition: d3dukmdt.h:119
@ D3DDDIFMT_DXT3
Definition: d3dukmdt.h:130
@ D3DDDIFMT_DXVA_RESERVED27
Definition: d3dukmdt.h:121
@ D3DDDIFMT_SLICECONTROLDATA
Definition: d3dukmdt.h:99
@ D3DDDIFMT_DXT4
Definition: d3dukmdt.h:131
@ D3DDDIFMT_G32R32F
Definition: d3dukmdt.h:88
@ D3DDDIFMT_UYVY
Definition: d3dukmdt.h:136
@ D3DDDIFMT_YUY2
Definition: d3dukmdt.h:137
@ D3DDDIFMT_DEBLOCKINGDATA
Definition: d3dukmdt.h:97
@ D3DDDIFMT_DXVA_RESERVED21
Definition: d3dukmdt.h:115
@ D3DDDIFMT_FORCE_UINT
Definition: d3dukmdt.h:138
@ D3DDDIFMT_R32F
Definition: d3dukmdt.h:87
@ D3DDDIFMT_DXVA_RESERVED13
Definition: d3dukmdt.h:107
@ D3DDDIFMT_R3G3B2
Definition: d3dukmdt.h:40
@ D3DDDIFMT_D24X8
Definition: d3dukmdt.h:69
@ D3DDDIFMT_DXVA_RESERVED10
Definition: d3dukmdt.h:104
@ D3DDDIFMT_V16U16
Definition: d3dukmdt.h:59
@ D3DDDIFMT_DXVA_RESERVED12
Definition: d3dukmdt.h:106
@ D3DDDIFMT_A1
Definition: d3dukmdt.h:91
@ D3DDDIFMT_DXVA_RESERVED9
Definition: d3dukmdt.h:103
@ D3DDDIFMT_W11V11U10
Definition: d3dukmdt.h:60
@ D3DDDIFMT_A4R4G4B4
Definition: d3dukmdt.h:39
@ D3DDDIFMT_DXVA_RESERVED17
Definition: d3dukmdt.h:111
@ D3DDDIFMT_MOTIONVECTORBUFFER
Definition: d3dukmdt.h:101
@ D3DDDIFMT_MULTI2_ARGB8
Definition: d3dukmdt.h:134
@ D3DDDIFMT_G8R8
Definition: d3dukmdt.h:78
@ D3DDDIFMT_DXT5
Definition: d3dukmdt.h:132
@ D3DDDIFMT_A16B16G16R16F
Definition: d3dukmdt.h:86
@ D3DDDIFMT_CxV8U8
Definition: d3dukmdt.h:90
@ D3DDDIFMT_A32B32G32R32F
Definition: d3dukmdt.h:89
@ D3DDDIFMT_DXVA_RESERVED15
Definition: d3dukmdt.h:109
@ D3DDDIFMT_DXVA_RESERVED31
Definition: d3dukmdt.h:125
@ D3DDDIFMT_X4R4G4B4
Definition: d3dukmdt.h:43
@ D3DDDIFMT_DXVACOMPBUFFER_BASE
Definition: d3dukmdt.h:93
@ D3DDDIFMT_FILMGRAINBUFFER
Definition: d3dukmdt.h:102
@ D3DDDIFMT_X8B8G8R8
Definition: d3dukmdt.h:46
@ D3DDDIFMT_D15S1
Definition: d3dukmdt.h:65
@ D3DDDIFMT_MACROBLOCKDATA
Definition: d3dukmdt.h:95
@ D3DDDIFMT_DXVA_RESERVED23
Definition: d3dukmdt.h:117
@ D3DDDIFMT_RESIDUALDIFFERENCEDATA
Definition: d3dukmdt.h:96
@ D3DDDIFMT_DXVA_RESERVED30
Definition: d3dukmdt.h:124
@ D3DDDIFMT_R8
Definition: d3dukmdt.h:79
@ D3DDDIFMT_S8_LOCKABLE
Definition: d3dukmdt.h:77
@ D3DDDIFMT_DXVACOMPBUFFER_MAX
Definition: d3dukmdt.h:126
@ D3DDDIFMT_UNKNOWN
Definition: d3dukmdt.h:32
@ D3DDDIFMT_X8D24
Definition: d3dukmdt.h:68
@ D3DDDIFMT_X8L8V8U8
Definition: d3dukmdt.h:57
@ D3DDDIFMT_DXVA_RESERVED11
Definition: d3dukmdt.h:105
@ D3DDDIFMT_L16
Definition: d3dukmdt.h:73
@ D3DDDIFMT_A4L4
Definition: d3dukmdt.h:54
@ D3DDDIFMT_R8G8_B8G8
Definition: d3dukmdt.h:135
@ D3DDDIFMT_INDEX16
Definition: d3dukmdt.h:81
@ D3DDDIFMT_X8R8G8B8
Definition: d3dukmdt.h:35
@ D3DDDIFMT_A1R5G5B5
Definition: d3dukmdt.h:38
@ D3DDDIFMT_DXVA_RESERVED22
Definition: d3dukmdt.h:116
@ D3DDDIFMT_DXVA_RESERVED26
Definition: d3dukmdt.h:120
@ D3DDDIFMT_Q8W8V8U8
Definition: d3dukmdt.h:58
@ D3DDDIFMT_INVERSEQUANTIZATIONDATA
Definition: d3dukmdt.h:98
@ D3DDDIFMT_A2B10G10R10
Definition: d3dukmdt.h:44
@ D3DDDIFMT_X1R5G5B5
Definition: d3dukmdt.h:37
@ D3DDDIFMT_D24FS8
Definition: d3dukmdt.h:75
@ D3DDDIFMT_D24X4S4
Definition: d3dukmdt.h:71
@ D3DDDIFMT_D16
Definition: d3dukmdt.h:72
@ D3DDDIFMT_D16_LOCKABLE
Definition: d3dukmdt.h:62
@ D3DDDIFMT_D32_LOCKABLE
Definition: d3dukmdt.h:76
@ D3DDDIFMT_D24S8
Definition: d3dukmdt.h:67
@ D3DDDIFMT_DXT1
Definition: d3dukmdt.h:128
@ D3DDDIFMT_PICTUREPARAMSDATA
Definition: d3dukmdt.h:94
@ D3DDDIFMT_DXVA_RESERVED29
Definition: d3dukmdt.h:123
UINT D3DKMT_HANDLE
Definition: d3dukmdt.h:28
enum _D3DDDIFORMAT D3DDDIFORMAT
UINT D3DDDI_VIDEO_PRESENT_SOURCE_ID
Definition: d3dukmdt.h:141
struct _D3DDDI_OPENALLOCATIONINFO D3DDDI_OPENALLOCATIONINFO
struct _D3DDDI_ALLOCATIONLIST D3DDDI_ALLOCATIONLIST
ULONGLONG D3DGPU_VIRTUAL_ADDRESS
Definition: d3dkmthk.h:858
struct _D3DDDI_SYNCHRONIZATIONOBJECTINFO D3DDDI_SYNCHRONIZATIONOBJECTINFO
struct _D3DDDI_PATCHLOCATIONLIST D3DDDI_PATCHLOCATIONLIST
_D3DDDI_SYNCHRONIZATIONOBJECT_TYPE
Definition: d3dkmthk.h:889
@ D3DDDI_PERIODIC_MONITORED_FENCE
Definition: d3dkmthk.h:895
@ D3DDDI_CPU_NOTIFICATION
Definition: d3dkmthk.h:893
@ D3DDDI_FENCE
Definition: d3dkmthk.h:892
@ D3DDDI_SYNCHRONIZATION_TYPE_LIMIT
Definition: d3dkmthk.h:896
@ D3DDDI_MONITORED_FENCE
Definition: d3dkmthk.h:894
@ D3DDDI_SEMAPHORE
Definition: d3dkmthk.h:891
@ D3DDDI_SYNCHRONIZATION_MUTEX
Definition: d3dkmthk.h:890
struct _D3DDDI_ALLOCATIONINFO D3DDDI_ALLOCATIONINFO
struct _D3DDDICB_DESTROYALLOCATION2FLAGS D3DDDICB_DESTROYALLOCATION2FLAGS
struct _D3DDDI_SYNCHRONIZATIONOBJECT_FLAGS D3DDDI_SYNCHRONIZATIONOBJECT_FLAGS
struct _D3DDDI_OPENALLOCATIONINFO2 D3DDDI_OPENALLOCATIONINFO2
UINT D3DDDI_VIDEO_PRESENT_TARGET_ID
Definition: d3dkmthk.h:886
struct _D3DDDI_ALLOCATIONINFO2 D3DDDI_ALLOCATIONINFO2
enum _D3DDDI_SYNCHRONIZATIONOBJECT_TYPE D3DDDI_SYNCHRONIZATIONOBJECT_TYPE
struct _D3DDDI_SYNCHRONIZATIONOBJECTINFO2 D3DDDI_SYNCHRONIZATIONOBJECTINFO2
struct _D3DDDICB_SIGNALFLAGS D3DDDICB_SIGNALFLAGS
_In_ const BITMAPINFO _In_ UINT _In_opt_ HANDLE hSection
Definition: wingdi.h:3685
_Inout_ PVOID Segment
Definition: exfuncs.h:1101
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
Definition: exfuncs.h:819
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS SourceAddress
Definition: iotypes.h:1127
_Must_inspect_result_ _In_ SIZE_T _In_ PVOID PageAddress
Definition: mmfuncs.h:472
unsigned char BYTE
Definition: xxhash.c:193