dmime/tests: Remove some duplicated tests.
[wine.git] / include / ddk / d3dkmthk.h
blob69239a45fd9a00b127c0f554ea5eb2fdb674d8a1
1 /*
2 * Copyright 2016 Henri Verbeet 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
19 #ifndef __WINE_D3DKMTHK_H
20 #define __WINE_D3DKMTHK_H
22 #include <d3dukmdt.h>
24 typedef enum _D3DKMT_VIDPNSOURCEOWNER_TYPE
26 D3DKMT_VIDPNSOURCEOWNER_UNOWNED = 0,
27 D3DKMT_VIDPNSOURCEOWNER_SHARED = 1,
28 D3DKMT_VIDPNSOURCEOWNER_EXCLUSIVE = 2,
29 D3DKMT_VIDPNSOURCEOWNER_EXCLUSIVEGDI = 3,
30 D3DKMT_VIDPNSOURCEOWNER_EMULATED = 4
31 } D3DKMT_VIDPNSOURCEOWNER_TYPE;
33 typedef enum _D3DKMT_MEMORY_SEGMENT_GROUP
35 D3DKMT_MEMORY_SEGMENT_GROUP_LOCAL = 0,
36 D3DKMT_MEMORY_SEGMENT_GROUP_NON_LOCAL = 1
37 } D3DKMT_MEMORY_SEGMENT_GROUP;
39 typedef struct _D3DKMT_CREATEDEVICEFLAGS
41 UINT LegacyMode : 1;
42 UINT RequestVSync : 1;
43 UINT DisableGpuTimeout : 1;
44 UINT Reserved : 29;
45 } D3DKMT_CREATEDEVICEFLAGS;
47 typedef struct _D3DDDI_ALLOCATIONLIST
49 D3DKMT_HANDLE hAllocation;
50 union
52 struct
54 UINT WriteOperation : 1;
55 UINT DoNotRetireInstance : 1;
56 UINT OfferPriority : 3;
57 UINT Reserved : 27;
58 } DUMMYSTRUCTNAME;
59 UINT Value;
60 } DUMMYUNIONNAME;
61 } D3DDDI_ALLOCATIONLIST;
63 typedef struct _D3DDDI_PATCHLOCATIONLIST
65 UINT AllocationIndex;
66 union
68 struct
70 UINT SlotId : 24;
71 UINT Reserved : 8;
72 } DUMMYSTRUCTNAME;
73 UINT Value;
74 } DUMMYUNIONNAME;
75 UINT DriverId;
76 UINT AllocationOffset;
77 UINT PatchOffset;
78 UINT SplitOffset;
79 } D3DDDI_PATCHLOCATIONLIST;
81 typedef struct _D3DKMT_DESTROYDEVICE
83 D3DKMT_HANDLE hDevice;
84 } D3DKMT_DESTROYDEVICE;
86 typedef struct _D3DKMT_CHECKOCCLUSION
88 HWND hWnd;
89 } D3DKMT_CHECKOCCLUSION;
91 typedef struct _D3DKMT_CREATEDEVICE
93 union
95 D3DKMT_HANDLE hAdapter;
96 VOID *pAdapter;
97 } DUMMYUNIONNAME;
98 D3DKMT_CREATEDEVICEFLAGS Flags;
99 D3DKMT_HANDLE hDevice;
100 VOID *pCommandBuffer;
101 UINT CommandBufferSize;
102 D3DDDI_ALLOCATIONLIST *pAllocationList;
103 UINT AllocationListSize;
104 D3DDDI_PATCHLOCATIONLIST *pPatchLocationList;
105 UINT PatchLocationListSize;
106 } D3DKMT_CREATEDEVICE;
108 typedef struct _D3DKMT_OPENADAPTERFROMHDC
110 HDC hDc;
111 D3DKMT_HANDLE hAdapter;
112 LUID AdapterLuid;
113 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
114 } D3DKMT_OPENADAPTERFROMHDC;
116 typedef struct _D3DKMT_OPENADAPTERFROMDEVICENAME
118 const WCHAR *pDeviceName;
119 D3DKMT_HANDLE hAdapter;
120 LUID AdapterLuid;
121 } D3DKMT_OPENADAPTERFROMDEVICENAME;
123 typedef struct _D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME
125 WCHAR DeviceName[32];
126 D3DKMT_HANDLE hAdapter;
127 LUID AdapterLuid;
128 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
129 } D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME;
131 typedef struct _D3DKMT_OPENADAPTERFROMLUID
133 LUID AdapterLuid;
134 D3DKMT_HANDLE hAdapter;
135 } D3DKMT_OPENADAPTERFROMLUID;
137 typedef struct _D3DKMT_SETVIDPNSOURCEOWNER
139 D3DKMT_HANDLE hDevice;
140 const D3DKMT_VIDPNSOURCEOWNER_TYPE *pType;
141 const D3DDDI_VIDEO_PRESENT_SOURCE_ID *pVidPnSourceId;
142 UINT VidPnSourceCount;
143 } D3DKMT_SETVIDPNSOURCEOWNER;
145 typedef struct _D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP
147 D3DKMT_HANDLE hAdapter;
148 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
149 } D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP;
151 #define D3DKMT_QUERYSTATISTICS_SEGMENT_PREFERENCE_MAX 5
153 typedef struct _D3DKMT_CLOSEADAPTER
155 D3DKMT_HANDLE hAdapter;
156 } D3DKMT_CLOSEADAPTER;
158 typedef struct _D3DKMT_CREATEDCFROMMEMORY
160 void *pMemory;
161 D3DDDIFORMAT Format;
162 UINT Width;
163 UINT Height;
164 UINT Pitch;
165 HDC hDeviceDc;
166 PALETTEENTRY *pColorTable;
167 HDC hDc;
168 HANDLE hBitmap;
169 } D3DKMT_CREATEDCFROMMEMORY;
171 typedef struct _D3DKMT_DESTROYDCFROMMEMORY
173 HDC hDc;
174 HANDLE hBitmap;
175 } D3DKMT_DESTROYDCFROMMEMORY;
177 typedef enum _D3DKMT_QUERYRESULT_PREEMPTION_ATTEMPT_RESULT
179 D3DKMT_PreemptionAttempt = 0,
180 D3DKMT_PreemptionAttemptSuccess = 1,
181 D3DKMT_PreemptionAttemptMissNoCommand = 2,
182 D3DKMT_PreemptionAttemptMissNotEnabled = 3,
183 D3DKMT_PreemptionAttemptMissNextFence = 4,
184 D3DKMT_PreemptionAttemptMissPagingCommand = 5,
185 D3DKMT_PreemptionAttemptMissSplittedCommand = 6,
186 D3DKMT_PreemptionAttemptMissFenceCommand = 7,
187 D3DKMT_PreemptionAttemptMissRenderPendingFlip = 8,
188 D3DKMT_PreemptionAttemptMissNotMakingProgress = 9,
189 D3DKMT_PreemptionAttemptMissLessPriority = 10,
190 D3DKMT_PreemptionAttemptMissRemainingQuantum = 11,
191 D3DKMT_PreemptionAttemptMissRemainingPreemptionQuantum = 12,
192 D3DKMT_PreemptionAttemptMissAlreadyPreempting = 13,
193 D3DKMT_PreemptionAttemptMissGlobalBlock = 14,
194 D3DKMT_PreemptionAttemptMissAlreadyRunning = 15,
195 D3DKMT_PreemptionAttemptStatisticsMax
196 } D3DKMT_QUERYRESULT_PREEMPTION_ATTEMPT_RESULT;
198 typedef enum _D3DKMT_QUERYSTATISTICS_ALLOCATION_PRIORITY_CLASS
200 D3DKMT_AllocationPriorityClassMinimum,
201 D3DKMT_AllocationPriorityClassLow,
202 D3DKMT_AllocationPriorityClassNormal,
203 D3DKMT_AllocationPriorityClassHigh,
204 D3DKMT_AllocationPriorityClassMaximum,
205 D3DKMT_MaxAllocationPriorityClass
206 } D3DKMT_QUERYSTATISTICS_ALLOCATION_PRIORITY_CLASS;
208 typedef enum _D3DKMT_QUERYSTATISTICS_QUEUE_PACKET_TYPE
210 D3DKMT_RenderCommandBuffer,
211 D3DKMT_DeferredCommandBuffer,
212 D3DKMT_SystemCommandBuffer,
213 D3DKMT_MmIoFlipCommandBuffer,
214 D3DKMT_WaitCommandBuffer,
215 D3DKMT_SignalCommandBuffer,
216 D3DKMT_DeviceCommandBuffer,
217 D3DKMT_SoftwareCommandBuffer,
218 D3DKMT_QueuePacketTypeMax
219 } D3DKMT_QUERYSTATISTICS_QUEUE_PACKET_TYPE;
221 typedef enum _D3DKMT_QUERYSTATISTICS_DMA_PACKET_TYPE
223 D3DKMT_ClientRenderBuffer,
224 D3DKMT_ClientPagingBuffer,
225 D3DKMT_SystemPagingBuffer,
226 D3DKMT_SystemPreemptionBuffer,
227 D3DKMT_DmaPacketTypeMax
228 } D3DKMT_QUERYSTATISTICS_DMA_PACKET_TYPE;
230 typedef struct _D3DKMT_QUERYSTATSTICS_PAGING_TRANSFER
232 ULONGLONG BytesFilled;
233 ULONGLONG BytesDiscarded;
234 ULONGLONG BytesMappedIntoAperture;
235 ULONGLONG BytesUnmappedFromAperture;
236 ULONGLONG BytesTransferredFromMdlToMemory;
237 ULONGLONG BytesTransferredFromMemoryToMdl;
238 ULONGLONG BytesTransferredFromApertureToMemory;
239 ULONGLONG BytesTransferredFromMemoryToAperture;
240 } D3DKMT_QUERYSTATSTICS_PAGING_TRANSFER;
242 typedef struct _D3DKMT_QUERYSTATISTICS_COMMITMENT_DATA
244 ULONG64 TotalBytesEvictedFromProcess;
245 ULONG64 BytesBySegmentPreference[D3DKMT_QUERYSTATISTICS_SEGMENT_PREFERENCE_MAX];
246 } D3DKMT_QUERYSTATISTICS_COMMITMENT_DATA;
248 typedef struct _D3DKMT_QUERYSTATSTICS_SWIZZLING_RANGE
250 ULONG NbRangesAcquired;
251 ULONG NbRangesReleased;
252 } D3DKMT_QUERYSTATSTICS_SWIZZLING_RANGE;
254 typedef struct _D3DKMT_QUERYSTATISTICS_COUNTER
256 ULONG Count;
257 ULONGLONG Bytes;
258 } D3DKMT_QUERYSTATISTICS_COUNTER;
260 typedef struct _D3DKMT_QUERYSTATISTICS_DMA_BUFFER
262 D3DKMT_QUERYSTATISTICS_COUNTER Size;
263 ULONG AllocationListBytes;
264 ULONG PatchLocationListBytes;
265 } D3DKMT_QUERYSTATISTICS_DMA_BUFFER;
267 typedef struct _D3DKMT_QUERYSTATSTICS_LOCKS
269 ULONG NbLocks;
270 ULONG NbLocksWaitFlag;
271 ULONG NbLocksDiscardFlag;
272 ULONG NbLocksNoOverwrite;
273 ULONG NbLocksNoReadSync;
274 ULONG NbLocksLinearization;
275 ULONG NbComplexLocks;
276 } D3DKMT_QUERYSTATSTICS_LOCKS;
278 typedef struct _D3DKMT_QUERYSTATSTICS_ALLOCATIONS
280 D3DKMT_QUERYSTATISTICS_COUNTER Created;
281 D3DKMT_QUERYSTATISTICS_COUNTER Destroyed;
282 D3DKMT_QUERYSTATISTICS_COUNTER Opened;
283 D3DKMT_QUERYSTATISTICS_COUNTER Closed;
284 D3DKMT_QUERYSTATISTICS_COUNTER MigratedSuccess;
285 D3DKMT_QUERYSTATISTICS_COUNTER MigratedFail;
286 D3DKMT_QUERYSTATISTICS_COUNTER MigratedAbandoned;
287 } D3DKMT_QUERYSTATSTICS_ALLOCATIONS;
289 typedef struct _D3DKMT_QUERYSTATSTICS_TERMINATIONS
291 D3DKMT_QUERYSTATISTICS_COUNTER TerminatedShared;
292 D3DKMT_QUERYSTATISTICS_COUNTER TerminatedNonShared;
293 D3DKMT_QUERYSTATISTICS_COUNTER DestroyedShared;
294 D3DKMT_QUERYSTATISTICS_COUNTER DestroyedNonShared;
295 } D3DKMT_QUERYSTATSTICS_TERMINATIONS;
297 typedef struct _D3DKMT_QUERYSTATISTICS_QUERY_NODE
299 ULONG NodeId;
300 } D3DKMT_QUERYSTATISTICS_QUERY_NODE;
302 typedef struct _D3DKMT_QUERYSTATISTICS_QUERY_SEGMENT
304 ULONG SegmentId;
305 } D3DKMT_QUERYSTATISTICS_QUERY_SEGMENT;
307 typedef struct _D3DKMT_QUERYSTATISTICS_PREEMPTION_INFORMATION
309 ULONG PreemptionCounter[D3DKMT_PreemptionAttemptStatisticsMax];
310 } D3DKMT_QUERYSTATISTICS_PREEMPTION_INFORMATION;
312 typedef struct _D3DKMT_QUERYSTATISTICS_QUERY_VIDPNSOURCE
314 ULONG VidPnSourceId;
315 } D3DKMT_QUERYSTATISTICS_QUERY_VIDPNSOURCE;
317 typedef struct _D3DKMT_QUERYSTATISTICS_QUEUE_PACKET_TYPE_INFORMATION
319 ULONG PacketSubmited;
320 ULONG PacketCompleted;
321 } D3DKMT_QUERYSTATISTICS_QUEUE_PACKET_TYPE_INFORMATION;
323 typedef struct _D3DKMT_QUERYSTATISTICS_DMA_PACKET_TYPE_INFORMATION
325 ULONG PacketSubmited;
326 ULONG PacketCompleted;
327 ULONG PacketPreempted;
328 ULONG PacketFaulted;
329 } D3DKMT_QUERYSTATISTICS_DMA_PACKET_TYPE_INFORMATION;
331 typedef struct _D3DKMT_QUERYSTATISTICS_SYSTEM_MEMORY
333 ULONGLONG BytesAllocated;
334 ULONGLONG BytesReserved;
335 ULONG SmallAllocationBlocks;
336 ULONG LargeAllocationBlocks;
337 ULONGLONG WriteCombinedBytesAllocated;
338 ULONGLONG WriteCombinedBytesReserved;
339 ULONGLONG CachedBytesAllocated;
340 ULONGLONG CachedBytesReserved;
341 ULONGLONG SectionBytesAllocated;
342 ULONGLONG SectionBytesReserved;
343 } D3DKMT_QUERYSTATISTICS_SYSTEM_MEMORY;
345 typedef enum _D3DKMT_QUERYSTATISTICS_TYPE
347 D3DKMT_QUERYSTATISTICS_ADAPTER,
348 D3DKMT_QUERYSTATISTICS_PROCESS,
349 D3DKMT_QUERYSTATISTICS_PROCESS_ADAPTER,
350 D3DKMT_QUERYSTATISTICS_SEGMENT,
351 D3DKMT_QUERYSTATISTICS_PROCESS_SEGMENT,
352 D3DKMT_QUERYSTATISTICS_NODE,
353 D3DKMT_QUERYSTATISTICS_PROCESS_NODE,
354 D3DKMT_QUERYSTATISTICS_VIDPNSOURCE,
355 D3DKMT_QUERYSTATISTICS_PROCESS_VIDPNSOURCE
356 } D3DKMT_QUERYSTATISTICS_TYPE;
358 typedef struct _D3DKMT_QUERYSTATSTICS_PAGING_FAULT
360 D3DKMT_QUERYSTATISTICS_COUNTER Faults;
361 D3DKMT_QUERYSTATISTICS_COUNTER FaultsFirstTimeAccess;
362 D3DKMT_QUERYSTATISTICS_COUNTER FaultsReclaimed;
363 D3DKMT_QUERYSTATISTICS_COUNTER FaultsMigration;
364 D3DKMT_QUERYSTATISTICS_COUNTER FaultsIncorrectResource;
365 D3DKMT_QUERYSTATISTICS_COUNTER FaultsLostContent;
366 D3DKMT_QUERYSTATISTICS_COUNTER FaultsEvicted;
367 D3DKMT_QUERYSTATISTICS_COUNTER AllocationsMEM_RESET;
368 D3DKMT_QUERYSTATISTICS_COUNTER AllocationsUnresetSuccess;
369 D3DKMT_QUERYSTATISTICS_COUNTER AllocationsUnresetFail;
370 ULONG AllocationsUnresetSuccessRead;
371 ULONG AllocationsUnresetFailRead;
372 D3DKMT_QUERYSTATISTICS_COUNTER Evictions;
373 D3DKMT_QUERYSTATISTICS_COUNTER EvictionsDueToPreparation;
374 D3DKMT_QUERYSTATISTICS_COUNTER EvictionsDueToLock;
375 D3DKMT_QUERYSTATISTICS_COUNTER EvictionsDueToClose;
376 D3DKMT_QUERYSTATISTICS_COUNTER EvictionsDueToPurge;
377 D3DKMT_QUERYSTATISTICS_COUNTER EvictionsDueToSuspendCPUAccess;
378 } D3DKMT_QUERYSTATSTICS_PAGING_FAULT;
380 typedef struct _D3DKMT_QUERYSTATSTICS_REFERENCE_DMA_BUFFER
382 ULONG NbCall;
383 ULONG NbAllocationsReferenced;
384 ULONG MaxNbAllocationsReferenced;
385 ULONG NbNULLReference;
386 ULONG NbWriteReference;
387 ULONG NbRenamedAllocationsReferenced;
388 ULONG NbIterationSearchingRenamedAllocation;
389 ULONG NbLockedAllocationReferenced;
390 ULONG NbAllocationWithValidPrepatchingInfoReferenced;
391 ULONG NbAllocationWithInvalidPrepatchingInfoReferenced;
392 ULONG NbDMABufferSuccessfullyPrePatched;
393 ULONG NbPrimariesReferencesOverflow;
394 ULONG NbAllocationWithNonPreferredResources;
395 ULONG NbAllocationInsertedInMigrationTable;
396 } D3DKMT_QUERYSTATSTICS_REFERENCE_DMA_BUFFER;
398 typedef struct _D3DKMT_QUERYSTATSTICS_RENAMING
400 ULONG NbAllocationsRenamed;
401 ULONG NbAllocationsShrinked;
402 ULONG NbRenamedBuffer;
403 ULONG MaxRenamingListLength;
404 ULONG NbFailuresDueToRenamingLimit;
405 ULONG NbFailuresDueToCreateAllocation;
406 ULONG NbFailuresDueToOpenAllocation;
407 ULONG NbFailuresDueToLowResource;
408 ULONG NbFailuresDueToNonRetiredLimit;
409 } D3DKMT_QUERYSTATSTICS_RENAMING;
411 typedef struct _D3DKMT_QUERYSTATSTICS_PREPRATION
413 ULONG BroadcastStall;
414 ULONG NbDMAPrepared;
415 ULONG NbDMAPreparedLongPath;
416 ULONG ImmediateHighestPreparationPass;
417 D3DKMT_QUERYSTATISTICS_COUNTER AllocationsTrimmed;
418 } D3DKMT_QUERYSTATSTICS_PREPRATION;
420 typedef struct _D3DKMT_QUERYSTATISTICS_MEMORY
422 ULONGLONG TotalBytesEvicted;
423 ULONG AllocsCommitted;
424 ULONG AllocsResident;
425 } D3DKMT_QUERYSTATISTICS_MEMORY;
427 typedef struct _D3DKMT_QUERYSTATISTICS_PROCESS_VIDPNSOURCE_INFORMATION
429 ULONG Frame;
430 ULONG CancelledFrame;
431 ULONG QueuedPresent;
432 ULONG64 Reserved[8];
433 } D3DKMT_QUERYSTATISTICS_PROCESS_VIDPNSOURCE_INFORMATION;
435 typedef struct _D3DKMT_QUERYSTATISTICS_PACKET_INFORMATION
437 D3DKMT_QUERYSTATISTICS_QUEUE_PACKET_TYPE_INFORMATION QueuePacket[D3DKMT_QueuePacketTypeMax];
438 D3DKMT_QUERYSTATISTICS_DMA_PACKET_TYPE_INFORMATION DmaPacket[D3DKMT_DmaPacketTypeMax];
439 } D3DKMT_QUERYSTATISTICS_PACKET_INFORMATION;
441 typedef struct _D3DKMT_QUERYSTATISTICS_PROCESS_NODE_INFORMATION
443 LARGE_INTEGER RunningTime;
444 ULONG ContextSwitch;
445 D3DKMT_QUERYSTATISTICS_PREEMPTION_INFORMATION PreemptionStatistics;
446 D3DKMT_QUERYSTATISTICS_PACKET_INFORMATION PacketStatistics;
447 ULONG64 Reserved[8];
448 } D3DKMT_QUERYSTATISTICS_PROCESS_NODE_INFORMATION;
450 typedef struct _D3DKMT_QUERYSTATISTICS_NODE_INFORMATION
452 D3DKMT_QUERYSTATISTICS_PROCESS_NODE_INFORMATION GlobalInformation;
453 D3DKMT_QUERYSTATISTICS_PROCESS_NODE_INFORMATION SystemInformation;
454 ULONG64 Reserved[8];
455 } D3DKMT_QUERYSTATISTICS_NODE_INFORMATION;
457 typedef struct _D3DKMT_QUERYSTATISTICS_VIDPNSOURCE_INFORMATION
459 D3DKMT_QUERYSTATISTICS_PROCESS_VIDPNSOURCE_INFORMATION GlobalInformation;
460 D3DKMT_QUERYSTATISTICS_PROCESS_VIDPNSOURCE_INFORMATION SystemInformation;
461 ULONG64 Reserved[8];
462 } D3DKMT_QUERYSTATISTICS_VIDPNSOURCE_INFORMATION;
464 typedef struct _D3DKMT_QUERYSTATISTICS_ADAPTER_INFORMATION
466 ULONG NbSegments;
467 ULONG NodeCount;
468 ULONG VidPnSourceCount;
469 ULONG VSyncEnabled;
470 ULONG TdrDetectedCount;
471 LONGLONG ZeroLengthDmaBuffers;
472 ULONGLONG RestartedPeriod;
473 D3DKMT_QUERYSTATSTICS_REFERENCE_DMA_BUFFER ReferenceDmaBuffer;
474 D3DKMT_QUERYSTATSTICS_RENAMING Renaming;
475 D3DKMT_QUERYSTATSTICS_PREPRATION Preparation;
476 D3DKMT_QUERYSTATSTICS_PAGING_FAULT PagingFault;
477 D3DKMT_QUERYSTATSTICS_PAGING_TRANSFER PagingTransfer;
478 D3DKMT_QUERYSTATSTICS_SWIZZLING_RANGE SwizzlingRange;
479 D3DKMT_QUERYSTATSTICS_LOCKS Locks;
480 D3DKMT_QUERYSTATSTICS_ALLOCATIONS Allocations;
481 D3DKMT_QUERYSTATSTICS_TERMINATIONS Terminations;
482 ULONG64 Reserved[8];
483 } D3DKMT_QUERYSTATISTICS_ADAPTER_INFORMATION;
485 typedef struct _D3DKMT_QUERYSTATISTICS_POLICY
487 ULONGLONG PreferApertureForRead[D3DKMT_MaxAllocationPriorityClass];
488 ULONGLONG PreferAperture[D3DKMT_MaxAllocationPriorityClass];
489 ULONGLONG MemResetOnPaging;
490 ULONGLONG RemovePagesFromWorkingSetOnPaging;
491 ULONGLONG MigrationEnabled;
492 } D3DKMT_QUERYSTATISTICS_POLICY;
494 typedef struct _D3DKMT_QUERYSTATISTICS_PROCESS_ADAPTER_INFORMATION
496 ULONG NbSegments;
497 ULONG NodeCount;
498 ULONG VidPnSourceCount;
499 ULONG VirtualMemoryUsage;
500 D3DKMT_QUERYSTATISTICS_DMA_BUFFER DmaBuffer;
501 D3DKMT_QUERYSTATISTICS_COMMITMENT_DATA CommitmentData;
502 D3DKMT_QUERYSTATISTICS_POLICY _Policy;
503 ULONG64 Reserved[8];
504 } D3DKMT_QUERYSTATISTICS_PROCESS_ADAPTER_INFORMATION;
506 typedef struct _D3DKMT_QUERYSTATISTICS_VIDEO_MEMORY
508 ULONG AllocsCommitted;
509 D3DKMT_QUERYSTATISTICS_COUNTER AllocsResidentInP[D3DKMT_QUERYSTATISTICS_SEGMENT_PREFERENCE_MAX];
510 D3DKMT_QUERYSTATISTICS_COUNTER AllocsResidentInNonPreferred;
511 ULONGLONG TotalBytesEvictedDueToPreparation;
512 } D3DKMT_QUERYSTATISTICS_VIDEO_MEMORY;
514 typedef struct _D3DKMT_QUERYSTATISTICS_PROCESS_SEGMENT_POLICY
516 ULONGLONG UseMRU;
517 } D3DKMT_QUERYSTATISTICS_PROCESS_SEGMENT_POLICY;
519 typedef struct _D3DKMT_QUERYSTATISTICS_PROCESS_SEGMENT_INFORMATION
521 ULONGLONG BytesCommitted;
522 ULONGLONG MaximumWorkingSet;
523 ULONGLONG MinimumWorkingSet;
525 ULONG NbReferencedAllocationEvictedInPeriod;
527 D3DKMT_QUERYSTATISTICS_VIDEO_MEMORY VideoMemory;
528 D3DKMT_QUERYSTATISTICS_PROCESS_SEGMENT_POLICY _Policy;
530 ULONG64 Reserved[8];
531 } D3DKMT_QUERYSTATISTICS_PROCESS_SEGMENT_INFORMATION;
533 typedef struct _D3DKMT_QUERYSTATISTICS_PROCESS_INFORMATION
535 ULONG NodeCount;
536 ULONG VidPnSourceCount;
537 D3DKMT_QUERYSTATISTICS_SYSTEM_MEMORY SystemMemory;
538 ULONG64 Reserved[8];
539 } D3DKMT_QUERYSTATISTICS_PROCESS_INFORMATION;
541 typedef struct _D3DKMT_QUERYSTATISTICS_SEGMENT_INFORMATION
543 ULONGLONG CommitLimit;
544 ULONGLONG BytesCommitted;
545 ULONGLONG BytesResident;
546 D3DKMT_QUERYSTATISTICS_MEMORY Memory;
547 ULONG Aperture;
548 ULONGLONG TotalBytesEvictedByPriority[D3DKMT_MaxAllocationPriorityClass];
549 ULONG64 SystemMemoryEndAddress;
550 struct
552 ULONG64 PreservedDuringStandby : 1;
553 ULONG64 PreservedDuringHibernate : 1;
554 ULONG64 PartiallyPreservedDuringHibernate : 1;
555 ULONG64 Reserved : 61;
556 } PowerFlags;
557 ULONG64 Reserved[6];
558 } D3DKMT_QUERYSTATISTICS_SEGMENT_INFORMATION;
560 typedef struct _D3DKMT_QUERYSTATISTICS_SEGMENT_INFORMATION_V1
562 ULONG CommitLimit;
563 ULONG BytesCommitted;
564 ULONG BytesResident;
565 D3DKMT_QUERYSTATISTICS_MEMORY Memory;
566 ULONG Aperture;
567 ULONGLONG TotalBytesEvictedByPriority[D3DKMT_MaxAllocationPriorityClass];
568 ULONG64 SystemMemoryEndAddress;
569 struct
571 ULONG64 PreservedDuringStandby : 1;
572 ULONG64 PreservedDuringHibernate : 1;
573 ULONG64 PartiallyPreservedDuringHibernate : 1;
574 ULONG64 Reserved : 61;
575 } PowerFlags;
577 ULONG64 Reserved[7];
578 } D3DKMT_QUERYSTATISTICS_SEGMENT_INFORMATION_V1;
580 typedef union _D3DKMT_QUERYSTATISTICS_RESULT
582 D3DKMT_QUERYSTATISTICS_ADAPTER_INFORMATION AdapterInformation;
583 D3DKMT_QUERYSTATISTICS_SEGMENT_INFORMATION_V1 SegmentInformationV1;
584 D3DKMT_QUERYSTATISTICS_SEGMENT_INFORMATION SegmentInformation;
585 D3DKMT_QUERYSTATISTICS_NODE_INFORMATION NodeInformation;
586 D3DKMT_QUERYSTATISTICS_VIDPNSOURCE_INFORMATION VidPnSourceInformation;
587 D3DKMT_QUERYSTATISTICS_PROCESS_INFORMATION ProcessInformation;
588 D3DKMT_QUERYSTATISTICS_PROCESS_ADAPTER_INFORMATION ProcessAdapterInformation;
589 D3DKMT_QUERYSTATISTICS_PROCESS_SEGMENT_INFORMATION ProcessSegmentInformation;
590 D3DKMT_QUERYSTATISTICS_PROCESS_NODE_INFORMATION ProcessNodeInformation;
591 D3DKMT_QUERYSTATISTICS_PROCESS_VIDPNSOURCE_INFORMATION ProcessVidPnSourceInformation;
592 } D3DKMT_QUERYSTATISTICS_RESULT;
594 typedef struct _D3DKMT_QUERYSTATISTICS
596 D3DKMT_QUERYSTATISTICS_TYPE Type;
597 LUID AdapterLuid;
598 HANDLE hProcess;
599 D3DKMT_QUERYSTATISTICS_RESULT QueryResult;
601 union
603 D3DKMT_QUERYSTATISTICS_QUERY_SEGMENT QuerySegment;
604 D3DKMT_QUERYSTATISTICS_QUERY_SEGMENT QueryProcessSegment;
605 D3DKMT_QUERYSTATISTICS_QUERY_NODE QueryNode;
606 D3DKMT_QUERYSTATISTICS_QUERY_NODE QueryProcessNode;
607 D3DKMT_QUERYSTATISTICS_QUERY_VIDPNSOURCE QueryVidPnSource;
608 D3DKMT_QUERYSTATISTICS_QUERY_VIDPNSOURCE QueryProcessVidPnSource;
609 } DUMMYUNIONNAME;
610 } D3DKMT_QUERYSTATISTICS;
612 typedef struct _D3DKMT_QUERYVIDEOMEMORYINFO
614 HANDLE hProcess;
615 D3DKMT_HANDLE hAdapter;
616 D3DKMT_MEMORY_SEGMENT_GROUP MemorySegmentGroup;
617 UINT64 Budget;
618 UINT64 CurrentUsage;
619 UINT64 CurrentReservation;
620 UINT64 AvailableForReservation;
621 UINT PhysicalAdapterIndex;
622 } D3DKMT_QUERYVIDEOMEMORYINFO;
624 typedef enum _D3DKMT_QUEUEDLIMIT_TYPE
626 D3DKMT_SET_QUEUEDLIMIT_PRESENT = 1,
627 D3DKMT_GET_QUEUEDLIMIT_PRESENT
628 } D3DKMT_QUEUEDLIMIT_TYPE;
630 typedef struct _D3DKMT_SETQUEUEDLIMIT
632 D3DKMT_HANDLE hDevice;
633 D3DKMT_QUEUEDLIMIT_TYPE Type;
634 union
636 UINT QueuedPresentLimit;
637 struct
639 D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId;
640 UINT QueuedPendingFlipLimit;
641 } DUMMYSTRUCTNAME;
642 } DUMMYUNIONNAME;
643 } D3DKMT_SETQUEUEDLIMIT;
645 typedef enum _D3DKMT_ESCAPETYPE
647 D3DKMT_ESCAPE_DRIVERPRIVATE,
648 D3DKMT_ESCAPE_VIDMM,
649 D3DKMT_ESCAPE_TDRDBGCTRL,
650 D3DKMT_ESCAPE_VIDSCH,
651 D3DKMT_ESCAPE_DEVICE,
652 D3DKMT_ESCAPE_DMM,
653 D3DKMT_ESCAPE_DEBUG_SNAPSHOT,
654 D3DKMT_ESCAPE_SETDRIVERUPDATESTATUS,
655 D3DKMT_ESCAPE_DRT_TEST,
656 D3DKMT_ESCAPE_DIAGNOSTICS,
657 } D3DKMT_ESCAPETYPE;
659 typedef struct _D3DKMT_ESCAPE
661 D3DKMT_HANDLE hAdapter;
662 D3DKMT_HANDLE hDevice;
663 D3DKMT_ESCAPETYPE Type;
664 D3DDDI_ESCAPEFLAGS Flags;
665 void *pPrivateDriverData;
666 UINT PrivateDriverDataSize;
667 D3DKMT_HANDLE hContext;
668 } D3DKMT_ESCAPE;
670 typedef struct _D3DKMT_ADAPTERINFO
672 D3DKMT_HANDLE hAdapter;
673 LUID AdapterLuid;
674 ULONG NumOfSources;
675 BOOL bPrecisePresentRegionsPreferred;
676 } D3DKMT_ADAPTERINFO;
678 typedef struct _D3DKMT_ENUMADAPTERS2
680 ULONG NumAdapters;
681 D3DKMT_ADAPTERINFO *pAdapters;
682 } D3DKMT_ENUMADAPTERS2;
684 #ifdef __cplusplus
685 extern "C"
687 #endif /* __cplusplus */
689 NTSTATUS WINAPI D3DKMTCheckVidPnExclusiveOwnership(const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc);
690 NTSTATUS WINAPI D3DKMTCloseAdapter(const D3DKMT_CLOSEADAPTER *desc);
691 NTSTATUS WINAPI D3DKMTCreateDevice(D3DKMT_CREATEDEVICE *desc);
692 NTSTATUS WINAPI D3DKMTCreateDCFromMemory(D3DKMT_CREATEDCFROMMEMORY *desc);
693 NTSTATUS WINAPI D3DKMTDestroyDCFromMemory(const D3DKMT_DESTROYDCFROMMEMORY *desc);
694 NTSTATUS WINAPI D3DKMTDestroyDevice(const D3DKMT_DESTROYDEVICE *desc);
695 NTSTATUS WINAPI D3DKMTEscape( const D3DKMT_ESCAPE *desc );
696 NTSTATUS WINAPI D3DKMTOpenAdapterFromGdiDisplayName(D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME *desc);
697 NTSTATUS WINAPI D3DKMTOpenAdapterFromHdc( D3DKMT_OPENADAPTERFROMHDC *desc );
698 NTSTATUS WINAPI D3DKMTOpenAdapterFromLuid( D3DKMT_OPENADAPTERFROMLUID * desc );
699 NTSTATUS WINAPI D3DKMTQueryStatistics(D3DKMT_QUERYSTATISTICS *stats);
700 NTSTATUS WINAPI D3DKMTQueryVideoMemoryInfo(D3DKMT_QUERYVIDEOMEMORYINFO *desc);
701 NTSTATUS WINAPI D3DKMTSetQueuedLimit(D3DKMT_SETQUEUEDLIMIT *desc);
702 NTSTATUS WINAPI D3DKMTSetVidPnSourceOwner(const D3DKMT_SETVIDPNSOURCEOWNER *desc);
704 #ifdef __cplusplus
706 #endif /* __cplusplus */
708 #endif /* __WINE_D3DKMTHK_H */