1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 /* This file is based on a header file that was briefly seen in the
6 * Windows 8 RC SDK. The work for this file itself was based on the one in ProcessHacker at
7 * http://processhacker.svn.sourceforge.net/viewvc/processhacker/2.x/trunk/plugins/ExtendedTools/d3dkmt.h?revision=4758&view=markup
8 * For more details see Mozilla Bug 689870.
9 * [Bug 917496 indicates that some of these structs may not match reality, and
10 * therefore should not be trusted. See the reference to bug 917496 in
11 * gfxWindowsPlatform.cpp.]
14 typedef struct _D3DKMTQS_COUNTER
20 typedef struct _D3DKMTQS_ADAPTER_INFO
25 ULONGLONG Filler2
[2]; // Assumed sizeof(LONGLONG) = sizeof(ULONGLONG)
34 D3DKMTQS_COUNTER Filler2
;
37 D3DKMTQS_COUNTER Filler
[16];
50 D3DKMTQS_COUNTER Filler
[7];
53 D3DKMTQS_COUNTER Filler
[4];
56 } D3DKMTQS_ADAPTER_INFO
;
58 typedef struct _D3DKMTQS_SEGMENT_INFO_WIN7
70 } D3DKMTQS_SEGMENT_INFO_WIN7
;
72 typedef struct _D3DKMTQS_SEGMENT_INFO_WIN8
84 } D3DKMTQS_SEGMENT_INFO_WIN8
;
86 typedef struct _D3DKMTQS_SYSTEM_MEMORY
88 ULONGLONG BytesAllocated
;
91 } D3DKMTQS_SYSTEM_MEMORY
;
93 typedef struct _D3DKMTQS_PROCESS_INFO
97 ULONGLONG BytesAllocated
;
100 ULONGLONG Filler2
[7];
103 } D3DKMTQS_PROCESS_INFO
;
105 typedef struct _D3DKMTQS_PROCESS_SEGMENT_INFO
109 ULONGLONG BytesCommitted
;
112 ULONG BytesCommitted
;
113 ULONG UnknownRandomness
;
121 D3DKMTQS_COUNTER Filler2
[6];
128 } D3DKMTQS_PROCESS_SEGMENT_INFO
;
130 typedef enum _D3DKMTQS_TYPE
132 D3DKMTQS_ADAPTER
= 0,
133 D3DKMTQS_PROCESS
= 1,
134 D3DKMTQS_SEGMENT
= 3,
135 D3DKMTQS_PROCESS_SEGMENT
= 4,
138 typedef union _D3DKMTQS_RESULT
140 D3DKMTQS_ADAPTER_INFO AdapterInfo
;
141 D3DKMTQS_SEGMENT_INFO_WIN7 SegmentInfoWin7
;
142 D3DKMTQS_SEGMENT_INFO_WIN8 SegmentInfoWin8
;
143 D3DKMTQS_PROCESS_INFO ProcessInfo
;
144 D3DKMTQS_PROCESS_SEGMENT_INFO ProcessSegmentInfo
;
147 typedef struct _D3DKMTQS_QUERY_SEGMENT
150 } D3DKMTQS_QUERY_SEGMENT
;
152 typedef struct _D3DKMTQS
157 D3DKMTQS_RESULT QueryResult
;
161 D3DKMTQS_QUERY_SEGMENT QuerySegment
;
162 D3DKMTQS_QUERY_SEGMENT QueryProcessSegment
;
167 typedef __checkReturn
NTSTATUS (APIENTRY
*PFND3DKMTQS
)(const D3DKMTQS
*);