1 /*
2  * Copyright � 2014 Intel Corporation
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sub license, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice (including the
13  * next paragraph) shall be included in all copies or substantial portions
14  * of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19  * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  *
24  * Authors:
25  *     Wei Lin<wei.w.lin@intel.com>
26  *     Yuting Yang<yuting.yang@intel.com>
27  */
28 
29 #ifndef __HWCMD__
30 #define __HWCMD__
31 
32 #include "oscl_platform_def.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 	typedef enum {
39 		MI_BUFFER_MEMORY_MAIN = 0,
40 		MI_BUFFER_MEMORY_LOCAL = 1,
41 		MI_BUFFER_MEMORY_GTT = 2
42 	} _MI_BUFFER_MEMORY_SPACE;
43 
44 	typedef enum {
45 		MI_BUFFER_SECURE = 0,
46 		MI_BUFFER_NONSECURE = 1
47 	} _MI_BUFFER_SECURITY_TYPE;
48 
49 #ifndef SIZE16
50 #define SIZE16( x )         ((DWORD)( sizeof(x) / sizeof(WORD) ))
51 #endif
52 
53 #ifndef SIZE32
54 #define SIZE32( x )         ((DWORD)( sizeof(x) / sizeof(DWORD) ))
55 #endif
56 
57 #ifndef OP_LENGTH
58 #define OP_LENGTH( x )      ((DWORD)(x) - 2 )
59 #endif
60 
61 #define SIZE_IN_DW(x) ((x) / sizeof(DWORD))
62 
63 #ifndef BITFIELD_RANGE
64 #define BITFIELD_RANGE( startbit, endbit )     ((endbit)-(startbit)+1)
65 #endif
66 
67 #ifndef BITFIELD_BIT
68 #define BITFIELD_BIT( bit )                   1
69 #endif
70 
71 	enum INSTRUCTION_PIPELINE {
72 		PIPE_COMMON = 0x0,
73 		PIPE_SINGLE_DWORD = 0x1,
74 		PIPE_COMMON_CTG = 0x1,
75 		PIPE_MEDIA = 0x2,
76 		PIPE_3D = 0x3
77 	};
78 
79 	enum GFX_OPCODE {
80 		GFXOP_PIPELINED = 0x0,
81 		GFXOP_NONPIPELINED = 0x1,
82 		GFXOP_3DPRIMITIVE = 0x3
83 	};
84 
85 	enum GFX3D_OPCODE {
86 		GFX3DOP_3DSTATE_PIPELINED = 0x0,
87 		GFX3DOP_3DSTATE_NONPIPELINED = 0x1,
88 		GFX3DOP_3DCONTROL = 0x2,
89 		GFX3DOP_3DPRIMITIVE = 0x3
90 	};
91 
92 	enum GFX_MEDIA_OPCODE {
93 		MEDIAOP_MEDIA_STATE_POINTERS = 0,
94 		MEDIAOP_MEDIA_OBJECT = 1,
95 	};
96 
97 	enum GFX_MEDIA_SUBOPCODE {
98 		MEDIASUBOP_MEDIA_OBJECT = 0,
99 		MEDIASUBOP_MEDIA_OBJECT_EX = 1
100 	};
101 
102 	enum GFX_NONPIPELINED_SUBOPCODE {
103 		GFXSUBOP_STATE_BASE_ADDRESS = 0x1,
104 		GFXSUBOP_STATE_SIP = 0x2,
105 		GFXSUBOP_STATE_PREFETCH = 0x3,
106 		GFXSUBOP_PIPELINE_SELECT = 0x4
107 	};
108 
109 	enum GFX3DCONTROL_SUBOPCODE {
110 		GFX3DSUBOP_3DCONTROL = 0x00
111 	};
112 
113 	typedef enum _INSTRUCTION_TYPE {
114 		INSTRUCTION_MI = 0x0,
115 		INSTRUCTION_TRUSTED = 0x1,
116 		INSTRUCTION_2D = 0x2,
117 		INSTRUCTION_GFX = 0x3
118 	} INSTRUCTION_TYPE;
119 
120 	enum GFX_COMMON_PIPELINED_SUBOPCODE {
121 		GFXSUBOP_URB_FENCE = 0x0,
122 		GFXSUBOP_CS_URB_STATE = 0x1,
123 		GFXSUBOP_CONSTANT_BUFFER = 0x2
124 	};
125 
126 	enum GFX_COMMON_TOKEN_SUBOPCODE {
127 		GFXSUBOP_BINDING_TABLE_STATE_TOKEN = 0xFE,
128 		GFXSUBOP_SURFACE_STATE_TOKEN = 0xFF
129 	};
130 	enum GFX3DSTATE_CUBE_MAP_CORNER_MODE {
131 		GFX3DSTATE_CUBE_REPLICATE = 0x0,
132 		GFX3DSTATE_CUBE_AVERAGE = 0X1
133 	};
134 	enum GFX3DSTATE_RENDER_CACHE_READ_WRITE_MODE {
135 		GFX3DSTATE_WRITE_ONLY_ON_MISS = 0x0,
136 		GFX3DSTATE_READ_WRITE_ONLY_ON_MISS = 0x1
137 	};
138 
139 	enum GFX3DSTATE_MEDIA_BOUNDARY_PIXEL_MODE {
140 		GFX3DSTATE_BOUNDARY_NORMAL = 0x0,
141 		GFX3DSTATE_BOUNDARY_PROGRESSIVE_FRAME = 0x2,
142 		GFX3DSTATE_BOUNDARY_INTERLACED_FRAME = 0x3
143 	};
144 
145 	enum GFX3DSTATE_SURFACERETURNFORMAT {
146 		GFX3DSTATE_SURFACERETURNFORMAT_FLOAT32 = 0,
147 		GFX3DSTATE_SURFACERETURNFORMAT_S1_14 = 1
148 	};
149 
150 	enum GFX3DSTATE_CONSTANT_BUFFER_ADDRESS_MODE {
151 		GFX3DSTATE_CONSTANT_BUFFER_ADDRESS_GENERAL_STATE,
152 		GFX3DSTATE_CONSTANT_BUFFER_ADDRESS_GTT,
153 		GFX3DSTATE_CONSTANT_BUFFER_ADDRESS_SURFACE_STATE,
154 		NUM_GFX3DSTATE_CONSTANT_BUFFER_ADDRESS_MODES
155 	};
156 
157 	enum GFX3DSTATE_PREFILTER_OPERATION {
158 		GFX3DSTATE_PREFILTER_ALWAYS = 0x0,
159 		GFX3DSTATE_PREFILTER_NEVER = 0x1,
160 		GFX3DSTATE_PREFILTER_LESS = 0x2,
161 		GFX3DSTATE_PREFILTER_EQUAL = 0x3,
162 		GFX3DSTATE_PREFILTER_LEQUAL = 0x4,
163 		GFX3DSTATE_PREFILTER_GREATER = 0x5,
164 		GFX3DSTATE_PREFILTER_NOTEQUAL = 0x6,
165 		GFX3DSTATE_PREFILTER_GEQUAL = 0x7
166 	};
167 
168 	enum GFX3DSTATE_MIPFILTER {
169 		GFX3DSTATE_MIPFILTER_NONE = 0,
170 		GFX3DSTATE_MIPFILTER_NEAREST = 1,
171 		GFX3DSTATE_MIPFILTER_LINEAR = 3
172 	};
173 
174 	typedef enum _GFX3DSTATE_MAPFILTER {
175 		GFX3DSTATE_MAPFILTER_NEAREST = 0x0,
176 		GFX3DSTATE_MAPFILTER_LINEAR = 0x1,
177 		GFX3DSTATE_MAPFILTER_ANISOTROPIC = 0x2,
178 		GFX3DSTATE_MAPFILTER_FLEXIBLE = 0x3,
179 		GFX3DSTATE_MAPFILTER_MONO = 0x6
180 	} GFX3DSTATE_MAPFILTER;
181 
182 	enum GFX3DSTATE_DEFAULTCOLOR_MODE {
183 		GFX3DSTATE_DEFAULTCOLOR_R32G32B32A32_FLOAT = 0,
184 		GFX3DSTATE_DEFAULTCOLOR_R8G8B8A8_UNORM = 1
185 	};
186 
187 	typedef enum _GFX3DSTATE_TEXCOORDMODE {
188 		GFX3DSTATE_TEXCOORDMODE_WRAP = 0,
189 		GFX3DSTATE_TEXCOORDMODE_MIRROR = 1,
190 		GFX3DSTATE_TEXCOORDMODE_CLAMP = 2,
191 		GFX3DSTATE_TEXCOORDMODE_CUBE = 3,
192 		GFX3DSTATE_TEXCOORDMODE_CLAMP_BORDER = 4,
193 		GFX3DSTATE_TEXCOORDMODE_MIRROR_ONCE = 5
194 	} GFX3DSTATE_TEXCOORDMODE;
195 
196 	enum GFX3DSTATE_CUBESURFACECONTROLMODE {
197 		GFX3DSTATE_CUBESURFACECONTROLMODE_PROGRAMMED = 0,
198 		GFX3DSTATE_CUBESURFACECONTROLMODE_OVERRIDE = 1
199 	};
200 
201 	enum GFX3DSTATE_ANISORATIO {
202 		GFX3DSTATE_ANISORATIO_2 = 0,
203 		GFX3DSTATE_ANISORATIO_4 = 1,
204 		GFX3DSTATE_ANISORATIO_6 = 2,
205 		GFX3DSTATE_ANISORATIO_8 = 3,
206 		GFX3DSTATE_ANISORATIO_10 = 4,
207 		GFX3DSTATE_ANISORATIO_12 = 5,
208 		GFX3DSTATE_ANISORATIO_14 = 6,
209 		GFX3DSTATE_ANISORATIO_16 = 7
210 	};
211 
212 	enum GFX3DSTATE_CHROMAKEY_MODE {
213 		GFX3DSTATE_CHROMAKEY_KILL_ON_ANY_MATCH = 0,
214 		GFX3DSTATE_CHROMAKEY_REPLACE_BLACK = 1
215 	};
216 
217 	enum GFX3DSTATE_SURFACETYPE {
218 		GFX3DSTATE_SURFACETYPE_1D = 0,
219 		GFX3DSTATE_SURFACETYPE_2D = 1,
220 		GFX3DSTATE_SURFACETYPE_3D = 2,
221 		GFX3DSTATE_SURFACETYPE_CUBE = 3,
222 		GFX3DSTATE_SURFACETYPE_BUFFER = 4,
223 		GFX3DSTATE_SURFACETYPE_NULL = 7
224 	};
225 
226 	enum GFX3DSTATE_RENDERTARGET_ROTATE {
227 		GFX3DSTATE_RENDERTARGET_ROTATE_0DEG = 0,
228 		GFX3DSTATE_RENDERTARGET_ROTATE_90DEG = 1,
229 		GFX3DSTATE_RENDERTARGET_ROTATE_270DEG = 3,
230 	};
231 
232 	enum GFX3DSTATE_PIPELINED_SUBOPCODE {
233 		GFX3DSUBOP_3DSTATE_PIPELINED_POINTERS = 0x00,
234 		GFX3DSUBOP_3DSTATE_BINDING_TABLE_POINTERS = 0x01,
235 		GFX3DSUBOP_3DSTATE_STATE_POINTER_INVALIDATE = 0x02,
236 		GFX3DSUBOP_3DSTATE_VERTEX_BUFFERS = 0x08,
237 		GFX3DSUBOP_3DSTATE_VERTEX_ELEMENTS = 0x09,
238 		GFX3DSUBOP_3DSTATE_INDEX_BUFFER = 0x0A,
239 		GFX3DSUBOP_3DSTATE_VF_STATISTICS = 0x0B
240 	};
241 
242 	enum GFX3DSTATE_SURFACE_MIPMAPLAYOUT {
243 		GFX3DSTATE_SURFACE_MIPMAPLAYOUT_BELOW = 0,
244 		GFX3DSTATE_SURFACE_MIPMAPLAYOUT_RIGHT = 1
245 	};
246 
247 	enum GFX3DSTATE_SURFACEFORMAT {
248 		GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_FLOAT = 0x000,
249 		GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_SINT = 0x001,
250 		GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_UINT = 0x002,
251 		GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_UNORM = 0x003,
252 		GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_SNORM = 0x004,
253 		GFX3DSTATE_SURFACEFORMAT_R64G64_FLOAT = 0x005,
254 		GFX3DSTATE_SURFACEFORMAT_R32G32B32X32_FLOAT = 0x006,
255 		GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_SSCALED = 0x007,
256 		GFX3DSTATE_SURFACEFORMAT_R32G32B32A32_USCALED = 0x008,
257 		GFX3DSTATE_SURFACEFORMAT_R32G32B32_FLOAT = 0x040,
258 		GFX3DSTATE_SURFACEFORMAT_R32G32B32_SINT = 0x041,
259 		GFX3DSTATE_SURFACEFORMAT_R32G32B32_UINT = 0x042,
260 		GFX3DSTATE_SURFACEFORMAT_R32G32B32_UNORM = 0x043,
261 		GFX3DSTATE_SURFACEFORMAT_R32G32B32_SNORM = 0x044,
262 		GFX3DSTATE_SURFACEFORMAT_R32G32B32_SSCALED = 0x045,
263 		GFX3DSTATE_SURFACEFORMAT_R32G32B32_USCALED = 0x046,
264 		GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UNORM = 0x080,
265 		GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_SNORM = 0x081,
266 		GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_SINT = 0x082,
267 		GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_UINT = 0x083,
268 		GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_FLOAT = 0x084,
269 		GFX3DSTATE_SURFACEFORMAT_R32G32_FLOAT = 0x085,
270 		GFX3DSTATE_SURFACEFORMAT_R32G32_SINT = 0x086,
271 		GFX3DSTATE_SURFACEFORMAT_R32G32_UINT = 0x087,
272 		GFX3DSTATE_SURFACEFORMAT_R32_FLOAT_X8X24_TYPELESS = 0x088,
273 		GFX3DSTATE_SURFACEFORMAT_X32_TYPELESS_G8X24_UINT = 0x089,
274 		GFX3DSTATE_SURFACEFORMAT_L32A32_FLOAT = 0x08A,
275 		GFX3DSTATE_SURFACEFORMAT_R32G32_UNORM = 0x08B,
276 		GFX3DSTATE_SURFACEFORMAT_R32G32_SNORM = 0x08C,
277 		GFX3DSTATE_SURFACEFORMAT_R64_FLOAT = 0x08D,
278 		GFX3DSTATE_SURFACEFORMAT_R16G16B16X16_UNORM = 0x08E,
279 		GFX3DSTATE_SURFACEFORMAT_R16G16B16X16_FLOAT = 0x08F,
280 		GFX3DSTATE_SURFACEFORMAT_A32X32_FLOAT = 0x090,
281 		GFX3DSTATE_SURFACEFORMAT_L32X32_FLOAT = 0x091,
282 		GFX3DSTATE_SURFACEFORMAT_I32X32_FLOAT = 0x092,
283 		GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_SSCALED = 0x093,
284 		GFX3DSTATE_SURFACEFORMAT_R16G16B16A16_USCALED = 0x094,
285 		GFX3DSTATE_SURFACEFORMAT_R32G32_SSCALED = 0x095,
286 		GFX3DSTATE_SURFACEFORMAT_R32G32_USCALED = 0x096,
287 		GFX3DSTATE_SURFACEFORMAT_B8G8R8A8_UNORM = 0x0C0,
288 		GFX3DSTATE_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB = 0x0C1,
289 		GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM = 0x0C2,
290 		GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UNORM_SRGB = 0x0C3,
291 		GFX3DSTATE_SURFACEFORMAT_R10G10B10A2_UINT = 0x0C4,
292 		GFX3DSTATE_SURFACEFORMAT_R10G10B10_SNORM_A2_UNORM = 0x0C5,
293 		GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM = 0x0C7,
294 		GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UNORM_SRGB = 0x0C8,
295 		GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_SNORM = 0x0C9,
296 		GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_SINT = 0x0CA,
297 		GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_UINT = 0x0CB,
298 		GFX3DSTATE_SURFACEFORMAT_R16G16_UNORM = 0x0CC,
299 		GFX3DSTATE_SURFACEFORMAT_R16G16_SNORM = 0x0CD,
300 		GFX3DSTATE_SURFACEFORMAT_R16G16_SINT = 0x0CE,
301 		GFX3DSTATE_SURFACEFORMAT_R16G16_UINT = 0x0CF,
302 		GFX3DSTATE_SURFACEFORMAT_R16G16_FLOAT = 0x0D0,
303 		GFX3DSTATE_SURFACEFORMAT_B10G10R10A2_UNORM = 0x0D1,
304 		GFX3DSTATE_SURFACEFORMAT_B10G10R10A2_UNORM_SRGB = 0x0D2,
305 		GFX3DSTATE_SURFACEFORMAT_R11G11B10_FLOAT = 0x0D3,
306 		GFX3DSTATE_SURFACEFORMAT_R32_SINT = 0x0D6,
307 		GFX3DSTATE_SURFACEFORMAT_R32_UINT = 0x0D7,
308 		GFX3DSTATE_SURFACEFORMAT_R32_FLOAT = 0x0D8,
309 		GFX3DSTATE_SURFACEFORMAT_R24_UNORM_X8_TYPELESS = 0x0D9,
310 		GFX3DSTATE_SURFACEFORMAT_X24_TYPELESS_G8_UINT = 0x0DA,
311 		GFX3DSTATE_SURFACEFORMAT_L16A16_UNORM = 0x0DF,
312 		GFX3DSTATE_SURFACEFORMAT_I24X8_UNORM = 0x0E0,
313 		GFX3DSTATE_SURFACEFORMAT_L24X8_UNORM = 0x0E1,
314 		GFX3DSTATE_SURFACEFORMAT_A24X8_UNORM = 0x0E2,
315 		GFX3DSTATE_SURFACEFORMAT_I32_FLOAT = 0x0E3,
316 		GFX3DSTATE_SURFACEFORMAT_L32_FLOAT = 0x0E4,
317 		GFX3DSTATE_SURFACEFORMAT_A32_FLOAT = 0x0E5,
318 		GFX3DSTATE_SURFACEFORMAT_B8G8R8X8_UNORM = 0x0E9,
319 		GFX3DSTATE_SURFACEFORMAT_B8G8R8X8_UNORM_SRGB = 0x0EA,
320 		GFX3DSTATE_SURFACEFORMAT_R8G8B8X8_UNORM = 0x0EB,
321 		GFX3DSTATE_SURFACEFORMAT_R8G8B8X8_UNORM_SRGB = 0x0EC,
322 		GFX3DSTATE_SURFACEFORMAT_R9G9B9E5_SHAREDEXP = 0x0ED,
323 		GFX3DSTATE_SURFACEFORMAT_B10G10R10X2_UNORM = 0x0EE,
324 		GFX3DSTATE_SURFACEFORMAT_L16A16_FLOAT = 0x0F0,
325 		GFX3DSTATE_SURFACEFORMAT_R32_UNORM = 0x0F1,
326 		GFX3DSTATE_SURFACEFORMAT_R32_SNORM = 0x0F2,
327 		GFX3DSTATE_SURFACEFORMAT_R10G10B10X2_USCALED = 0x0F3,
328 		GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_SSCALED = 0x0F4,
329 		GFX3DSTATE_SURFACEFORMAT_R8G8B8A8_USCALED = 0x0F5,
330 		GFX3DSTATE_SURFACEFORMAT_R16G16_SSCALED = 0x0F6,
331 		GFX3DSTATE_SURFACEFORMAT_R16G16_USCALED = 0x0F7,
332 		GFX3DSTATE_SURFACEFORMAT_R32_SSCALED = 0x0F8,
333 		GFX3DSTATE_SURFACEFORMAT_R32_USCALED = 0x0F9,
334 		GFX3DSTATE_SURFACEFORMAT_R8B8G8A8_UNORM = 0x0FA,
335 		GFX3DSTATE_SURFACEFORMAT_B5G6R5_UNORM = 0x100,
336 		GFX3DSTATE_SURFACEFORMAT_B5G6R5_UNORM_SRGB = 0x101,
337 		GFX3DSTATE_SURFACEFORMAT_B5G5R5A1_UNORM = 0x102,
338 		GFX3DSTATE_SURFACEFORMAT_B5G5R5A1_UNORM_SRGB = 0x103,
339 		GFX3DSTATE_SURFACEFORMAT_B4G4R4A4_UNORM = 0x104,
340 		GFX3DSTATE_SURFACEFORMAT_B4G4R4A4_UNORM_SRGB = 0x105,
341 		GFX3DSTATE_SURFACEFORMAT_R8G8_UNORM = 0x106,
342 		GFX3DSTATE_SURFACEFORMAT_R8G8_SNORM = 0x107,
343 		GFX3DSTATE_SURFACEFORMAT_R8G8_SINT = 0x108,
344 		GFX3DSTATE_SURFACEFORMAT_R8G8_UINT = 0x109,
345 		GFX3DSTATE_SURFACEFORMAT_R16_UNORM = 0x10A,
346 		GFX3DSTATE_SURFACEFORMAT_R16_SNORM = 0x10B,
347 		GFX3DSTATE_SURFACEFORMAT_R16_SINT = 0x10C,
348 		GFX3DSTATE_SURFACEFORMAT_R16_UINT = 0x10D,
349 		GFX3DSTATE_SURFACEFORMAT_R16_FLOAT = 0x10E,
350 		GFX3DSTATE_SURFACEFORMAT_I16_UNORM = 0x111,
351 		GFX3DSTATE_SURFACEFORMAT_L16_UNORM = 0x112,
352 		GFX3DSTATE_SURFACEFORMAT_A16_UNORM = 0x113,
353 		GFX3DSTATE_SURFACEFORMAT_L8A8_UNORM = 0x114,
354 		GFX3DSTATE_SURFACEFORMAT_I16_FLOAT = 0x115,
355 		GFX3DSTATE_SURFACEFORMAT_L16_FLOAT = 0x116,
356 		GFX3DSTATE_SURFACEFORMAT_A16_FLOAT = 0x117,
357 		GFX3DSTATE_SURFACEFORMAT_L8A8_UNORM_SRGB = 0x118,
358 		GFX3DSTATE_SURFACEFORMAT_R5G5_SNORM_B6_UNORM = 0x119,
359 		GFX3DSTATE_SURFACEFORMAT_B5G5R5X1_UNORM = 0x11A,
360 		GFX3DSTATE_SURFACEFORMAT_B5G5R5X1_UNORM_SRGB = 0x11B,
361 		GFX3DSTATE_SURFACEFORMAT_R8G8_SSCALED = 0x11C,
362 		GFX3DSTATE_SURFACEFORMAT_R8G8_USCALED = 0x11D,
363 		GFX3DSTATE_SURFACEFORMAT_R16_SSCALED = 0x11E,
364 		GFX3DSTATE_SURFACEFORMAT_R16_USCALED = 0x11F,
365 		GFX3DSTATE_SURFACEFORMAT_P8A8_UNORM_PALETTE_0 = 0x122,
366 		GFX3DSTATE_SURFACEFORMAT_P8A8_UNORM_PALETTE_1 = 0x123,
367 		GFX3DSTATE_SURFACEFORMAT_R8_UNORM = 0x140,
368 		GFX3DSTATE_SURFACEFORMAT_R8_SNORM = 0x141,
369 		GFX3DSTATE_SURFACEFORMAT_R8_SINT = 0x142,
370 		GFX3DSTATE_SURFACEFORMAT_R8_UINT = 0x143,
371 		GFX3DSTATE_SURFACEFORMAT_A8_UNORM = 0x144,
372 		GFX3DSTATE_SURFACEFORMAT_I8_UNORM = 0x145,
373 		GFX3DSTATE_SURFACEFORMAT_L8_UNORM = 0x146,
374 		GFX3DSTATE_SURFACEFORMAT_P4A4_UNORM_PALETTE_0 = 0x147,
375 		GFX3DSTATE_SURFACEFORMAT_A4P4_UNORM_PALETTE_0 = 0x148,
376 		GFX3DSTATE_SURFACEFORMAT_R8_SSCALED = 0x149,
377 		GFX3DSTATE_SURFACEFORMAT_R8_USCALED = 0x14A,
378 		GFX3DSTATE_SURFACEFORMAT_P8_UNORM_PALETTE_0 = 0x14B,
379 		GFX3DSTATE_SURFACEFORMAT_L8_UNORM_SRGB = 0x14C,
380 		GFX3DSTATE_SURFACEFORMAT_P8_UNORM_PALETTE_1 = 0x14D,
381 		GFX3DSTATE_SURFACEFORMAT_P4A4_UNORM_PALETTE_1 = 0x14E,
382 		GFX3DSTATE_SURFACEFORMAT_A4P4_UNORM_PALETTE_1 = 0x14F,
383 		GFX3DSTATE_SURFACEFORMAT_DXT1_RGB_SRGB = 0x180,
384 		GFX3DSTATE_SURFACEFORMAT_R1_UINT = 0x181,
385 		GFX3DSTATE_SURFACEFORMAT_YCRCB_NORMAL = 0x182,
386 		GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUVY = 0x183,
387 		GFX3DSTATE_SURFACEFORMAT_P2_UNORM_PALETTE_0 = 0x184,
388 		GFX3DSTATE_SURFACEFORMAT_P2_UNORM_PALETTE_1 = 0x185,
389 		GFX3DSTATE_SURFACEFORMAT_BC1_UNORM = 0x186,
390 		GFX3DSTATE_SURFACEFORMAT_BC2_UNORM = 0x187,
391 		GFX3DSTATE_SURFACEFORMAT_BC3_UNORM = 0x188,
392 		GFX3DSTATE_SURFACEFORMAT_BC4_UNORM = 0x189,
393 		GFX3DSTATE_SURFACEFORMAT_BC5_UNORM = 0x18A,
394 		GFX3DSTATE_SURFACEFORMAT_BC1_UNORM_SRGB = 0x18B,
395 		GFX3DSTATE_SURFACEFORMAT_BC2_UNORM_SRGB = 0x18C,
396 		GFX3DSTATE_SURFACEFORMAT_BC3_UNORM_SRGB = 0x18D,
397 		GFX3DSTATE_SURFACEFORMAT_MONO8 = 0x18E,
398 		GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPUV = 0x18F,
399 		GFX3DSTATE_SURFACEFORMAT_YCRCB_SWAPY = 0x190,
400 		GFX3DSTATE_SURFACEFORMAT_DXT1_RGB = 0x191,
401 		GFX3DSTATE_SURFACEFORMAT_FXT1 = 0x192,
402 		GFX3DSTATE_SURFACEFORMAT_R8G8B8_UNORM = 0x193,
403 		GFX3DSTATE_SURFACEFORMAT_R8G8B8_SNORM = 0x194,
404 		GFX3DSTATE_SURFACEFORMAT_R8G8B8_SSCALED = 0x195,
405 		GFX3DSTATE_SURFACEFORMAT_R8G8B8_USCALED = 0x196,
406 		GFX3DSTATE_SURFACEFORMAT_R64G64B64A64_FLOAT = 0x197,
407 		GFX3DSTATE_SURFACEFORMAT_R64G64B64_FLOAT = 0x198,
408 		GFX3DSTATE_SURFACEFORMAT_BC4_SNORM = 0x199,
409 		GFX3DSTATE_SURFACEFORMAT_BC5_SNORM = 0x19A,
410 		GFX3DSTATE_SURFACEFORMAT_R16G16B16_UNORM = 0x19C,
411 		GFX3DSTATE_SURFACEFORMAT_R16G16B16_SNORM = 0x19D,
412 		GFX3DSTATE_SURFACEFORMAT_R16G16B16_SSCALED = 0x19E,
413 		GFX3DSTATE_SURFACEFORMAT_R16G16B16_USCALED = 0x19F,
414 		GFX3DSTATE_SURFACEFORMAT_PLANAR_420_8 = 0x1A5,
415 		GFX3DSTATE_SURFACEFORMAT_R8G8B8_UNORM_SRGB = 0x1A8,
416 		GFX3DSTATE_SURFACEFORMAT_RAW = 0x1FF,
417 		NUM_GFX3DSTATE_SURFACEFORMATS
418 	};
419 
420 	enum GFX3DSTATE_TILEWALK {
421 		GFX3DSTATE_TILEWALK_XMAJOR = 0,
422 		GFX3DSTATE_TILEWALK_YMAJOR = 1
423 	};
424 
425 	enum GFX3DSTATE_TILEMODE {
426 		GFX3DSTATE_TILEMODE_LINEAR = 0,
427 		GFX3DSTATE_TILEMODE_WMAJOR = 1,
428 		GFX3DSTATE_TILEMODE_XMAJOR = 2,
429 		GFX3DSTATE_TILEMODE_YMAJOR = 3
430 	};
431 
432 	enum GFX3DSTATE_SURFACE_VERTICAL_ALIGNMENT {
433 		GFX3DSTATE_SURFACE_VERTICAL_ALIGNMENT_2 = 0x0,
434 		GFX3DSTATE_SURFACE_VERTICAL_ALIGNMENT_4 = 0x1
435 	};
436 
437 	enum GFX3DSTATE_SURFACE_HORIZONTAL_ALIGNMENT {
438 		GFX3DSTATE_SURFACE_HORIZONTAL_ALIGNMENT_4 = 0x0,
439 		GFX3DSTATE_SURFACE_HORIZONTAL_ALIGNMENT_8 = 0x1
440 	};
441 
442 	typedef enum _GFX3DCONTROL_OPERATION {
443 		GFX3DCONTROLOP_NOWRITE = 0x00,
444 		GFX3DCONTROLOP_WRITEIMMEDIATE = 0x01,
445 		GFX3DCONTROLOP_WRITEDEPTH = 0x02,
446 		GFX3DCONTROLOP_WRITETIMESTAMP = 0x03
447 	} GFX3DCONTROL_OPERATION;
448 
449 	typedef enum _GFX3DFLUSH_OPERATION {
450 		GFX3DFLUSH_NONE = 0x00,
451 		GFX3DFLUSH_WRITE_CACHE = 0x01,
452 		GFX3DFLUSH_READ_CACHE = 0x02
453 	} GFX3DFLUSH_OPERATION;
454 
455 	enum GFXPIPELINE_SELECT {
456 		GFXPIPELINE_3D = 0x0,
457 		GFXPIPELINE_MEDIA = 0x1,
458 		GFXPIPELINE_GPGPU = 0x2
459 	};
460 
461 	enum MEDIASTATE_VFE_GPGPU_MODE {
462 		MEDIASTATE_MEDIA_MODE = 0,
463 		MEDIASTATE_GPGPU_MODE = 1
464 	};
465 
466 	enum MI_OPCODE {
467 		MI_NOOP = 0x00,
468 		MI_SET_PREDICATE = 0x01,
469 		MI_USER_INTERRUPT = 0x02,
470 		MI_WAIT_FOR_EVENT = 0x03,
471 		MI_FLUSH = 0x04,
472 		MI_ARB_CHECK = 0x05,
473 		MI_REPORT_HEAD = 0x07,
474 		MI_ARB_ON_OFF = 0x08,
475 		MI_BATCH_BUFFER_END = 0x0A,
476 		MI_LOAD_SCAN_LINES_INCL = 0x12,
477 		MI_LOAD_SCAN_LINES_EXCL = 0x13,
478 		MI_DISPLAY_BUFFER_INFO = 0x14,
479 		MI_SET_CONTEXT = 0x18,
480 		MI_STORE_DATA_IMM = 0x20,
481 		MI_STORE_DATA_INDEX = 0x21,
482 		MI_LOAD_REGISTER_IMM = 0x22,
483 		MI_STORE_REGISTER_MEM = 0x24,
484 		MI_LOAD_REGISTER_REG = 0x2A,
485 		MI_BATCH_BUFFER_START = 0x31,
486 	};
487 
488 	enum MI_SET_PREDICATE_ENABLE_GEN7P5 {
489 		MI_SET_PREDICATE_ENABLE_ALWAYS = 0x0,
490 		MI_SET_PREDICATE_ENABLE_ON_CLEAR = 0x1,
491 		MI_SET_PREDICATE_ENABLE_ON_SET = 0x2,
492 		MI_SET_PREDICATE_DISABLE = 0x3,
493 	};
494 
495 	typedef enum _MEDIASTATE_SURFACEFORMAT {
496 		MEDIASTATE_SURFACEFORMAT_YCRCB_NORMAL = 0,
497 		MEDIASTATE_SURFACEFORMAT_YCRCB_SWAPUVY = 1,
498 		MEDIASTATE_SURFACEFORMAT_YCRCB_SWAPUV = 2,
499 		MEDIASTATE_SURFACEFORMAT_YCRCB_SWAPY = 3,
500 		MEDIASTATE_SURFACEFORMAT_PLANAR_420_8 = 4,
501 		MEDIASTATE_SURFACEFORMAT_PLANAR_411_8 = 5,
502 		MEDIASTATE_SURFACEFORMAT_PLANAR_422_8 = 6,
503 		MEDIASTATE_SURFACEFORMAT_STMM_DN_STATISTICS = 7,
504 		MEDIASTATE_SURFACEFORMAT_R10G10B10A2_UNORM = 8,
505 		MEDIASTATE_SURFACEFORMAT_R8G8B8A8_UNORM = 9,
506 		MEDIASTATE_SURFACEFORMAT_R8B8_UNORM = 10,
507 		MEDIASTATE_SURFACEFORMAT_R8_UNORM = 11,
508 		MEDIASTATE_SURFACEFORMAT_Y8_UNORM = 12,
509 		MEDIASTATE_SURFACEFORMAT_A8Y8U8V8_UNORM = 13,
510 		MEDIASTATE_SURFACEFORMAT_B8G8R8A8_UNORM = 14,
511 		MEDIASTATE_SURFACEFORMAT_R16G16B16A16 = 15
512 	} MEDIASTATE_SURFACEFORMAT;
513 
514 	enum MI_OPCODE_G6 {
515 		MI_SEMAPHORE_MBOX = 0x16,
516 		MI_FLUSH_DW = 0x26,
517 		MI_COND_BATCH_BUFFER_END = 0x36
518 	};
519 
520 	enum GFX_MEDIA_SUBOPCODE_G6 {
521 		MEDIASUBOP_MEDIA_VFE_STATE = 0,
522 		MEDIASUBOP_MEDIA_CURBE_LOAD = 1,
523 		MEDIASUBOP_MEDIA_INTERFACE_DESCRIPTOR_LOAD = 2,
524 		MEDIASUBOP_MEDIA_GATEWAY_STATE = 3,
525 		MEDIASUBOP_MEDIA_OBJECT_WALKER = 3,
526 		MEDIASUBOP_MEDIA_STATE_FLUSH = 4,
527 		MEDIASUBOP_GPGPU_WALKER = 5
528 	};
529 
530 	enum MEDIASTATE_VALIDPTE_CONTROL {
531 		MEDIASTATE_INVALID_PTE = 0,
532 		MEDIASTATE_VALID_PTE = 1
533 	};
534 
535 	enum PIPE_BUF_ADDR_STATE_MEMORY_TYPE {
536 		MEMORY_TYPE_USE_PTE_CHACHEABILITY = 0,
537 		MEMORY_TYPE_UNCHACHEABLE = 1,
538 		MEMORY_TYPE_WRITE_THROUGH = 2,
539 		MEMORY_TYPE_WRITEBACK = 3
540 	};
541 
542 	enum MI_POST_SYNC_OPERATION {
543 		FLUSH_NOWRITE = 0,
544 		FLUSH_WRITE_IMMEDIATE_DATA = 1,
545 		FLUSH_WRITE_TIMESTAMP_REG = 3
546 	};
547 
548 	enum MI_ADDRESS_SPACE_INDICATOR {
549 		MI_BB_ADDRESS_USE_GGTT = 0,
550 		MI_BB_ADDRESS_USE_PPGTT = 1
551 	};
552 
553 	enum MI_BB_SECURITY_INDICATOR {
554 		MI_BB_SECURITY_PRIVILEGED = 0,
555 		MI_BB_SECURITY_NON_PRIVILEGED = 1
556 	};
557 
558 	enum SHADER_CHANNEL_SELECT {
559 		SCS_ZERO = 0,
560 		SCS_ONE = 1,
561 		SCS_RED = 4,
562 		SCS_GREEN = 5,
563 		SCS_BLUE = 6,
564 		SCS_ALPHA = 7
565 	};
566 	enum MI_OPCODE_G7 {
567 		MI_SET_APP_ID = 0x0E
568 	};
569 
570 	typedef struct _MEDIA_OBJECT_KA2_INLINE_DATA_G575 {
571 		union {
572 			struct {
573 				DWORD DestinationBlockHorizontalOrigin:16;
574 				DWORD DestinationBlockVerticalOrigin:16;
575 			};
576 
577 			struct {
578 				DWORD BlockHeight:16;
579 				DWORD BufferOffset:16;
580 			};
581 
582 			struct {
583 				DWORD StartRowOffset;
584 			};
585 
586 			DWORD Value;
587 		} DW00;
588 
589 		union {
590 			struct {
591 				DWORD HorizontalBlockCompositeMaskLayer0:16;
592 				DWORD VerticalBlockCompositeMaskLayer0:16;
593 			};
594 
595 			struct {
596 				DWORD TotalRows;
597 			};
598 
599 			DWORD Value;
600 		} DW01;
601 
602 		union {
603 			struct {
604 				DWORD HorizontalBlockCompositeMaskLayer1:16;
605 				DWORD VerticalBlockCompositeMaskLayer1:16;
606 			};
607 
608 			struct {
609 				DWORD StartColumnOffset;
610 			};
611 
612 			DWORD Value;
613 		} DW02;
614 
615 		union {
616 			struct {
617 				DWORD HorizontalBlockCompositeMaskLayer2:16;
618 				DWORD VerticalBlockCompositeMaskLayer2:16;
619 			};
620 
621 			struct {
622 				DWORD TotalColumns;
623 			};
624 
625 			DWORD Value;
626 		} DW03;
627 
628 		union {
629 			struct {
630 				FLOAT VideoXScalingStep;
631 			};
632 
633 			DWORD Value;
634 		} DW04;
635 
636 		union {
637 			struct {
638 				FLOAT VideoStepDelta;
639 			};
640 
641 			DWORD Value;
642 		} DW05;
643 
644 		union {
645 			struct {
646 				DWORD VerticalBlockNumber:17;
647 				DWORD AreaOfInterest:1;
648 				 DWORD:14;
649 			};
650 
651 			DWORD Value;
652 		} DW06;
653 
654 		union {
655 			struct {
656 				DWORD GroupIDNumber;
657 			};
658 
659 			DWORD Value;
660 		} DW07;
661 
662 		union {
663 			struct {
664 				DWORD HorizontalBlockCompositeMaskLayer3:16;
665 				DWORD VerticalBlockCompositeMaskLayer3:16;
666 			};
667 
668 			DWORD Value;
669 		} DW08;
670 
671 		union {
672 			struct {
673 				DWORD HorizontalBlockCompositeMaskLayer4:16;
674 				DWORD VerticalBlockCompositeMaskLayer4:16;
675 			};
676 
677 			DWORD Value;
678 		} DW09;
679 
680 		union {
681 			struct {
682 				DWORD HorizontalBlockCompositeMaskLayer5:16;
683 				DWORD VerticalBlockCompositeMaskLayer5:16;
684 			};
685 
686 			DWORD Value;
687 		} DW10;
688 
689 		union {
690 			struct {
691 				DWORD HorizontalBlockCompositeMaskLayer6:16;
692 				DWORD VerticalBlockCompositeMaskLayer6:16;
693 			};
694 
695 			DWORD Value;
696 		} DW11;
697 
698 		union {
699 			struct {
700 				DWORD HorizontalBlockCompositeMaskLayer7:16;
701 				DWORD VerticalBlockCompositeMaskLayer7:16;
702 			};
703 
704 			DWORD Value;
705 		} DW12;
706 
707 		union {
708 			struct {
709 				DWORD Reserved;
710 			};
711 
712 			DWORD Value;
713 		} DW13;
714 
715 		union {
716 			struct {
717 				DWORD Reserved;
718 			};
719 
720 			DWORD Value;
721 		} DW14;
722 
723 		union {
724 			struct {
725 				DWORD Reserved;
726 			};
727 
728 			DWORD Value;
729 		} DW15;
730 	} MEDIA_OBJECT_KA2_INLINE_DATA_G575,
731 	    *PMEDIA_OBJECT_KA2_INLINE_DATA_G575;
732 
733 	typedef struct _MEDIA_OBJECT_HEADER_G6 {
734 		union {
735 			struct {
736 				DWORD DWordLength:16;
737 				DWORD CommandSubOpcode:8;
738 				DWORD CommandOpcode:3;
739 				DWORD CommandPipeLine:2;
740 				DWORD CommandType:3;
741 			};
742 			struct {
743 				DWORD Value;
744 			};
745 		} DW0;
746 
747 		union {
748 			struct {
749 				DWORD InterfaceDescriptorOffset:6;
750 				 DWORD:2;
751 				DWORD ObjectID:24;
752 			};
753 			struct {
754 				DWORD Value;
755 			};
756 		} DW1;
757 
758 		union {
759 			struct {
760 				DWORD IndirectDataLength:17;
761 				DWORD HalfSliceDestinationSelect:2;
762 				DWORD SliceDestinationSelect:2;
763 				DWORD UseScoreboard:1;
764 				DWORD ForceDestination:1;
765 				 DWORD:1;
766 				DWORD ThreadSynchronization:1;
767 				 DWORD:6;
768 				DWORD ChildrenPresent:1;
769 			};
770 			struct {
771 				DWORD Value;
772 			};
773 		} DW2;
774 
775 		union {
776 			struct {
777 				DWORD IndirectDataStartAddress;
778 			};
779 			struct {
780 				DWORD Value;
781 			};
782 		} DW3;
783 
784 		union {
785 			struct {
786 				DWORD ScoreboardX:9;
787 				 DWORD:7;
788 				DWORD ScoreboardY:9;
789 				 DWORD:7;
790 			};
791 			struct {
792 				DWORD Value;
793 			};
794 		} DW4;
795 
796 		union {
797 			struct {
798 				DWORD ScoreboardMask:8;
799 				 DWORD:8;
800 				DWORD ScoreboardColor:4;
801 				 DWORD:12;
802 			};
803 			struct {
804 				DWORD Value;
805 			};
806 		} DW5;
807 	} MEDIA_OBJECT_HEADER_G6, *PMEDIA_OBJECT_HEADER_G6;
808 
809 	typedef struct _MEDIA_OBJECT_FC_CMD_G6 {
810 		MEDIA_OBJECT_HEADER_G6 Header;
811 		MEDIA_OBJECT_KA2_INLINE_DATA_G575 InlineData;
812 	} MEDIA_OBJECT_FC_CMD_G6, *PMEDIA_OBJECT_FC_CMD_G6;
813 
814 	typedef struct _BINDING_TABLE_STATE_G5 {
815 		union {
816 			struct {
817 				DWORD Enable:1;
818 				DWORD Copy:1;
819 				DWORD BindingTableStateType:1;
820 				 DWORD:2;
821 				DWORD SurfaceStatePointer:27;
822 			};
823 			struct {
824 				DWORD Value;
825 			};
826 		} DW0;
827 	} BINDING_TABLE_STATE_G5, *PBINDING_TABLE_STATE_G5;
828 
829 	typedef struct _BINDING_TABLE_STATE_G8 {
830 		union {
831 			struct {
832 				DWORD Enable:BITFIELD_BIT(0);
833 				DWORD Copy:BITFIELD_BIT(1);
834 				DWORD BindingTableStateType:BITFIELD_BIT(2);
835 				 DWORD:BITFIELD_RANGE(3, 5);
836 				DWORD SurfaceStatePointer:BITFIELD_RANGE(6, 31);
837 			};
838 			struct {
839 				DWORD Value;
840 			};
841 		} DW0;
842 	} BINDING_TABLE_STATE_G8, *PBINDING_TABLE_STATE_G8;
843 
844 	typedef struct _MI_BATCH_BUFFER_END_CMD_G5 {
845 		union {
846 			struct {
847 				DWORD:23;
848 				DWORD InstructionOpcode:6;
849 				DWORD InstructionType:3;
850 			};
851 			struct {
852 				DWORD Value;
853 			};
854 		} DW0;
855 	} MI_BATCH_BUFFER_END_CMD_G5, *PMI_BATCH_BUFFER_END_CMD_G5;
856 
857 	typedef struct _PIPELINE_SELECT_CMD_G5 {
858 		union {
859 			struct {
860 				DWORD PipelineSelect:2;
861 				 DWORD:14;
862 				DWORD InstructionSubOpcode:8;
863 				DWORD InstructionOpcode:3;
864 				DWORD InstructionPipeline:2;
865 				DWORD InstructionType:3;
866 			};
867 			struct {
868 				DWORD Value;
869 			};
870 		} DW0;
871 	} PIPELINE_SELECT_CMD_G5, *PPIPELINE_SELECT_CMD_G5;
872 
873 	typedef struct _MI_NOOP_CMD_G5 {
874 		union {
875 			struct {
876 				DWORD IdentificationNumber:22;
877 				DWORD IdentificationWriteEnable:1;
878 				DWORD InstructionOpcode:6;
879 				DWORD InstructionType:3;
880 			};
881 			struct {
882 				DWORD Value;
883 			};
884 		} DW0;
885 	} MI_NOOP_CMD_G5, *PMI_NOOP_CMD_G5;
886 
887 	typedef struct _ALLOC {
888 		struct {
889 			DWORD AllocationIndex:16;
890 			 DWORD:13;
891 			DWORD UpperBoundEnable:1;
892 			DWORD RenderTargetEnable:1;
893 			DWORD AllocationEnable:1;
894 		} DW0;
895 
896 		DWORD AllocationOffset;
897 	} ALLOC, *PALLOC;
898 
899 	typedef struct _BINDING_TABLE_STATE_TOKEN_G6 {
900 		union {
901 			struct {
902 				DWORD Length:8;
903 				 DWORD:8;
904 				DWORD InstructionSubOpcode:8;
905 				DWORD InstructionOpcode:3;
906 				DWORD InstructionPipeLine:2;
907 				DWORD InstructionType:2;
908 				DWORD Token:1;
909 			};
910 			struct {
911 				DWORD Value;
912 			};
913 		} DW0;
914 
915 		union {
916 			struct {
917 				DWORD BindingTableHeapOffset:16;
918 				DWORD NumBindingTableEntries:16;
919 			};
920 			struct {
921 				DWORD Value;
922 			};
923 		} DW1;
924 	} BINDING_TABLE_STATE_TOKEN_G6, *PBINDING_TABLE_STATE_TOKEN_G6;
925 
926 	typedef struct _SURFACE_STATE_TOKEN_G75 {
927 		union {
928 			struct {
929 				DWORD Length:8;
930 				 DWORD:8;
931 				DWORD InstructionSubOpcode:8;
932 				DWORD InstructionOpcode:3;
933 				DWORD InstructionPipeLine:2;
934 				DWORD InstructionType:2;
935 				DWORD Token:1;
936 			};
937 
938 			struct {
939 				DWORD DriverID;
940 			};
941 
942 			struct {
943 				DWORD Value;
944 			};
945 		} DW0;
946 
947 		union {
948 			struct {
949 				DWORD SurfaceStateHeapOffset:16;
950 				DWORD SurfaceAllocationIndex:16;
951 			};
952 			struct {
953 				DWORD Value;
954 			};
955 		} DW1;
956 
957 		union {
958 			struct {
959 				DWORD SurfaceOffset:32;
960 			};
961 			struct {
962 				DWORD Value;
963 			};
964 		} DW2;
965 
966 		union {
967 			struct {
968 				DWORD RenderTargetEnable:1;
969 				DWORD YUVPlane:2;
970 				DWORD SurfaceStateType:1;
971 				 DWORD:28;
972 			};
973 			struct {
974 				DWORD Value;
975 			};
976 		} DW3;
977 
978 		union {
979 			struct {
980 				DWORD SurfaceBaseAddress;
981 			};
982 			struct {
983 				DWORD Value;
984 			};
985 		} DW4;
986 
987 		union {
988 			struct {
989 				DWORD SurfaceBaseAddress64:BITFIELD_RANGE(0,
990 									  15);
991 				 DWORD:BITFIELD_RANGE(16, 31);
992 			};
993 			struct {
994 				DWORD Value;
995 			};
996 		} DW5;
997 	} SURFACE_STATE_TOKEN_G75, *PSURFACE_STATE_TOKEN_G75;
998 
999 	typedef struct _MI_LOAD_REGISTER_IMM_CMD_G6 {
1000 		union {
1001 			struct {
1002 				DWORD Length:6;
1003 				 DWORD:2;
1004 				DWORD ByteWriteDisables:4;
1005 				 DWORD:11;
1006 				DWORD InstructionOpcode:6;
1007 				DWORD InstructionType:3;
1008 			};
1009 			struct {
1010 				DWORD Value;
1011 			};
1012 		} DW0;
1013 
1014 		union {
1015 			struct {
1016 				DWORD:2;
1017 				DWORD RegisterAddress:30;
1018 			};
1019 			struct {
1020 				DWORD Value;
1021 			};
1022 		} DW1;
1023 
1024 		union {
1025 			struct {
1026 				DWORD DataDword:32;
1027 			};
1028 			struct {
1029 				DWORD Value;
1030 			};
1031 		} DW2;
1032 	} MI_LOAD_REGISTER_IMM_CMD_G6, *PMI_LOAD_REGISTER_IMM_CMD_G6;
1033 
1034 	typedef struct _MI_SET_PREDICATE_CMD_G75 {
1035 		union {
1036 			struct {
1037 				DWORD Enable:2;
1038 				 DWORD:21;
1039 				DWORD CommandOpcode:6;
1040 				DWORD CommandType:3;
1041 			};
1042 			struct {
1043 				DWORD Value;
1044 			};
1045 		} DW0;
1046 	} MI_SET_PREDICATE_CMD_G75, *PMI_SET_PREDICATE_CMD_G75;
1047 
1048 	typedef struct _PIPE_CONTROL_CMD_G6 {
1049 		union {
1050 			struct {
1051 				DWORD DWordLength:8;
1052 				 DWORD:8;
1053 				DWORD InstructionSubOpcode:8;
1054 				DWORD InstructionOpcode:3;
1055 				DWORD InstructionSubType:2;
1056 				DWORD InstructionType:3;
1057 			};
1058 			struct {
1059 				DWORD Value;
1060 			};
1061 		} DW0;
1062 
1063 		union {
1064 			struct {
1065 				DWORD DepthCacheFlushEnable:1;
1066 				DWORD StallAtPixelScoreboard:1;
1067 				DWORD StateCacheInvalidationEnable:1;
1068 				DWORD ConstantCacheInvalidationEnable:1;
1069 				DWORD VFCacheInvalidationEnable:1;
1070 				 DWORD:1;
1071 				DWORD ProtectedMemoryApplicationID:1;
1072 				 DWORD:1;
1073 				DWORD NotifyEnable:1;
1074 				DWORD IndirectStatePointersDisable:1;
1075 				DWORD TextureCacheInvalidationEnable:1;
1076 				DWORD InstructionCacheInvalidateEnable:1;
1077 				DWORD RenderTargetCacheFlushEnable:1;
1078 				DWORD DepthStallEnable:1;
1079 				DWORD PostSyncOperation:2;
1080 				DWORD GenericMediaStateClear:1;
1081 				DWORD SynchronizeGFDTSurface:1;
1082 				DWORD TLBInvalidate:1;
1083 				DWORD GlobalSnapshotCountReset:1;
1084 				DWORD CSStall:1;
1085 				DWORD StoreDataIndex:1;
1086 				DWORD ProtectedMemoryEnable:1;
1087 				DWORD LRIPostSync:1;
1088 				DWORD DestinationAddressType:1;
1089 				DWORD CoreModeEnable:1;
1090 				 DWORD:6;
1091 			};
1092 			struct {
1093 				DWORD Value;
1094 			};
1095 		} DW1;
1096 
1097 		union {
1098 			struct {
1099 				DWORD:2;
1100 				DWORD DestinationAddressType:1;
1101 				DWORD Address:29;
1102 			};
1103 			struct {
1104 				DWORD Value;
1105 			};
1106 		} DW2;
1107 
1108 		union {
1109 			struct {
1110 				DWORD ImmediateData;
1111 			};
1112 			struct {
1113 				DWORD Value;
1114 			};
1115 		} DW3;
1116 
1117 		union {
1118 			struct {
1119 				DWORD ImmediateData;
1120 			};
1121 			struct {
1122 				DWORD Value;
1123 			};
1124 		} DW4;
1125 	} PIPE_CONTROL_CMD_G6, *PPIPE_CONTROL_CMD_G6;
1126 
1127 	typedef struct _MI_BATCH_BUFFER_START_CMD_G75 {
1128 		union {
1129 			struct {
1130 				DWORD Length:8;
1131 				DWORD AddressSpaceIndicator:1;
1132 				 DWORD:1;
1133 				DWORD ResourceStreamerEnable:1;
1134 				DWORD ClearCommandBufferEnable:1;
1135 				DWORD CodedCsMemoryReadEnable:1;
1136 				DWORD NonPrivileged:1;
1137 				 DWORD:1;
1138 				DWORD PredictionEnable:1;
1139 				DWORD AddOffsetEnable:1;
1140 				 DWORD:5;
1141 				DWORD SecondLevelBatchBuffer:1;
1142 				DWORD InstructionOpcode:6;
1143 				DWORD InstructionType:3;
1144 			};
1145 			struct {
1146 				DWORD Value;
1147 			};
1148 		} DW0;
1149 
1150 		union {
1151 			struct {
1152 				DWORD:2;
1153 				DWORD BufferStartAddress:30;
1154 			};
1155 			struct {
1156 				DWORD Value;
1157 			};
1158 		} DW1;
1159 	} MI_BATCH_BUFFER_START_CMD_G75, *PMI_BATCH_BUFFER_START_CMD_G75;
1160 
1161 	typedef struct _MI_BATCH_BUFFER_START_CMD_G8 {
1162 		union {
1163 			struct {
1164 				DWORD Length:BITFIELD_RANGE(0, 7);
1165 				DWORD AddressSpaceIndicator:BITFIELD_BIT(8);
1166 				 DWORD:BITFIELD_BIT(9);
1167 				DWORD ResourceStreamerEnable:BITFIELD_BIT(10);
1168 				 DWORD:BITFIELD_RANGE(11, 14);
1169 				DWORD PredictionEnable:BITFIELD_BIT(15);
1170 				DWORD AddOffsetEnable:BITFIELD_BIT(16);
1171 				 DWORD:BITFIELD_RANGE(17, 21);
1172 				DWORD SecondLevelBatchBuffer:BITFIELD_BIT(22);
1173 				DWORD InstructionOpcode:BITFIELD_RANGE(23, 28);
1174 				DWORD InstructionType:BITFIELD_RANGE(29, 31);
1175 			};
1176 			struct {
1177 				DWORD Value;
1178 			};
1179 		} DW0;
1180 
1181 		union {
1182 			struct {
1183 				DWORD:BITFIELD_RANGE(0, 1);
1184 				DWORD BufferStartAddress:BITFIELD_RANGE(2, 31);
1185 			};
1186 			struct {
1187 				DWORD Value;
1188 			};
1189 		} DW1;
1190 
1191 		union {
1192 			struct {
1193 				DWORD BufferStartAddress64:BITFIELD_RANGE(0,
1194 									  15);
1195 				 DWORD:BITFIELD_RANGE(16, 31);
1196 			};
1197 			struct {
1198 				DWORD Value;
1199 			};
1200 		} DW2;
1201 
1202 	} MI_BATCH_BUFFER_START_CMD_G8, *PMI_BATCH_BUFFER_START_CMD_G8;
1203 
1204 	 C_ASSERT(SIZE32(MI_BATCH_BUFFER_START_CMD_G8) == 3);
1205 
1206 	typedef struct _STATE_BASE_ADDRESS_CMD_G6 {
1207 		union {
1208 			struct {
1209 				DWORD Length:8;
1210 				 DWORD:8;
1211 				DWORD InstructionSubOpcode:8;
1212 				DWORD InstructionOpcode:3;
1213 				DWORD InstructionPipeline:2;
1214 				DWORD InstructionType:3;
1215 			};
1216 			struct {
1217 				DWORD Value;
1218 			};
1219 		} DW0;
1220 
1221 		union {
1222 			struct {
1223 				DWORD Modify:1;
1224 				 DWORD:2;
1225 				DWORD StatelessDPAccessForceWriteThru:1;
1226 				DWORD StatelessDPMemObjCtrlState:4;
1227 				DWORD GeneralStateMemObjCtrlState:4;
1228 				DWORD GeneralStateBaseAddress:20;
1229 			};
1230 			struct {
1231 				DWORD Value;
1232 			};
1233 		} DW1;
1234 
1235 		union {
1236 			struct {
1237 				DWORD Modify:1;
1238 				 DWORD:7;
1239 				DWORD SurfaceStateMemObjCtrlState:4;
1240 				DWORD SurfaceStateBaseAddress:20;
1241 			};
1242 			struct {
1243 				DWORD Value;
1244 			};
1245 		} DW2;
1246 
1247 		union {
1248 			struct {
1249 				DWORD Modify:1;
1250 				 DWORD:7;
1251 				DWORD DynamicStateMemObjCtrlState:4;
1252 				DWORD DynamicStateBaseAddress:20;
1253 			};
1254 			struct {
1255 				DWORD Value;
1256 			};
1257 		} DW3;
1258 
1259 		union {
1260 			struct {
1261 				DWORD Modify:1;
1262 				 DWORD:7;
1263 				DWORD IndirectObjectMemObjCtrlState:4;
1264 				DWORD IndirectObjectBaseAddress:20;
1265 			};
1266 			struct {
1267 				DWORD Value;
1268 			};
1269 		} DW4;
1270 
1271 		union {
1272 			struct {
1273 				DWORD Modify:1;
1274 				 DWORD:7;
1275 				DWORD InstructionMemObjCtrlState:4;
1276 				DWORD InstructionBaseAddress:20;
1277 			};
1278 			struct {
1279 				DWORD Value;
1280 			};
1281 
1282 		} DW5;
1283 
1284 		union {
1285 			struct {
1286 				DWORD Modify:1;
1287 				 DWORD:11;
1288 				DWORD GeneralStateAccessUpperBound:20;
1289 			};
1290 			struct {
1291 				DWORD Value;
1292 			};
1293 		} DW6;
1294 
1295 		union {
1296 			struct {
1297 				DWORD Modify:1;
1298 				 DWORD:11;
1299 				DWORD DynamicStateAccessUpperBound:20;
1300 			};
1301 			struct {
1302 				DWORD Value;
1303 			};
1304 		} DW7;
1305 
1306 		union {
1307 			struct {
1308 				DWORD Modify:1;
1309 				 DWORD:11;
1310 				DWORD IndirectObjectAccessUpperBound:20;
1311 			};
1312 			struct {
1313 				DWORD Value;
1314 			};
1315 		} DW8;
1316 
1317 		union {
1318 			struct {
1319 				DWORD Modify:1;
1320 				 DWORD:11;
1321 				DWORD InstructionAccessUpperBound:20;
1322 			};
1323 			struct {
1324 				DWORD Value;
1325 			};
1326 		} DW9;
1327 	} STATE_BASE_ADDRESS_CMD_G6, *PSTATE_BASE_ADDRESS_CMD_G6;
1328 
1329 	typedef struct _SURFACE_STATE_G6 {
1330 		union {
1331 			struct {
1332 				DWORD CubeFaceEnablesPositiveZ:1;
1333 				DWORD CubeFaceEnablesNegativeZ:1;
1334 				DWORD CubeFaceEnablesPositiveY:1;
1335 				DWORD CubeFaceEnablesNegativeY:1;
1336 				DWORD CubeFaceEnablesPositiveX:1;
1337 				DWORD CubeFaceEnablesNegativeX:1;
1338 				DWORD MediaBoundaryPixelMode:2;
1339 				DWORD RenderCacheReadWriteMode:1;
1340 				DWORD CubeMapCornerMode:1;
1341 				DWORD MipMapLayoutMode:1;
1342 				DWORD VerticalLineStrideOffset:1;
1343 				DWORD VerticalLineStride:1;
1344 				DWORD ColorBlendEnable:1;
1345 				DWORD ColorBufferBlueWriteDisable:1;
1346 				DWORD ColorBufferGreenWriteDisable:1;
1347 				DWORD ColorBufferRedWriteDisable:1;
1348 				DWORD ColorBufferAlphaWriteDisable:1;
1349 				DWORD SurfaceFormat:9;
1350 				DWORD DataReturnFormat:1;
1351 				 DWORD:1;
1352 				DWORD SurfaceType:3;
1353 			};
1354 			struct {
1355 				DWORD Value;
1356 			};
1357 		} DW0;
1358 
1359 		union {
1360 			struct {
1361 				DWORD SurfaceBaseAddress;
1362 			};
1363 			struct {
1364 				DWORD Value;
1365 			};
1366 		} DW1;
1367 
1368 		union {
1369 			struct {
1370 				DWORD RenderTargetRotation:2;
1371 				DWORD MipCount:4;
1372 				DWORD Width:13;
1373 				DWORD Height:13;
1374 			};
1375 			struct {
1376 				DWORD Value;
1377 			};
1378 		} DW2;
1379 
1380 		union {
1381 			struct {
1382 				DWORD TileWalk:1;
1383 				DWORD TiledSurface:1;
1384 				 DWORD:1;
1385 				DWORD SurfacePitch:17;
1386 				 DWORD:1;
1387 				DWORD Depth:11;
1388 			};
1389 			struct {
1390 				DWORD Value;
1391 			};
1392 		} DW3;
1393 
1394 		union {
1395 			struct {
1396 				DWORD MultisamplePositionPaletteIndex:3;
1397 				 DWORD:1;
1398 				DWORD NumberofMultisamples:3;
1399 				 DWORD:1;
1400 				DWORD RenderTargetViewExtent:9;
1401 				DWORD MinimumArrayElement:11;
1402 				DWORD SurfaceMinL:4;
1403 			};
1404 			struct {
1405 				DWORD Value;
1406 			};
1407 		} DW4;
1408 
1409 		union {
1410 			struct {
1411 				DWORD:16;
1412 				DWORD CacheabilityControl:2;
1413 				DWORD GraphicsDataType:1;
1414 				DWORD CodedData:1;
1415 				DWORD YOffset:4;
1416 				DWORD SurfaceVerticalAlignment:1;
1417 				DWORD XOffset:7;
1418 			};
1419 			struct {
1420 				DWORD Value;
1421 			};
1422 		} DW5;
1423 
1424 		DWORD dwPad[2];
1425 	} SURFACE_STATE_G6, *PSURFACE_STATE_G6;
1426 
1427 	typedef struct _MEDIA_VFE_STATE_CMD_G6 {
1428 		union {
1429 			struct {
1430 				DWORD Length:16;
1431 				DWORD InstructionSubOpcode:8;
1432 				DWORD InstructionOpcode:3;
1433 				DWORD InstructionPipeline:2;
1434 				DWORD InstructionType:3;
1435 			};
1436 			struct {
1437 				DWORD Value;
1438 			};
1439 		} DW0;
1440 
1441 		union {
1442 			struct {
1443 				DWORD PerThreadScratchSpace:4;
1444 				 DWORD:6;
1445 				DWORD ScratchSpaceBasePointer:22;
1446 			};
1447 			struct {
1448 				DWORD Value;
1449 			};
1450 		} DW1;
1451 
1452 		union {
1453 			struct {
1454 				DWORD DebugCounterControl:2;
1455 				DWORD GPGPUMode:1;
1456 				DWORD GatewayMMIOAccessControl:2;
1457 				DWORD FastPreempt:1;
1458 				DWORD BypassGatewayControl:1;
1459 				DWORD ResetGatewayTimer:1;
1460 				DWORD NumberofURBEntries:8;
1461 				DWORD MaximumNumberofThreads:16;
1462 			};
1463 			struct {
1464 				DWORD Value;
1465 			};
1466 		} DW2;
1467 
1468 		union {
1469 			struct {
1470 				DWORD:8;
1471 				DWORD DebugObjectID:24;
1472 			};
1473 			struct {
1474 				DWORD Value;
1475 			};
1476 		} DW3;
1477 
1478 		union {
1479 			struct {
1480 				DWORD CURBEAllocationSize:16;
1481 				DWORD URBEntryAllocationSize:16;
1482 			};
1483 			struct {
1484 				DWORD Value;
1485 			};
1486 		} DW4;
1487 
1488 		union {
1489 			struct {
1490 				DWORD ScoreboardMask:8;
1491 				 DWORD:22;
1492 				DWORD ScoreboardType:1;
1493 				DWORD ScoreboardEnable:1;
1494 			};
1495 			struct {
1496 				DWORD Value;
1497 			};
1498 		} DW5;
1499 
1500 		union {
1501 			struct {
1502 				DWORD Scoreboard0DeltaX:4;
1503 				DWORD Scoreboard0DeltaY:4;
1504 				DWORD Scoreboard1DeltaX:4;
1505 				DWORD Scoreboard1DeltaY:4;
1506 				DWORD Scoreboard2DeltaX:4;
1507 				DWORD Scoreboard2DeltaY:4;
1508 				DWORD Scoreboard3DeltaX:4;
1509 				DWORD Scoreboard3DeltaY:4;
1510 			};
1511 			struct {
1512 				DWORD Value;
1513 			};
1514 		} DW6;
1515 
1516 		union {
1517 			struct {
1518 				DWORD Scoreboard4DeltaX:4;
1519 				DWORD Scoreboard4DeltaY:4;
1520 				DWORD Scoreboard5DeltaX:4;
1521 				DWORD Scoreboard5DeltaY:4;
1522 				DWORD Scoreboard6DeltaX:4;
1523 				DWORD Scoreboard6DeltaY:4;
1524 				DWORD Scoreboard7DeltaX:4;
1525 				DWORD Scoreboard7DeltaY:4;
1526 			};
1527 			struct {
1528 				DWORD Value;
1529 			};
1530 		} DW7;
1531 	} MEDIA_VFE_STATE_CMD_G6, *PMEDIA_VFE_STATE_CMD_G6;
1532 
1533 	typedef struct _MEDIA_VFE_STATE_CMD_G8 {
1534 		union {
1535 			struct {
1536 				DWORD Length:BITFIELD_RANGE(0, 15);
1537 				DWORD InstructionSubOpcode:BITFIELD_RANGE(16,
1538 									  23);
1539 				DWORD InstructionOpcode:BITFIELD_RANGE(24, 26);
1540 				DWORD InstructionPipeline:BITFIELD_RANGE(27,
1541 									 28);
1542 				DWORD InstructionType:BITFIELD_RANGE(29, 31);
1543 			};
1544 			struct {
1545 				DWORD Value;
1546 			};
1547 		} DW0;
1548 
1549 		union {
1550 			struct {
1551 				DWORD PerThreadScratchSpace:BITFIELD_RANGE(0,
1552 									   3);
1553 				DWORD StackSize:BITFIELD_RANGE(4, 7);
1554 				 DWORD:BITFIELD_RANGE(8, 9);
1555 				DWORD ScratchSpaceBasePointer:BITFIELD_RANGE(10,
1556 									     31);
1557 			};
1558 			struct {
1559 				DWORD Value;
1560 			};
1561 		} DW1;
1562 
1563 		union {
1564 			struct {
1565 				DWORD
1566 				    ScratchSpaceBasePointer64:BITFIELD_RANGE(0,
1567 									     15);
1568 				DWORD:BITFIELD_RANGE(16, 31);
1569 			};
1570 			struct {
1571 				DWORD Value;
1572 			};
1573 		} DW2;
1574 
1575 		union {
1576 			struct {
1577 				DWORD DebugCounterControl:BITFIELD_RANGE(0, 1);
1578 				DWORD GPGPUMode:BITFIELD_BIT(2);
1579 				DWORD GatewayMMIOAccessControl:BITFIELD_RANGE(3,
1580 									      4);
1581 				DWORD FastPreempt:BITFIELD_BIT(5);
1582 				DWORD BypassGatewayControl:BITFIELD_BIT(6);
1583 				DWORD ResetGatewayTimer:BITFIELD_BIT(7);
1584 				DWORD NumberofURBEntries:BITFIELD_RANGE(8, 15);
1585 				DWORD MaximumNumberofThreads:BITFIELD_RANGE(16,
1586 									    31);
1587 			};
1588 			struct {
1589 				DWORD Value;
1590 			};
1591 		} DW3;
1592 
1593 		union {
1594 			struct {
1595 				DWORD SliceDisable:BITFIELD_RANGE(0, 1);
1596 				 DWORD:BITFIELD_RANGE(2, 7);
1597 				DWORD DebugObjectID:BITFIELD_RANGE(8, 31);
1598 			};
1599 			struct {
1600 				DWORD Value;
1601 			};
1602 		} DW4;
1603 
1604 		union {
1605 			struct {
1606 				DWORD CURBEAllocationSize:BITFIELD_RANGE(0, 15);
1607 				DWORD URBEntryAllocationSize:BITFIELD_RANGE(16,
1608 									    31);
1609 			};
1610 			struct {
1611 				DWORD Value;
1612 			};
1613 		} DW5;
1614 
1615 		union {
1616 			struct {
1617 				DWORD ScoreboardMask:BITFIELD_RANGE(0, 7);
1618 				 DWORD:BITFIELD_RANGE(8, 29);
1619 				DWORD ScoreboardType:BITFIELD_BIT(30);
1620 				DWORD ScoreboardEnable:BITFIELD_BIT(31);
1621 			};
1622 			struct {
1623 				DWORD Value;
1624 			};
1625 		} DW6;
1626 
1627 		union {
1628 			struct {
1629 				DWORD Scoreboard0DeltaX:BITFIELD_RANGE(0, 3);
1630 				DWORD Scoreboard0DeltaY:BITFIELD_RANGE(4, 7);
1631 				DWORD Scoreboard1DeltaX:BITFIELD_RANGE(8, 11);
1632 				DWORD Scoreboard1DeltaY:BITFIELD_RANGE(12, 15);
1633 				DWORD Scoreboard2DeltaX:BITFIELD_RANGE(16, 19);
1634 				DWORD Scoreboard2DeltaY:BITFIELD_RANGE(20, 23);
1635 				DWORD Scoreboard3DeltaX:BITFIELD_RANGE(24, 27);
1636 				DWORD Scoreboard3DeltaY:BITFIELD_RANGE(28, 31);
1637 			};
1638 			struct {
1639 				DWORD Value;
1640 			};
1641 		} DW7;
1642 
1643 		union {
1644 			struct {
1645 				DWORD Scoreboard4DeltaX:BITFIELD_RANGE(0, 3);
1646 				DWORD Scoreboard4DeltaY:BITFIELD_RANGE(4, 7);
1647 				DWORD Scoreboard5DeltaX:BITFIELD_RANGE(8, 11);
1648 				DWORD Scoreboard5DeltaY:BITFIELD_RANGE(12, 15);
1649 				DWORD Scoreboard6DeltaX:BITFIELD_RANGE(16, 19);
1650 				DWORD Scoreboard6DeltaY:BITFIELD_RANGE(20, 23);
1651 				DWORD Scoreboard7DeltaX:BITFIELD_RANGE(24, 27);
1652 				DWORD Scoreboard7DeltaY:BITFIELD_RANGE(28, 31);
1653 			};
1654 			struct {
1655 				DWORD Value;
1656 			};
1657 		} DW8;
1658 
1659 	} MEDIA_VFE_STATE_CMD_G8, *PMEDIA_VFE_STATE_CMD_G8;
1660 
1661 	 C_ASSERT(SIZE32(MEDIA_VFE_STATE_CMD_G8) == 9);
1662 
1663 	typedef struct _MEDIA_CURBE_LOAD_CMD_G6 {
1664 		union {
1665 			struct {
1666 				DWORD Length:16;
1667 				DWORD InstructionSubOpcode:8;
1668 				DWORD InstructionOpcode:3;
1669 				DWORD InstructionPipeline:2;
1670 				DWORD InstructionType:3;
1671 			};
1672 			struct {
1673 				DWORD Value;
1674 			};
1675 		} DW0;
1676 
1677 		union {
1678 			struct {
1679 				DWORD Reserved:32;
1680 			};
1681 			struct {
1682 				DWORD Value;
1683 			};
1684 		} DW1;
1685 
1686 		union {
1687 			struct {
1688 				DWORD CURBETotalDataLength:17;
1689 				 DWORD:15;
1690 			};
1691 			struct {
1692 				DWORD Value;
1693 			};
1694 		} DW2;
1695 
1696 		union {
1697 			struct {
1698 				DWORD CURBEDataStartAddress:32;
1699 			};
1700 			struct {
1701 				DWORD Value;
1702 			};
1703 		} DW3;
1704 	} MEDIA_CURBE_LOAD_CMD_G6, *PMEDIA_CURBE_LOAD_CMD_G6;
1705 
1706 	typedef struct _MEDIA_INTERFACE_DESCRIPTOR_LOAD_CMD_G6 {
1707 		union {
1708 			struct {
1709 				DWORD Length:16;
1710 				DWORD InstructionSubOpcode:8;
1711 				DWORD InstructionOpcode:3;
1712 				DWORD InstructionPipeline:2;
1713 				DWORD InstructionType:3;
1714 			};
1715 			struct {
1716 				DWORD Value;
1717 			};
1718 		} DW0;
1719 
1720 		union {
1721 			struct {
1722 				DWORD Reserved:32;
1723 			};
1724 			struct {
1725 				DWORD Value;
1726 			};
1727 		} DW1;
1728 
1729 		union {
1730 			struct {
1731 				DWORD InterfaceDescriptorLength:17;
1732 				 DWORD:15;
1733 			};
1734 			struct {
1735 				DWORD Value;
1736 			};
1737 		} DW2;
1738 
1739 		union {
1740 			struct {
1741 				DWORD InterfaceDescriptorStartAddress:32;
1742 			};
1743 			struct {
1744 				DWORD Value;
1745 			};
1746 		} DW3;
1747 	} MEDIA_INTERFACE_DESCRIPTOR_LOAD_CMD_G6,
1748 	    *PMEDIA_INTERFACE_DESCRIPTOR_LOAD_CMD_G6;
1749 
1750 	typedef struct _INTERFACE_DESCRIPTOR_DATA_G6 {
1751 		union {
1752 			struct {
1753 				DWORD:6;
1754 				DWORD KernelStartPointer:26;
1755 			};
1756 			struct {
1757 				DWORD Value;
1758 			};
1759 		} DW0;
1760 
1761 		union {
1762 			struct {
1763 				DWORD:7;
1764 				DWORD SoftwareExceptionEnable:1;
1765 				 DWORD:3;
1766 				DWORD MaskStackExceptionEnable:1;
1767 				 DWORD:1;
1768 				DWORD IllegalOpcodeExceptionEnable:1;
1769 				 DWORD:2;
1770 				DWORD FloatingPointMode:1;
1771 				DWORD ThreadPriority:1;
1772 				DWORD SingleProgramFlow:1;
1773 				 DWORD:13;
1774 			};
1775 			struct {
1776 				DWORD Value;
1777 			};
1778 		} DW1;
1779 
1780 		union {
1781 			struct {
1782 				DWORD:2;
1783 				DWORD SamplerCount:3;
1784 				DWORD SamplerStatePointer:27;
1785 			};
1786 			struct {
1787 				DWORD Value;
1788 			};
1789 		} DW2;
1790 
1791 		union {
1792 			struct {
1793 				DWORD BindingTableEntryCount:5;
1794 				DWORD BindingTablePointer:27;
1795 			};
1796 			struct {
1797 				DWORD Value;
1798 			};
1799 		} DW3;
1800 
1801 		union {
1802 			struct {
1803 				DWORD ConstantURBEntryReadOffset:16;
1804 				DWORD ConstantURBEntryReadLength:16;
1805 			};
1806 			struct {
1807 				DWORD Value;
1808 			};
1809 		} DW4;
1810 
1811 		union {
1812 			struct {
1813 				DWORD NumberofThreadsInGPGPUGroup:8;
1814 				DWORD BarrierReturnByte:8;
1815 				DWORD SharedLocalMemorySize:5;
1816 				DWORD BarrierEnable:1;
1817 				DWORD RoundingMode:2;
1818 				DWORD BarrierReturnGRFOffset:8;
1819 			};
1820 			struct {
1821 				DWORD Value;
1822 			};
1823 		} DW5;
1824 
1825 		union {
1826 			struct {
1827 				DWORD CrsThdConDataRdLn:8;
1828 				DWORD Reserved:24;
1829 			};
1830 			struct {
1831 				DWORD Value;
1832 			};
1833 		} DW6;
1834 
1835 		union {
1836 			struct {
1837 				DWORD Reserved:32;
1838 			};
1839 			struct {
1840 				DWORD Value;
1841 			};
1842 		} DW7;
1843 	} INTERFACE_DESCRIPTOR_DATA_G6, *PINTERFACE_DESCRIPTOR_DATA_G6;
1844 
1845 	typedef struct _INTERFACE_DESCRIPTOR_DATA_G8 {
1846 		union {
1847 			struct {
1848 				DWORD:BITFIELD_RANGE(0, 5);
1849 				DWORD KernelStartPointer:BITFIELD_RANGE(6, 31);
1850 			};
1851 			struct {
1852 				DWORD Value;
1853 			};
1854 		} DW0;
1855 
1856 		union {
1857 			struct {
1858 				DWORD KernelStartPointer64:BITFIELD_RANGE(0,
1859 									  15);
1860 				 DWORD:BITFIELD_RANGE(16, 31);
1861 			};
1862 			struct {
1863 				DWORD Value;
1864 			};
1865 		} DW1;
1866 
1867 		union {
1868 			struct {
1869 				DWORD:BITFIELD_RANGE(0, 6);
1870 				DWORD SoftwareExceptionEnable:BITFIELD_BIT(7);
1871 				 DWORD:BITFIELD_RANGE(8, 10);
1872 				DWORD MaskStackExceptionEnable:BITFIELD_BIT(11);
1873 				 DWORD:BITFIELD_BIT(12);
1874 				 DWORD
1875 				    IllegalOpcodeExceptionEnable:BITFIELD_BIT
1876 				    (13);
1877 				 DWORD:BITFIELD_RANGE(14, 15);
1878 				DWORD FloatingPointMode:BITFIELD_BIT(16);
1879 				DWORD ThreadPriority:BITFIELD_BIT(17);
1880 				DWORD SingleProgramFlow:BITFIELD_BIT(18);
1881 				DWORD DenormMode:BITFIELD_BIT(19);
1882 				 DWORD:BITFIELD_RANGE(20, 31);
1883 			};
1884 			struct {
1885 				DWORD Value;
1886 			};
1887 		} DW2;
1888 
1889 		union {
1890 			struct {
1891 				DWORD:BITFIELD_RANGE(0, 1);
1892 				DWORD SamplerCount:BITFIELD_RANGE(2, 4);
1893 				DWORD SamplerStatePointer:BITFIELD_RANGE(5, 31);
1894 			};
1895 			struct {
1896 				DWORD Value;
1897 			};
1898 		} DW3;
1899 
1900 		union {
1901 			struct {
1902 				DWORD BindingTableEntryCount:BITFIELD_RANGE(0,
1903 									    4);
1904 				DWORD BindingTablePointer:BITFIELD_RANGE(5, 15);
1905 				 DWORD:BITFIELD_RANGE(16, 31);
1906 			};
1907 			struct {
1908 				DWORD Value;
1909 			};
1910 		} DW4;
1911 
1912 		union {
1913 			struct {
1914 				DWORD
1915 				    ConstantURBEntryReadOffset:BITFIELD_RANGE(0,
1916 									      15);
1917 				DWORD
1918 				    ConstantURBEntryReadLength:BITFIELD_RANGE
1919 				    (16, 31);
1920 			};
1921 			struct {
1922 				DWORD Value;
1923 			};
1924 		} DW5;
1925 
1926 		union {
1927 			struct {
1928 
1929 				DWORD
1930 				    NumberofThreadsInGPGPUGroup:BITFIELD_RANGE
1931 				    (0, 9);
1932 				DWORD:BITFIELD_RANGE(10, 14);
1933 				DWORD GlobalBarrierEnable:BITFIELD_BIT(15);
1934 				DWORD SharedLocalMemorySize:BITFIELD_RANGE(16,
1935 									   20);
1936 				DWORD BarrierEnable:BITFIELD_BIT(21);
1937 				DWORD RoundingMode:BITFIELD_RANGE(22, 23);
1938 				 DWORD:BITFIELD_RANGE(24, 31);
1939 			};
1940 			struct {
1941 				DWORD Value;
1942 			};
1943 		} DW6;
1944 
1945 		union {
1946 			struct {
1947 				DWORD CrsThdConDataRdLn:BITFIELD_RANGE(0, 7);
1948 				 DWORD:BITFIELD_RANGE(8, 31);
1949 			};
1950 			struct {
1951 				DWORD Value;
1952 			};
1953 		} DW7;
1954 	} INTERFACE_DESCRIPTOR_DATA_G8, *PINTERFACE_DESCRIPTOR_DATA_G8;
1955 
1956 	 C_ASSERT(SIZE32(INTERFACE_DESCRIPTOR_DATA_G8) == 8);
1957 
1958 	typedef struct _MEDIA_OBJECT_WALKER_CMD_G6 {
1959 		union {
1960 			struct {
1961 				DWORD Length:16;
1962 				DWORD InstructionSubOpcode:8;
1963 				DWORD InstructionOpcode:3;
1964 				DWORD InstructionPipeline:2;
1965 				DWORD InstructionType:3;
1966 			};
1967 			struct {
1968 				DWORD Value;
1969 			};
1970 		} DW0;
1971 
1972 		union {
1973 			struct {
1974 				DWORD InterfaceDescriptorOffset:6;
1975 				 DWORD:2;
1976 				DWORD ObjectID:24;
1977 			};
1978 			struct {
1979 				DWORD Value;
1980 			};
1981 		} DW1;
1982 
1983 		union {
1984 			struct {
1985 				DWORD IndirectDataLength:17;
1986 				 DWORD:4;
1987 				DWORD UseScoreboard:1;
1988 				 DWORD:2;
1989 				DWORD ThreadSynchronization:1;
1990 				 DWORD:6;
1991 				DWORD ChildrenPresent:1;
1992 			};
1993 			struct {
1994 				DWORD Value;
1995 			};
1996 		} DW2;
1997 
1998 		union {
1999 			struct {
2000 				DWORD IndirectDataStartAddress;
2001 			};
2002 			struct {
2003 				DWORD Value;
2004 			};
2005 		} DW3;
2006 
2007 		union {
2008 			struct {
2009 				DWORD Reserved:32;
2010 			};
2011 			struct {
2012 				DWORD Value;
2013 			};
2014 		} DW4;
2015 
2016 		union {
2017 			struct {
2018 				DWORD ScoreboardMask:8;
2019 				DWORD GroupIdLoopSelect:24;
2020 			};
2021 			struct {
2022 				DWORD Value;
2023 			};
2024 		} DW5;
2025 
2026 		union {
2027 			struct {
2028 				DWORD:8;
2029 				DWORD MidLoopUnitX:2;
2030 				 DWORD:2;
2031 				DWORD MidLoopUnitY:2;
2032 				 DWORD:2;
2033 				DWORD MidLoopExtraSteps:5;
2034 				 DWORD:3;
2035 				DWORD ColorCountMinusOne:4;
2036 				 DWORD:1;
2037 				DWORD QuadMode:1;
2038 				DWORD Repel:1;
2039 				DWORD DualMode:1;
2040 			};
2041 			struct {
2042 				DWORD Value;
2043 			};
2044 		} DW6;
2045 
2046 		union {
2047 			struct {
2048 				DWORD LocalLoopExecCount:10;
2049 				 DWORD:6;
2050 				DWORD GlobalLoopExecCount:10;
2051 				 DWORD:6;
2052 			};
2053 			struct {
2054 				DWORD Value;
2055 			};
2056 		} DW7;
2057 
2058 		union {
2059 			struct {
2060 				DWORD BlockResolutionX:9;
2061 				 DWORD:7;
2062 				DWORD BlockResolutionY:9;
2063 				 DWORD:7;
2064 			};
2065 			struct {
2066 				DWORD Value;
2067 			};
2068 		} DW8;
2069 
2070 		union {
2071 			struct {
2072 				DWORD LocalStartX:9;
2073 				 DWORD:7;
2074 				DWORD LocalStartY:9;
2075 				 DWORD:7;
2076 			};
2077 			struct {
2078 				DWORD Value;
2079 			};
2080 		} DW9;
2081 
2082 		union {
2083 			struct {
2084 				DWORD LocalEndX:9;
2085 				 DWORD:7;
2086 				DWORD LocalEndY:9;
2087 				 DWORD:7;
2088 			};
2089 			struct {
2090 				DWORD Value;
2091 			};
2092 		} DW10;
2093 
2094 		union {
2095 			struct {
2096 				DWORD LocalOuterLoopStrideX:10;
2097 				 DWORD:6;
2098 				DWORD LocalOuterLoopStrideY:10;
2099 				 DWORD:6;
2100 			};
2101 			struct {
2102 				DWORD Value;
2103 			};
2104 		} DW11;
2105 
2106 		union {
2107 			struct {
2108 				DWORD LocalInnerLoopUnitX:10;
2109 				 DWORD:6;
2110 				DWORD LocalInnerLoopUnitY:10;
2111 				 DWORD:6;
2112 			};
2113 			struct {
2114 				DWORD Value;
2115 			};
2116 		} DW12;
2117 
2118 		union {
2119 			struct {
2120 				DWORD GlobalResolutionX:9;
2121 				 DWORD:7;
2122 				DWORD GlobalResolutionY:9;
2123 				 DWORD:7;
2124 			};
2125 			struct {
2126 				DWORD Value;
2127 			};
2128 		} DW13;
2129 
2130 		union {
2131 			struct {
2132 				DWORD GlobalStartX:10;
2133 				 DWORD:6;
2134 				DWORD GlobalStartY:10;
2135 				 DWORD:6;
2136 			};
2137 			struct {
2138 				DWORD Value;
2139 			};
2140 		} DW14;
2141 
2142 		union {
2143 			struct {
2144 				DWORD GlobalOuterLoopStrideX:10;
2145 				 DWORD:6;
2146 				DWORD GlobalOuterLoopStrideY:10;
2147 				 DWORD:6;
2148 			};
2149 			struct {
2150 				DWORD Value;
2151 			};
2152 		} DW15;
2153 
2154 		union {
2155 			struct {
2156 				DWORD GlobalInnerLoopUnitX:10;
2157 				 DWORD:6;
2158 				DWORD GlobalInnerLoopUnitY:10;
2159 				 DWORD:6;
2160 			};
2161 			struct {
2162 				DWORD Value;
2163 			};
2164 		} DW16;
2165 	} MEDIA_OBJECT_WALKER_CMD_G6, *PMEDIA_OBJECT_WALKER_CMD_G6;
2166 
2167 	typedef struct _GPGPU_WALKER_CMD_G75 {
2168 		union {
2169 			struct {
2170 				DWORD Length:8;
2171 				DWORD PredicateEnable:1;
2172 				 DWORD:1;
2173 				DWORD IndirectParameterEnable:1;
2174 				 DWORD:5;
2175 				DWORD InstructionSubOpcode:8;
2176 				DWORD InstructionOpcode:3;
2177 				DWORD InstructionPipeline:2;
2178 				DWORD InstructionType:3;
2179 			};
2180 			struct {
2181 				DWORD Value;
2182 			};
2183 		} DW0;
2184 
2185 		union {
2186 			struct {
2187 				DWORD InterfaceDescriptorOffset:5;
2188 				 DWORD:3;
2189 				DWORD ObjectID:24;
2190 			};
2191 			struct {
2192 				DWORD Value;
2193 			};
2194 		} DW1;
2195 
2196 		union {
2197 			struct {
2198 				DWORD ThreadWidthCounterMax:6;
2199 				 DWORD:2;
2200 				DWORD ThreadHeightCounterMax:6;
2201 				 DWORD:2;
2202 				DWORD ThreadDepthCounterMax:6;
2203 				 DWORD:8;
2204 				DWORD SIMDSize:2;
2205 			};
2206 			struct {
2207 				DWORD Value;
2208 			};
2209 		} DW2;
2210 
2211 		union {
2212 			struct {
2213 				DWORD ThreadGroupIDStartingX;
2214 			};
2215 			struct {
2216 				DWORD Value;
2217 			};
2218 		} DW3;
2219 
2220 		union {
2221 			struct {
2222 				DWORD ThreadGroupIDDimensionX;
2223 			};
2224 			struct {
2225 				DWORD Value;
2226 			};
2227 		} DW4;
2228 
2229 		union {
2230 			struct {
2231 				DWORD ThreadGroupIDStartingY;
2232 			};
2233 			struct {
2234 				DWORD Value;
2235 			};
2236 		} DW5;
2237 
2238 		union {
2239 			struct {
2240 				DWORD ThreadGroupIDDimensionY;
2241 			};
2242 			struct {
2243 				DWORD Value;
2244 			};
2245 		} DW6;
2246 
2247 		union {
2248 			struct {
2249 				DWORD ThreadGroupIDStartingZ;
2250 			};
2251 			struct {
2252 				DWORD Value;
2253 			};
2254 		} DW7;
2255 
2256 		union {
2257 			struct {
2258 				DWORD ThreadGroupIDDimensionZ;
2259 			};
2260 			struct {
2261 				DWORD Value;
2262 			};
2263 		} DW8;
2264 
2265 		union {
2266 			struct {
2267 				DWORD RightExecutionMask;
2268 			};
2269 			struct {
2270 				DWORD Value;
2271 			};
2272 		} DW9;
2273 
2274 		union {
2275 			struct {
2276 				DWORD BottomExecutionMask;
2277 			};
2278 			struct {
2279 				DWORD Value;
2280 			};
2281 		} DW10;
2282 	} GPGPU_WALKER_CMD_G75, *PGPGPU_WALKER_CMD_G75;
2283 
2284 	typedef struct _GPGPU_WALKER_CMD_G8 {
2285 		union {
2286 			struct {
2287 				DWORD Length:8;
2288 				DWORD PredicateEnable:1;
2289 				 DWORD:1;
2290 				DWORD IndirectParameterEnable:1;
2291 				 DWORD:5;
2292 				DWORD InstructionSubOpcode:8;
2293 				DWORD InstructionOpcode:3;
2294 				DWORD InstructionPipeline:2;
2295 				DWORD InstructionType:3;
2296 			};
2297 			struct {
2298 				DWORD Value;
2299 			};
2300 		} DW0;
2301 
2302 		union {
2303 			struct {
2304 				DWORD InterfaceDescriptorOffset:5;
2305 				 DWORD:3;
2306 				DWORD ObjectID:24;
2307 			};
2308 			struct {
2309 				DWORD Value;
2310 			};
2311 		} DW1;
2312 
2313 		union {
2314 			struct {
2315 				DWORD IndirectDataLength:17;
2316 				 DWORD:15;
2317 			};
2318 			struct {
2319 				DWORD Value;
2320 			};
2321 		} DW2;
2322 
2323 		union {
2324 			struct {
2325 				DWORD IndirectDataStartAddress;
2326 			};
2327 			struct {
2328 				DWORD Value;
2329 			};
2330 		} DW3;
2331 
2332 		union {
2333 			struct {
2334 				DWORD ThreadWidthCounterMax:6;
2335 				 DWORD:2;
2336 				DWORD ThreadHeightCounterMax:6;
2337 				 DWORD:2;
2338 				DWORD ThreadDepthCounterMax:6;
2339 				 DWORD:8;
2340 				DWORD SIMDSize:2;
2341 			};
2342 			struct {
2343 				DWORD Value;
2344 			};
2345 		} DW4;
2346 
2347 		union {
2348 			struct {
2349 				DWORD ThreadGroupIDStartingX;
2350 			};
2351 			struct {
2352 				DWORD Value;
2353 			};
2354 		} DW5;
2355 
2356 		union {
2357 			struct {
2358 				DWORD Reserved;
2359 			};
2360 			struct {
2361 				DWORD Value;
2362 			};
2363 		} DW6;
2364 
2365 		union {
2366 			struct {
2367 				DWORD ThreadGroupIDDimensionX;
2368 			};
2369 			struct {
2370 				DWORD Value;
2371 			};
2372 		} DW7;
2373 
2374 		union {
2375 			struct {
2376 				DWORD ThreadGroupIDStartingY;
2377 			};
2378 			struct {
2379 				DWORD Value;
2380 			};
2381 		} DW8;
2382 
2383 		union {
2384 			struct {
2385 				DWORD Reserved;
2386 			};
2387 			struct {
2388 				DWORD Value;
2389 			};
2390 		} DW9;
2391 
2392 		union {
2393 			struct {
2394 				DWORD ThreadGroupIDDimensionY;
2395 			};
2396 			struct {
2397 				DWORD Value;
2398 			};
2399 		} DW10;
2400 
2401 		union {
2402 			struct {
2403 				DWORD ThreadGroupIDStartingZ;
2404 			};
2405 			struct {
2406 				DWORD Value;
2407 			};
2408 		} DW11;
2409 
2410 		union {
2411 			struct {
2412 				DWORD ThreadGroupIDDimensionZ;
2413 			};
2414 			struct {
2415 				DWORD Value;
2416 			};
2417 		} DW12;
2418 
2419 		union {
2420 			struct {
2421 				DWORD RightExecutionMask;
2422 			};
2423 			struct {
2424 				DWORD Value;
2425 			};
2426 		} DW13;
2427 
2428 		union {
2429 			struct {
2430 				DWORD BottomExecutionMask;
2431 			};
2432 			struct {
2433 				DWORD Value;
2434 			};
2435 		} DW14;
2436 	} GPGPU_WALKER_CMD_G8, *PGPGPU_WALKER_CMD_G8;
2437 
2438 	typedef struct _MI_ARB_CHECK_CMD_G75 {
2439 		union _DW0 {
2440 			struct _BitField {
2441 				DWORD Reserved:BITFIELD_RANGE(0, 22);
2442 				DWORD InstructionOpcode:BITFIELD_RANGE(23, 28);
2443 				DWORD InstructionType:BITFIELD_RANGE(29, 31);
2444 			} BitField;
2445 
2446 			DWORD Value;
2447 		} DW0;
2448 	} MI_ARB_CHECK_CMD_G75, *PMI_ARB_CHECK_CMD_G75;
2449 
2450 	typedef struct _MEDIA_STATE_FLUSH_CMD_G75 {
2451 		union {
2452 			struct {
2453 				DWORD Length:16;
2454 				DWORD InstructionSubOpcode:8;
2455 				DWORD InstructionOpcode:3;
2456 				DWORD InstructionPipeline:2;
2457 				DWORD InstructionType:3;
2458 			};
2459 			struct {
2460 				DWORD Value;
2461 			};
2462 		} DW0;
2463 
2464 		union {
2465 			struct {
2466 				DWORD InterfaceDescriptorOffset:6;
2467 				DWORD WatermarkRequired:1;
2468 				DWORD FlushToGo:1;
2469 				DWORD DisablePreemption:1;
2470 				 DWORD:23;
2471 			};
2472 			struct {
2473 				DWORD Value;
2474 			};
2475 		} DW1;
2476 	} MEDIA_STATE_FLUSH_CMD_G75, *PMEDIA_STATE_FLUSH_CMD_G75;
2477 
2478 	typedef struct _PIPE_CONTROL_CMD_G7 {
2479 		union {
2480 			struct {
2481 				DWORD DWordLength:8;
2482 				 DWORD:8;
2483 				DWORD InstructionSubOpcode:8;
2484 				DWORD InstructionOpcode:3;
2485 				DWORD InstructionSubType:2;
2486 				DWORD InstructionType:3;
2487 			};
2488 			struct {
2489 				DWORD Value;
2490 			};
2491 		} DW0;
2492 
2493 		union {
2494 			struct {
2495 				DWORD DepthCacheFlushEnable:1;
2496 				DWORD StallAtPixelScoreboard:1;
2497 				DWORD StateCacheInvalidationEnable:1;
2498 				DWORD ConstantCacheInvalidationEnable:1;
2499 				DWORD VFCacheInvalidationEnable:1;
2500 				DWORD DCFlushEnable:1;
2501 				DWORD ProtectedMemoryApplicationID:1;
2502 				DWORD PIPE_CONTROLFlushEnable:1;
2503 				DWORD NotifyEnable:1;
2504 				DWORD IndirectStatePointersDisable:1;
2505 				DWORD TextureCacheInvalidationEnable:1;
2506 				DWORD InstructionCacheInvalidateEnable:1;
2507 				DWORD RenderTargetCacheFlushEnable:1;
2508 				DWORD DepthStallEnable:1;
2509 				DWORD PostSyncOperation:2;
2510 				DWORD GenericMediaStateClear:1;
2511 				DWORD SynchronizeGFDTSurface:1;
2512 				DWORD TLBInvalidate:1;
2513 				DWORD GlobalSnapshotCountReset:1;
2514 				DWORD CSStall:1;
2515 				DWORD StoreDataIndex:1;
2516 				DWORD ProtectedMemoryEnable:1;
2517 				DWORD LRIPostSyncOperation:1;
2518 				DWORD DestinationAddressType:1;
2519 				DWORD CoreModeEnable:1;
2520 				 DWORD:6;
2521 			};
2522 			struct {
2523 				DWORD Value;
2524 			};
2525 		} DW1;
2526 
2527 		union {
2528 			struct {
2529 				DWORD:2;
2530 				DWORD Address:30;
2531 			};
2532 			struct {
2533 				DWORD Value;
2534 			};
2535 		} DW2;
2536 
2537 		union {
2538 			struct {
2539 				DWORD ImmediateData;
2540 			};
2541 			struct {
2542 				DWORD Value;
2543 			};
2544 		} DW3;
2545 
2546 		union {
2547 			struct {
2548 				DWORD ImmediateData;
2549 			};
2550 			struct {
2551 				DWORD Value;
2552 			};
2553 		} DW4;
2554 	} PIPE_CONTROL_CMD_G7, *PPIPE_CONTROL_CMD_G7;
2555 
2556 	typedef struct _PIPE_CONTROL_CMD_G8 {
2557 		union {
2558 			struct {
2559 				DWORD DWordLength:8;
2560 				 DWORD:8;
2561 				DWORD InstructionSubOpcode:8;
2562 				DWORD InstructionOpcode:3;
2563 				DWORD InstructionSubType:2;
2564 				DWORD InstructionType:3;
2565 			};
2566 			struct {
2567 				DWORD Value;
2568 			};
2569 		} DW0;
2570 
2571 		union {
2572 			struct {
2573 				DWORD DepthCacheFlushEnable:1;
2574 				DWORD StallAtPixelScoreboard:1;
2575 				DWORD StateCacheInvalidationEnable:1;
2576 				DWORD ConstantCacheInvalidationEnable:1;
2577 				DWORD VFCacheInvalidationEnable:1;
2578 				DWORD DCFlushEnable:1;
2579 				DWORD ProtectedMemoryApplicationID:1;
2580 				DWORD PIPE_CONTROLFlushEnable:1;
2581 				DWORD NotifyEnable:1;
2582 				DWORD IndirectStatePointersDisable:1;
2583 				DWORD TextureCacheInvalidationEnable:1;
2584 				DWORD InstructionCacheInvalidateEnable:1;
2585 				DWORD RenderTargetCacheFlushEnable:1;
2586 				DWORD DepthStallEnable:1;
2587 				DWORD PostSyncOperation:2;
2588 				DWORD GenericMediaStateClear:1;
2589 				DWORD SynchronizeGFDTSurface:1;
2590 				DWORD TLBInvalidate:1;
2591 				DWORD GlobalSnapshotCountReset:1;
2592 				DWORD CSStall:1;
2593 				DWORD StoreDataIndex:1;
2594 				DWORD ProtectedMemoryEnable:1;
2595 				DWORD LRIPostSyncOperation:1;
2596 				DWORD DestinationAddressType:1;
2597 				DWORD CoreModeEnable:1;
2598 				 DWORD:6;
2599 			};
2600 			struct {
2601 				DWORD Value;
2602 			};
2603 		} DW1;
2604 
2605 		union {
2606 			struct {
2607 				DWORD:2;
2608 				DWORD Address:30;
2609 			};
2610 			struct {
2611 				DWORD Value;
2612 			};
2613 		} DW2;
2614 
2615 		union {
2616 			struct {
2617 				DWORD Address64:32;
2618 			};
2619 			struct {
2620 				DWORD Value;
2621 			};
2622 		} DW3;
2623 
2624 		union {
2625 			struct {
2626 				DWORD ImmediateData;
2627 			};
2628 			struct {
2629 				DWORD Value;
2630 			};
2631 		} DW4;
2632 
2633 		union {
2634 			struct {
2635 				DWORD ImmediateData;
2636 			};
2637 			struct {
2638 				DWORD Value;
2639 			};
2640 		} DW5;
2641 	} PIPE_CONTROL_CMD_G8, *PPIPE_CONTROL_CMD_G8;
2642 
2643 	typedef struct _SURFACE_STATE_G7 {
2644 		union {
2645 			struct {
2646 				DWORD CubeFaceEnablesPositiveZ:1;
2647 				DWORD CubeFaceEnablesNegativeZ:1;
2648 				DWORD CubeFaceEnablesPositiveY:1;
2649 				DWORD CubeFaceEnablesNegativeY:1;
2650 				DWORD CubeFaceEnablesPositiveX:1;
2651 				DWORD CubeFaceEnablesNegativeX:1;
2652 				DWORD MediaBoundaryPixelMode:2;
2653 				DWORD RenderCacheReadWriteMode:1;
2654 				 DWORD:1;
2655 				DWORD SurfaceArraySpacing:1;
2656 				DWORD VerticalLineStrideOffset:1;
2657 				DWORD VerticalLineStride:1;
2658 				DWORD TileWalk:1;
2659 				DWORD TiledSurface:1;
2660 				DWORD SurfaceHorizontalAlignment:1;
2661 				DWORD SurfaceVerticalAlignment:2;
2662 				DWORD SurfaceFormat:9;
2663 				DWORD MinMagStateNotEqual:1;
2664 				DWORD SurfaceArray:1;
2665 				DWORD SurfaceType:3;
2666 			};
2667 			struct {
2668 				DWORD Value;
2669 			};
2670 		} DW0;
2671 
2672 		union {
2673 			struct {
2674 				DWORD SurfaceBaseAddress;
2675 			};
2676 			struct {
2677 				DWORD Value;
2678 			};
2679 		} DW1;
2680 
2681 		union {
2682 			struct {
2683 				DWORD Width:14;
2684 				 DWORD:2;
2685 				DWORD Height:14;
2686 				 DWORD:2;
2687 			};
2688 			struct {
2689 				DWORD Value;
2690 			};
2691 		} DW2;
2692 
2693 		union {
2694 			struct {
2695 				DWORD SurfacePitch:18;
2696 				 DWORD:3;
2697 				DWORD Depth:11;
2698 			};
2699 			struct {
2700 				DWORD Value;
2701 			};
2702 		} DW3;
2703 
2704 		union {
2705 			struct {
2706 				DWORD MultiSamplePositionPaletteIndex:3;
2707 				DWORD NumberofMultiSamples:3;
2708 				DWORD MultiSampledSurfaceStorageFormat:1;
2709 				DWORD RenderTargetViewExtent:11;
2710 				DWORD MinimumArrayElement:11;
2711 				DWORD RenderTargetRotation:2;
2712 				 DWORD:1;
2713 			};
2714 			struct {
2715 				DWORD Value;
2716 			};
2717 		} DW4;
2718 
2719 		union {
2720 			struct {
2721 				DWORD MipCount:4;
2722 				DWORD SurfaceMinL:4;
2723 				 DWORD:6;
2724 				DWORD CoherencyType:1;
2725 				DWORD StatelessDataPortAccessWriteThru:1;
2726 				DWORD SurfaceObjectControlState:4;
2727 				DWORD YOffset:4;
2728 				 DWORD:1;
2729 				DWORD XOffset:7;
2730 			};
2731 			struct {
2732 				DWORD Value;
2733 			};
2734 		} DW5;
2735 
2736 		union {
2737 			struct {
2738 				DWORD YOffsetUVPlane:14;
2739 				 DWORD:2;
2740 				DWORD XOffsetUVPlane:14;
2741 				 DWORD:2;
2742 			};
2743 			struct {
2744 				DWORD MCSEnable:1;
2745 				 DWORD:2;
2746 				DWORD MCSSurfacePitch:9;
2747 				DWORD MCSBaseAddress:20;
2748 			};
2749 			struct {
2750 				DWORD Value;
2751 			};
2752 		} DW6;
2753 
2754 		union {
2755 			struct {
2756 				DWORD ResourceMinL:12;
2757 				 DWORD:4;
2758 				DWORD ShaderChannelSelectA:3;
2759 				DWORD ShaderChannelSelectB:3;
2760 				DWORD ShaderChannelSelectG:3;
2761 				DWORD ShaderChannelSelectR:3;
2762 				DWORD AlphaClearColor:1;
2763 				DWORD BlueClearColor:1;
2764 				DWORD GreenClearColor:1;
2765 				DWORD RedClearColor:1;
2766 			};
2767 			struct {
2768 				DWORD Value;
2769 			};
2770 		} DW7;
2771 	} SURFACE_STATE_G7, *PSURFACE_STATE_G7;
2772 
2773 	typedef struct _SURFACE_STATE_G8 {
2774 		union {
2775 			struct {
2776 				DWORD CubeFaceEnablesPositiveZ:BITFIELD_BIT(0);
2777 				DWORD CubeFaceEnablesNegativeZ:BITFIELD_BIT(1);
2778 				DWORD CubeFaceEnablesPositiveY:BITFIELD_BIT(2);
2779 				DWORD CubeFaceEnablesNegativeY:BITFIELD_BIT(3);
2780 				DWORD CubeFaceEnablesPositiveX:BITFIELD_BIT(4);
2781 				DWORD CubeFaceEnablesNegativeX:BITFIELD_BIT(5);
2782 				DWORD MediaBoundaryPixelMode:BITFIELD_RANGE(6,
2783 									    7);
2784 				DWORD RenderCacheReadWriteMode:BITFIELD_BIT(8);
2785 				 DWORD:BITFIELD_BIT(9);
2786 				DWORD VerticalLineStrideOffset:BITFIELD_BIT(10);
2787 				DWORD VerticalLineStride:BITFIELD_BIT(11);
2788 				DWORD TileMode:BITFIELD_RANGE(12, 13);
2789 				 DWORD
2790 				    SurfaceHorizontalAlignment:BITFIELD_RANGE
2791 				    (14, 15);
2792 				 DWORD
2793 				    SurfaceVerticalAlignment:BITFIELD_RANGE(16,
2794 									    17);
2795 				DWORD SurfaceFormat:BITFIELD_RANGE(18, 26);
2796 				 DWORD:BITFIELD_BIT(27);
2797 				DWORD SurfaceArray:BITFIELD_BIT(28);
2798 				DWORD SurfaceType:BITFIELD_RANGE(29, 31);
2799 			};
2800 			struct {
2801 				DWORD Value;
2802 			};
2803 		} DW0;
2804 
2805 		union {
2806 			struct {
2807 				DWORD SurfaceQPitch:BITFIELD_RANGE(0, 14);
2808 				 DWORD:BITFIELD_RANGE(15, 23);
2809 				DWORD SurfaceMemObjCtrlState:BITFIELD_RANGE(24,
2810 									    30);
2811 				 DWORD:BITFIELD_BIT(31);
2812 			};
2813 			struct {
2814 				DWORD Value;
2815 			};
2816 		} DW1;
2817 
2818 		union {
2819 			struct {
2820 				DWORD Width:BITFIELD_RANGE(0, 13);
2821 				 DWORD:BITFIELD_RANGE(14, 15);
2822 				DWORD Height:BITFIELD_RANGE(16, 29);
2823 				 DWORD:BITFIELD_RANGE(30, 31);
2824 			};
2825 			struct {
2826 				DWORD Value;
2827 			};
2828 		} DW2;
2829 
2830 		union {
2831 			struct {
2832 				DWORD SurfacePitch:BITFIELD_RANGE(0, 17);
2833 				 DWORD:BITFIELD_RANGE(18, 20);
2834 				DWORD Depth:BITFIELD_RANGE(21, 31);
2835 			};
2836 			struct {
2837 				DWORD Value;
2838 			};
2839 		} DW3;
2840 
2841 		union {
2842 			struct {
2843 				DWORD
2844 				    MultiSamplePositionPaletteIndex:BITFIELD_RANGE
2845 				    (0, 2);
2846 				DWORD NumberofMultiSamples:BITFIELD_RANGE(3, 5);
2847 				 DWORD
2848 				    MultiSampledSurfaceStorageFormat:BITFIELD_BIT
2849 				    (6);
2850 				DWORD RenderTargetViewExtent:BITFIELD_RANGE(7,
2851 									    17);
2852 				DWORD MinimumArrayElement:BITFIELD_RANGE(18,
2853 									 28);
2854 				DWORD RenderTargetRotation:BITFIELD_RANGE(29,
2855 									  30);
2856 				 DWORD:BITFIELD_BIT(31);
2857 			};
2858 			struct {
2859 				DWORD MinArrrayElement:BITFIELD_RANGE(0, 26);
2860 				 DWORD:BITFIELD_RANGE(27, 31);
2861 			};
2862 			struct {
2863 				DWORD Value;
2864 			};
2865 		} DW4;
2866 
2867 		union {
2868 			struct {
2869 				DWORD MipCount:BITFIELD_RANGE(0, 3);
2870 				DWORD SurfaceMinL:BITFIELD_RANGE(4, 7);
2871 				 DWORD:BITFIELD_RANGE(8, 13);
2872 				DWORD CoherencyType:BITFIELD_BIT(14);
2873 				 DWORD:BITFIELD_RANGE(15, 20);
2874 				DWORD YOffset:BITFIELD_RANGE(21, 23);
2875 				 DWORD:BITFIELD_BIT(24);
2876 				DWORD XOffset:BITFIELD_RANGE(25, 31);
2877 			};
2878 			struct {
2879 				DWORD Value;
2880 			};
2881 		} DW5;
2882 
2883 		union {
2884 			struct {
2885 				DWORD AuxSurfaceMode:BITFIELD_RANGE(0, 1);
2886 				 DWORD:BITFIELD_BIT(2);
2887 				DWORD AuxSurfacePitch:BITFIELD_RANGE(3, 11);
2888 				 DWORD:BITFIELD_RANGE(12, 15);
2889 				DWORD AuxSurfaceQPitch:BITFIELD_RANGE(16, 30);
2890 				 DWORD:BITFIELD_BIT(31);
2891 			};
2892 			struct {
2893 				DWORD YOffsetUVPlane:BITFIELD_RANGE(0, 13);
2894 				 DWORD:BITFIELD_RANGE(14, 15);
2895 				DWORD XOffsetUVPlane:BITFIELD_RANGE(16, 29);
2896 				 DWORD:BITFIELD_RANGE(30, 31);
2897 			};
2898 			struct {
2899 				DWORD Value;
2900 			};
2901 		} DW6;
2902 
2903 		union {
2904 			struct {
2905 				DWORD ResourceMinL:BITFIELD_RANGE(0, 11);
2906 				 DWORD:BITFIELD_RANGE(12, 15);
2907 				DWORD ShaderChannelSelectA:BITFIELD_RANGE(16,
2908 									  18);
2909 				DWORD ShaderChannelSelectB:BITFIELD_RANGE(19,
2910 									  21);
2911 				DWORD ShaderChannelSelectG:BITFIELD_RANGE(22,
2912 									  24);
2913 				DWORD ShaderChannelSelectR:BITFIELD_RANGE(25,
2914 									  27);
2915 				DWORD AlphaClearColor:BITFIELD_BIT(28);
2916 				DWORD BlueClearColor:BITFIELD_BIT(29);
2917 				DWORD GreenClearColor:BITFIELD_BIT(30);
2918 				DWORD RedClearColor:BITFIELD_BIT(31);
2919 			};
2920 			struct {
2921 				DWORD Value;
2922 			};
2923 		} DW7;
2924 
2925 		union {
2926 			struct {
2927 				DWORD SurfaceBaseAddress;
2928 			};
2929 			struct {
2930 				DWORD Value;
2931 			};
2932 		} DW8;
2933 
2934 		union {
2935 			struct {
2936 				DWORD SurfaceBaseAddress64:BITFIELD_RANGE(0,
2937 									  15);
2938 				 DWORD:BITFIELD_RANGE(16, 31);
2939 			};
2940 			struct {
2941 				DWORD Value;
2942 			};
2943 		} DW9;
2944 
2945 		union {
2946 			struct {
2947 				DWORD:BITFIELD_RANGE(0, 11);
2948 				DWORD AuxSurfaceBaseAddress:BITFIELD_RANGE(12,
2949 									   31);
2950 			};
2951 			struct {
2952 				DWORD Value;
2953 			};
2954 		} DW10;
2955 
2956 		union {
2957 			struct {
2958 				DWORD AuxSurfaceBaseAddress64:BITFIELD_RANGE(0,
2959 									     15);
2960 				 DWORD:BITFIELD_RANGE(16, 31);
2961 			};
2962 			struct {
2963 				DWORD Value;
2964 			};
2965 		} DW11;
2966 
2967 		union {
2968 			struct {
2969 				DWORD HierarchicalDepthClear;
2970 			};
2971 			struct {
2972 				DWORD Value;
2973 			};
2974 		} DW12;
2975 
2976 		DWORD Padding[3];
2977 
2978 	} SURFACE_STATE_G8, *PSURFACE_STATE_G8;
2979 
2980 	 C_ASSERT(SIZE32(SURFACE_STATE_G8) == 16);
2981 
2982 	typedef struct _PACKET_SURFACE_STATE_G75 {
2983 		SURFACE_STATE_TOKEN_G75 Token;
2984 
2985 		union {
2986 			SURFACE_STATE_G7 cmdSurfaceState_g75;
2987 		};
2988 	} PACKET_SURFACE_STATE_G75, *PPACKET_SURFACE_STATE_G75;
2989 
2990 	typedef struct _PACKET_SURFACE_STATE_G8 {
2991 		SURFACE_STATE_TOKEN_G75 Token;
2992 		SURFACE_STATE_G8 cmdSurfaceState_g8;
2993 	} PACKET_SURFACE_STATE_G8, *PPACKET_SURFACE_STATE_G8;
2994 
2995 	typedef struct _STATE_BASE_ADDRESS_CMD_G75 {
2996 		union {
2997 			struct {
2998 				DWORD Length:8;
2999 				 DWORD:8;
3000 				DWORD InstructionSubOpcode:8;
3001 				DWORD InstructionOpcode:3;
3002 				DWORD InstructionPipeline:2;
3003 				DWORD InstructionType:3;
3004 			};
3005 			struct {
3006 				DWORD Value;
3007 			};
3008 		} DW0;
3009 
3010 		union {
3011 			struct {
3012 				DWORD Modify:1;
3013 				 DWORD:3;
3014 				DWORD StatelessDPMemObjCtrlState:4;
3015 				DWORD GeneralStateMemObjCtrlState:4;
3016 				DWORD GeneralStateBaseAddress:20;
3017 			};
3018 			struct {
3019 				DWORD Value;
3020 			};
3021 		} DW1;
3022 
3023 		union {
3024 			struct {
3025 				DWORD Modify:1;
3026 				 DWORD:7;
3027 				DWORD SurfaceStateMemObjCtrlState:4;
3028 				DWORD SurfaceStateBaseAddress:20;
3029 			};
3030 			struct {
3031 				DWORD Value;
3032 			};
3033 		} DW2;
3034 
3035 		union {
3036 			struct {
3037 				DWORD Modify:1;
3038 				 DWORD:7;
3039 				DWORD DynamicStateMemObjCtrlState:4;
3040 				DWORD DynamicStateBaseAddress:20;
3041 			};
3042 			struct {
3043 				DWORD Value;
3044 			};
3045 		} DW3;
3046 
3047 		union {
3048 			struct {
3049 				DWORD Modify:1;
3050 				 DWORD:7;
3051 				DWORD IndirectObjectMemObjCtrlState:4;
3052 				DWORD IndirectObjectBaseAddress:20;
3053 			};
3054 			struct {
3055 				DWORD Value;
3056 			};
3057 		} DW4;
3058 
3059 		union {
3060 			struct {
3061 				DWORD Modify:1;
3062 				 DWORD:7;
3063 				DWORD InstructionMemObjCtrlState:4;
3064 				DWORD InstructionBaseAddress:20;
3065 			};
3066 			struct {
3067 				DWORD Value;
3068 			};
3069 
3070 		} DW5;
3071 
3072 		union {
3073 			struct {
3074 				DWORD Modify:1;
3075 				 DWORD:11;
3076 				DWORD GeneralStateAccessUpperBound:20;
3077 			};
3078 			struct {
3079 				DWORD Value;
3080 			};
3081 		} DW6;
3082 
3083 		union {
3084 			struct {
3085 				DWORD Modify:1;
3086 				 DWORD:11;
3087 				DWORD DynamicStateAccessUpperBound:20;
3088 			};
3089 			struct {
3090 				DWORD Value;
3091 			};
3092 		} DW7;
3093 
3094 		union {
3095 			struct {
3096 				DWORD Modify:1;
3097 				 DWORD:11;
3098 				DWORD IndirectObjectAccessUpperBound:20;
3099 			};
3100 			struct {
3101 				DWORD Value;
3102 			};
3103 		} DW8;
3104 
3105 		union {
3106 			struct {
3107 				DWORD Modify:1;
3108 				 DWORD:11;
3109 				DWORD InstructionAccessUpperBound:20;
3110 			};
3111 			struct {
3112 				DWORD Value;
3113 			};
3114 		} DW9;
3115 
3116 		union {
3117 			struct {
3118 				DWORD LLCCoherentAddressModify:1;
3119 				 DWORD:11;
3120 				DWORD LLCCoherentBaseAddress:20;
3121 			};
3122 			struct {
3123 				DWORD Value;
3124 			};
3125 		} DW10;
3126 
3127 		union {
3128 			struct {
3129 				DWORD LLCCoherentUpperBoundModify:1;
3130 				 DWORD:11;
3131 				DWORD LLCCoherentUpperBound:20;
3132 			};
3133 			struct {
3134 				DWORD Value;
3135 			};
3136 		} DW11;
3137 	} STATE_BASE_ADDRESS_CMD_G75, *PSTATE_BASE_ADDRESS_CMD_G75;
3138 
3139 	typedef struct _STATE_BASE_ADDRESS_CMD_G8 {
3140 		union {
3141 			struct {
3142 				DWORD Length:BITFIELD_RANGE(0, 7);
3143 				 DWORD:BITFIELD_RANGE(8, 15);
3144 				DWORD InstructionSubOpcode:BITFIELD_RANGE(16,
3145 									  23);
3146 				DWORD InstructionOpcode:BITFIELD_RANGE(24, 26);
3147 				DWORD InstructionSubType:BITFIELD_RANGE(27, 28);
3148 				DWORD InstructionType:BITFIELD_RANGE(29, 31);
3149 			};
3150 			struct {
3151 				DWORD Value;
3152 			};
3153 		} DW0;
3154 
3155 		union {
3156 			struct {
3157 				DWORD
3158 				    GeneralStateBaseAddressModify:BITFIELD_BIT
3159 				    (0);
3160 				DWORD:BITFIELD_RANGE(1, 3);
3161 				DWORD
3162 				    GeneralStateMemObjCtrlState:BITFIELD_RANGE
3163 				    (4, 10);
3164 				DWORD:BITFIELD_BIT(11);
3165 				DWORD GeneralStateBaseAddress:BITFIELD_RANGE(12,
3166 									     31);
3167 			};
3168 			struct {
3169 				DWORD Value;
3170 			};
3171 		} DW1;
3172 
3173 		union {
3174 			struct {
3175 				DWORD
3176 				    GeneralStateBaseAddress64:BITFIELD_RANGE(0,
3177 									     31);
3178 			};
3179 			struct {
3180 				DWORD Value;
3181 			};
3182 		} DW2;
3183 
3184 		union {
3185 			struct {
3186 				DWORD:BITFIELD_RANGE(0, 15);
3187 				DWORD
3188 				    StatelessDPMemObjCtrlState:BITFIELD_RANGE
3189 				    (16, 22);
3190 				DWORD
3191 				    StatelessDPAccessForceWrite:BITFIELD_BIT
3192 				    (23);
3193 				DWORD:BITFIELD_RANGE(24, 31);
3194 			};
3195 			struct {
3196 				DWORD Value;
3197 			};
3198 		} DW3;
3199 
3200 		union {
3201 			struct {
3202 				DWORD
3203 				    SurfaceStateBaseAddressModify:BITFIELD_BIT
3204 				    (0);
3205 				DWORD:BITFIELD_RANGE(1, 3);
3206 				DWORD
3207 				    SurfaceStateMemObjCtrlState:BITFIELD_RANGE
3208 				    (4, 10);
3209 				DWORD:BITFIELD_BIT(11);
3210 				DWORD SurfaceStateBaseAddress:BITFIELD_RANGE(12,
3211 									     31);
3212 			};
3213 			struct {
3214 				DWORD Value;
3215 			};
3216 		} DW4;
3217 
3218 		union {
3219 			struct {
3220 				DWORD
3221 				    SurfaceStateBaseAddress64:BITFIELD_RANGE(0,
3222 									     31);
3223 			};
3224 			struct {
3225 				DWORD Value;
3226 			};
3227 		} DW5;
3228 
3229 		union {
3230 			struct {
3231 				DWORD
3232 				    DynamicStateBaseAddressModify:BITFIELD_BIT
3233 				    (0);
3234 				DWORD:BITFIELD_RANGE(1, 3);
3235 				DWORD
3236 				    DynamicStateMemObjCtrlState:BITFIELD_RANGE
3237 				    (4, 10);
3238 				DWORD:BITFIELD_BIT(11);
3239 				DWORD DynamicStateBaseAddress:BITFIELD_RANGE(12,
3240 									     31);
3241 			};
3242 			struct {
3243 				DWORD Value;
3244 			};
3245 		} DW6;
3246 
3247 		union {
3248 			struct {
3249 				DWORD
3250 				    DynamicStateBaseAddress64:BITFIELD_RANGE(0,
3251 									     31);
3252 			};
3253 			struct {
3254 				DWORD Value;
3255 			};
3256 		} DW7;
3257 
3258 		union {
3259 			struct {
3260 				DWORD
3261 				    IndirectObjBaseAddressModify:BITFIELD_BIT
3262 				    (0);
3263 				DWORD:BITFIELD_RANGE(1, 3);
3264 				DWORD
3265 				    IndirectObjectMemObjCtrlState:BITFIELD_RANGE
3266 				    (4, 10);
3267 				DWORD:BITFIELD_BIT(11);
3268 				DWORD IndirectObjBaseAddress:BITFIELD_RANGE(12,
3269 									    31);
3270 			};
3271 			struct {
3272 				DWORD Value;
3273 			};
3274 		} DW8;
3275 
3276 		union {
3277 			struct {
3278 				DWORD IndirectObjBaseAddress64:BITFIELD_RANGE(0,
3279 									      31);
3280 			};
3281 			struct {
3282 				DWORD Value;
3283 			};
3284 		} DW9;
3285 
3286 		union {
3287 			struct {
3288 				DWORD
3289 				    InstructionBaseAddressModify:BITFIELD_BIT
3290 				    (0);
3291 				DWORD:BITFIELD_RANGE(1, 3);
3292 				DWORD
3293 				    InstructionMemObjCtrlState:BITFIELD_RANGE(4,
3294 									      10);
3295 				DWORD:BITFIELD_BIT(11);
3296 				DWORD InstructionBaseAddress:BITFIELD_RANGE(12,
3297 									    31);
3298 			};
3299 			struct {
3300 				DWORD Value;
3301 			};
3302 		} DW10;
3303 
3304 		union {
3305 			struct {
3306 				DWORD InstructionBaseAddress64:BITFIELD_RANGE(0,
3307 									      31);
3308 			};
3309 			struct {
3310 				DWORD Value;
3311 			};
3312 		} DW11;
3313 
3314 		union {
3315 			struct {
3316 				DWORD
3317 				    GeneralStateBufferSizeModifyEnable:BITFIELD_BIT
3318 				    (0);
3319 				DWORD:BITFIELD_RANGE(1, 11);
3320 				DWORD GeneralStateBufferSize:BITFIELD_RANGE(12,
3321 									    31);
3322 			};
3323 			struct {
3324 				DWORD Value;
3325 			};
3326 		} DW12;
3327 
3328 		union {
3329 			struct {
3330 				DWORD
3331 				    DynamicStateBufferSizeModifyEnable:BITFIELD_BIT
3332 				    (0);
3333 				DWORD:BITFIELD_RANGE(1, 11);
3334 				DWORD DynamicStateBufferSize:BITFIELD_RANGE(12,
3335 									    31);
3336 			};
3337 			struct {
3338 				DWORD Value;
3339 			};
3340 		} DW13;
3341 
3342 		union {
3343 			struct {
3344 				DWORD
3345 				    IndirectObjBufferSizeModifyEnable:BITFIELD_BIT
3346 				    (0);
3347 				DWORD:BITFIELD_RANGE(1, 11);
3348 				DWORD IndirectObjBufferSize:BITFIELD_RANGE(12,
3349 									   31);
3350 			};
3351 			struct {
3352 				DWORD Value;
3353 			};
3354 		} DW14;
3355 
3356 		union {
3357 			struct {
3358 				DWORD
3359 				    InstructionBufferSizeModifyEnable:BITFIELD_BIT
3360 				    (0);
3361 				DWORD:BITFIELD_RANGE(1, 11);
3362 				DWORD InstructionBufferSize:BITFIELD_RANGE(12,
3363 									   31);
3364 			};
3365 			struct {
3366 				DWORD Value;
3367 			};
3368 		} DW15;
3369 
3370 	} STATE_BASE_ADDRESS_CMD_G8, *PSTATE_BASE_ADDRESS_CMD_G8;
3371 
3372 	 C_ASSERT(SIZE32(STATE_BASE_ADDRESS_CMD_G8) == 16);
3373 
3374 	typedef struct _STATE_SIP_CMD_G75
3375 	{
3376 		// DWORD 0
3377 		union
3378 		{
3379 			struct
3380 			{
3381 				DWORD	   Length		: 8;	// OP_LENGTH
3382 				DWORD				: 8;
3383 				DWORD	   InstructionSubOpcode	: 8;	// GFX_COMMON_NONPIPELINED_SUBOPCODE
3384 				DWORD	   InstructionOpcode	: 3;	// GFX_OPCODE
3385 				DWORD	   InstructionPipeline	: 2;	// INSTRUCTION_PIPELINE
3386 				DWORD	   InstructionType	: 3;	// INSTRUCTION_TYPE
3387 			};
3388 			struct
3389 			{
3390 				DWORD	   Value;
3391 			};
3392 		} DW0;
3393 
3394 		// DWORD 1
3395 		union
3396 		{
3397 			struct
3398 			{
3399 				DWORD					: 4;
3400 				DWORD	   SystemInstructionPointer	: 28;   // GTT[31:4]
3401 			};
3402 			struct
3403 			{
3404 				DWORD	   Value;
3405 			};
3406 		} DW1;
3407 	} STATE_SIP_CMD_G75, *PSTATE_SIP_CMD_G75;
3408 
3409 	typedef struct _STATE_SIP_CMD_G8
3410 	{
3411 		// DWORD 0
3412 		union
3413 		{
3414 			struct
3415 			{
3416 				DWORD	   Length		: 8;	// OP_LENGTH
3417 				DWORD				: 8;
3418 				DWORD	   InstructionSubOpcode	: 8;	// GFX_COMMON_NONPIPELINED_SUBOPCODE
3419 				DWORD	   InstructionOpcode	: 3;	// GFX_OPCODE
3420 				DWORD	   InstructionPipeline	: 2;	// INSTRUCTION_PIPELINE
3421 				DWORD	   InstructionType	: 3;	// INSTRUCTION_TYPE
3422 			};
3423 			struct
3424 			{
3425 				DWORD	   Value;
3426 			};
3427 		} DW0;
3428 
3429 		// DWORD 1
3430 		union
3431 		{
3432 			struct
3433 			{
3434 				DWORD									   : 4;
3435 				DWORD	   SystemInstructionPointer	: 28;   // GTT[31:4]
3436 			};
3437 			struct
3438 			{
3439 				DWORD	   Value;
3440 			};
3441 		} DW1;
3442 
3443 		// DWORD 2
3444 		union
3445 		{
3446 			struct
3447 			{
3448 				DWORD	   SystemInstructionPointer64	: 28;   // GTT[63:32]
3449 			};
3450 			struct
3451 			{
3452 				DWORD	   Value;
3453 			};
3454 		} DW2;
3455 	} STATE_SIP_CMD_G8, *PSTATE_SIP_CMD_G8;
3456 
3457 	extern CONST MI_BATCH_BUFFER_END_CMD_G5
3458 	    g_cInit_MI_BATCH_BUFFER_END_CMD_G5;
3459 
3460 	extern CONST MI_NOOP_CMD_G5 g_cInit_MI_NOOP_CMD_G5;
3461 	extern CONST PIPELINE_SELECT_CMD_G5
3462 	    g_cInit_PIPELINE_SELECT_CMD_MEDIA_G575;
3463 
3464 	extern CONST MI_LOAD_REGISTER_IMM_CMD_G6
3465 	    g_cInit_MI_LOAD_REGISTER_IMM_CMD_G6;
3466 	extern CONST PIPE_CONTROL_CMD_G6 g_cInit_PIPE_CONTROL_CMD_G6;
3467 	extern CONST BINDING_TABLE_STATE_G5 g_cInit_BINDING_TABLE_STATE_G5;
3468 	extern CONST STATE_BASE_ADDRESS_CMD_G6
3469 	    g_cInit_STATE_BASE_ADDRESS_CMD_G6;
3470 	extern CONST MEDIA_VFE_STATE_CMD_G6 g_cInit_MEDIA_VFE_STATE_CMD_G6;
3471 	extern CONST MEDIA_CURBE_LOAD_CMD_G6 g_cInit_MEDIA_CURBE_LOAD_CMD_G6;
3472 	extern CONST MEDIA_INTERFACE_DESCRIPTOR_LOAD_CMD_G6
3473 	    g_cInit_MEDIA_INTERFACE_DESCRIPTOR_LOAD_CMD_G6;
3474 	extern CONST INTERFACE_DESCRIPTOR_DATA_G6
3475 	    g_cInit_INTERFACE_DESCRIPTOR_DATA_G6;
3476 	extern CONST MEDIA_OBJECT_WALKER_CMD_G6
3477 	    g_cInit_MEDIA_OBJECT_WALKER_CMD_G6;
3478 	extern CONST GPGPU_WALKER_CMD_G75 g_cInit_GPGPU_WALKER_CMD_G75;
3479 	extern CONST SURFACE_STATE_G6 g_cInit_SURFACE_STATE_G6;
3480 	extern CONST MEDIA_STATE_FLUSH_CMD_G75
3481 	    g_cInit_MEDIA_STATE_FLUSH_CMD_G75;
3482 	extern CONST MEDIA_OBJECT_HEADER_G6 g_cInit_MEDIA_OBJECT_HEADER_G6;
3483 	extern CONST SURFACE_STATE_TOKEN_G75 g_cInit_SURFACE_STATE_TOKEN_G75;
3484 
3485 	extern CONST PIPE_CONTROL_CMD_G7 g_cInit_PIPE_CONTROL_CMD_G7;
3486 	extern CONST SURFACE_STATE_G7 g_cInit_SURFACE_STATE_G7;
3487 
3488 	extern CONST MI_SET_PREDICATE_CMD_G75 g_cInit_MI_SET_PREDICATE_CMD_G75;
3489 	extern CONST STATE_BASE_ADDRESS_CMD_G75
3490 	    g_cInit_STATE_BASE_ADDRESS_CMD_G75;
3491 	extern CONST MI_BATCH_BUFFER_START_CMD_G75
3492 	    g_cInit_MI_BATCH_BUFFER_START_CMD_G75;
3493 
3494 	extern CONST BINDING_TABLE_STATE_G8 g_cInit_BINDING_TABLE_STATE_G8;
3495 	extern CONST SURFACE_STATE_G8 g_cInit_SURFACE_STATE_G8;
3496 	extern CONST PIPE_CONTROL_CMD_G8 g_cInit_PIPE_CONTROL_CMD_G8;
3497 	extern CONST STATE_BASE_ADDRESS_CMD_G8
3498 	    g_cInit_STATE_BASE_ADDRESS_CMD_G8;
3499 	extern CONST MI_BATCH_BUFFER_START_CMD_G8
3500 	    g_cInit_MI_BATCH_BUFFER_START_CMD_G8;
3501 	extern CONST MEDIA_VFE_STATE_CMD_G8 g_cInit_MEDIA_VFE_STATE_CMD_G8;
3502 	extern CONST INTERFACE_DESCRIPTOR_DATA_G8
3503 	    g_cInit_INTERFACE_DESCRIPTOR_DATA_G8;
3504 	extern CONST GPGPU_WALKER_CMD_G8 g_cInit_GPGPU_WALKER_CMD_G8;
3505 
3506     extern CONST STATE_SIP_CMD_G8 g_cInit_STATE_SIP_CMD_G8;
3507 
3508 #ifdef __cplusplus
3509 }
3510 #endif
3511 #endif
3512