Bumping manifests a=b2g-bump
[gecko.git] / gfx / thebes / d3dkmtQueryStatistics.h
blob76f34d5413a5e55e0ce6966cc1bdb0e6da94ebc8
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
16 ULONG Count;
17 ULONGLONG Bytes;
18 } D3DKMTQS_COUNTER;
20 typedef struct _D3DKMTQS_ADAPTER_INFO
22 ULONG NbSegments;
24 ULONG Filler[4];
25 ULONGLONG Filler2[2]; // Assumed sizeof(LONGLONG) = sizeof(ULONGLONG)
26 struct {
27 ULONG Filler[14];
28 } Filler_RDMAB;
29 struct {
30 ULONG Filler[9];
31 } Filler_R;
32 struct {
33 ULONG Filler[4];
34 D3DKMTQS_COUNTER Filler2;
35 } Filler_P;
36 struct {
37 D3DKMTQS_COUNTER Filler[16];
38 ULONG Filler2[2];
39 } Filler_PF;
40 struct {
41 ULONGLONG Filler[8];
42 } Filler_PT;
43 struct {
44 ULONG Filler[2];
45 } Filler_SR;
46 struct {
47 ULONG Filler[7];
48 } Filler_L;
49 struct {
50 D3DKMTQS_COUNTER Filler[7];
51 } Filler_A;
52 struct {
53 D3DKMTQS_COUNTER Filler[4];
54 } Filler_T;
55 ULONG64 Reserved[8];
56 } D3DKMTQS_ADAPTER_INFO;
58 typedef struct _D3DKMTQS_SEGMENT_INFO_WIN7
60 ULONG Filler[3];
61 struct {
62 ULONGLONG Filler;
63 ULONG Filler2[2];
64 } Filler_M;
66 ULONG Aperture;
68 ULONGLONG Filler3[5];
69 ULONG64 Filler4[8];
70 } D3DKMTQS_SEGMENT_INFO_WIN7;
72 typedef struct _D3DKMTQS_SEGMENT_INFO_WIN8
74 ULONGLONG Filler[3];
75 struct {
76 ULONGLONG Filler;
77 ULONG Filler2[2];
78 } Filler_M;
80 ULONG Aperture;
82 ULONGLONG Filler3[5];
83 ULONG64 Filler4[8];
84 } D3DKMTQS_SEGMENT_INFO_WIN8;
86 typedef struct _D3DKMTQS_SYSTEM_MEMORY
88 ULONGLONG BytesAllocated;
89 ULONG Filler[2];
90 ULONGLONG Filler2[7];
91 } D3DKMTQS_SYSTEM_MEMORY;
93 typedef struct _D3DKMTQS_PROCESS_INFO
95 ULONG Filler[2];
96 struct {
97 ULONGLONG BytesAllocated;
99 ULONG Filler[2];
100 ULONGLONG Filler2[7];
101 } SystemMemory;
102 ULONG64 Reserved[8];
103 } D3DKMTQS_PROCESS_INFO;
105 typedef struct _D3DKMTQS_PROCESS_SEGMENT_INFO
107 union {
108 struct {
109 ULONGLONG BytesCommitted;
110 } Win8;
111 struct {
112 ULONG BytesCommitted;
113 ULONG UnknownRandomness;
114 } Win7;
117 ULONGLONG Filler[2];
118 ULONG Filler2;
119 struct {
120 ULONG Filler;
121 D3DKMTQS_COUNTER Filler2[6];
122 ULONGLONG Filler3;
123 } Filler3;
124 struct {
125 ULONGLONG Filler;
126 } Filler4;
127 ULONG64 Reserved[8];
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,
136 } D3DKMTQS_TYPE;
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;
145 } D3DKMTQS_RESULT;
147 typedef struct _D3DKMTQS_QUERY_SEGMENT
149 ULONG SegmentId;
150 } D3DKMTQS_QUERY_SEGMENT;
152 typedef struct _D3DKMTQS
154 D3DKMTQS_TYPE Type;
155 LUID AdapterLuid;
156 HANDLE hProcess;
157 D3DKMTQS_RESULT QueryResult;
159 union
161 D3DKMTQS_QUERY_SEGMENT QuerySegment;
162 D3DKMTQS_QUERY_SEGMENT QueryProcessSegment;
164 } D3DKMTQS;
166 extern "C" {
167 typedef __checkReturn NTSTATUS (APIENTRY *PFND3DKMTQS)(const D3DKMTQS *);