1 /* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*-
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
8 * http://processhacker.svn.sourceforge.net/viewvc/processhacker/2.x/trunk/plugins/ExtendedTools/d3dkmt.h?revision=4758&view=markup
9 * For more details see Mozilla Bug 689870.
10 * [Bug 917496 indicates that some of these structs may not match reality, and
11 * therefore should not be trusted. See the reference to bug 917496 in
12 * gfxWindowsPlatform.cpp.]
15 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
{
69 } D3DKMTQS_SEGMENT_INFO
;
71 typedef struct _D3DKMTQS_SYSTEM_MEMORY
{
72 ULONGLONG BytesAllocated
;
75 } D3DKMTQS_SYSTEM_MEMORY
;
77 typedef struct _D3DKMTQS_PROCESS_INFO
{
80 ULONGLONG BytesAllocated
;
86 } D3DKMTQS_PROCESS_INFO
;
88 typedef struct _D3DKMTQS_PROCESS_SEGMENT_INFO
{
89 ULONGLONG BytesCommitted
;
94 D3DKMTQS_COUNTER Filler2
[6];
101 } D3DKMTQS_PROCESS_SEGMENT_INFO
;
103 typedef struct _D3DKMTQS_PROCESS_NODE_INFO
{
104 LARGE_INTEGER RunningTime
; // 100ns
106 ULONG PreemptionStatistics
[16];
107 ULONG PacketStatistics
[32];
109 } D3DKMTQS_PROCESS_NODE_INFO
;
111 typedef enum _D3DKMTQS_TYPE
{
112 D3DKMTQS_ADAPTER
= 0,
113 D3DKMTQS_PROCESS
= 1,
114 D3DKMTQS_SEGMENT
= 3,
115 D3DKMTQS_PROCESS_SEGMENT
= 4,
116 D3DKMTQS_PROCESS_NODE
= 6,
119 typedef union _D3DKMTQS_RESULT
{
120 D3DKMTQS_ADAPTER_INFO AdapterInfo
;
121 D3DKMTQS_SEGMENT_INFO SegmentInfo
;
122 D3DKMTQS_PROCESS_INFO ProcessInfo
;
123 D3DKMTQS_PROCESS_SEGMENT_INFO ProcessSegmentInfo
;
124 D3DKMTQS_PROCESS_NODE_INFO ProcessNodeInformation
;
127 typedef struct _D3DKMTQS_QUERY_SEGMENT
{
129 } D3DKMTQS_QUERY_SEGMENT
;
131 typedef struct _D3DKMTQS_QUERY_NODE
{
133 } D3DKMTQS_QUERY_NODE
;
135 typedef struct _D3DKMTQS
{
139 D3DKMTQS_RESULT QueryResult
;
142 D3DKMTQS_QUERY_SEGMENT QuerySegment
;
143 D3DKMTQS_QUERY_SEGMENT QueryProcessSegment
;
144 D3DKMTQS_QUERY_NODE QueryProcessNode
;
149 typedef __checkReturn
NTSTATUS(APIENTRY
* PFND3DKMTQS
)(const D3DKMTQS
*);