Debian Codegraph @

media_driver/agnostic/gen8/hw/mhw_render_hwcmd_g8_X.h

raw
1 /*
2 * Copyright (c) 2017, 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 "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 */
22 //!
23 //! \file mhw_render_hwcmd_g8_X.h
24 //! \brief Auto-generated constructors for MHW and states.
25 //! \details This file may not be included outside of g8_X as other components
26 //! should use MHW interface to interact with MHW commands and states.
27 //!
28 #ifndef __MHW_RENDER_HWCMD_G8_X_H__
29 #define __MHW_RENDER_HWCMD_G8_X_H__
30
31 #pragma once
32
33 #include <cstdint>
34 #include <cstddef>
35
36 #pragma pack(1)
37
38 class mhw_render_g8_X
39 {
40 public:
41 // Internal Macros
42 #define __CODEGEN_MAX(_a, _b) (((_a) > (_b)) ? (_a) : (_b))
43 #define __CODEGEN_BITFIELD(l, h) (h) - (l) + 1
44 #define __CODEGEN_OP_LENGTH_BIAS 2
45 #define __CODEGEN_OP_LENGTH(x) (uint32_t)((__CODEGEN_MAX(x, __CODEGEN_OP_LENGTH_BIAS)) - __CODEGEN_OP_LENGTH_BIAS)
46
47 static uint32_t GetOpLength(uint32_t uiLength) { return __CODEGEN_OP_LENGTH(uiLength); }
48
49 //!
50 //! \brief MEDIA_OBJECT
51 //! \details
52 //!
53 //!
54 struct MEDIA_OBJECT_CMD
55 {
56 union
57 {
58 //!< DWORD 0
59 struct
60 {
61 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 15) ; //!< DWORD_LENGTH
62 uint32_t MediaCommandSubOpcode : __CODEGEN_BITFIELD(16, 23) ; //!< MEDIA_COMMAND_SUB_OPCODE
63 uint32_t MediaCommandOpcode : __CODEGEN_BITFIELD(24, 26) ; //!< MEDIA_COMMAND_OPCODE
64 uint32_t MediaCommandPipeline : __CODEGEN_BITFIELD(27, 28) ; //!< MEDIA_COMMAND_PIPELINE
65 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
66 };
67 uint32_t Value;
68 } DW0;
69 union
70 {
71 //!< DWORD 1
72 struct
73 {
74 uint32_t InterfaceDescriptorOffset : __CODEGEN_BITFIELD( 0, 5) ; //!< Interface Descriptor Offset
75 uint32_t Reserved38 : __CODEGEN_BITFIELD( 6, 31) ; //!< Reserved
76 };
77 uint32_t Value;
78 } DW1;
79 union
80 {
81 //!< DWORD 2
82 struct
83 {
84 uint32_t IndirectDataLength : __CODEGEN_BITFIELD( 0, 16) ; //!< Indirect Data Length
85 uint32_t SubsliceDestinationSelect : __CODEGEN_BITFIELD(17, 18) ; //!< SUBSLICE_DESTINATION_SELECT
86 uint32_t SliceDestinationSelect : __CODEGEN_BITFIELD(19, 20) ; //!< SLICE_DESTINATION_SELECT
87 uint32_t UseScoreboard : __CODEGEN_BITFIELD(21, 21) ; //!< USE_SCOREBOARD
88 uint32_t ForceDestination : __CODEGEN_BITFIELD(22, 22) ; //!< Force Destination
89 uint32_t Reserved87 : __CODEGEN_BITFIELD(23, 23) ; //!< Reserved
90 uint32_t ThreadSynchronization : __CODEGEN_BITFIELD(24, 24) ; //!< THREAD_SYNCHRONIZATION
91 uint32_t Reserved89 : __CODEGEN_BITFIELD(25, 30) ; //!< Reserved
92 uint32_t ChildrenPresent : __CODEGEN_BITFIELD(31, 31) ; //!< Children Present
93 };
94 uint32_t Value;
95 } DW2;
96 union
97 {
98 //!< DWORD 3
99 struct
100 {
101 uint32_t IndirectDataStartAddress ; //!< Indirect Data Start Address
102 };
103 uint32_t Value;
104 } DW3;
105 union
106 {
107 //!< DWORD 4
108 struct
109 {
110 uint32_t ScoreboardX : __CODEGEN_BITFIELD( 0, 8) ; //!< Scoreboard X
111 uint32_t Reserved137 : __CODEGEN_BITFIELD( 9, 15) ; //!< Reserved
112 uint32_t ScoredboardY : __CODEGEN_BITFIELD(16, 24) ; //!< Scoredboard Y
113 uint32_t Reserved153 : __CODEGEN_BITFIELD(25, 31) ; //!< Reserved
114 };
115 uint32_t Value;
116 } DW4;
117 union
118 {
119 //!< DWORD 5
120 struct
121 {
122 uint32_t ScoreboardMask : __CODEGEN_BITFIELD( 0, 7) ; //!< Scoreboard Mask
123 uint32_t Reserved168 : __CODEGEN_BITFIELD( 8, 15) ; //!< Reserved
124 uint32_t ScoreboardColor : __CODEGEN_BITFIELD(16, 19) ; //!< Scoreboard Color
125 uint32_t Reserved180 : __CODEGEN_BITFIELD(20, 31) ; //!< Reserved
126 };
127 uint32_t Value;
128 } DW5;
129
130 //! \name Local enumerations
131
132 enum MEDIA_COMMAND_SUB_OPCODE
133 {
134 MEDIA_COMMAND_SUB_OPCODE_MEDIAOBJECTSUBOP = 0, //!< No additional details
135 };
136
137 enum MEDIA_COMMAND_OPCODE
138 {
139 MEDIA_COMMAND_OPCODE_MEDIAOBJECT = 1, //!< No additional details
140 };
141
142 enum MEDIA_COMMAND_PIPELINE
143 {
144 MEDIA_COMMAND_PIPELINE_MEDIA = 2, //!< No additional details
145 };
146
147 enum COMMAND_TYPE
148 {
149 COMMAND_TYPE_GFXPIPE = 3, //!< No additional details
150 };
151
152 //! \brief SUBSLICE_DESTINATION_SELECT
153 //! \details
154 //! This field selects the SubSlice that this thread must be sent to.
155 //! Ignored if <b>Force Destination</b> = 0
156 enum SUBSLICE_DESTINATION_SELECT
157 {
158 SUBSLICE_DESTINATION_SELECT_SUBSLICE0 = 0, //!< No additional details
159 SUBSLICE_DESTINATION_SELECT_SUBSLICE1 = 1, //!< No additional details
160 SUBSLICE_DESTINATION_SELECT_SUBSLICE2 = 2, //!< No additional details
161 };
162
163 //! \brief SLICE_DESTINATION_SELECT
164 //! \details
165 //! This bit along with the subslice destination select determines the slice
166 //! that this thread must be sent to. Ignored if <b>Force Destination</b> =
167 //! 0, or if product only has 1 slice.
168 enum SLICE_DESTINATION_SELECT
169 {
170 SLICE_DESTINATION_SELECT_SLICE0 = 0, //!< No additional details
171 SLICE_DESTINATION_SELECT_SLICE1 = 1, //!< Cannot be used in products without a Slice 1.
172 SLICE_DESTINATION_SELECT_SLICE2 = 2, //!< Cannot be used in products without a Slice 2.
173 };
174
175 //! \brief USE_SCOREBOARD
176 //! \details
177 //! This field specifies whether the thread associated with this command
178 //! uses hardware scoreboard. Only when this field is set, the scoreboard
179 //! control fields in the VFE Dword are valid. If this field is cleared, the
180 //! thread associated with this command bypasses hardware scoreboard.
181 enum USE_SCOREBOARD
182 {
183 USE_SCOREBOARD_NOTUSINGSCOREBOARD = 0, //!< No additional details
184 USE_SCOREBOARD_USINGSCOREBOARD = 1, //!< No additional details
185 };
186
187 //! \brief THREAD_SYNCHRONIZATION
188 //! \details
189 //! This field when set indicates that the dispatch of the thread originated
190 //! from this command is based on the "spawn root thread" message.
191 enum THREAD_SYNCHRONIZATION
192 {
193 THREAD_SYNCHRONIZATION_NOTHREADSYNCHRONIZATION = 0, //!< No additional details
194 THREAD_SYNCHRONIZATION_THREADDISPATCHISSYNCHRONIZEDBYTHESPAWNROOTTHREADMESSAGE = 1, //!< No additional details
195 };
196
197 //! \name Initializations
198
199 //! \brief Explicit member initialization function
200 MEDIA_OBJECT_CMD();
201
202 static const size_t dwSize = 6;
203 static const size_t byteSize = 24;
204 };
205
206 //!
207 //! \brief PIPELINE_SELECT
208 //! \details
209 //! The PIPELINE_SELECT command is used to specify which GPE pipeline is to
210 //! be considered the 'current' active pipeline. Issuing
211 //! 3D-pipeline-specific commands when the Media pipeline is selected, or
212 //! vice versa, is UNDEFINED.
213 //!
214 //! Issuing 3D-pipeline-specific commands when the GPGPU pipeline is
215 //! selected, or vice versa, is UNDEFINED.
216 //!
217 //! Programming common non pipeline commands (e.g., STATE_BASE_ADDRESS) is
218 //! allowed in all pipeline modes.
219 //!
220 //! Software must ensure all the write caches are flushed through a stalling
221 //! PIPE_CONTROL command followed by another PIPE_CONTROL command to
222 //! invalidate read only caches prior to programming MI_PIPELINE_SELECT
223 //! command to change the Pipeline Select Mode. Example: ... Workload-3Dmode
224 //! PIPE_CONTROL (CS Stall, Depth Cache Flush Enable, Render Target Cache
225 //! Flush Enable, DC Flush Enable) PIPE_CONTROL (Constant Cache Invalidate,
226 //! Texture Cache Invalidate, Instruction Cache Invalidate, State Cache
227 //! invalidate) PIPELINE_SELECT ( GPGPU)
228 //!
229 //! Software must clear the COLOR_CALC_STATE Valid field in
230 //! 3DSTATE_CC_STATE_POINTERS command prior to send a PIPELINE_SELECT with
231 //! Pipeline Select set to GPGPU.
232 //!
233 //! Render CS Only: SW must always program PIPE_CONTROL with CS Stall and
234 //! Render Target Cache Flush Enable set prior to programming
235 //! PIPELINE_SELECT command for GPGPU workloads i.e when pipeline mode is
236 //! set to GPGPU. This is required to achieve better GPGPU preemption
237 //! latencies for certain programming sequences. If programming PIPE_CONTROL
238 //! has performance implications then preemption latencies can be trade off
239 //! against performance by not implementing this programming note.
240 //!
241 //! Hardware Binding Tables are only supported for 3D workloads. Resource
242 //! streamer must be enabled only for 3D workloads. Resource streamer must
243 //! be disabled for Media and GPGPU workloads. Batch buffer containing both
244 //! 3D and GPGPU workloads must take care of disabling and enabling Resource
245 //! Streamer appropriately while changing the PIPELINE_SELECT mode from 3D
246 //! to GPGPU and vice versa. Resource streamer must be disabled using
247 //! MI_RS_CONTROL command and Hardware Binding Tables must be disabled by
248 //! programming 3DSTATE_BINDING_TABLE_POOL_ALLOC with "Binding Table Pool
249 //! Enable" set to disable (i.e. value '0'). Example below shows disabling
250 //! and enabling of resource streamer in a batch buffer for 3D and GPGPU
251 //! workloads. MI_BATCH_BUFFER_START (Resource Streamer Enabled)
252 //! PIPELINE_SELECT (3D) 3DSTATE_BINDING_TABLE_POOL_ALLOC (Binding Table
253 //! Pool Enabled) 3D WORKLOAD MI_RS_CONTROL (Disable Resource Streamer)
254 //! 3DSTATE_BINDING_TABLE_POOL_ALLOC (Binding Table Pool Disabled)
255 //! PIPELINE_SELECT (GPGPU) GPGPU Workload 3DSTATE_BINDING_TABLE_POOL_ALLOC
256 //! (Binding Table Pool Enabled) MI_RS_CONTROL (Enable Resource Streamer) 3D
257 //! WORKLOAD MI_BATCH_BUFFER_END
258 //!
259 //! Render command streamer (RCS) does Fixed Function DOP CG for media and
260 //! gpgpu workloads. During context restore 3D semi pipeline state is
261 //! restored to WM, which triggers implicit flush. Theoretically under
262 //! certain conditions RCS can trigger FFDOP CG while WM  in doing implicit
263 //! flush leading to hangs. Only way to resolve this issue is by
264 //! disabling FFDOP CG feature. This issue is being fixed on G0 stepping.  
265 //!  
266 //! So far this issue is not yet hit in pre-silicon validation, emulation,
267 //! Silicon-SV or Silicon-Driver being a rare condition.
268 //! Disabling FFDOP CG is not being applied at this point to allow valdiaiton
269 //! to make progress on FFDOP CG feature, further decision will be taken
270 //! when this issue occurs. Validation teams are requested to triage any
271 //! GPGPU workload hangs with WM no done with FFDOP CG disabled to eliminate
272 //! this scenario.
273 //!
274 struct PIPELINE_SELECT_CMD
275 {
276 union
277 {
278 //!< DWORD 0
279 struct
280 {
281 uint32_t PipelineSelection : __CODEGEN_BITFIELD( 0, 1) ; //!< PIPELINE_SELECTION
282 uint32_t Reserved2 : __CODEGEN_BITFIELD( 2, 15) ; //!< Reserved
283 uint32_t Command3DSubOpcode : __CODEGEN_BITFIELD(16, 23) ; //!< _3D_COMMAND_SUB_OPCODE
284 uint32_t Command3DOpcode : __CODEGEN_BITFIELD(24, 26) ; //!< _3D_COMMAND_OPCODE
285 uint32_t CommandSubtype : __CODEGEN_BITFIELD(27, 28) ; //!< COMMAND_SUBTYPE
286 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
287 };
288 uint32_t Value;
289 } DW0;
290
291 //! \name Local enumerations
292
293 enum PIPELINE_SELECTION
294 {
295 PIPELINE_SELECTION_3D = 0, //!< 3D pipeline is selected
296 PIPELINE_SELECTION_MEDIA = 1, //!< Media pipeline is selected (Includes HD optical disc playback, HD video playback, and generic media workloads)
297 PIPELINE_SELECTION_GPGPU = 2, //!< GPGPU pipeline is selected
298 };
299
300 enum _3D_COMMAND_SUB_OPCODE
301 {
302 _3D_COMMAND_SUB_OPCODE_PIPELINESELECT = 4, //!< No additional details
303 };
304
305 enum _3D_COMMAND_OPCODE
306 {
307 _3D_COMMAND_OPCODE_GFXPIPENONPIPELINED = 1, //!< No additional details
308 };
309
310 enum COMMAND_SUBTYPE
311 {
312 COMMAND_SUBTYPE_GFXPIPESINGLEDW = 1, //!< No additional details
313 };
314
315 enum COMMAND_TYPE
316 {
317 COMMAND_TYPE_GFXPIPE = 3, //!< No additional details
318 };
319
320 //! \name Initializations
321
322 //! \brief Explicit member initialization function
323 PIPELINE_SELECT_CMD();
324
325 static const size_t dwSize = 1;
326 static const size_t byteSize = 4;
327 };
328
329 //!
330 //! \brief STATE_BASE_ADDRESS
331 //! \details
332 //! The STATE_BASE_ADDRESS command sets the base pointers for subsequent
333 //! state, instruction, and media indirect object accesses by the GPE.
334 //! For more information see the Base Address Utilization table in the
335 //! Memory Access Indirection narrative topic.
336 //!
337 //! The following commands must be reissued following any change to the base
338 //! addresses: 3DSTATE_CC_POINTERS
339 //! 3DSTATE_BINDING_TABLE_POINTERS
340 //! 3DSTATE_SAMPLER_STATE_POINTERS
341 //! 3DSTATE_VIEWPORT_STATE_POINTERS
342 //! MEDIA_STATE_POINTERS
343 //! Execution of this command causes a full pipeline flush, thus its use
344 //! should be minimized for higher performance.
345 //!
346 //! SW must always program PIPE_CONTROL with "CS Stall" and "Render Target
347 //! Cache Flush Enable" set before programming STATE_BASE_ADDRESS command
348 //! for GPGPU workloads i.e when pipeline select is GPGPU via
349 //! PIPELINE_SELECT command. This is required to achieve better GPGPU
350 //! preemption latencies in certain workload programming sequences. If
351 //! programming PIPE_CONTROL has performance implications then preemption
352 //! latencies can be traded off against performance by not implementing this
353 //! programming note.
354 //!
355 struct STATE_BASE_ADDRESS_CMD
356 {
357 union
358 {
359 //!< DWORD 0
360 struct
361 {
362 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 7) ; //!< DWORD_LENGTH
363 uint32_t Reserved8 : __CODEGEN_BITFIELD( 8, 15) ; //!< Reserved
364 uint32_t Command3DSubOpcode : __CODEGEN_BITFIELD(16, 23) ; //!< _3D_COMMAND_SUB_OPCODE
365 uint32_t Command3DOpcode : __CODEGEN_BITFIELD(24, 26) ; //!< _3D_COMMAND_OPCODE
366 uint32_t CommandSubtype : __CODEGEN_BITFIELD(27, 28) ; //!< COMMAND_SUBTYPE
367 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
368 };
369 uint32_t Value;
370 } DW0;
371 union
372 {
373 //!< DWORD 1..2
374 struct
375 {
376 uint64_t GeneralStateBaseAddressModifyEnable : __CODEGEN_BITFIELD( 0, 0) ; //!< GENERAL_STATE_BASE_ADDRESS_MODIFY_ENABLE
377 uint64_t Reserved33 : __CODEGEN_BITFIELD( 1, 3) ; //!< Reserved
378 uint64_t GeneralStateMemoryObjectControlState : __CODEGEN_BITFIELD( 4, 10) ; //!< General State Memory Object Control State
379 uint64_t Reserved43 : __CODEGEN_BITFIELD(11, 11) ; //!< Reserved
380 uint64_t GeneralStateBaseAddress : __CODEGEN_BITFIELD(12, 63) ; //!< General State Base Address
381 };
382 uint32_t Value[2];
383 } DW1_2;
384 union
385 {
386 //!< DWORD 3
387 struct
388 {
389 uint32_t Reserved96 : __CODEGEN_BITFIELD( 0, 15) ; //!< Reserved
390 uint32_t StatelessDataPortAccessMemoryObjectControlState : __CODEGEN_BITFIELD(16, 22) ; //!< Stateless Data Port Access Memory Object Control State
391 uint32_t Reserved119 : __CODEGEN_BITFIELD(23, 31) ; //!< Reserved
392 };
393 uint32_t Value;
394 } DW3;
395 union
396 {
397 //!< DWORD 4..5
398 struct
399 {
400 uint64_t SurfaceStateBaseAddressModifyEnable : __CODEGEN_BITFIELD( 0, 0) ; //!< SURFACE_STATE_BASE_ADDRESS_MODIFY_ENABLE
401 uint64_t Reserved129 : __CODEGEN_BITFIELD( 1, 3) ; //!< Reserved
402 uint64_t SurfaceStateMemoryObjectControlState : __CODEGEN_BITFIELD( 4, 10) ; //!< Surface State Memory Object Control State
403 uint64_t Reserved139 : __CODEGEN_BITFIELD(11, 11) ; //!< Reserved
404 uint64_t SurfaceStateBaseAddress : __CODEGEN_BITFIELD(12, 63) ; //!< Surface State Base Address
405 };
406 uint32_t Value[2];
407 } DW4_5;
408 union
409 {
410 //!< DWORD 6..7
411 struct
412 {
413 uint64_t DynamicStateBaseAddressModifyEnable : __CODEGEN_BITFIELD( 0, 0) ; //!< DYNAMIC_STATE_BASE_ADDRESS_MODIFY_ENABLE
414 uint64_t Reserved193 : __CODEGEN_BITFIELD( 1, 3) ; //!< Reserved
415 uint64_t DynamicStateMemoryObjectControlState : __CODEGEN_BITFIELD( 4, 10) ; //!< Dynamic State Memory Object Control State
416 uint64_t Reserved203 : __CODEGEN_BITFIELD(11, 11) ; //!< Reserved
417 uint64_t DynamicStateBaseAddress : __CODEGEN_BITFIELD(12, 63) ; //!< Dynamic State Base Address
418 };
419 uint32_t Value[2];
420 } DW6_7;
421 union
422 {
423 //!< DWORD 8..9
424 struct
425 {
426 uint64_t IndirectObjectBaseAddressModifyEnable : __CODEGEN_BITFIELD( 0, 0) ; //!< INDIRECT_OBJECT_BASE_ADDRESS_MODIFY_ENABLE
427 uint64_t Reserved257 : __CODEGEN_BITFIELD( 1, 3) ; //!< Reserved
428 uint64_t IndirectObjectMemoryObjectControlState : __CODEGEN_BITFIELD( 4, 10) ; //!< Indirect Object Memory Object Control State
429 uint64_t Reserved267 : __CODEGEN_BITFIELD(11, 11) ; //!< Reserved
430 uint64_t IndirectObjectBaseAddress : __CODEGEN_BITFIELD(12, 63) ; //!< Indirect Object Base Address
431 };
432 uint32_t Value[2];
433 } DW8_9;
434 union
435 {
436 //!< DWORD 10..11
437 struct
438 {
439 uint64_t InstructionBaseAddressModifyEnable : __CODEGEN_BITFIELD( 0, 0) ; //!< INSTRUCTION_BASE_ADDRESS_MODIFY_ENABLE
440 uint64_t Reserved321 : __CODEGEN_BITFIELD( 1, 3) ; //!< Reserved
441 uint64_t InstructionMemoryObjectControlState : __CODEGEN_BITFIELD( 4, 10) ; //!< Instruction Memory Object Control State
442 uint64_t Reserved331 : __CODEGEN_BITFIELD(11, 11) ; //!< Reserved
443 uint64_t InstructionBaseAddress : __CODEGEN_BITFIELD(12, 63) ; //!< Instruction Base Address
444 };
445 uint32_t Value[2];
446 } DW10_11;
447 union
448 {
449 //!< DWORD 12
450 struct
451 {
452 uint32_t GeneralStateBufferSizeModifyEnable : __CODEGEN_BITFIELD( 0, 0) ; //!< GENERAL_STATE_BUFFER_SIZE_MODIFY_ENABLE
453 uint32_t Reserved385 : __CODEGEN_BITFIELD( 1, 11) ; //!< Reserved
454 uint32_t GeneralStateBufferSize : __CODEGEN_BITFIELD(12, 31) ; //!< General State Buffer Size
455 };
456 uint32_t Value;
457 } DW12;
458 union
459 {
460 //!< DWORD 13
461 struct
462 {
463 uint32_t DynamicStateBufferSizeModifyEnable : __CODEGEN_BITFIELD( 0, 0) ; //!< DYNAMIC_STATE_BUFFER_SIZE_MODIFY_ENABLE
464 uint32_t Reserved417 : __CODEGEN_BITFIELD( 1, 11) ; //!< Reserved
465 uint32_t DynamicStateBufferSize : __CODEGEN_BITFIELD(12, 31) ; //!< Dynamic State Buffer Size
466 };
467 uint32_t Value;
468 } DW13;
469 union
470 {
471 //!< DWORD 14
472 struct
473 {
474 uint32_t IndirectObjectBufferSizeModifyEnable : __CODEGEN_BITFIELD( 0, 0) ; //!< INDIRECT_OBJECT_BUFFER_SIZE_MODIFY_ENABLE
475 uint32_t Reserved449 : __CODEGEN_BITFIELD( 1, 11) ; //!< Reserved
476 uint32_t IndirectObjectBufferSize : __CODEGEN_BITFIELD(12, 31) ; //!< Indirect Object Buffer Size
477 };
478 uint32_t Value;
479 } DW14;
480 union
481 {
482 //!< DWORD 15
483 struct
484 {
485 uint32_t InstructionBufferSizeModifyEnable : __CODEGEN_BITFIELD( 0, 0) ; //!< INSTRUCTION_BUFFER_SIZE_MODIFY_ENABLE
486 uint32_t Reserved481 : __CODEGEN_BITFIELD( 1, 11) ; //!< Reserved
487 uint32_t InstructionBufferSize : __CODEGEN_BITFIELD(12, 31) ; //!< Instruction Buffer Size
488 };
489 uint32_t Value;
490 } DW15;
491
492 //! \name Local enumerations
493
494 enum _3D_COMMAND_SUB_OPCODE
495 {
496 _3D_COMMAND_SUB_OPCODE_STATEBASEADDRESS = 1, //!< No additional details
497 };
498
499 enum _3D_COMMAND_OPCODE
500 {
501 _3D_COMMAND_OPCODE_GFXPIPENONPIPELINED = 1, //!< No additional details
502 };
503
504 enum COMMAND_SUBTYPE
505 {
506 COMMAND_SUBTYPE_GFXPIPECOMMON = 0, //!< No additional details
507 };
508
509 enum COMMAND_TYPE
510 {
511 COMMAND_TYPE_GFXPIPE = 3, //!< No additional details
512 };
513
514 //! \brief GENERAL_STATE_BASE_ADDRESS_MODIFY_ENABLE
515 //! \details
516 //! <p>The other fields in this DWord and the following DWord are updated
517 //! only when this bit is set.</p>
518 enum GENERAL_STATE_BASE_ADDRESS_MODIFY_ENABLE
519 {
520 GENERAL_STATE_BASE_ADDRESS_MODIFY_ENABLE_DISABLE = 0, //!< Ignore the updated address.
521 GENERAL_STATE_BASE_ADDRESS_MODIFY_ENABLE_ENABLE = 1, //!< Modify the address.
522 };
523
524 //! \brief SURFACE_STATE_BASE_ADDRESS_MODIFY_ENABLE
525 //! \details
526 //! The other fields in this DWord and the following DWord are updated only
527 //! when this bit is set.
528 enum SURFACE_STATE_BASE_ADDRESS_MODIFY_ENABLE
529 {
530 SURFACE_STATE_BASE_ADDRESS_MODIFY_ENABLE_DISABLE = 0, //!< Ignore the updated address.
531 SURFACE_STATE_BASE_ADDRESS_MODIFY_ENABLE_ENABLE = 1, //!< Modify the address.
532 };
533
534 //! \brief DYNAMIC_STATE_BASE_ADDRESS_MODIFY_ENABLE
535 //! \details
536 //! The other fields in this DWord and the following DWord are updated only
537 //! when this bit is set.
538 enum DYNAMIC_STATE_BASE_ADDRESS_MODIFY_ENABLE
539 {
540 DYNAMIC_STATE_BASE_ADDRESS_MODIFY_ENABLE_DISABLE = 0, //!< Ignore the updated address.
541 DYNAMIC_STATE_BASE_ADDRESS_MODIFY_ENABLE_ENABLE = 1, //!< Modify the address.
542 };
543
544 //! \brief INDIRECT_OBJECT_BASE_ADDRESS_MODIFY_ENABLE
545 //! \details
546 //! <p>The other fields in this DWord and the following DWord are updated
547 //! only when this bit is set.</p>
548 enum INDIRECT_OBJECT_BASE_ADDRESS_MODIFY_ENABLE
549 {
550 INDIRECT_OBJECT_BASE_ADDRESS_MODIFY_ENABLE_DISABLE = 0, //!< Ignore the updated address.
551 INDIRECT_OBJECT_BASE_ADDRESS_MODIFY_ENABLE_ENABLE = 1, //!< Modify the address.
552 };
553
554 //! \brief INSTRUCTION_BASE_ADDRESS_MODIFY_ENABLE
555 //! \details
556 //! <p>The other fields in this DWord and the following DWord are updated
557 //! only when this bit is set.</p>
558 enum INSTRUCTION_BASE_ADDRESS_MODIFY_ENABLE
559 {
560 INSTRUCTION_BASE_ADDRESS_MODIFY_ENABLE_DISABLE = 0, //!< Ignore the updated address.
561 INSTRUCTION_BASE_ADDRESS_MODIFY_ENABLE_ENABLE = 1, //!< Modify the address.
562 };
563
564 //! \brief GENERAL_STATE_BUFFER_SIZE_MODIFY_ENABLE
565 //! \details
566 //! The bound in this DWord is updated only when this bit is set.
567 enum GENERAL_STATE_BUFFER_SIZE_MODIFY_ENABLE
568 {
569 GENERAL_STATE_BUFFER_SIZE_MODIFY_ENABLE_DISABLE = 0, //!< Ignore the updated bound.
570 GENERAL_STATE_BUFFER_SIZE_MODIFY_ENABLE_ENABLE = 1, //!< Modify the updated bound.
571 };
572
573 //! \brief DYNAMIC_STATE_BUFFER_SIZE_MODIFY_ENABLE
574 //! \details
575 //! FormatDesc
576 enum DYNAMIC_STATE_BUFFER_SIZE_MODIFY_ENABLE
577 {
578 DYNAMIC_STATE_BUFFER_SIZE_MODIFY_ENABLE_DISABLE = 0, //!< Ignore the updated bound.
579 DYNAMIC_STATE_BUFFER_SIZE_MODIFY_ENABLE_ENABLE = 1, //!< Modify the updated bound.
580 };
581
582 //! \brief INDIRECT_OBJECT_BUFFER_SIZE_MODIFY_ENABLE
583 //! \details
584 //! FormatDesc
585 enum INDIRECT_OBJECT_BUFFER_SIZE_MODIFY_ENABLE
586 {
587 INDIRECT_OBJECT_BUFFER_SIZE_MODIFY_ENABLE_DISABLE = 0, //!< Ignore the updated bound.
588 INDIRECT_OBJECT_BUFFER_SIZE_MODIFY_ENABLE_ENABLE = 1, //!< Modify the updated bound.
589 };
590
591 //! \brief INSTRUCTION_BUFFER_SIZE_MODIFY_ENABLE
592 //! \details
593 //! FormatDesc
594 enum INSTRUCTION_BUFFER_SIZE_MODIFY_ENABLE
595 {
596 INSTRUCTION_BUFFER_SIZE_MODIFY_ENABLE_DISABLE = 0, //!< Ignore the updated bound.
597 };
598
599 //! \name Initializations
600
601 //! \brief Explicit member initialization function
602 STATE_BASE_ADDRESS_CMD();
603
604 static const size_t dwSize = 16;
605 static const size_t byteSize = 64;
606 };
607
608 //!
609 //! \brief MEDIA_VFE_STATE
610 //! \details
611 //! A stalling PIPE_CONTROL is required before MEDIA_VFE_STATE unless the
612 //! only bits that are changed are scoreboard related: Scoreboard Enable,
613 //! Scoreboard Type, Scoreboard Mask, Scoreboard * Delta. For these
614 //! scoreboard related states, a MEDIA_STATE_FLUSH is sufficient.
615 //!
616 //! MEDIA_STATE_FLUSH (optional, only if barrier dependency is needed)
617 //!
618 //! MEDIA_INTERFACE_DESCRIPTOR_LOAD (optional)
619 //!
620 //!
621 //!
622 struct MEDIA_VFE_STATE_CMD
623 {
624 union
625 {
626 //!< DWORD 0
627 struct
628 {
629 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 15) ; //!< DWORD_LENGTH
630 uint32_t Subopcode : __CODEGEN_BITFIELD(16, 23) ; //!< SUBOPCODE
631 uint32_t MediaCommandOpcode : __CODEGEN_BITFIELD(24, 26) ; //!< MEDIA_COMMAND_OPCODE
632 uint32_t Pipeline : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE
633 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
634 };
635 uint32_t Value;
636 } DW0;
637 union
638 {
639 //!< DWORD 1
640 struct
641 {
642 uint32_t PerThreadScratchSpace : __CODEGEN_BITFIELD( 0, 3) ; //!< Per Thread Scratch Space
643 uint32_t StackSize : __CODEGEN_BITFIELD( 4, 7) ; //!< Stack Size
644 uint32_t Reserved40 : __CODEGEN_BITFIELD( 8, 9) ; //!< Reserved
645 uint32_t ScratchSpaceBasePointer : __CODEGEN_BITFIELD(10, 31) ; //!< Scratch Space Base Pointer
646 };
647 uint32_t Value;
648 } DW1;
649 union
650 {
651 //!< DWORD 2
652 struct
653 {
654 uint32_t ScratchSpaceBasePointerHigh : __CODEGEN_BITFIELD( 0, 15) ; //!< Scratch Space Base Pointer High
655 uint32_t Reserved80 : __CODEGEN_BITFIELD(16, 31) ; //!< Reserved
656 };
657 uint32_t Value;
658 } DW2;
659 union
660 {
661 //!< DWORD 3
662 struct
663 {
664 uint32_t Reserved96 : __CODEGEN_BITFIELD( 0, 5) ; //!< Reserved
665 uint32_t BypassGatewayControl : __CODEGEN_BITFIELD( 6, 6) ; //!< BYPASS_GATEWAY_CONTROL
666 uint32_t ResetGatewayTimer : __CODEGEN_BITFIELD( 7, 7) ; //!< RESET_GATEWAY_TIMER
667 uint32_t NumberOfUrbEntries : __CODEGEN_BITFIELD( 8, 15) ; //!< Number of URB Entries
668 uint32_t MaximumNumberOfThreads : __CODEGEN_BITFIELD(16, 31) ; //!< Maximum Number of Threads
669 };
670 uint32_t Value;
671 } DW3;
672 union
673 {
674 //!< DWORD 4
675 struct
676 {
677 uint32_t SliceDisable : __CODEGEN_BITFIELD( 0, 1) ; //!< SLICE_DISABLE
678 uint32_t Reserved130 : __CODEGEN_BITFIELD( 2, 31) ; //!< Reserved
679 };
680 uint32_t Value;
681 } DW4;
682 union
683 {
684 //!< DWORD 5
685 struct
686 {
687 uint32_t CurbeAllocationSize : __CODEGEN_BITFIELD( 0, 15) ; //!< CURBE Allocation Size
688 uint32_t UrbEntryAllocationSize : __CODEGEN_BITFIELD(16, 31) ; //!< URB Entry Allocation Size
689 };
690 uint32_t Value;
691 } DW5;
692 union
693 {
694 //!< DWORD 6
695 struct
696 {
697 uint32_t ScoreboardMask : __CODEGEN_BITFIELD( 0, 7) ; //!< Scoreboard Mask
698 uint32_t Reserved200 : __CODEGEN_BITFIELD( 8, 29) ; //!< Reserved
699 uint32_t ScoreboardType : __CODEGEN_BITFIELD(30, 30) ; //!< SCOREBOARD_TYPE
700 uint32_t ScoreboardEnable : __CODEGEN_BITFIELD(31, 31) ; //!< SCOREBOARD_ENABLE
701 };
702 uint32_t Value;
703 } DW6;
704 union
705 {
706 //!< DWORD 7
707 struct
708 {
709 uint32_t Scoreboard0DeltaX : __CODEGEN_BITFIELD( 0, 3) ; //!< Scoreboard 0 Delta X
710 uint32_t Scoreboard0DeltaY : __CODEGEN_BITFIELD( 4, 7) ; //!< Scoreboard 0 Delta Y
711 uint32_t Scoreboard1DeltaX : __CODEGEN_BITFIELD( 8, 11) ; //!< Scoreboard 1 Delta X
712 uint32_t Scoreboard1DeltaY : __CODEGEN_BITFIELD(12, 15) ; //!< Scoreboard 1 Delta Y
713 uint32_t Scoreboard2DeltaX : __CODEGEN_BITFIELD(16, 19) ; //!< Scoreboard 2 Delta X
714 uint32_t Scoreboard2DeltaY : __CODEGEN_BITFIELD(20, 23) ; //!< Scoreboard 2 Delta Y
715 uint32_t Scoreboard3DeltaX : __CODEGEN_BITFIELD(24, 27) ; //!< Scoreboard 3 Delta X
716 uint32_t Scoreboard3DeltaY : __CODEGEN_BITFIELD(28, 31) ; //!< Scoreboard 3 Delta Y
717 };
718 uint32_t Value;
719 } DW7;
720 union
721 {
722 //!< DWORD 8
723 struct
724 {
725 uint32_t Scoreboard4DeltaX : __CODEGEN_BITFIELD( 0, 3) ; //!< Scoreboard 4 Delta X
726 uint32_t Scoreboard4DeltaY : __CODEGEN_BITFIELD( 4, 7) ; //!< Scoreboard 4 Delta Y
727 uint32_t Scoreboard5DeltaX : __CODEGEN_BITFIELD( 8, 11) ; //!< Scoreboard 5 Delta X
728 uint32_t Scoreboard5DeltaY : __CODEGEN_BITFIELD(12, 15) ; //!< Scoreboard 5 Delta Y
729 uint32_t Scoreboard6DeltaX : __CODEGEN_BITFIELD(16, 19) ; //!< Scoreboard 6 Delta X
730 uint32_t Scoreboard6DeltaY : __CODEGEN_BITFIELD(20, 23) ; //!< Scoreboard 6 Delta Y
731 uint32_t Scoreboard7DeltaX : __CODEGEN_BITFIELD(24, 27) ; //!< Scoreboard 7 Delta X
732 uint32_t Scoreboard7DeltaY : __CODEGEN_BITFIELD(28, 31) ; //!< Scoreboard 7 Delta Y
733 };
734 uint32_t Value;
735 } DW8;
736
737 //! \name Local enumerations
738
739 enum SUBOPCODE
740 {
741 SUBOPCODE_MEDIAVFESTATESUBOP = 0, //!< No additional details
742 };
743
744 enum MEDIA_COMMAND_OPCODE
745 {
746 MEDIA_COMMAND_OPCODE_MEDIAVFESTATE = 0, //!< No additional details
747 };
748
749 enum PIPELINE
750 {
751 PIPELINE_MEDIA = 2, //!< No additional details
752 };
753
754 enum COMMAND_TYPE
755 {
756 COMMAND_TYPE_GFXPIPE = 3, //!< No additional details
757 };
758
759 //! \brief BYPASS_GATEWAY_CONTROL
760 //! \details
761 //! This field configures Gateway to use a simple message protocol.
762 enum BYPASS_GATEWAY_CONTROL
763 {
764 BYPASS_GATEWAY_CONTROL_MAINTAININGOPENGATEWAYFORWARDMSGCLOSEGATEWAYPROTOCOL_LEGACYMODE = 0, //!< No additional details
765 BYPASS_GATEWAY_CONTROL_BYPASSINGOPENGATEWAYCLOSEGATEWAYPROTOCOL = 1, //!< No additional details
766 };
767
768 //! \brief RESET_GATEWAY_TIMER
769 //! \details
770 //! This field controls the reset of the timestamp counter maintained in
771 //! Message Gateway.
772 enum RESET_GATEWAY_TIMER
773 {
774 RESET_GATEWAY_TIMER_MAINTAININGTHEEXISTINGTIMESTAMPSTATE = 0, //!< No additional details
775 RESET_GATEWAY_TIMER_RESETTINGRELATIVETIMERANDLATCHINGTHEGLOBALTIMESTAMP = 1, //!< No additional details
776 };
777
778 //! \brief SLICE_DISABLE
779 //! \details
780 //! This field disables dispatch to slices and subslices for Media and GPGPU
781 //! applications. It is used to limit the amount of scratch space that needs
782 //! to be allocated for a context. If a particular configuration doesn't
783 //! have slice or subslice then there is no impact to disabling it.
784 enum SLICE_DISABLE
785 {
786 SLICE_DISABLE_ALLSUBSLICESENABLED = 0, //!< All subslices are enabled.
787 SLICE_DISABLE_ONLYSLICE0ENABLED = 1, //!< Slice 2 and 1 are disabled, only Slice 0 with all subslices is enabled.
788 SLICE_DISABLE_ONLYSLICE0SUBSLICE0ENABLED = 3, //!< Slice 2 and 1 are disabled, only Slice 0 with only subslice 0 enabled.
789 };
790
791 //! \brief SCOREBOARD_TYPE
792 //! \details
793 //! This field selects the type of scoreboard in use.
794 enum SCOREBOARD_TYPE
795 {
796 SCOREBOARD_TYPE_STALLINGSCOREBOARD = 0, //!< No additional details
797 SCOREBOARD_TYPE_NON_STALLINGSCOREBOARD = 1, //!< No additional details
798 };
799
800 //! \brief SCOREBOARD_ENABLE
801 //! \details
802 //! This field enables and disables the hardware scoreboard in the Media
803 //! Pipeline. If this field is cleared, hardware ignores the following
804 //! scoreboard state fields.
805 enum SCOREBOARD_ENABLE
806 {
807 SCOREBOARD_ENABLE_SCOREBOARDDISABLED = 0, //!< No additional details
808 SCOREBOARD_ENABLE_SCOREBOARDENABLED = 1, //!< No additional details
809 };
810
811 //! \name Initializations
812
813 //! \brief Explicit member initialization function
814 MEDIA_VFE_STATE_CMD();
815
816 static const size_t dwSize = 9;
817 static const size_t byteSize = 36;
818 };
819
820 //!
821 //! \brief MEDIA_CURBE_LOAD
822 //!
823 struct MEDIA_CURBE_LOAD_CMD
824 {
825 union
826 {
827 //!< DWORD 0
828 struct
829 {
830 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 15) ; //!< DWORD_LENGTH
831 uint32_t Subopcode : __CODEGEN_BITFIELD(16, 23) ; //!< SUBOPCODE
832 uint32_t MediaCommandOpcode : __CODEGEN_BITFIELD(24, 26) ; //!< MEDIA_COMMAND_OPCODE
833 uint32_t Pipeline : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE
834 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
835 };
836 uint32_t Value;
837 } DW0;
838 union
839 {
840 //!< DWORD 1
841 struct
842 {
843 uint32_t Reserved32 ; //!< Reserved
844 };
845 uint32_t Value;
846 } DW1;
847 union
848 {
849 //!< DWORD 2
850 struct
851 {
852 uint32_t CurbeTotalDataLength : __CODEGEN_BITFIELD( 0, 16) ; //!< CURBE Total Data Length
853 uint32_t Reserved81 : __CODEGEN_BITFIELD(17, 31) ; //!< Reserved
854 };
855 uint32_t Value;
856 } DW2;
857 union
858 {
859 //!< DWORD 3
860 struct
861 {
862 uint32_t CurbeDataStartAddress ; //!< CURBE Data Start Address
863 };
864 uint32_t Value;
865 } DW3;
866
867 //! \name Local enumerations
868
869 enum SUBOPCODE
870 {
871 SUBOPCODE_MEDIACURBELOADSUBOP = 1, //!< No additional details
872 };
873
874 enum MEDIA_COMMAND_OPCODE
875 {
876 MEDIA_COMMAND_OPCODE_MEDIACURBELOAD = 0, //!< No additional details
877 };
878
879 enum PIPELINE
880 {
881 PIPELINE_MEDIA = 2, //!< No additional details
882 };
883
884 enum COMMAND_TYPE
885 {
886 COMMAND_TYPE_GFXPIPE = 3, //!< No additional details
887 };
888
889 //! \name Initializations
890
891 //! \brief Explicit member initialization function
892 MEDIA_CURBE_LOAD_CMD();
893
894 static const size_t dwSize = 4;
895 static const size_t byteSize = 16;
896 };
897
898 //!
899 //! \brief MEDIA_INTERFACE_DESCRIPTOR_LOAD
900 //! \details
901 //! A Media_State_Flush should be used before this command to ensure that
902 //! the temporary Interface Descriptor storage is cleared.
903 struct MEDIA_INTERFACE_DESCRIPTOR_LOAD_CMD
904 {
905 union
906 {
907 //!< DWORD 0
908 struct
909 {
910 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 15) ; //!< DWORD_LENGTH
911 uint32_t Subopcode : __CODEGEN_BITFIELD(16, 23) ; //!< SUBOPCODE
912 uint32_t MediaCommandOpcode : __CODEGEN_BITFIELD(24, 26) ; //!< MEDIA_COMMAND_OPCODE
913 uint32_t Pipeline : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE
914 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
915 };
916 uint32_t Value;
917 } DW0;
918 union
919 {
920 //!< DWORD 1
921 struct
922 {
923 uint32_t Reserved32 ; //!< Reserved
924 };
925 uint32_t Value;
926 } DW1;
927 union
928 {
929 //!< DWORD 2
930 struct
931 {
932 uint32_t InterfaceDescriptorTotalLength : __CODEGEN_BITFIELD( 0, 16) ; //!< Interface Descriptor Total Length
933 uint32_t Reserved81 : __CODEGEN_BITFIELD(17, 31) ; //!< Reserved
934 };
935 uint32_t Value;
936 } DW2;
937 union
938 {
939 //!< DWORD 3
940 struct
941 {
942 uint32_t InterfaceDescriptorDataStartAddress ; //!< Interface Descriptor Data Start Address
943 };
944 uint32_t Value;
945 } DW3;
946
947 //! \name Local enumerations
948
949 enum SUBOPCODE
950 {
951 SUBOPCODE_MEDIAINTERFACEDESCRIPTORLOADSUBOP = 2, //!< No additional details
952 };
953
954 enum MEDIA_COMMAND_OPCODE
955 {
956 MEDIA_COMMAND_OPCODE_MEDIAINTERFACEDESCRIPTORLOAD = 0, //!< No additional details
957 };
958
959 enum PIPELINE
960 {
961 PIPELINE_MEDIA = 2, //!< No additional details
962 };
963
964 enum COMMAND_TYPE
965 {
966 COMMAND_TYPE_GFXPIPE = 3, //!< No additional details
967 };
968
969 //! \name Initializations
970
971 //! \brief Explicit member initialization function
972 MEDIA_INTERFACE_DESCRIPTOR_LOAD_CMD();
973
974 static const size_t dwSize = 4;
975 static const size_t byteSize = 16;
976 };
977
978 //!
979 //! \brief MEDIA_OBJECT_WALKER
980 //! \details
981 //!
982 //!
983 struct MEDIA_OBJECT_WALKER_CMD
984 {
985 union
986 {
987 //!< DWORD 0
988 struct
989 {
990 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 15) ; //!< DWORD_LENGTH
991 uint32_t Subopcode : __CODEGEN_BITFIELD(16, 23) ; //!< SUBOPCODE
992 uint32_t MediaCommandOpcode : __CODEGEN_BITFIELD(24, 26) ; //!< MEDIA_COMMAND_OPCODE
993 uint32_t Pipeline : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE
994 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
995 };
996 uint32_t Value;
997 } DW0;
998 union
999 {
1000 //!< DWORD 1
1001 struct
1002 {
1003 uint32_t InterfaceDescriptorOffset : __CODEGEN_BITFIELD( 0, 5) ; //!< Interface Descriptor Offset
1004 uint32_t Reserved38 : __CODEGEN_BITFIELD( 6, 31) ; //!< Reserved
1005 };
1006 uint32_t Value;
1007 } DW1;
1008 union
1009 {
1010 //!< DWORD 2
1011 struct
1012 {
1013 uint32_t IndirectDataLength : __CODEGEN_BITFIELD( 0, 16) ; //!< Indirect Data Length
1014 uint32_t Reserved81 : __CODEGEN_BITFIELD(17, 20) ; //!< Reserved
1015 uint32_t UseScoreboard : __CODEGEN_BITFIELD(21, 21) ; //!< USE_SCOREBOARD
1016 uint32_t Reserved86 : __CODEGEN_BITFIELD(22, 23) ; //!< Reserved
1017 uint32_t ThreadSynchronization : __CODEGEN_BITFIELD(24, 24) ; //!< THREAD_SYNCHRONIZATION
1018 uint32_t Reserved89 : __CODEGEN_BITFIELD(25, 30) ; //!< Reserved
1019 uint32_t ChildrenPresent : __CODEGEN_BITFIELD(31, 31) ; //!< Children Present
1020 };
1021 uint32_t Value;
1022 } DW2;
1023 union
1024 {
1025 //!< DWORD 3
1026 struct
1027 {
1028 uint32_t IndirectDataStartAddress ; //!< Indirect Data Start Address
1029 };
1030 uint32_t Value;
1031 } DW3;
1032 union
1033 {
1034 //!< DWORD 4
1035 struct
1036 {
1037 uint32_t Reserved128 ; //!< Reserved
1038 };
1039 uint32_t Value;
1040 } DW4;
1041 union
1042 {
1043 //!< DWORD 5
1044 struct
1045 {
1046 uint32_t ScoreboardMask : __CODEGEN_BITFIELD( 0, 7) ; //!< Scoreboard Mask
1047 uint32_t GroupIdLoopSelect : __CODEGEN_BITFIELD( 8, 31) ; //!< GROUP_ID_LOOP_SELECT
1048 };
1049 uint32_t Value;
1050 } DW5;
1051 union
1052 {
1053 //!< DWORD 6
1054 struct
1055 {
1056 uint32_t Reserved192 : __CODEGEN_BITFIELD( 0, 7) ; //!< Reserved
1057 uint32_t MidLoopUnitX : __CODEGEN_BITFIELD( 8, 9) ; //!< Mid-Loop Unit X
1058 uint32_t Reserved202 : __CODEGEN_BITFIELD(10, 11) ; //!< Reserved
1059 uint32_t LocalMidLoopUnitY : __CODEGEN_BITFIELD(12, 13) ; //!< Local Mid-Loop Unit Y
1060 uint32_t Reserved206 : __CODEGEN_BITFIELD(14, 15) ; //!< Reserved
1061 uint32_t MiddleLoopExtraSteps : __CODEGEN_BITFIELD(16, 20) ; //!< Middle Loop Extra Steps
1062 uint32_t Reserved213 : __CODEGEN_BITFIELD(21, 23) ; //!< Reserved
1063 uint32_t ColorCountMinusOne : __CODEGEN_BITFIELD(24, 27) ; //!< Color Count Minus One
1064 uint32_t Reserved220 : __CODEGEN_BITFIELD(28, 31) ; //!< Reserved
1065 };
1066 uint32_t Value;
1067 } DW6;
1068 union
1069 {
1070 //!< DWORD 7
1071 struct
1072 {
1073 uint32_t LocalLoopExecCount : __CODEGEN_BITFIELD( 0, 9) ; //!< Local Loop Exec Count
1074 uint32_t Reserved234 : __CODEGEN_BITFIELD(10, 15) ; //!< Reserved
1075 uint32_t GlobalLoopExecCount : __CODEGEN_BITFIELD(16, 25) ; //!< Global Loop Exec Count
1076 uint32_t Reserved250 : __CODEGEN_BITFIELD(26, 31) ; //!< Reserved
1077 };
1078 uint32_t Value;
1079 } DW7;
1080 union
1081 {
1082 //!< DWORD 8
1083 struct
1084 {
1085 uint32_t BlockResolutionX : __CODEGEN_BITFIELD( 0, 8) ; //!< Block Resolution X
1086 uint32_t Reserved265 : __CODEGEN_BITFIELD( 9, 15) ; //!< Reserved
1087 uint32_t BlockResolutionY : __CODEGEN_BITFIELD(16, 24) ; //!< Block Resolution Y
1088 uint32_t Reserved281 : __CODEGEN_BITFIELD(25, 31) ; //!< Reserved
1089 };
1090 uint32_t Value;
1091 } DW8;
1092 union
1093 {
1094 //!< DWORD 9
1095 struct
1096 {
1097 uint32_t LocalStartX : __CODEGEN_BITFIELD( 0, 8) ; //!< Local Start X
1098 uint32_t Reserved297 : __CODEGEN_BITFIELD( 9, 15) ; //!< Reserved
1099 uint32_t LocalStartY : __CODEGEN_BITFIELD(16, 24) ; //!< Local Start Y
1100 uint32_t Reserved313 : __CODEGEN_BITFIELD(25, 31) ; //!< Reserved
1101 };
1102 uint32_t Value;
1103 } DW9;
1104 union
1105 {
1106 //!< DWORD 10
1107 struct
1108 {
1109 uint32_t Reserved320 ; //!< Reserved
1110 };
1111 uint32_t Value;
1112 } DW10;
1113 union
1114 {
1115 //!< DWORD 11
1116 struct
1117 {
1118 uint32_t LocalOuterLoopStrideX : __CODEGEN_BITFIELD( 0, 9) ; //!< Local Outer Loop Stride X
1119 uint32_t Reserved362 : __CODEGEN_BITFIELD(10, 15) ; //!< Reserved
1120 uint32_t LocalOuterLoopStrideY : __CODEGEN_BITFIELD(16, 25) ; //!< Local Outer Loop Stride Y
1121 uint32_t Reserved378 : __CODEGEN_BITFIELD(26, 31) ; //!< Reserved
1122 };
1123 uint32_t Value;
1124 } DW11;
1125 union
1126 {
1127 //!< DWORD 12
1128 struct
1129 {
1130 uint32_t LocalInnerLoopUnitX : __CODEGEN_BITFIELD( 0, 9) ; //!< Local Inner Loop Unit X
1131 uint32_t Reserved394 : __CODEGEN_BITFIELD(10, 15) ; //!< Reserved
1132 uint32_t LocalInnerLoopUnitY : __CODEGEN_BITFIELD(16, 25) ; //!< Local Inner Loop Unit Y
1133 uint32_t Reserved410 : __CODEGEN_BITFIELD(26, 31) ; //!< Reserved
1134 };
1135 uint32_t Value;
1136 } DW12;
1137 union
1138 {
1139 //!< DWORD 13
1140 struct
1141 {
1142 uint32_t GlobalResolutionX : __CODEGEN_BITFIELD( 0, 8) ; //!< Global Resolution X
1143 uint32_t Reserved425 : __CODEGEN_BITFIELD( 9, 15) ; //!< Reserved
1144 uint32_t GlobalResolutionY : __CODEGEN_BITFIELD(16, 24) ; //!< Global Resolution Y
1145 uint32_t Reserved441 : __CODEGEN_BITFIELD(25, 31) ; //!< Reserved
1146 };
1147 uint32_t Value;
1148 } DW13;
1149 union
1150 {
1151 //!< DWORD 14
1152 struct
1153 {
1154 uint32_t GlobalStartX : __CODEGEN_BITFIELD( 0, 9) ; //!< Global Start X
1155 uint32_t Reserved458 : __CODEGEN_BITFIELD(10, 15) ; //!< Reserved
1156 uint32_t GlobalStartY : __CODEGEN_BITFIELD(16, 25) ; //!< Global Start Y
1157 uint32_t Reserved474 : __CODEGEN_BITFIELD(26, 31) ; //!< Reserved
1158 };
1159 uint32_t Value;
1160 } DW14;
1161 union
1162 {
1163 //!< DWORD 15
1164 struct
1165 {
1166 uint32_t GlobalOuterLoopStrideX : __CODEGEN_BITFIELD( 0, 9) ; //!< Global Outer Loop Stride X
1167 uint32_t Reserved490 : __CODEGEN_BITFIELD(10, 15) ; //!< Reserved
1168 uint32_t GlobalOuterLoopStrideY : __CODEGEN_BITFIELD(16, 25) ; //!< Global Outer Loop Stride Y
1169 uint32_t Reserved506 : __CODEGEN_BITFIELD(26, 31) ; //!< Reserved
1170 };
1171 uint32_t Value;
1172 } DW15;
1173 union
1174 {
1175 //!< DWORD 16
1176 struct
1177 {
1178 uint32_t GlobalInnerLoopUnitX : __CODEGEN_BITFIELD( 0, 9) ; //!< Global Inner Loop Unit X
1179 uint32_t Reserved522 : __CODEGEN_BITFIELD(10, 15) ; //!< Reserved
1180 uint32_t GlobalInnerLoopUnitY : __CODEGEN_BITFIELD(16, 25) ; //!< Global Inner Loop Unit Y
1181 uint32_t Reserved538 : __CODEGEN_BITFIELD(26, 31) ; //!< Reserved
1182 };
1183 uint32_t Value;
1184 } DW16;
1185
1186 //! \name Local enumerations
1187
1188 enum SUBOPCODE
1189 {
1190 SUBOPCODE_MEDIAOBJECTWALKERSUBOP = 3, //!< No additional details
1191 };
1192
1193 enum MEDIA_COMMAND_OPCODE
1194 {
1195 MEDIA_COMMAND_OPCODE_MEDIAOBJECTWALKER = 1, //!< No additional details
1196 };
1197
1198 enum PIPELINE
1199 {
1200 PIPELINE_MEDIA = 2, //!< No additional details
1201 };
1202
1203 enum COMMAND_TYPE
1204 {
1205 COMMAND_TYPE_GFXPIPE = 3, //!< No additional details
1206 };
1207
1208 //! \brief USE_SCOREBOARD
1209 //! \details
1210 //! This field specifies whether the thread associated with this command
1211 //! uses hardware scoreboard. Only when this field is set, the scoreboard
1212 //! control fields in the VFE Dword are valid. If this field is cleared, the
1213 //! thread associated with this command bypasses hardware scoreboard.
1214 enum USE_SCOREBOARD
1215 {
1216 USE_SCOREBOARD_NOTUSINGSCOREBOARD = 0, //!< No additional details
1217 USE_SCOREBOARD_USINGSCOREBOARD = 1, //!< No additional details
1218 };
1219
1220 //! \brief THREAD_SYNCHRONIZATION
1221 //! \details
1222 //! This field when set indicates that the dispatch of the thread originated
1223 //! from this command is based on the "spawn root thread" message.
1224 enum THREAD_SYNCHRONIZATION
1225 {
1226 THREAD_SYNCHRONIZATION_NOTHREADSYNCHRONIZATION = 0, //!< No additional details
1227 THREAD_SYNCHRONIZATION_THREADDISPATCHISSYNCHRONIZEDBYTHESPAWNROOTTHREADMESSAGE = 1, //!< No additional details
1228 };
1229
1230 //! \brief GROUP_ID_LOOP_SELECT
1231 //! \details
1232 //! This bit field chooses which of the nested loops of the walker are used
1233 //! to identify threads which share a group id and therefore a shared
1234 //! barrier and SLM. The programmer must ensure that each group will fit
1235 //! into a single subslice. When barriers are enabled every group must have
1236 //! the same number of threads matching the number specified in the
1237 //! Interface Descriptor.
1238 enum GROUP_ID_LOOP_SELECT
1239 {
1240 GROUP_ID_LOOP_SELECT_UNNAMED0 = 0, //!< Groups are not created, barriers and SLM are not allocated
1241 GROUP_ID_LOOP_SELECT_UNNAMED1 = 1, //!< Each complete iteration of the Color loop defines a group, the group id is the concatenation of the Outer global, Inner global, Outer local, Mid local and Inner local loop execution counts.
1242 GROUP_ID_LOOP_SELECT_UNNAMED2 = 2, //!< Each complete iteration of the Inner local loop and Color loop defines a group, the group id is the concatenation of the Outer global loop to the Mid local loop execution counts.
1243 GROUP_ID_LOOP_SELECT_UNNAMED3 = 3, //!< Each complete iteration of the Mid local loop and lower loops defines a group, the group id is the concatenation of the Outer global loop to the Outer local loop execution counts.
1244 GROUP_ID_LOOP_SELECT_UNNAMED4 = 4, //!< Each complete iteration of the Outer local loop and lower loops defines a group, the group id is the concatenation of the Outer global loop and the Inner global loop execution counts.
1245 GROUP_ID_LOOP_SELECT_UNNAMED5 = 5, //!< Each complete iteration of the Inner global loop and lower loops defines a group, the group id is the Outer global loop execution count.
1246 };
1247
1248 //! \name Initializations
1249
1250 //! \brief Explicit member initialization function
1251 MEDIA_OBJECT_WALKER_CMD();
1252
1253 static const size_t dwSize = 17;
1254 static const size_t byteSize = 68;
1255 };
1256
1257 //!
1258 //! \brief GPGPU_WALKER
1259 //! \details
1260 //! If the threads spawned by this command are required to observe memory
1261 //! writes performed by threads spawned from a previous command, software
1262 //! must precede this command with a command that performs a memory flush
1263 //! (e.g., MI_FLUSH).
1264 //!
1265 struct GPGPU_WALKER_CMD
1266 {
1267 union
1268 {
1269 //!< DWORD 0
1270 struct
1271 {
1272 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 7) ; //!< DWORD_LENGTH
1273 uint32_t PredicateEnable : __CODEGEN_BITFIELD( 8, 8) ; //!< Predicate Enable
1274 uint32_t Reserved9 : __CODEGEN_BITFIELD( 9, 9) ; //!< Reserved
1275 uint32_t IndirectParameterEnable : __CODEGEN_BITFIELD(10, 10) ; //!< Indirect Parameter Enable
1276 uint32_t Reserved11 : __CODEGEN_BITFIELD(11, 15) ; //!< Reserved
1277 uint32_t Subopcode : __CODEGEN_BITFIELD(16, 23) ; //!< SUBOPCODE
1278 uint32_t MediaCommandOpcode : __CODEGEN_BITFIELD(24, 26) ; //!< MEDIA_COMMAND_OPCODE
1279 uint32_t Pipeline : __CODEGEN_BITFIELD(27, 28) ; //!< PIPELINE
1280 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
1281 };
1282 uint32_t Value;
1283 } DW0;
1284 union
1285 {
1286 //!< DWORD 1
1287 struct
1288 {
1289 uint32_t InterfaceDescriptorOffset : __CODEGEN_BITFIELD( 0, 5) ; //!< Interface Descriptor Offset
1290 uint32_t Reserved38 : __CODEGEN_BITFIELD( 6, 31) ; //!< Reserved
1291 };
1292 uint32_t Value;
1293 } DW1;
1294 union
1295 {
1296 //!< DWORD 2
1297 struct
1298 {
1299 uint32_t IndirectDataLength : __CODEGEN_BITFIELD( 0, 16) ; //!< Indirect Data Length
1300 uint32_t Reserved81 : __CODEGEN_BITFIELD(17, 31) ; //!< Reserved
1301 };
1302 uint32_t Value;
1303 } DW2;
1304 union
1305 {
1306 //!< DWORD 3
1307 struct
1308 {
1309 uint32_t Reserved96 : __CODEGEN_BITFIELD( 0, 5) ; //!< Reserved
1310 uint32_t IndirectDataStartAddress : __CODEGEN_BITFIELD( 6, 31) ; //!< Indirect Data Start Address
1311 };
1312 uint32_t Value;
1313 } DW3;
1314 union
1315 {
1316 //!< DWORD 4
1317 struct
1318 {
1319 uint32_t ThreadWidthCounterMaximum : __CODEGEN_BITFIELD( 0, 5) ; //!< Thread Width Counter Maximum
1320 uint32_t Reserved134 : __CODEGEN_BITFIELD( 6, 7) ; //!< Reserved
1321 uint32_t ThreadHeightCounterMaximum : __CODEGEN_BITFIELD( 8, 13) ; //!< Thread Height Counter Maximum
1322 uint32_t Reserved142 : __CODEGEN_BITFIELD(14, 15) ; //!< Reserved
1323 uint32_t ThreadDepthCounterMaximum : __CODEGEN_BITFIELD(16, 21) ; //!< Thread Depth Counter Maximum
1324 uint32_t Reserved150 : __CODEGEN_BITFIELD(22, 29) ; //!< Reserved
1325 uint32_t SimdSize : __CODEGEN_BITFIELD(30, 31) ; //!< SIMD_SIZE
1326 };
1327 uint32_t Value;
1328 } DW4;
1329 union
1330 {
1331 //!< DWORD 5
1332 struct
1333 {
1334 uint32_t ThreadGroupIdStartingX ; //!< Thread Group ID Starting X
1335 };
1336 uint32_t Value;
1337 } DW5;
1338 union
1339 {
1340 //!< DWORD 6
1341 struct
1342 {
1343 uint32_t Reserved192 ; //!< Reserved
1344 };
1345 uint32_t Value;
1346 } DW6;
1347 union
1348 {
1349 //!< DWORD 7
1350 struct
1351 {
1352 uint32_t ThreadGroupIdXDimension ; //!< Thread Group ID X Dimension
1353 };
1354 uint32_t Value;
1355 } DW7;
1356 union
1357 {
1358 //!< DWORD 8
1359 struct
1360 {
1361 uint32_t ThreadGroupIdStartingY ; //!< Thread Group ID Starting Y
1362 };
1363 uint32_t Value;
1364 } DW8;
1365 union
1366 {
1367 //!< DWORD 9
1368 struct
1369 {
1370 uint32_t Reserved288 ; //!< Reserved
1371 };
1372 uint32_t Value;
1373 } DW9;
1374 union
1375 {
1376 //!< DWORD 10
1377 struct
1378 {
1379 uint32_t ThreadGroupIdYDimension ; //!< Thread Group ID Y Dimension
1380 };
1381 uint32_t Value;
1382 } DW10;
1383 union
1384 {
1385 //!< DWORD 11
1386 struct
1387 {
1388 uint32_t ThreadGroupIdStartingResumeZ ; //!< Thread Group ID Starting/Resume Z
1389 };
1390 uint32_t Value;
1391 } DW11;
1392 union
1393 {
1394 //!< DWORD 12
1395 struct
1396 {
1397 uint32_t ThreadGroupIdZDimension ; //!< Thread Group ID Z Dimension
1398 };
1399 uint32_t Value;
1400 } DW12;
1401 union
1402 {
1403 //!< DWORD 13
1404 struct
1405 {
1406 uint32_t RightExecutionMask ; //!< Right Execution Mask
1407 };
1408 uint32_t Value;
1409 } DW13;
1410 union
1411 {
1412 //!< DWORD 14
1413 struct
1414 {
1415 uint32_t BottomExecutionMask ; //!< Bottom Execution Mask
1416 };
1417 uint32_t Value;
1418 } DW14;
1419
1420 //! \name Local enumerations
1421
1422 enum SUBOPCODE
1423 {
1424 SUBOPCODE_GPGPUWALKERSUBOP = 5, //!< No additional details
1425 };
1426
1427 enum MEDIA_COMMAND_OPCODE
1428 {
1429 MEDIA_COMMAND_OPCODE_GPGPUWALKER = 1, //!< No additional details
1430 };
1431
1432 enum PIPELINE
1433 {
1434 PIPELINE_MEDIA = 2, //!< No additional details
1435 };
1436
1437 enum COMMAND_TYPE
1438 {
1439 COMMAND_TYPE_GFXPIPE = 3, //!< No additional details
1440 };
1441
1442 //! \brief SIMD_SIZE
1443 //! \details
1444 //! This field determines the size of the payload and the number of bits of
1445 //! the execution mask that are expected. The kernel pointed to by the
1446 //! interface descriptor should match the SIMD declared here.
1447 enum SIMD_SIZE
1448 {
1449 SIMD_SIZE_SIMD8 = 0, //!< 8 LSBs of the execution mask are used
1450 SIMD_SIZE_SIMD16 = 1, //!< 16 LSBs used in execution mask
1451 SIMD_SIZE_SIMD32 = 2, //!< 32 bits of execution mask used
1452 };
1453
1454 //! \name Initializations
1455
1456 //! \brief Explicit member initialization function
1457 GPGPU_WALKER_CMD();
1458
1459 static const size_t dwSize = 15;
1460 static const size_t byteSize = 60;
1461 };
1462
1463 //!
1464 //! \brief _3DSTATE_CHROMA_KEY
1465 //! \details
1466 //! The 3DSTATE_CHROMA_KEY instruction is used to program texture
1467 //! color/chroma-key key values. A table containing four set of values is
1468 //! supported. The ChromaKey Index sampler state variable is used to select
1469 //! which table entry is associated with the map. Texture chromakey
1470 //! functions are enabled and controlled via use of the ChromaKey Enable
1471 //! texture sampler state variable.Texture Color Key (keying on a paletted
1472 //! texture index) is not supported.
1473 //!
1474 struct _3DSTATE_CHROMA_KEY_CMD
1475 {
1476 union
1477 {
1478 //!< DWORD 0
1479 struct
1480 {
1481 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 7) ; //!< DWORD_LENGTH
1482 uint32_t Reserved8 : __CODEGEN_BITFIELD( 8, 15) ; //!< Reserved
1483 uint32_t Command3DSubOpcode : __CODEGEN_BITFIELD(16, 23) ; //!< _3D_COMMAND_SUB_OPCODE
1484 uint32_t Command3DOpcode : __CODEGEN_BITFIELD(24, 26) ; //!< _3D_COMMAND_OPCODE
1485 uint32_t CommandSubtype : __CODEGEN_BITFIELD(27, 28) ; //!< COMMAND_SUBTYPE
1486 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
1487 };
1488 uint32_t Value;
1489 } DW0;
1490 union
1491 {
1492 //!< DWORD 1
1493 struct
1494 {
1495 uint32_t Reserved32 : __CODEGEN_BITFIELD( 0, 29) ; //!< Reserved
1496 uint32_t ChromakeyTableIndex : __CODEGEN_BITFIELD(30, 31) ; //!< ChromaKey Table Index
1497 };
1498 uint32_t Value;
1499 } DW1;
1500 union
1501 {
1502 //!< DWORD 2
1503 struct
1504 {
1505 uint32_t ChromakeyLowValue ; //!< ChromaKey Low Value
1506 };
1507 uint32_t Value;
1508 } DW2;
1509 union
1510 {
1511 //!< DWORD 3
1512 struct
1513 {
1514 uint32_t ChromakeyHighValue ; //!< ChromaKey High Value
1515 };
1516 uint32_t Value;
1517 } DW3;
1518
1519 //! \name Local enumerations
1520
1521 enum _3D_COMMAND_SUB_OPCODE
1522 {
1523 _3D_COMMAND_SUB_OPCODE_3DSTATECHROMAKEY = 4, //!< No additional details
1524 };
1525
1526 enum _3D_COMMAND_OPCODE
1527 {
1528 _3D_COMMAND_OPCODE_3DSTATENONPIPELINED = 1, //!< No additional details
1529 };
1530
1531 enum COMMAND_SUBTYPE
1532 {
1533 COMMAND_SUBTYPE_GFXPIPE3D = 3, //!< No additional details
1534 };
1535
1536 enum COMMAND_TYPE
1537 {
1538 COMMAND_TYPE_GFXPIPE = 3, //!< No additional details
1539 };
1540
1541 //! \name Initializations
1542
1543 //! \brief Explicit member initialization function
1544 _3DSTATE_CHROMA_KEY_CMD();
1545
1546 static const size_t dwSize = 4;
1547 static const size_t byteSize = 16;
1548 };
1549
1550 //!
1551 //! \brief _3DSTATE_SAMPLER_PALETTE_LOAD0
1552 //! \details
1553 //! The 3DSTATE_SAMPLER_PALETTE_LOAD0 instruction is used to load 32-bit
1554 //! values into the first texture palette. The texture palette is used
1555 //! whenever a texture with a paletted format (containing "Px [palette0]")
1556 //! is referenced by the sampler.
1557 //!
1558 //! This instruction is used to load all or a subset of the 256 entries of
1559 //! the first palette. Partial loads always start from the first (index 0)
1560 //! entry.
1561 //!
1562 struct _3DSTATE_SAMPLER_PALETTE_LOAD0_CMD
1563 {
1564 union
1565 {
1566 //!< DWORD 0
1567 struct
1568 {
1569 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 7) ; //!< DWord Length
1570 uint32_t Reserved8 : __CODEGEN_BITFIELD( 8, 15) ; //!< Reserved
1571 uint32_t Command3DSubOpcode : __CODEGEN_BITFIELD(16, 23) ; //!< _3D_COMMAND_SUB_OPCODE
1572 uint32_t Command3DOpcode : __CODEGEN_BITFIELD(24, 26) ; //!< _3D_COMMAND_OPCODE
1573 uint32_t CommandSubtype : __CODEGEN_BITFIELD(27, 28) ; //!< COMMAND_SUBTYPE
1574 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
1575 };
1576 uint32_t Value;
1577 } DW0;
1578
1579 //! \name Local enumerations
1580
1581 enum _3D_COMMAND_SUB_OPCODE
1582 {
1583 _3D_COMMAND_SUB_OPCODE_3DSTATESAMPLERPALETTELOAD0 = 2, //!< No additional details
1584 };
1585
1586 enum _3D_COMMAND_OPCODE
1587 {
1588 _3D_COMMAND_OPCODE_3DSTATENONPIPELINED = 1, //!< No additional details
1589 };
1590
1591 enum COMMAND_SUBTYPE
1592 {
1593 COMMAND_SUBTYPE_GFXPIPE3D = 3, //!< No additional details
1594 };
1595
1596 enum COMMAND_TYPE
1597 {
1598 COMMAND_TYPE_GFXPIPE = 3, //!< No additional details
1599 };
1600
1601 //! \name Initializations
1602
1603 //! \brief Explicit member initialization function
1604 _3DSTATE_SAMPLER_PALETTE_LOAD0_CMD();
1605
1606 static const size_t dwSize = 1;
1607 static const size_t byteSize = 4;
1608 };
1609
1610 //!
1611 //! \brief _3DSTATE_SAMPLER_PALETTE_LOAD1
1612 //! \details
1613 //! The 3DSTATE_SAMPLER_PALETTE_LOAD1 instruction is used to load 32-bit
1614 //! values into the second texture palette. The second texture palette is
1615 //! used whenever a texture with a paletted format (containing
1616 //! "Px...[palette1]") is referenced by the sampler.This instruction is used
1617 //! to load all or a subset of the 256 entries of the second palette.
1618 //! Partial loads always start from the first (index 0) entry.
1619 //!
1620 struct _3DSTATE_SAMPLER_PALETTE_LOAD1_CMD
1621 {
1622 union
1623 {
1624 //!< DWORD 0
1625 struct
1626 {
1627 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 7) ; //!< DWORD_LENGTH
1628 uint32_t Reserved8 : __CODEGEN_BITFIELD( 8, 15) ; //!< Reserved
1629 uint32_t Command3DSubOpcode : __CODEGEN_BITFIELD(16, 23) ; //!< _3D_COMMAND_SUB_OPCODE
1630 uint32_t Command3DOpcode : __CODEGEN_BITFIELD(24, 26) ; //!< _3D_COMMAND_OPCODE
1631 uint32_t CommandSubtype : __CODEGEN_BITFIELD(27, 28) ; //!< COMMAND_SUBTYPE
1632 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
1633 };
1634 uint32_t Value;
1635 } DW0;
1636
1637 //! \name Local enumerations
1638
1639 enum _3D_COMMAND_SUB_OPCODE
1640 {
1641 _3D_COMMAND_SUB_OPCODE_3DSTATESAMPLERPALETTELOAD1 = 12, //!< No additional details
1642 };
1643
1644 enum _3D_COMMAND_OPCODE
1645 {
1646 _3D_COMMAND_OPCODE_3DSTATENONPIPELINED = 1, //!< No additional details
1647 };
1648
1649 enum COMMAND_SUBTYPE
1650 {
1651 COMMAND_SUBTYPE_GFXPIPE3D = 3, //!< No additional details
1652 };
1653
1654 enum COMMAND_TYPE
1655 {
1656 COMMAND_TYPE_GFXPIPE = 3, //!< No additional details
1657 };
1658
1659 //! \name Initializations
1660
1661 //! \brief Explicit member initialization function
1662 _3DSTATE_SAMPLER_PALETTE_LOAD1_CMD();
1663
1664 static const size_t dwSize = 1;
1665 static const size_t byteSize = 4;
1666 };
1667
1668 //!
1669 //! \brief PALETTE_ENTRY
1670 //! \details
1671 //!
1672 //!
1673 struct PALETTE_ENTRY_CMD
1674 {
1675 union
1676 {
1677 //!< DWORD 0
1678 struct
1679 {
1680 uint32_t Blue : __CODEGEN_BITFIELD( 0, 7) ; //!< Blue
1681 uint32_t Green : __CODEGEN_BITFIELD( 8, 15) ; //!< Green
1682 uint32_t Red : __CODEGEN_BITFIELD(16, 23) ; //!< Red
1683 uint32_t Alpha : __CODEGEN_BITFIELD(24, 31) ; //!< Alpha
1684 };
1685 uint32_t Value;
1686 } DW0;
1687
1688 //! \name Local enumerations
1689
1690 //! \name Initializations
1691
1692 //! \brief Explicit member initialization function
1693 PALETTE_ENTRY_CMD();
1694
1695 static const size_t dwSize = 1;
1696 static const size_t byteSize = 4;
1697 };
1698
1699 //!
1700 //! \brief STATE_SIP
1701 //! \details
1702 //! The STATE_SIP command specifies the starting instruction location of the
1703 //! System Routine that is shared by all threads in execution.
1704 //!
1705 struct STATE_SIP_CMD
1706 {
1707 union
1708 {
1709 //!< DWORD 0
1710 struct
1711 {
1712 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 7) ; //!< DWORD_LENGTH
1713 uint32_t Reserved8 : __CODEGEN_BITFIELD( 8, 15) ; //!< Reserved
1714 uint32_t Command3DSubOpcode : __CODEGEN_BITFIELD(16, 23) ; //!< _3D_COMMAND_SUB_OPCODE
1715 uint32_t Command3DOpcode : __CODEGEN_BITFIELD(24, 26) ; //!< _3D_COMMAND_OPCODE
1716 uint32_t CommandSubtype : __CODEGEN_BITFIELD(27, 28) ; //!< COMMAND_SUBTYPE
1717 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
1718 };
1719 uint32_t Value;
1720 } DW0;
1721 union
1722 {
1723 //!< DWORD 1..2
1724 struct
1725 {
1726 uint64_t Reserved32 : __CODEGEN_BITFIELD( 0, 3) ; //!< Reserved
1727 uint64_t SystemInstructionPointer : __CODEGEN_BITFIELD( 4, 63) ; //!< System Instruction Pointer
1728 };
1729 uint32_t Value[2];
1730 } DW1_2;
1731
1732 //! \name Local enumerations
1733
1734 enum _3D_COMMAND_SUB_OPCODE
1735 {
1736 _3D_COMMAND_SUB_OPCODE_STATESIP = 2, //!< No additional details
1737 };
1738
1739 enum _3D_COMMAND_OPCODE
1740 {
1741 _3D_COMMAND_OPCODE_GFXPIPENONPIPELINED = 1, //!< No additional details
1742 };
1743
1744 enum COMMAND_SUBTYPE
1745 {
1746 COMMAND_SUBTYPE_GFXPIPECOMMON = 0, //!< No additional details
1747 };
1748
1749 enum COMMAND_TYPE
1750 {
1751 COMMAND_TYPE_GFXPIPE = 3, //!< No additional details
1752 };
1753
1754 //! \name Initializations
1755
1756 //! \brief Explicit member initialization function
1757 STATE_SIP_CMD();
1758
1759 static const size_t dwSize = 3;
1760 static const size_t byteSize = 12;
1761 };
1762
1763 //!
1764 //! \brief GPGPU_CSR_BASE_ADDRESS
1765 //! \details
1766 //! The GPGPU_CSR_BASE_ADDRESS command sets the base pointers for EU and L3
1767 //! to Context Save and Restore EU State and SLM for GPGPU mid-thread
1768 //! preemption.
1769 //!
1770 //! Execution of this command causes a full pipeline flush, thus its use
1771 //! should be minimized for higher performance. State and instruction caches
1772 //! are flushed on completion of the flush.
1773 //!
1774 //! SW must always program PIPE_CONTROL with "CS Stall" and "Render Target
1775 //! Cache Flush Enable" set prior to programming GPGPU_CSR_BASE_ADDRESS
1776 //! command for GPGPU workloads i.e when pipeline select is GPGPU via
1777 //! PIPELINE_SELECT command. This is required to achieve better GPGPU
1778 //! preemption latencies for certain programming sequences. If programming
1779 //! PIPE_CONTROL has performance implications then preemption latencies can
1780 //! be trade off against performance by not implementing this programming
1781 //! note.
1782 //!
1783 struct GPGPU_CSR_BASE_ADDRESS_CMD
1784 {
1785 union
1786 {
1787 //!< DWORD 0
1788 struct
1789 {
1790 uint32_t DwordLength : __CODEGEN_BITFIELD( 0, 7) ; //!< DWORD_LENGTH
1791 uint32_t Reserved8 : __CODEGEN_BITFIELD( 8, 15) ; //!< Reserved
1792 uint32_t Command3DSubOpcode : __CODEGEN_BITFIELD(16, 23) ; //!< _3D_COMMAND_SUB_OPCODE
1793 uint32_t Command3DOpcode : __CODEGEN_BITFIELD(24, 26) ; //!< _3D_COMMAND_OPCODE
1794 uint32_t CommandSubtype : __CODEGEN_BITFIELD(27, 28) ; //!< COMMAND_SUBTYPE
1795 uint32_t CommandType : __CODEGEN_BITFIELD(29, 31) ; //!< COMMAND_TYPE
1796 };
1797 uint32_t Value;
1798 } DW0;
1799 union
1800 {
1801 //!< DWORD 1..2
1802 struct
1803 {
1804 uint64_t Reserved32 : __CODEGEN_BITFIELD( 0, 11) ; //!< Reserved
1805 uint64_t GpgpuCsrBaseAddress : __CODEGEN_BITFIELD(12, 63) ; //!< GPGPU CSR Base Address
1806 };
1807 uint32_t Value[2];
1808 } DW1_2;
1809
1810 //! \name Local enumerations
1811
1812 enum _3D_COMMAND_SUB_OPCODE
1813 {
1814 _3D_COMMAND_SUB_OPCODE_GPGPUCSRBASEADDRESS = 4, //!< No additional details
1815 };
1816
1817 enum _3D_COMMAND_OPCODE
1818 {
1819 _3D_COMMAND_OPCODE_GFXPIPENONPIPELINED = 1, //!< No additional details
1820 };
1821
1822 enum COMMAND_SUBTYPE
1823 {
1824 COMMAND_SUBTYPE_GFXPIPECOMMON = 0, //!< No additional details
1825 };
1826
1827 enum COMMAND_TYPE
1828 {
1829 COMMAND_TYPE_GFXPIPE = 3, //!< No additional details
1830 };
1831
1832 //! \name Initializations
1833
1834 //! \brief Explicit member initialization function
1835 GPGPU_CSR_BASE_ADDRESS_CMD();
1836
1837 static const size_t dwSize = 3;
1838 static const size_t byteSize = 12;
1839 };
1840
1841 };
1842
1843 #pragma pack()
1844
1845 #endif // __MHW_RENDER_HWCMD_G8_X_H__