diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vulkan/.gitignore | 1 | ||||
-rw-r--r-- | src/vulkan/Makefile.am | 9 | ||||
-rw-r--r-- | src/vulkan/anv_batch_chain.c | 2 | ||||
-rw-r--r-- | src/vulkan/anv_private.h | 2 | ||||
-rw-r--r-- | src/vulkan/gen7.xml | 2519 | ||||
-rw-r--r-- | src/vulkan/gen75.xml | 2912 | ||||
-rw-r--r-- | src/vulkan/gen75_pack.h | 8421 | ||||
-rw-r--r-- | src/vulkan/gen7_pack.h | 7003 | ||||
-rw-r--r-- | src/vulkan/gen7_state.c | 18 | ||||
-rw-r--r-- | src/vulkan/gen8.xml | 3165 | ||||
-rw-r--r-- | src/vulkan/gen8_cmd_buffer.c | 8 | ||||
-rw-r--r-- | src/vulkan/gen8_pack.h | 9209 | ||||
-rw-r--r-- | src/vulkan/gen8_pipeline.c | 8 | ||||
-rw-r--r-- | src/vulkan/gen8_state.c | 2 | ||||
-rw-r--r-- | src/vulkan/gen9.xml | 3469 | ||||
-rw-r--r-- | src/vulkan/gen9_pack.h | 9797 | ||||
-rw-r--r-- | src/vulkan/genX_pipeline_util.h | 6 | ||||
-rwxr-xr-x | src/vulkan/gen_pack_header.py | 585 |
18 files changed, 12682 insertions, 34454 deletions
diff --git a/src/vulkan/.gitignore b/src/vulkan/.gitignore index 8f9477c4c63..2980dbfece3 100644 --- a/src/vulkan/.gitignore +++ b/src/vulkan/.gitignore @@ -5,3 +5,4 @@ /wayland-drm-protocol.c /wayland-drm-client-protocol.h /anv_icd.json +/gen*_pack.h
\ No newline at end of file diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am index 58668c7cf88..36bea427c66 100644 --- a/src/vulkan/Makefile.am +++ b/src/vulkan/Makefile.am @@ -96,7 +96,11 @@ VULKAN_SOURCES = \ BUILT_SOURCES = \ anv_entrypoints.h \ - anv_entrypoints.c + anv_entrypoints.c \ + gen7_pack.h \ + gen75_pack.h \ + gen8_pack.h \ + gen9_pack.h libanv_gen7_la_SOURCES = \ genX_cmd_buffer.c \ @@ -158,6 +162,9 @@ anv_entrypoints.h : anv_entrypoints_gen.py $(vulkan_include_HEADERS) anv_entrypoints.c : anv_entrypoints_gen.py $(vulkan_include_HEADERS) $(AM_V_GEN) cat $(vulkan_include_HEADERS) | $(CPP) $(VULKAN_ENTRYPOINT_CPPFLAGS) - | $(PYTHON2) $< code > $@ +%_pack.h : %.xml gen_pack_header.py + $(AM_V_GEN) $(srcdir)/gen_pack_header.py $< > $@ + CLEANFILES = $(BUILT_SOURCES) libvulkan_la_LIBADD = $(WAYLAND_LIBS) -lxcb -lxcb-dri3 \ diff --git a/src/vulkan/anv_batch_chain.c b/src/vulkan/anv_batch_chain.c index d74c5995168..13a3faee233 100644 --- a/src/vulkan/anv_batch_chain.c +++ b/src/vulkan/anv_batch_chain.c @@ -420,7 +420,7 @@ emit_batch_buffer_start(struct anv_cmd_buffer *cmd_buffer, GEN8_MI_BATCH_BUFFER_START_length - GEN8_MI_BATCH_BUFFER_START_length_bias; anv_batch_emit(&cmd_buffer->batch, GEN8_MI_BATCH_BUFFER_START, - .DwordLength = cmd_buffer->device->info.gen < 8 ? + .DWordLength = cmd_buffer->device->info.gen < 8 ? gen7_length : gen8_length, ._2ndLevelBatchBuffer = _1stlevelbatch, .AddressSpaceIndicator = ASI_PPGTT, diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index b7d35f88ef0..ad34772b081 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -792,7 +792,7 @@ __gen_combine_address(struct anv_batch *batch, void *location, void *__dst = anv_batch_emit_dwords(batch, n); \ struct cmd __template = { \ __anv_cmd_header(cmd), \ - .DwordLength = n - __anv_cmd_length_bias(cmd), \ + .DWordLength = n - __anv_cmd_length_bias(cmd), \ __VA_ARGS__ \ }; \ __anv_cmd_pack(cmd)(batch, __dst, &__template); \ diff --git a/src/vulkan/gen7.xml b/src/vulkan/gen7.xml new file mode 100644 index 00000000000..d717b144085 --- /dev/null +++ b/src/vulkan/gen7.xml @@ -0,0 +1,2519 @@ +<genxml name="IVB" gen="7"> + <struct name="MEMORY_OBJECT_CONTROL_STATE" length="1"> + <field name="Graphics Data Type (GFDT)" start="2" end="2" type="uint"/> + <field name="LLC Cacheability Control (LLCCC)" start="1" end="1" type="uint"/> + <field name="L3 Cacheability Control (L3CC)" start="0" end="0" type="uint"/> + </struct> + + <struct name="3DSTATE_CONSTANT_BODY" length="6"> + <field name="Constant Buffer 1 Read Length" start="16" end="31" type="uint"/> + <field name="Constant Buffer 0 Read Length" start="0" end="15" type="uint"/> + <field name="Constant Buffer 3 Read Length" start="48" end="63" type="uint"/> + <field name="Constant Buffer 2 Read Length" start="32" end="47" type="uint"/> + <field name="Pointer To Constant Buffer 0" start="69" end="95" type="address"/> + <field name="Constant Buffer Object Control State" start="64" end="68" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Pointer To Constant Buffer 1" start="101" end="127" type="address"/> + <field name="Pointer To Constant Buffer 2" start="133" end="159" type="address"/> + <field name="Pointer To Constant Buffer 3" start="165" end="191" type="address"/> + </struct> + + <struct name="VERTEX_BUFFER_STATE" length="4"> + <field name="Vertex Buffer Index" start="26" end="31" type="uint"/> + <field name="Buffer Access Type" start="20" end="20" type="uint"> + <value name="VERTEXDATA" value="0"/> + <value name="INSTANCEDATA" value="1"/> + </field> + <field name="Vertex Buffer Memory Object Control State" start="16" end="19" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Address Modify Enable" start="14" end="14" type="uint"/> + <field name="Null Vertex Buffer" start="13" end="13" type="bool"/> + <field name="Vertex Fetch Invalidate" start="12" end="12" type="uint" default="0"/> + <field name="Buffer Pitch" start="0" end="11" type="uint"/> + <field name="Buffer Starting Address" start="32" end="63" type="address"/> + <field name="End Address" start="64" end="95" type="address"/> + <field name="Instance Data Step Rate" start="96" end="127" type="uint"/> + </struct> + + <struct name="VERTEX_ELEMENT_STATE" length="2"> + <field name="Vertex Buffer Index" start="26" end="31" type="uint"/> + <field name="Valid" start="25" end="25" type="uint"/> + <field name="Source Element Format" start="16" end="24" type="uint"/> + <field name="Edge Flag Enable" start="15" end="15" type="bool"/> + <field name="Source Element Offset" start="0" end="11" type="uint"/> + <field name="Component 0 Control" start="60" end="62" type="uint"/> + <field name="Component 1 Control" start="56" end="58" type="uint"/> + <field name="Component 2 Control" start="52" end="54" type="uint"/> + <field name="Component 3 Control" start="48" end="50" type="uint"/> + </struct> + + <struct name="SO_DECL" length="1"> + <field name="Output Buffer Slot" start="12" end="13" type="uint"/> + <field name="Hole Flag" start="11" end="11" type="uint"/> + <field name="Register Index" start="4" end="9" type="uint"/> + <field name="Component Mask" start="0" end="3" type="uint" default="0"/> + </struct> + + <struct name="SO_DECL_ENTRY" length="2"> + <field name="Stream 3 Decl" start="48" end="63" type="SO_DECL"/> + <field name="Stream 2 Decl" start="32" end="47" type="SO_DECL"/> + <field name="Stream 1 Decl" start="16" end="31" type="SO_DECL"/> + <field name="Stream 0 Decl" start="0" end="15" type="SO_DECL"/> + </struct> + + <struct name="SCISSOR_RECT" length="2"> + <field name="Scissor Rectangle Y Min" start="16" end="31" type="uint"/> + <field name="Scissor Rectangle X Min" start="0" end="15" type="uint"/> + <field name="Scissor Rectangle Y Max" start="48" end="63" type="uint"/> + <field name="Scissor Rectangle X Max" start="32" end="47" type="uint"/> + </struct> + + <struct name="SF_CLIP_VIEWPORT" length="16"> + <field name="Viewport Matrix Element m00" start="0" end="31" type="float"/> + <field name="Viewport Matrix Element m11" start="32" end="63" type="float"/> + <field name="Viewport Matrix Element m22" start="64" end="95" type="float"/> + <field name="Viewport Matrix Element m30" start="96" end="127" type="float"/> + <field name="Viewport Matrix Element m31" start="128" end="159" type="float"/> + <field name="Viewport Matrix Element m32" start="160" end="191" type="float"/> + <field name="X Min Clip Guardband" start="256" end="287" type="float"/> + <field name="X Max Clip Guardband" start="288" end="319" type="float"/> + <field name="Y Min Clip Guardband" start="320" end="351" type="float"/> + <field name="Y Max Clip Guardband" start="352" end="383" type="float"/> + <group count="4" start="384" size="32"> + </group> + </struct> + + <struct name="BLEND_STATE" length="2"> + <field name="Color Buffer Blend Enable" start="31" end="31" type="bool"/> + <field name="Independent Alpha Blend Enable" start="30" end="30" type="bool"/> + <field name="Alpha Blend Function" start="26" end="28" type="uint"> + <value name="BLENDFUNCTION_ADD" value="0"/> + <value name="BLENDFUNCTION_SUBTRACT" value="1"/> + <value name="BLENDFUNCTION_REVERSE_SUBTRACT" value="2"/> + <value name="BLENDFUNCTION_MIN" value="3"/> + <value name="BLENDFUNCTION_MAX" value="4"/> + </field> + <field name="Source Alpha Blend Factor" start="20" end="24" type="uint"> + <value name="BLENDFACTOR_ONE" value="1"/> + <value name="BLENDFACTOR_SRC_COLOR" value="2"/> + <value name="BLENDFACTOR_SRC_ALPHA" value="3"/> + <value name="BLENDFACTOR_DST_ALPHA" value="4"/> + <value name="BLENDFACTOR_DST_COLOR" value="5"/> + <value name="BLENDFACTOR_SRC_ALPHA_SATURATE" value="6"/> + <value name="BLENDFACTOR_CONST_COLOR" value="7"/> + <value name="BLENDFACTOR_CONST_ALPHA" value="8"/> + <value name="BLENDFACTOR_SRC1_COLOR" value="9"/> + <value name="BLENDFACTOR_SRC1_ALPHA" value="10"/> + <value name="BLENDFACTOR_ZERO" value="17"/> + <value name="BLENDFACTOR_INV_SRC_COLOR" value="18"/> + <value name="BLENDFACTOR_INV_SRC_ALPHA" value="19"/> + <value name="BLENDFACTOR_INV_DST_ALPHA" value="20"/> + <value name="BLENDFACTOR_INV_DST_COLOR" value="21"/> + <value name="BLENDFACTOR_INV_CONST_COLOR" value="23"/> + <value name="BLENDFACTOR_INV_CONST_ALPHA" value="24"/> + <value name="BLENDFACTOR_INV_SRC1_COLOR" value="25"/> + <value name="BLENDFACTOR_INV_SRC1_ALPHA" value="26"/> + </field> + <field name="Destination Alpha Blend Factor" start="15" end="19" type="uint"/> + <field name="Color Blend Function" start="11" end="13" type="uint"> + <value name="BLENDFUNCTION_ADD" value="0"/> + <value name="BLENDFUNCTION_SUBTRACT" value="1"/> + <value name="BLENDFUNCTION_REVERSE_SUBTRACT" value="2"/> + <value name="BLENDFUNCTION_MIN " value="3"/> + <value name="BLENDFUNCTION_MAX" value="4"/> + </field> + <field name="Source Blend Factor" start="5" end="9" type="uint"/> + <field name="Destination Blend Factor" start="0" end="4" type="uint"/> + <field name="AlphaToCoverage Enable" start="63" end="63" type="bool"/> + <field name="AlphaToOne Enable" start="62" end="62" type="bool"/> + <field name="AlphaToCoverage Dither Enable" start="61" end="61" type="bool"/> + <field name="Write Disable Alpha" start="59" end="59" type="bool"/> + <field name="Write Disable Red" start="58" end="58" type="bool"/> + <field name="Write Disable Green" start="57" end="57" type="bool"/> + <field name="Write Disable Blue" start="56" end="56" type="bool"/> + <field name="Logic Op Enable" start="54" end="54" type="bool"/> + <field name="Logic Op Function" start="50" end="53" type="uint"> + <value name="LOGICOP_CLEAR" value="0"/> + <value name="LOGICOP_NOR" value="1"/> + <value name="LOGICOP_AND_INVERTED" value="2"/> + <value name="LOGICOP_COPY_INVERTED" value="3"/> + <value name="LOGICOP_AND_REVERSE" value="4"/> + <value name="LOGICOP_INVERT" value="5"/> + <value name="LOGICOP_XOR" value="6"/> + <value name="LOGICOP_NAND" value="7"/> + <value name="LOGICOP_AND" value="8"/> + <value name="LOGICOP_EQUIV" value="9"/> + <value name="LOGICOP_NOOP" value="10"/> + <value name="LOGICOP_OR_INVERTED" value="11"/> + <value name="LOGICOP_COPY" value="12"/> + <value name="LOGICOP_OR_REVERSE" value="13"/> + <value name="LOGICOP_OR" value="14"/> + <value name="LOGICOP_SET" value="15"/> + </field> + <field name="Alpha Test Enable" start="48" end="48" type="bool"/> + <field name="Alpha Test Function" start="45" end="47" type="uint"> + <value name="COMPAREFUNCTION_ALWAYS" value="0"/> + <value name="COMPAREFUNCTION_NEVER" value="1"/> + <value name="COMPAREFUNCTION_LESS" value="2"/> + <value name="COMPAREFUNCTION_EQUAL" value="3"/> + <value name="COMPAREFUNCTION_LEQUAL" value="4"/> + <value name="COMPAREFUNCTION_GREATER" value="5"/> + <value name="COMPAREFUNCTION_NOTEQUAL" value="6"/> + <value name="COMPAREFUNCTION_GEQUAL" value="7"/> + </field> + <field name="Color Dither Enable" start="44" end="44" type="bool"/> + <field name="X Dither Offset" start="42" end="43" type="uint"/> + <field name="Y Dither Offset" start="40" end="41" type="uint"/> + <field name="Color Clamp Range" start="34" end="35" type="uint"> + <value name="COLORCLAMP_UNORM" value="0"/> + <value name="COLORCLAMP_SNORM" value="1"/> + <value name="COLORCLAMP_RTFORMAT" value="2"/> + </field> + <field name="Pre-Blend Color Clamp Enable" start="33" end="33" type="bool"/> + <field name="Post-Blend Color Clamp Enable" start="32" end="32" type="bool"/> + </struct> + + <struct name="CC_VIEWPORT" length="2"> + <field name="Minimum Depth" start="0" end="31" type="float"/> + <field name="Maximum Depth" start="32" end="63" type="float"/> + </struct> + + <struct name="COLOR_CALC_STATE" length="6"> + <field name="Stencil Reference Value" start="24" end="31" type="uint"/> + <field name="BackFace Stencil Reference Value" start="16" end="23" type="uint"/> + <field name="Round Disable Function Disable" start="15" end="15" type="bool"/> + <field name="Alpha Test Format" start="0" end="0" type="uint"> + <value name="ALPHATEST_UNORM8" value="0"/> + <value name="ALPHATEST_FLOAT32" value="1"/> + </field> + <field name="Alpha Reference Value As UNORM8" start="32" end="63" type="uint"/> + <field name="Alpha Reference Value As FLOAT32" start="32" end="63" type="float"/> + <field name="Blend Constant Color Red" start="64" end="95" type="float"/> + <field name="Blend Constant Color Green" start="96" end="127" type="float"/> + <field name="Blend Constant Color Blue" start="128" end="159" type="float"/> + <field name="Blend Constant Color Alpha" start="160" end="191" type="float"/> + </struct> + + <struct name="DEPTH_STENCIL_STATE" length="3"> + <field name="Stencil Test Enable" start="31" end="31" type="bool"/> + <field name="Stencil Test Function" start="28" end="30" type="uint"> + <value name="COMPAREFUNCTION_ALWAYS" value="0"/> + <value name="COMPAREFUNCTION_NEVER" value="1"/> + <value name="COMPAREFUNCTION_LESS" value="2"/> + <value name="COMPAREFUNCTION_EQUAL" value="3"/> + <value name="COMPAREFUNCTION_LEQUAL" value="4"/> + <value name="COMPAREFUNCTION_GREATER" value="5"/> + <value name="COMPAREFUNCTION_NOTEQUAL" value="6"/> + <value name="COMPAREFUNCTION_GEQUAL" value="7"/> + </field> + <field name="Stencil Fail Op" start="25" end="27" type="uint"> + <value name="STENCILOP_KEEP" value="0"/> + <value name="STENCILOP_ZERO" value="1"/> + <value name="STENCILOP_REPLACE" value="2"/> + <value name="STENCILOP_INCRSAT" value="3"/> + <value name="STENCILOP_DECRSAT" value="4"/> + <value name="STENCILOP_INCR" value="5"/> + <value name="STENCILOP_DECR" value="6"/> + <value name="STENCILOP_INVERT" value="7"/> + </field> + <field name="Stencil Pass Depth Fail Op" start="22" end="24" type="uint"/> + <field name="Stencil Pass Depth Pass Op" start="19" end="21" type="uint"/> + <field name="Stencil Buffer Write Enable" start="18" end="18" type="bool"/> + <field name="Double Sided Stencil Enable" start="15" end="15" type="bool"/> + <field name="BackFace Stencil Test Function" start="12" end="14" type="uint"> + <value name="COMPAREFUNCTION_ALWAYS" value="0"/> + <value name="COMPAREFUNCTION_NEVER" value="1"/> + <value name="COMPAREFUNCTION_LESS" value="2"/> + <value name="COMPAREFUNCTION_EQUAL" value="3"/> + <value name="COMPAREFUNCTION_LEQUAL" value="4"/> + <value name="COMPAREFUNCTION_GREATER" value="5"/> + <value name="COMPAREFUNCTION_NOTEQUAL" value="6"/> + <value name="COMPAREFUNCTION_GEQUAL" value="7"/> + </field> + <field name="Backface Stencil Fail Op" start="9" end="11" type="uint"> + <value name="STENCILOP_KEEP" value="0"/> + <value name="STENCILOP_ZERO" value="1"/> + <value name="STENCILOP_REPLACE" value="2"/> + <value name="STENCILOP_INCRSAT" value="3"/> + <value name="STENCILOP_DECRSAT" value="4"/> + <value name="STENCILOP_INCR" value="5"/> + <value name="STENCILOP_DECR" value="6"/> + <value name="STENCILOP_INVERT" value="7"/> + </field> + <field name="Backface Stencil Pass Depth Fail Op" start="6" end="8" type="uint"/> + <field name="Backface Stencil Pass Depth Pass Op" start="3" end="5" type="uint"/> + <field name="Stencil Test Mask" start="56" end="63" type="uint"/> + <field name="Stencil Write Mask" start="48" end="55" type="uint"/> + <field name="Backface Stencil Test Mask" start="40" end="47" type="uint"/> + <field name="Backface Stencil Write Mask" start="32" end="39" type="uint"/> + <field name="Depth Test Enable" start="95" end="95" type="bool"/> + <field name="Depth Test Function" start="91" end="93" type="uint"> + <value name="COMPAREFUNCTION_ALWAYS" value="0"/> + <value name="COMPAREFUNCTION_NEVER" value="1"/> + <value name="COMPAREFUNCTION_LESS" value="2"/> + <value name="COMPAREFUNCTION_EQUAL" value="3"/> + <value name="COMPAREFUNCTION_LEQUAL" value="4"/> + <value name="COMPAREFUNCTION_GREATER" value="5"/> + <value name="COMPAREFUNCTION_NOTEQUAL" value="6"/> + <value name="COMPAREFUNCTION_GEQUAL" value="7"/> + </field> + <field name="Depth Buffer Write Enable" start="90" end="90" type="bool"/> + </struct> + + <struct name="INTERFACE_DESCRIPTOR_DATA" length="8"> + <field name="Kernel Start Pointer" start="6" end="31" type="offset"/> + <field name="Single Program Flow" start="50" end="50" type="uint"/> + <field name="Thread Priority" start="49" end="49" type="uint"> + <value name="Normal Priority" value="0"/> + <value name="High Priority" value="1"/> + </field> + <field name="Floating Point Mode" start="48" end="48" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="45" end="45" type="bool"/> + <field name="Mask Stack Exception Enable" start="43" end="43" type="bool"/> + <field name="Software Exception Enable" start="39" end="39" type="bool"/> + <field name="Sampler State Pointer" start="69" end="95" type="offset"/> + <field name="Sampler Count" start="66" end="68" type="uint"> + <value name="No samplers used" value="0"/> + <value name="Between 1 and 4 samplers used" value="1"/> + <value name="Between 5 and 8 samplers used" value="2"/> + <value name="Between 9 and 12 samplers used" value="3"/> + <value name="Between 13 and 16 samplers used" value="4"/> + </field> + <field name="Binding Table Pointer" start="101" end="111" type="offset"/> + <field name="Binding Table Entry Count" start="96" end="100" type="uint"/> + <field name="Constant URB Entry Read Length" start="144" end="159" type="uint"/> + <field name="Constant URB Entry Read Offset" start="128" end="143" type="uint"/> + <field name="Rounding Mode" start="182" end="183" type="uint"> + <value name="RTNE" value="0"/> + <value name="RU" value="1"/> + <value name="RD" value="2"/> + <value name="RTZ" value="3"/> + </field> + <field name="Barrier Enable" start="181" end="181" type="bool"/> + <field name="Shared Local Memory Size" start="176" end="180" type="uint"/> + <field name="Number of Threads in GPGPU Thread Group" start="160" end="167" type="uint"/> + </struct> + + <struct name="PALETTE_ENTRY" length="1"> + <field name="Alpha" start="24" end="31" type="uint"/> + <field name="Red" start="16" end="23" type="uint"/> + <field name="Green" start="8" end="15" type="uint"/> + <field name="Blue" start="0" end="7" type="uint"/> + </struct> + + <struct name="BINDING_TABLE_STATE" length="1"> + <field name="Surface State Pointer" start="5" end="31" type="offset"/> + </struct> + + <struct name="RENDER_SURFACE_STATE" length="8"> + <field name="Surface Type" start="29" end="31" type="uint"> + <value name="SURFTYPE_1D" value="0"/> + <value name="SURFTYPE_2D" value="1"/> + <value name="SURFTYPE_3D" value="2"/> + <value name="SURFTYPE_CUBE" value="3"/> + <value name="SURFTYPE_BUFFER" value="4"/> + <value name="SURFTYPE_STRBUF" value="5"/> + <value name="SURFTYPE_NULL" value="7"/> + </field> + <field name="Surface Array" start="28" end="28" type="bool"/> + <field name="Surface Format" start="18" end="26" type="uint"/> + <field name="Surface Vertical Alignment" start="16" end="17" type="uint"> + <value name="VALIGN_2" value="0"/> + <value name="VALIGN_4" value="1"/> + </field> + <field name="Surface Horizontal Alignment" start="15" end="15" type="uint"> + <value name="HALIGN_4" value="0"/> + <value name="HALIGN_8" value="1"/> + </field> + <field name="Tiled Surface" start="14" end="14" type="uint"/> + <field name="Tile Walk" start="13" end="13" type="uint"> + <value name="TILEWALK_XMAJOR" value="0"/> + <value name="TILEWALK_YMAJOR" value="1"/> + </field> + <field name="Vertical Line Stride" start="12" end="12" type="uint"/> + <field name="Vertical Line Stride Offset" start="11" end="11" type="uint"/> + <field name="Surface Array Spacing" start="10" end="10" type="uint"> + <value name="ARYSPC_FULL" value="0"/> + <value name="ARYSPC_LOD0" value="1"/> + </field> + <field name="Render Cache Read Write Mode" start="8" end="8" type="uint"/> + <field name="Media Boundary Pixel Mode" start="6" end="7" type="uint"> + <value name="NORMAL_MODE" value="0"/> + <value name="PROGRESSIVE_FRAME" value="2"/> + <value name="INTERLACED_FRAME" value="3"/> + </field> + <field name="Cube Face Enables" start="0" end="5" type="uint"/> + <field name="Surface Base Address" start="32" end="63" type="address"/> + <field name="Height" start="80" end="93" type="uint"/> + <field name="Width" start="64" end="77" type="uint"/> + <field name="Depth" start="117" end="127" type="uint"/> + <field name="Surface Pitch" start="96" end="113" type="uint"/> + <field name="Render Target Rotation" start="157" end="158" type="uint"> + <value name="RTROTATE_0DEG" value="0"/> + <value name="RTROTATE_90DEG" value="1"/> + <value name="RTROTATE_270DEG" value="3"/> + </field> + <field name="Minimum Array Element" start="146" end="156" type="uint"/> + <field name="Render Target View Extent" start="135" end="145" type="uint"/> + <field name="Multisampled Surface Storage Format" start="134" end="134" type="uint"> + <value name="MSFMT_MSS" value="0"/> + <value name="MSFMT_DEPTH_STENCIL" value="1"/> + </field> + <field name="Number of Multisamples" start="131" end="133" type="uint"> + <value name="MULTISAMPLECOUNT_1" value="0"/> + <value name="MULTISAMPLECOUNT_4" value="2"/> + <value name="MULTISAMPLECOUNT_8" value="3"/> + </field> + <field name="Multisample Position Palette Index" start="128" end="130" type="uint"/> + <field name="Strbuf Minimum Array Element" start="128" end="154" type="uint"/> + <field name="X Offset" start="185" end="191" type="offset"/> + <field name="Y Offset" start="180" end="183" type="offset"/> + <field name="Surface Object Control State" start="176" end="179" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface Min LOD" start="164" end="167" type="uint"/> + <field name="MIP Count / LOD" start="160" end="163" type="uint"/> + <field name="MCS Base Address" start="204" end="223" type="address"/> + <field name="MCS Surface Pitch" start="195" end="203" type="uint"/> + <field name="Append Counter Address" start="198" end="223" type="address"/> + <field name="Append Counter Enable" start="193" end="193" type="bool"/> + <field name="MCS Enable" start="192" end="192" type="bool"/> + <field name="Reserved: MBZ" start="222" end="223" type="uint"/> + <field name="X Offset for UV Plane" start="208" end="221" type="uint"/> + <field name="Y Offset for UV Plane" start="192" end="205" type="uint"/> + <field name="Red Clear Color" start="255" end="255" type="uint"> + <value name="CC_ZERO" value="0"/> + <value name="CC_ONE" value="1"/> + </field> + <field name="Green Clear Color" start="254" end="254" type="uint"> + <value name="CC_ZERO" value="0"/> + <value name="CC_ONE" value="1"/> + </field> + <field name="Blue Clear Color" start="253" end="253" type="uint"> + <value name="CC_ZERO" value="0"/> + <value name="CC_ONE" value="1"/> + </field> + <field name="Alpha Clear Color" start="252" end="252" type="uint"> + <value name="CC_ZERO" value="0"/> + <value name="CC_ONE" value="1"/> + </field> + <field name="Resource Min LOD" start="224" end="235" type="u4.8"/> + </struct> + + <struct name="SAMPLER_STATE" length="4"> + <field name="Sampler Disable" start="31" end="31" type="bool"/> + <field name="Texture Border Color Mode" start="29" end="29" type="uint"> + <value name="DX10/OGL" value="0"/> + <value name="DX9" value="1"/> + </field> + <field name="LOD PreClamp Enable" start="28" end="28" type="uint" prefix="CLAMP_ENABLE"> + <value name="OGL" value="1"/> + </field> + <field name="Base Mip Level" start="22" end="26" type="u4.1"/> + <field name="Mip Mode Filter" start="20" end="21" type="uint" prefix="MIPFILTER"> + <value name="NONE" value="0"/> + <value name="NEAREST" value="1"/> + <value name="LINEAR" value="3"/> + </field> + <field name="Mag Mode Filter" start="17" end="19" type="uint" prefix="MAPFILTER"> + <value name="NEAREST" value="0"/> + <value name="LINEAR" value="1"/> + <value name="ANISOTROPIC" value="2"/> + <value name="MONO" value="6"/> + </field> + <field name="Min Mode Filter" start="14" end="16" type="uint" prefix="MAPFILTER"> + <value name="NEAREST" value="0"/> + <value name="LINEAR" value="1"/> + <value name="ANISOTROPIC" value="2"/> + <value name="MONO" value="6"/> + </field> + <field name="Texture LOD Bias" start="1" end="13" type="s4.8"/> + <field name="Anisotropic Algorithm" start="0" end="0" type="uint"> + <value name="LEGACY" value="0"/> + <value name="EWA Approximation" value="1"/> + </field> + <field name="Min LOD" start="52" end="63" type="u4.8"/> + <field name="Max LOD" start="40" end="51" type="u4.8"/> + <field name="Shadow Function" start="33" end="35" type="uint"> + <value name="PREFILTEROP ALWAYS" value="0"/> + <value name="PREFILTEROP NEVER" value="1"/> + <value name="PREFILTEROP LESS" value="2"/> + <value name="PREFILTEROP EQUAL" value="3"/> + <value name="PREFILTEROP LEQUAL" value="4"/> + <value name="PREFILTEROP GREATER" value="5"/> + <value name="PREFILTEROP NOTEQUAL" value="6"/> + <value name="PREFILTEROP GEQUAL" value="7"/> + </field> + <field name="Cube Surface Control Mode" start="32" end="32" type="uint"> + <value name="PROGRAMMED" value="0"/> + <value name="OVERRIDE" value="1"/> + </field> + <field name="Border Color Pointer" start="69" end="95" type="offset"/> + <field name="ChromaKey Enable" start="121" end="121" type="bool"/> + <field name="ChromaKey Index" start="119" end="120" type="uint"/> + <field name="ChromaKey Mode" start="118" end="118" type="uint"> + <value name="KEYFILTER_KILL_ON_ANY_MATCH" value="0"/> + <value name="KEYFILTER_REPLACE_BLACK" value="1"/> + </field> + <field name="Maximum Anisotropy" start="115" end="117" type="uint"> + <value name="RATIO 2:1" value="0"/> + <value name="RATIO 4:1" value="1"/> + <value name="RATIO 6:1" value="2"/> + <value name="RATIO 8:1" value="3"/> + <value name="RATIO 10:1" value="4"/> + <value name="RATIO 12:1" value="5"/> + <value name="RATIO 14:1" value="6"/> + <value name="RATIO 16:1" value="7"/> + </field> + <field name="R Address Min Filter Rounding Enable" start="109" end="109" type="bool"/> + <field name="R Address Mag Filter Rounding Enable" start="110" end="110" type="bool"/> + <field name="V Address Min Filter Rounding Enable" start="111" end="111" type="bool"/> + <field name="V Address Mag Filter Rounding Enable" start="112" end="112" type="bool"/> + <field name="U Address Min Filter Rounding Enable" start="113" end="113" type="bool"/> + <field name="U Address Mag Filter Rounding Enable" start="114" end="114" type="bool"/> + <field name="Trilinear Filter Quality" start="107" end="108" type="uint"> + <value name="FULL" value="0"/> + <value name="MED" value="2"/> + <value name="LOW" value="3"/> + </field> + <field name="Non-normalized Coordinate Enable" start="106" end="106" type="bool"/> + <field name="TCX Address Control Mode" start="102" end="104" type="uint"/> + <field name="TCY Address Control Mode" start="99" end="101" type="uint"/> + <field name="TCZ Address Control Mode" start="96" end="98" type="uint"/> + </struct> + + <enum name="3D_Prim_Topo_Type" prefix="3DPRIM"> + <value name="POINTLIST" value="1"/> + <value name="LINELIST" value="2"/> + <value name="LINESTRIP" value="3"/> + <value name="TRILIST" value="4"/> + <value name="TRISTRIP" value="5"/> + <value name="TRIFAN" value="6"/> + <value name="QUADLIST" value="7"/> + <value name="QUADSTRIP" value="8"/> + <value name="LINELIST_ADJ" value="9"/> + <value name="LINESTRIP_ADJ" value="10"/> + <value name="TRILIST_ADJ" value="11"/> + <value name="TRISTRIP_ADJ" value="12"/> + <value name="TRISTRIP_REVERSE" value="13"/> + <value name="POLYGON" value="14"/> + <value name="RECTLIST" value="15"/> + <value name="LINELOOP" value="16"/> + <value name="POINTLIST _BF" value="17"/> + <value name="LINESTRIP_CONT" value="18"/> + <value name="LINESTRIP_BF" value="19"/> + <value name="LINESTRIP_CONT_BF" value="20"/> + <value name="TRIFAN_NOSTIPPLE" value="22"/> + <value name="PATCHLIST_1" value="32"/> + <value name="PATCHLIST_2" value="33"/> + <value name="PATCHLIST_3" value="34"/> + <value name="PATCHLIST_4" value="35"/> + <value name="PATCHLIST_5" value="36"/> + <value name="PATCHLIST_6" value="37"/> + <value name="PATCHLIST_7" value="38"/> + <value name="PATCHLIST_8" value="39"/> + <value name="PATCHLIST_9" value="40"/> + <value name="PATCHLIST_10" value="41"/> + <value name="PATCHLIST_11" value="42"/> + <value name="PATCHLIST_12" value="43"/> + <value name="PATCHLIST_13" value="44"/> + <value name="PATCHLIST_14" value="45"/> + <value name="PATCHLIST_15" value="46"/> + <value name="PATCHLIST_16" value="47"/> + <value name="PATCHLIST_17" value="48"/> + <value name="PATCHLIST_18" value="49"/> + <value name="PATCHLIST_19" value="50"/> + <value name="PATCHLIST_20" value="51"/> + <value name="PATCHLIST_21" value="52"/> + <value name="PATCHLIST_22" value="53"/> + <value name="PATCHLIST_23" value="54"/> + <value name="PATCHLIST_24" value="55"/> + <value name="PATCHLIST_25" value="56"/> + <value name="PATCHLIST_26" value="57"/> + <value name="PATCHLIST_27" value="58"/> + <value name="PATCHLIST_28" value="59"/> + <value name="PATCHLIST_29" value="60"/> + <value name="PATCHLIST_30" value="61"/> + <value name="PATCHLIST_31" value="62"/> + <value name="PATCHLIST_32" value="63"/> + </enum> + + <enum name="3D_Vertex_Component_Control" prefix="VFCOMP"> + <value name="NOSTORE" value="0"/> + <value name="STORE_SRC" value="1"/> + <value name="STORE_0" value="2"/> + <value name="STORE_1_FP" value="3"/> + <value name="STORE_1_INT" value="4"/> + <value name="STORE_VID" value="5"/> + <value name="STORE_IID" value="6"/> + <value name="STORE_PID" value="7"/> + </enum> + + <enum name="3D_Compare_Function" prefix="COMPAREFUNCTION"> + <value name="ALWAYS" value="0"/> + <value name="NEVER" value="1"/> + <value name="LESS" value="2"/> + <value name="EQUAL" value="3"/> + <value name="LEQUAL" value="4"/> + <value name="GREATER" value="5"/> + <value name="NOTEQUAL" value="6"/> + <value name="GEQUAL" value="7"/> + </enum> + + <enum name="SURFACE_FORMAT" prefix="SF"> + <value name="R32G32B32A32_FLOAT" value="0"/> + <value name="R32G32B32A32_SINT" value="1"/> + <value name="R32G32B32A32_UINT" value="2"/> + <value name="R32G32B32A32_UNORM" value="3"/> + <value name="R32G32B32A32_SNORM" value="4"/> + <value name="R64G64_FLOAT" value="5"/> + <value name="R32G32B32X32_FLOAT" value="6"/> + <value name="R32G32B32A32_SSCALED" value="7"/> + <value name="R32G32B32A32_USCALED" value="8"/> + <value name="R32G32B32A32_SFIXED" value="32"/> + <value name="R64G64_PASSTHRU" value="33"/> + <value name="R32G32B32_FLOAT" value="64"/> + <value name="R32G32B32_SINT" value="65"/> + <value name="R32G32B32_UINT" value="66"/> + <value name="R32G32B32_UNORM" value="67"/> + <value name="R32G32B32_SNORM" value="68"/> + <value name="R32G32B32_SSCALED" value="69"/> + <value name="R32G32B32_USCALED" value="70"/> + <value name="R32G32B32_SFIXED" value="80"/> + <value name="R16G16B16A16_UNORM" value="128"/> + <value name="R16G16B16A16_SNORM" value="129"/> + <value name="R16G16B16A16_SINT" value="130"/> + <value name="R16G16B16A16_UINT" value="131"/> + <value name="R16G16B16A16_FLOAT" value="132"/> + <value name="R32G32_FLOAT" value="133"/> + <value name="R32G32_SINT" value="134"/> + <value name="R32G32_UINT" value="135"/> + <value name="R32_FLOAT_X8X24_TYPELESS" value="136"/> + <value name="X32_TYPELESS_G8X24_UINT" value="137"/> + <value name="L32A32_FLOAT" value="138"/> + <value name="R32G32_UNORM" value="139"/> + <value name="R32G32_SNORM" value="140"/> + <value name="R64_FLOAT" value="141"/> + <value name="R16G16B16X16_UNORM" value="142"/> + <value name="R16G16B16X16_FLOAT" value="143"/> + <value name="A32X32_FLOAT" value="144"/> + <value name="L32X32_FLOAT" value="145"/> + <value name="I32X32_FLOAT" value="146"/> + <value name="R16G16B16A16_SSCALED" value="147"/> + <value name="R16G16B16A16_USCALED" value="148"/> + <value name="R32G32_SSCALED" value="149"/> + <value name="R32G32_USCALED" value="150"/> + <value name="R32G32_SFIXED" value="160"/> + <value name="R64_PASSTHRU" value="161"/> + <value name="B8G8R8A8_UNORM" value="192"/> + <value name="B8G8R8A8_UNORM_SRGB" value="193"/> + <value name="R10G10B10A2_UNORM" value="194"/> + <value name="R10G10B10A2_UNORM_SRGB" value="195"/> + <value name="R10G10B10A2_UINT" value="196"/> + <value name="R10G10B10_SNORM_A2_UNORM" value="197"/> + <value name="R8G8B8A8_UNORM" value="199"/> + <value name="R8G8B8A8_UNORM_SRGB" value="200"/> + <value name="R8G8B8A8_SNORM" value="201"/> + <value name="R8G8B8A8_SINT" value="202"/> + <value name="R8G8B8A8_UINT" value="203"/> + <value name="R16G16_UNORM" value="204"/> + <value name="R16G16_SNORM" value="205"/> + <value name="R16G16_SINT" value="206"/> + <value name="R16G16_UINT" value="207"/> + <value name="R16G16_FLOAT" value="208"/> + <value name="B10G10R10A2_UNORM" value="209"/> + <value name="B10G10R10A2_UNORM_SRGB" value="210"/> + <value name="R11G11B10_FLOAT" value="211"/> + <value name="R32_SINT" value="214"/> + <value name="R32_UINT" value="215"/> + <value name="R32_FLOAT" value="216"/> + <value name="R24_UNORM_X8_TYPELESS" value="217"/> + <value name="X24_TYPELESS_G8_UINT" value="218"/> + <value name="L32_UNORM" value="221"/> + <value name="A32_UNORM" value="222"/> + <value name="L16A16_UNORM" value="223"/> + <value name="I24X8_UNORM" value="224"/> + <value name="L24X8_UNORM" value="225"/> + <value name="A24X8_UNORM" value="226"/> + <value name="I32_FLOAT" value="227"/> + <value name="L32_FLOAT" value="228"/> + <value name="A32_FLOAT" value="229"/> + <value name="X8B8_UNORM_G8R8_SNORM" value="230"/> + <value name="A8X8_UNORM_G8R8_SNORM" value="231"/> + <value name="B8X8_UNORM_G8R8_SNORM" value="232"/> + <value name="B8G8R8X8_UNORM" value="233"/> + <value name="B8G8R8X8_UNORM_SRGB" value="234"/> + <value name="R8G8B8X8_UNORM" value="235"/> + <value name="R8G8B8X8_UNORM_SRGB" value="236"/> + <value name="R9G9B9E5_SHAREDEXP" value="237"/> + <value name="B10G10R10X2_UNORM" value="238"/> + <value name="L16A16_FLOAT" value="240"/> + <value name="R32_UNORM" value="241"/> + <value name="R32_SNORM" value="242"/> + <value name="R10G10B10X2_USCALED" value="243"/> + <value name="R8G8B8A8_SSCALED" value="244"/> + <value name="R8G8B8A8_USCALED" value="245"/> + <value name="R16G16_SSCALED" value="246"/> + <value name="R16G16_USCALED" value="247"/> + <value name="R32_SSCALED" value="248"/> + <value name="R32_USCALED" value="249"/> + <value name="B5G6R5_UNORM" value="256"/> + <value name="B5G6R5_UNORM_SRGB" value="257"/> + <value name="B5G5R5A1_UNORM" value="258"/> + <value name="B5G5R5A1_UNORM_SRGB" value="259"/> + <value name="B4G4R4A4_UNORM" value="260"/> + <value name="B4G4R4A4_UNORM_SRGB" value="261"/> + <value name="R8G8_UNORM" value="262"/> + <value name="R8G8_SNORM" value="263"/> + <value name="R8G8_SINT" value="264"/> + <value name="R8G8_UINT" value="265"/> + <value name="R16_UNORM" value="266"/> + <value name="R16_SNORM" value="267"/> + <value name="R16_SINT" value="268"/> + <value name="R16_UINT" value="269"/> + <value name="R16_FLOAT" value="270"/> + <value name="A8P8_UNORM_PALETTE0" value="271"/> + <value name="A8P8_UNORM_PALETTE1" value="272"/> + <value name="I16_UNORM" value="273"/> + <value name="L16_UNORM" value="274"/> + <value name="A16_UNORM" value="275"/> + <value name="L8A8_UNORM" value="276"/> + <value name="I16_FLOAT" value="277"/> + <value name="L16_FLOAT" value="278"/> + <value name="A16_FLOAT" value="279"/> + <value name="L8A8_UNORM_SRGB" value="280"/> + <value name="R5G5_SNORM_B6_UNORM" value="281"/> + <value name="B5G5R5X1_UNORM" value="282"/> + <value name="B5G5R5X1_UNORM_SRGB" value="283"/> + <value name="R8G8_SSCALED" value="284"/> + <value name="R8G8_USCALED" value="285"/> + <value name="R16_SSCALED" value="286"/> + <value name="R16_USCALED" value="287"/> + <value name="P8A8_UNORM_PALETTE0" value="290"/> + <value name="P8A8_UNORM_PALETTE1" value="291"/> + <value name="A1B5G5R5_UNORM" value="292"/> + <value name="A4B4G4R4_UNORM" value="293"/> + <value name="L8A8_UINT" value="294"/> + <value name="L8A8_SINT" value="295"/> + <value name="R8_UNORM" value="320"/> + <value name="R8_SNORM" value="321"/> + <value name="R8_SINT" value="322"/> + <value name="R8_UINT" value="323"/> + <value name="A8_UNORM" value="324"/> + <value name="I8_UNORM" value="325"/> + <value name="L8_UNORM" value="326"/> + <value name="P4A4_UNORM_PALETTE0" value="327"/> + <value name="A4P4_UNORM_PALETTE0" value="328"/> + <value name="R8_SSCALED" value="329"/> + <value name="R8_USCALED" value="330"/> + <value name="P8_UNORM_PALETTE0" value="331"/> + <value name="L8_UNORM_SRGB" value="332"/> + <value name="P8_UNORM_PALETTE1" value="333"/> + <value name="P4A4_UNORM_PALETTE1" value="334"/> + <value name="A4P4_UNORM_PALETTE1" value="335"/> + <value name="Y8_UNORM" value="336"/> + <value name="L8_UINT" value="338"/> + <value name="L8_SINT" value="339"/> + <value name="I8_UINT" value="340"/> + <value name="I8_SINT" value="341"/> + <value name="DXT1_RGB_SRGB" value="384"/> + <value name="R1_UNORM" value="385"/> + <value name="YCRCB_NORMAL" value="386"/> + <value name="YCRCB_SWAPUVY" value="387"/> + <value name="P2_UNORM_PALETTE0" value="388"/> + <value name="P2_UNORM_PALETTE1" value="389"/> + <value name="BC1_UNORM" value="390"/> + <value name="BC2_UNORM" value="391"/> + <value name="BC3_UNORM" value="392"/> + <value name="BC4_UNORM" value="393"/> + <value name="BC5_UNORM" value="394"/> + <value name="BC1_UNORM_SRGB" value="395"/> + <value name="BC2_UNORM_SRGB" value="396"/> + <value name="BC3_UNORM_SRGB" value="397"/> + <value name="MONO8" value="398"/> + <value name="YCRCB_SWAPUV" value="399"/> + <value name="YCRCB_SWAPY" value="400"/> + <value name="DXT1_RGB" value="401"/> + <value name="FXT1" value="402"/> + <value name="R8G8B8_UNORM" value="403"/> + <value name="R8G8B8_SNORM" value="404"/> + <value name="R8G8B8_SSCALED" value="405"/> + <value name="R8G8B8_USCALED" value="406"/> + <value name="R64G64B64A64_FLOAT" value="407"/> + <value name="R64G64B64_FLOAT" value="408"/> + <value name="BC4_SNORM" value="409"/> + <value name="BC5_SNORM" value="410"/> + <value name="R16G16B16_FLOAT" value="411"/> + <value name="R16G16B16_UNORM" value="412"/> + <value name="R16G16B16_SNORM" value="413"/> + <value name="R16G16B16_SSCALED" value="414"/> + <value name="R16G16B16_USCALED" value="415"/> + <value name="BC6H_SF16" value="417"/> + <value name="BC7_UNORM" value="418"/> + <value name="BC7_UNORM_SRGB" value="419"/> + <value name="BC6H_UF16" value="420"/> + <value name="PLANAR_420_8" value="421"/> + <value name="R8G8B8_UNORM_SRGB" value="424"/> + <value name="ETC1_RGB8" value="425"/> + <value name="ETC2_RGB8" value="426"/> + <value name="EAC_R11" value="427"/> + <value name="EAC_RG11" value="428"/> + <value name="EAC_SIGNED_R11" value="429"/> + <value name="EAC_SIGNED_RG11" value="430"/> + <value name="ETC2_SRGB8" value="431"/> + <value name="R16G16B16_UINT" value="432"/> + <value name="R16G16B16_SINT" value="433"/> + <value name="R32_SFIXED" value="434"/> + <value name="R10G10B10A2_SNORM" value="435"/> + <value name="R10G10B10A2_USCALED" value="436"/> + <value name="R10G10B10A2_SSCALED" value="437"/> + <value name="R10G10B10A2_SINT" value="438"/> + <value name="B10G10R10A2_SNORM" value="439"/> + <value name="B10G10R10A2_USCALED" value="440"/> + <value name="B10G10R10A2_SSCALED" value="441"/> + <value name="B10G10R10A2_UINT" value="442"/> + <value name="B10G10R10A2_SINT" value="443"/> + <value name="R64G64B64A64_PASSTHRU" value="444"/> + <value name="R64G64B64_PASSTHRU" value="445"/> + <value name="ETC2_RGB8_PTA" value="448"/> + <value name="ETC2_SRGB8_PTA" value="449"/> + <value name="ETC2_EAC_RGBA8" value="450"/> + <value name="ETC2_EAC_SRGB8_A8" value="451"/> + <value name="R8G8B8_UINT" value="456"/> + <value name="R8G8B8_SINT" value="457"/> + <value name="RAW" value="511"/> + </enum> + + <enum name="Texture Coordinate Mode" prefix="TCM"> + <value name="WRAP" value="0"/> + <value name="MIRROR" value="1"/> + <value name="CLAMP" value="2"/> + <value name="CUBE" value="3"/> + <value name="CLAMP_BORDER" value="4"/> + <value name="MIRROR_ONCE" value="5"/> + </enum> + + <instruction name="3DPRIMITIVE" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="3"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="0"/> + <field name="Indirect Parameter Enable" start="10" end="10" type="bool"/> + <field name="Predicate Enable" start="8" end="8" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="End Offset Enable" start="41" end="41" type="bool"/> + <field name="Vertex Access Type" start="40" end="40" type="uint"> + <value name="SEQUENTIAL" value="0"/> + <value name="RANDOM" value="1"/> + </field> + <field name="Primitive Topology Type" start="32" end="37" type="uint"/> + <field name="Vertex Count Per Instance" start="64" end="95" type="uint"/> + <field name="Start Vertex Location" start="96" end="127" type="uint"/> + <field name="Instance Count" start="128" end="159" type="uint"/> + <field name="Start Instance Location" start="160" end="191" type="uint"/> + <field name="Base Vertex Location" start="192" end="223" type="int"/> + </instruction> + + <instruction name="3DSTATE_AA_LINE_PARAMETERS" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="10"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="AA Coverage Bias" start="48" end="55" type="u0.8"/> + <field name="AA Coverage Slope" start="32" end="39" type="u0.8"/> + <field name="AA Coverage EndCap Bias" start="80" end="87" type="u0.8"/> + <field name="AA Coverage EndCap Slope" start="64" end="71" type="u0.8"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="40"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to DS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="41"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to GS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="39"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to HS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_PS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="42"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to PS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="38"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to VS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BLEND_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="36"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Blend State Pointer" start="38" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_CC_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="14"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Color Calc State Pointer" start="38" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_CHROMA_KEY" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="ChromaKey Table Index" start="62" end="63" type="uint"/> + <field name="ChromaKey Low Value" start="64" end="95" type="uint"/> + <field name="ChromaKey High Value" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="3DSTATE_CLEAR_PARAMS" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Depth Clear Value" start="32" end="63" type="uint"/> + <field name="Depth Clear Value Valid" start="64" end="64" type="bool"/> + </instruction> + + <instruction name="3DSTATE_CLIP" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="18"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Front Winding" start="52" end="52" type="uint"/> + <field name="Vertex Sub Pixel Precision Select" start="51" end="51" type="uint"/> + <field name="EarlyCull Enable" start="50" end="50" type="bool"/> + <field name="Cull Mode" start="48" end="49" type="uint" prefix="CULLMODE"> + <value name="BOTH" value="0"/> + <value name="NONE" value="1"/> + <value name="FRONT" value="2"/> + <value name="BACK" value="3"/> + </field> + <field name="Clipper Statistics Enable" start="42" end="42" type="bool"/> + <field name="User Clip Distance Cull Test Enable Bitmask" start="32" end="39" type="uint"/> + <field name="Clip Enable" start="95" end="95" type="bool"/> + <field name="API Mode" start="94" end="94" type="uint"> + <value name="APIMODE_OGL" value="0"/> + </field> + <field name="Viewport XY ClipTest Enable" start="92" end="92" type="bool"/> + <field name="Viewport Z ClipTest Enable" start="91" end="91" type="bool"/> + <field name="Guardband ClipTest Enable" start="90" end="90" type="bool"/> + <field name="User Clip Distance Clip Test Enable Bitmask" start="80" end="87" type="uint"/> + <field name="Clip Mode" start="77" end="79" type="uint"> + <value name="CLIPMODE_NORMAL" value="0"/> + <value name="CLIPMODE_REJECT_ALL" value="3"/> + <value name="CLIPMODE_ACCEPT_ALL" value="4"/> + </field> + <field name="Perspective Divide Disable" start="73" end="73" type="bool"/> + <field name="Non-Perspective Barycentric Enable" start="72" end="72" type="bool"/> + <field name="Triangle Strip/List Provoking Vertex Select" start="68" end="69" type="uint"> + <value name="Vertex 0" value="0"/> + <value name="Vertex 1" value="1"/> + <value name="Vertex 2" value="2"/> + </field> + <field name="Line Strip/List Provoking Vertex Select" start="66" end="67" type="uint"> + <value name="Vertex 0" value="0"/> + <value name="Vertex 1" value="1"/> + </field> + <field name="Triangle Fan Provoking Vertex Select" start="64" end="65" type="uint"> + <value name="Vertex 0" value="0"/> + <value name="Vertex 1" value="1"/> + <value name="Vertex 2" value="2"/> + </field> + <field name="Minimum Point Width" start="113" end="123" type="u8.3"/> + <field name="Maximum Point Width" start="102" end="112" type="u8.3"/> + <field name="Force Zero RTAIndex Enable" start="101" end="101" type="bool"/> + <field name="Maximum VPIndex" start="96" end="99" type="uint"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_DS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="26"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Constant Body" start="32" end="223" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_GS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="22"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Constant Body" start="32" end="223" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_HS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="25"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Constant Body" start="32" end="223" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_PS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="23"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Constant Body" start="32" end="223" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_VS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="21"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Constant Body" start="32" end="223" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_DEPTH_BUFFER" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="5"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Surface Type" start="61" end="63" type="uint"> + <value name="SURFTYPE_1D" value="0"/> + <value name="SURFTYPE_2D" value="1"/> + <value name="SURFTYPE_3D" value="2"/> + <value name="SURFTYPE_CUBE" value="3"/> + <value name="SURFTYPE_NULL" value="7"/> + </field> + <field name="Depth Write Enable" start="60" end="60" type="bool"/> + <field name="Stencil Write Enable" start="59" end="59" type="bool"/> + <field name="Hierarchical Depth Buffer Enable" start="54" end="54" type="bool"/> + <field name="Surface Format" start="50" end="52" type="uint"> + <value name="D32_FLOAT" value="1"/> + <value name="D24_UNORM_X8_UINT" value="3"/> + <value name="D16_UNORM" value="5"/> + </field> + <field name="Surface Pitch" start="32" end="49" type="uint"/> + <field name="Surface Base Address" start="64" end="95" type="address"/> + <field name="Height" start="114" end="127" type="uint"/> + <field name="Width" start="100" end="113" type="uint"/> + <field name="LOD" start="96" end="99" type="uint"/> + <field name="Depth" start="149" end="159" type="uint"> + <value name="SURFTYPE_CUBE (must be zero)" value="0"/> + </field> + <field name="Minimum Array Element" start="138" end="148" type="uint"/> + <field name="Depth Buffer Object Control State" start="128" end="131" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Depth Coordinate Offset Y" start="176" end="191" type="int"/> + <field name="Depth Coordinate Offset X" start="160" end="175" type="int"/> + <field name="Render Target View Extent" start="213" end="223" type="uint"/> + </instruction> + + <instruction name="3DSTATE_DEPTH_STENCIL_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="37"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to DEPTH_STENCIL_STATE" start="38" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_DRAWING_RECTANGLE" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="0"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Clipped Drawing Rectangle Y Min" start="48" end="63" type="uint"/> + <field name="Clipped Drawing Rectangle X Min" start="32" end="47" type="uint"/> + <field name="Clipped Drawing Rectangle Y Max" start="80" end="95" type="uint"/> + <field name="Clipped Drawing Rectangle X Max" start="64" end="79" type="uint"/> + <field name="Drawing Rectangle Origin Y" start="112" end="127" type="int"/> + <field name="Drawing Rectangle Origin X" start="96" end="111" type="int"/> + </instruction> + + <instruction name="3DSTATE_DS" bias="2" length="6"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="29"/> + <field name="DWord Length" start="0" end="7" type="uint" default="4"/> + <field name="Kernel Start Pointer" start="38" end="63" type="offset"/> + <field name="Single Domain Point Dispatch" start="95" end="95" type="uint"/> + <field name="Vector Mask Enable" start="94" end="94" type="bool"/> + <field name="Sampler Count" start="91" end="93" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="82" end="89" type="uint"/> + <field name="Floating Point Mode" start="80" end="80" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="77" end="77" type="bool"/> + <field name="Software Exception Enable" start="71" end="71" type="bool"/> + <field name="Scratch Space Base Pointer" start="106" end="127" type="offset"/> + <field name="Per-Thread Scratch Space" start="96" end="99" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data" start="148" end="152" type="uint"/> + <field name="Patch URB Entry Read Length" start="139" end="145" type="uint"/> + <field name="Patch URB Entry Read Offset" start="132" end="137" type="uint"/> + <field name="Maximum Number of Threads" start="185" end="191" type="uint"/> + <field name="Statistics Enable" start="170" end="170" type="bool"/> + <field name="Compute W Coordinate Enable" start="162" end="162" type="bool"/> + <field name="DS Cache Disable" start="161" end="161" type="bool"/> + <field name="DS Function Enable" start="160" end="160" type="bool"/> + </instruction> + + <instruction name="3DSTATE_GS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="17"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Kernel Start Pointer" start="38" end="63" type="offset"/> + <field name="Single Program Flow (SPF)" start="95" end="95" type="uint"/> + <field name="Vector Mask Enable (VME)" start="94" end="94" type="uint"/> + <field name="Sampler Count" start="91" end="93" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="82" end="89" type="uint"/> + <field name="Thread Priority" start="81" end="81" type="uint"> + <value name="Normal Priority" value="0"/> + <value name="High Priority" value="1"/> + </field> + <field name="Floating Point Mode" start="80" end="80" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="77" end="77" type="bool"/> + <field name="Mask Stack Exception Enable" start="75" end="75" type="bool"/> + <field name="Software Exception Enable" start="71" end="71" type="bool"/> + <field name="Scratch Space Base Pointer" start="106" end="127" type="offset"/> + <field name="Per-Thread Scratch Space" start="96" end="99" type="uint"/> + <field name="Output Vertex Size" start="151" end="156" type="uint"/> + <field name="Output Topology" start="145" end="150" type="uint" prefix="OUTPUT"/> + <field name="Vertex URB Entry Read Length" start="139" end="144" type="uint"/> + <field name="Include Vertex Handles" start="138" end="138" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="132" end="137" type="uint"/> + <field name="Dispatch GRF Start Register for URB Data" start="128" end="131" type="uint"/> + <field name="Maximum Number of Threads" start="185" end="191" type="uint"/> + <field name="Control Data Format" start="184" end="184" type="uint"> + <value name="GSCTL_CUT" value="0"/> + <value name="GSCTL_SID" value="1"/> + </field> + <field name="Control Data Header Size" start="180" end="183" type="uint"/> + <field name="Instance Control" start="175" end="179" type="uint"/> + <field name="Default StreamID" start="173" end="174" type="uint"/> + <field name="Dispatch Mode" start="171" end="172" type="uint" prefix="DISPATCH_MODE"> + <value name="SINGLE" value="0"/> + <value name="DUAL_INSTANCE" value="1"/> + <value name="DUAL_OBJECT" value="2"/> + </field> + <field name="GS Statistics Enable" start="170" end="170" type="uint"/> + <field name="GS Invocations Increment Value" start="165" end="169" type="uint"/> + <field name="Include Primitive ID" start="164" end="164" type="uint"/> + <field name="Hint" start="163" end="163" type="uint"/> + <field name="Reorder Enable" start="162" end="162" type="bool"/> + <field name="Discard Adjacency" start="161" end="161" type="bool"/> + <field name="GS Enable" start="160" end="160" type="bool"/> + <field name="Semaphore Handle" start="192" end="203" type="offset"/> + </instruction> + + <instruction name="3DSTATE_HIER_DEPTH_BUFFER" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="7"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Hierarchical Depth Buffer Object Control State" start="57" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface Pitch" start="32" end="48" type="uint"/> + <field name="Surface Base Address" start="64" end="95" type="address"/> + </instruction> + + <instruction name="3DSTATE_HS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="27"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Sampler Count" start="59" end="61" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="50" end="57" type="uint"/> + <field name="Floating Point Mode" start="48" end="48" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="45" end="45" type="bool"/> + <field name="Software Exception Enable" start="39" end="39" type="bool"/> + <field name="Maximum Number of Threads" start="32" end="38" type="uint"/> + <field name="Enable" start="95" end="95" type="bool"/> + <field name="Statistics Enable" start="93" end="93" type="bool"/> + <field name="Instance Count" start="64" end="67" type="uint"/> + <field name="Kernel Start Pointer" start="102" end="127" type="offset"/> + <field name="Scratch Space Base Pointer" start="138" end="159" type="offset"/> + <field name="Per-Thread Scratch Space" start="128" end="131" type="uint"/> + <field name="Single Program Flow" start="187" end="187" type="uint"/> + <field name="Vector Mask Enable" start="186" end="186" type="bool"/> + <field name="Include Vertex Handles" start="184" end="184" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data" start="179" end="183" type="uint"/> + <field name="Vertex URB Entry Read Length" start="171" end="176" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="164" end="169" type="uint"/> + <field name="Semaphore Handle" start="192" end="203" type="offset"/> + </instruction> + + <instruction name="3DSTATE_INDEX_BUFFER" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="10"/> + <field name="Memory Object Control State" start="12" end="15" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Cut Index Enable" start="10" end="10" type="bool"/> + <field name="Index Format" start="8" end="9" type="uint" prefix="INDEX"> + <value name="BYTE" value="0"/> + <value name="WORD" value="1"/> + <value name="DWORD" value="2"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Buffer Starting Address" start="32" end="63" type="address"/> + <field name="Buffer Ending Address" start="64" end="95" type="address"/> + </instruction> + + <instruction name="3DSTATE_LINE_STIPPLE" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="8"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Modify Enable (Current Repeat Counter, Current Stipple Index)" start="63" end="63" type="bool"/> + <field name="Current Repeat Counter" start="53" end="61" type="uint"/> + <field name="Current Stipple Index" start="48" end="51" type="uint"/> + <field name="Line Stipple Pattern" start="32" end="47" type="uint"/> + <field name="Line Stipple Inverse Repeat Count" start="79" end="95" type="u1.16"/> + <field name="Line Stipple Repeat Count" start="64" end="72" type="uint"/> + </instruction> + + <instruction name="3DSTATE_MONOFILTER_SIZE" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="17"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Monochrome Filter Width" start="35" end="37" type="uint"/> + <field name="Monochrome Filter Height" start="32" end="34" type="uint"/> + </instruction> + + <instruction name="3DSTATE_MULTISAMPLE" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="13"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Pixel Location" start="36" end="36" type="uint"> + <value name="PIXLOC_CENTER" value="0"/> + <value name="PIXLOC_UL_CORNER" value="1"/> + </field> + <field name="Number of Multisamples" start="33" end="35" type="uint"> + <value name="NUMSAMPLES_1" value="0"/> + <value name="NUMSAMPLES_4" value="2"/> + <value name="NUMSAMPLES_8" value="3"/> + </field> + <field name="Sample3 X Offset" start="92" end="95" type="u0.4"/> + <field name="Sample3 Y Offset" start="88" end="91" type="u0.4"/> + <field name="Sample2 X Offset" start="84" end="87" type="u0.4"/> + <field name="Sample2 Y Offset" start="80" end="83" type="u0.4"/> + <field name="Sample1 X Offset" start="76" end="79" type="u0.4"/> + <field name="Sample1 Y Offset" start="72" end="75" type="u0.4"/> + <field name="Sample0 X Offset" start="68" end="71" type="u0.4"/> + <field name="Sample0 Y Offset" start="64" end="67" type="u0.4"/> + <field name="Sample7 X Offset" start="124" end="127" type="u0.4"/> + <field name="Sample7 Y Offset" start="120" end="123" type="u0.4"/> + <field name="Sample6 X Offset" start="116" end="119" type="u0.4"/> + <field name="Sample6 Y Offset" start="112" end="115" type="u0.4"/> + <field name="Sample5 X Offset" start="108" end="111" type="u0.4"/> + <field name="Sample5 Y Offset" start="104" end="107" type="u0.4"/> + <field name="Sample4 X Offset" start="100" end="103" type="u0.4"/> + <field name="Sample4 Y Offset" start="96" end="99" type="u0.4"/> + </instruction> + + <instruction name="3DSTATE_POLY_STIPPLE_OFFSET" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="6"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Polygon Stipple X Offset" start="40" end="44" type="uint"/> + <field name="Polygon Stipple Y Offset" start="32" end="36" type="uint"/> + </instruction> + + <instruction name="3DSTATE_POLY_STIPPLE_PATTERN" bias="2" length="33"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="7"/> + <field name="DWord Length" start="0" end="7" type="uint" default="31"/> + <group count="32" start="32" size="32"> + <field name="Pattern Row" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="3DSTATE_PS" bias="2" length="8"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="32"/> + <field name="DWord Length" start="0" end="7" type="uint" default="6"/> + <field name="Kernel Start Pointer[0]" start="38" end="63" type="offset"/> + <field name="Single Program Flow (SPF)" start="95" end="95" type="uint"/> + <field name="Vector Mask Enable (VME)" start="94" end="94" type="uint"/> + <field name="Sampler Count" start="91" end="93" type="uint"/> + <field name="Denormal Mode" start="90" end="90" type="uint"> + <value name="FTZ" value="0"/> + <value name="RET" value="1"/> + </field> + <field name="Binding Table Entry Count" start="82" end="89" type="uint"/> + <field name="Floating Point Mode" start="80" end="80" type="uint"> + <value name="IEEE-745" value="0"/> + <value name="Alt" value="1"/> + </field> + <field name="Rounding Mode" start="78" end="79" type="uint"> + <value name="RTNE" value="0"/> + <value name="RU" value="1"/> + <value name="RD" value="2"/> + <value name="RTZ" value="3"/> + </field> + <field name="Illegal Opcode Exception Enable" start="77" end="77" type="bool"/> + <field name="Mask Stack Exception Enable" start="75" end="75" type="bool"/> + <field name="Software Exception Enable" start="71" end="71" type="bool"/> + <field name="Scratch Space Base Pointer" start="106" end="127" type="offset"/> + <field name="Per Thread Scratch Space" start="96" end="99" type="uint"/> + <field name="Maximum Number of Threads" start="152" end="159" type="uint"/> + <field name="Push Constant Enable" start="139" end="139" type="bool"/> + <field name="Attribute Enable" start="138" end="138" type="bool"/> + <field name="oMask Present to RenderTarget" start="137" end="137" type="bool"/> + <field name="Render Target Fast Clear Enable" start="136" end="136" type="bool"/> + <field name="Dual Source Blend Enable" start="135" end="135" type="bool"/> + <field name="Render Target Resolve Enable" start="134" end="134" type="bool"/> + <field name="Position XY Offset Select" start="131" end="132" type="uint"> + <value name="POSOFFSET_NONE" value="0"/> + <value name="POSOFFSET_CENTROID" value="2"/> + <value name="POSOFFSET_SAMPLE" value="3"/> + </field> + <field name="32 Pixel Dispatch Enable" start="130" end="130" type="bool"/> + <field name="16 Pixel Dispatch Enable" start="129" end="129" type="bool"/> + <field name="8 Pixel Dispatch Enable" start="128" end="128" type="bool"/> + <field name="Dispatch GRF Start Register for Constant/Setup Data [0]" start="176" end="182" type="uint"/> + <field name="Dispatch GRF Start Register for Constant/Setup Data [1]" start="168" end="174" type="uint"/> + <field name="Dispatch GRF Start Register for Constant/Setup Data [2]" start="160" end="166" type="uint"/> + <field name="Kernel Start Pointer[1]" start="198" end="223" type="offset"/> + <field name="Kernel Start Pointer[2]" start="230" end="255" type="offset"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="20"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="51" type="uint"> + <value name="0KB" value="0"/> + </field> + <field name="Constant Buffer Size" start="32" end="36" type="uint"> + <value name="0KB" value="0"/> + </field> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="21"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="51" type="uint"> + <value name="0KB" value="0"/> + </field> + <field name="Constant Buffer Size" start="32" end="36" type="uint"> + <value name="0KB" value="0"/> + </field> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="19"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="51" type="uint"> + <value name="0KB" value="0"/> + </field> + <field name="Constant Buffer Size" start="32" end="36" type="uint"> + <value name="0KB" value="0"/> + </field> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_PS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="22"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="51" type="uint"> + <value name="0KB" value="0"/> + </field> + <field name="Constant Buffer Size" start="32" end="36" type="uint"> + <value name="0KB" value="0"/> + </field> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="18"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="51" type="uint"> + <value name="0KB" value="0"/> + </field> + <field name="Constant Buffer Size" start="32" end="36" type="uint"> + <value name="0KB" value="0"/> + </field> + </instruction> + + <instruction name="3DSTATE_SAMPLER_PALETTE_LOAD0" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="7" type="uint"/> + <group count="0" start="32" size="32"> + <field name="Entry" start="0" end="31" type="PALETTE_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_SAMPLER_PALETTE_LOAD1" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="12"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <group count="0" start="32" size="32"> + <field name="Palette Alpha[0:N-1]" start="24" end="31" type="uint"/> + <field name="Palette Red[0:N-1]" start="16" end="23" type="uint"/> + <field name="Palette Green[0:N-1]" start="8" end="15" type="uint"/> + <field name="Palette Blue[0:N-1]" start="0" end="7" type="uint"/> + </group> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="45"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to DS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="46"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to GS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="44"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to HS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_PS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="47"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to PS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="43"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to VS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLE_MASK" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="24"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Sample Mask" start="32" end="39" type="uint"/> + </instruction> + + <instruction name="3DSTATE_SBE" bias="2" length="14"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="31"/> + <field name="DWord Length" start="0" end="7" type="uint" default="12"/> + <field name="Attribute Swizzle Control Mode" start="60" end="60" type="uint"> + <value name="SWIZ_0_15" value="0"/> + <value name="SWIZ_16_31" value="1"/> + </field> + <field name="Number of SF Output Attributes" start="54" end="59" type="uint"/> + <field name="Attribute Swizzle Enable" start="53" end="53" type="bool"/> + <field name="Point Sprite Texture Coordinate Origin" start="52" end="52" type="uint"> + <value name="UPPERLEFT" value="0"/> + <value name="LOWERLEFT" value="1"/> + </field> + <field name="Vertex URB Entry Read Length" start="43" end="47" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="36" end="41" type="uint"/> + <group count="8" start="64" size="32"> + <field name="Attribute [2n+1] Component Override W" start="31" end="31" type="bool"/> + <field name="Attribute [2n+1] Component Override Z" start="30" end="30" type="bool"/> + <field name="Attribute [2n+1] Component Override Y" start="29" end="29" type="bool"/> + <field name="Attribute [2n+1] Component Override X" start="28" end="28" type="bool"/> + <field name="Attribute [2n+1] Constant Source" start="25" end="26" type="uint"> + <value name="CONST_0000" value="0"/> + <value name="CONST_0001_FLOAT" value="1"/> + <value name="CONST_1111_FLOAT" value="2"/> + <value name="PRIM_ID" value="3"/> + </field> + <field name="Attribute [2n+1] Swizzle Select" start="22" end="23" type="uint"> + <value name="INPUTATTR" value="0"/> + <value name="INPUTATTR_FACING" value="1"/> + <value name="INPUTATTR_W" value="2"/> + <value name="INPUTATTR_FACING_W" value="3"/> + </field> + <field name="Attribute [2n+1] Source Attribute" start="16" end="20" type="uint"/> + <field name="Attribute [2n] Component Override W" start="15" end="15" type="bool"/> + <field name="Attribute [2n] Component Override Z" start="14" end="14" type="bool"/> + <field name="Attribute [2n] Component Override Y" start="13" end="13" type="bool"/> + <field name="Attribute [2n] Component Override X" start="12" end="12" type="bool"/> + <field name="Attribute [2n] Constant Source" start="9" end="10" type="uint"> + <value name="CONST_0000" value="0"/> + <value name="CONST_0001_FLOAT" value="1"/> + <value name="CONST_1111_FLOAT" value="2"/> + <value name="PRIM_ID" value="3"/> + </field> + <field name="Attribute [2n] Swizzle Select" start="6" end="7" type="uint"> + <value name="INPUTATTR" value="0"/> + <value name="INPUTATTR_FACING" value="1"/> + <value name="INPUTATTR_W" value="2"/> + <value name="INPUTATTR_FACING_W" value="3"/> + </field> + <field name="Attribute [2n] Source Attribute" start="0" end="4" type="uint"/> + </group> + <field name="Point Sprite Texture Coordinate Enable" start="320" end="351" type="uint"/> + <field name="Constant Interpolation Enable[31:0]" start="352" end="383" type="uint"/> + <field name="Attribute 7 WrapShortest Enables" start="412" end="415" type="uint"/> + <field name="Attribute 6 WrapShortest Enables" start="408" end="411" type="uint"/> + <field name="Attribute 5 WrapShortest Enables" start="404" end="407" type="uint"/> + <field name="Attribute 4 WrapShortest Enables" start="400" end="403" type="uint"/> + <field name="Attribute 3 WrapShortest Enables" start="396" end="399" type="uint"/> + <field name="Attribute 2 WrapShortest Enables" start="392" end="395" type="uint"/> + <field name="Attribute 1 WrapShortest Enables" start="388" end="391" type="uint"/> + <field name="Attribute 0 WrapShortest Enables" start="384" end="387" type="uint"/> + <field name="Attribute 15 WrapShortest Enables" start="444" end="447" type="uint"/> + <field name="Attribute 14 WrapShortest Enables" start="440" end="443" type="uint"/> + <field name="Attribute 13 WrapShortest Enables" start="436" end="439" type="uint"/> + <field name="Attribute 12 WrapShortest Enables" start="432" end="435" type="uint"/> + <field name="Attribute 11 WrapShortest Enables" start="428" end="431" type="uint"/> + <field name="Attribute 10 WrapShortest Enables" start="424" end="427" type="uint"/> + <field name="Attribute 9 WrapShortest Enables" start="420" end="423" type="uint"/> + <field name="Attribute 8 WrapShortest Enables" start="416" end="419" type="uint"/> + </instruction> + + <instruction name="3DSTATE_SCISSOR_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="15"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Scissor Rect Pointer" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SF" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="19"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Depth Buffer Surface Format" start="44" end="46" type="uint"> + <value name="D32_FLOAT_S8X24_UINT" value="0"/> + <value name="D32_FLOAT" value="1"/> + <value name="D24_UNORM_S8_UINT" value="2"/> + <value name="D24_UNORM_X8_UINT" value="3"/> + <value name="D16_UNORM" value="5"/> + </field> + <field name="Legacy Global Depth Bias Enable" start="43" end="43" type="bool"/> + <field name="Statistics Enable" start="42" end="42" type="bool"/> + <field name="Global Depth Offset Enable Solid" start="41" end="41" type="bool"/> + <field name="Global Depth Offset Enable Wireframe" start="40" end="40" type="bool"/> + <field name="Global Depth Offset Enable Point" start="39" end="39" type="bool"/> + <field name="FrontFace Fill Mode" start="37" end="38" type="uint" prefix="FILL_MODE"> + <value name="SOLID" value="0"/> + <value name="WIREFRAME" value="1"/> + <value name="POINT" value="2"/> + </field> + <field name="BackFace Fill Mode" start="35" end="36" type="uint" prefix="FILL_MODE"> + <value name="SOLID" value="0"/> + <value name="WIREFRAME" value="1"/> + <value name="POINT" value="2"/> + </field> + <field name="View Transform Enable" start="33" end="33" type="bool"/> + <field name="Front Winding" start="32" end="32" type="uint"/> + <field name="Anti-Aliasing Enable" start="95" end="95" type="bool"/> + <field name="Cull Mode" start="93" end="94" type="uint" prefix="CULLMODE"> + <value name="BOTH" value="0"/> + <value name="NONE" value="1"/> + <value name="FRONT" value="2"/> + <value name="BACK" value="3"/> + </field> + <field name="Line Width" start="82" end="91" type="u3.7"/> + <field name="Line End Cap Antialiasing Region Width" start="80" end="81" type="uint"/> + <field name="Scissor Rectangle Enable" start="75" end="75" type="bool"/> + <field name="Multisample Rasterization Mode" start="72" end="73" type="uint"/> + <field name="Last Pixel Enable" start="127" end="127" type="bool"/> + <field name="Triangle Strip/List Provoking Vertex Select" start="125" end="126" type="uint"> + <value name="Vertex 0" value="0"/> + <value name="Vertex 1" value="1"/> + <value name="Vertex 2" value="2"/> + </field> + <field name="Line Strip/List Provoking Vertex Select" start="123" end="124" type="uint"/> + <field name="Triangle Fan Provoking Vertex Select" start="121" end="122" type="uint"> + <value name="Vertex 0" value="0"/> + <value name="Vertex 1" value="1"/> + <value name="Vertex 2" value="2"/> + </field> + <field name="AA Line Distance Mode" start="110" end="110" type="uint"> + <value name="AALINEDISTANCE_TRUE" value="1"/> + </field> + <field name="Vertex Sub Pixel Precision Select" start="108" end="108" type="uint"/> + <field name="Use Point Width State" start="107" end="107" type="uint"/> + <field name="Point Width" start="96" end="106" type="u8.3"/> + <field name="Global Depth Offset Constant" start="128" end="159" type="float"/> + <field name="Global Depth Offset Scale" start="160" end="191" type="float"/> + <field name="Global Depth Offset Clamp" start="192" end="223" type="float"/> + </instruction> + + <instruction name="3DSTATE_SO_BUFFER" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="24"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="SO Buffer Index" start="61" end="62" type="uint"/> + <field name="SO Buffer Object Control State" start="57" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface Pitch" start="32" end="43" type="uint"/> + <field name="Surface Base Address" start="66" end="95" type="address"/> + <field name="Surface End Address" start="98" end="127" type="address"/> + </instruction> + + <instruction name="3DSTATE_SO_DECL_LIST" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="23"/> + <field name="DWord Length" start="0" end="8" type="uint"/> + <field name="Stream to Buffer Selects [3]" start="44" end="47" type="uint"/> + <field name="Stream to Buffer Selects [2]" start="40" end="43" type="uint"/> + <field name="Stream to Buffer Selects [1]" start="36" end="39" type="uint"/> + <field name="Stream to Buffer Selects [0]" start="32" end="35" type="uint"/> + <field name="Num Entries [3]" start="88" end="95" type="uint"/> + <field name="Num Entries [2]" start="80" end="87" type="uint"/> + <field name="Num Entries [1]" start="72" end="79" type="uint"/> + <field name="Num Entries [0]" start="64" end="71" type="uint"/> + <group count="0" start="96" size="64"> + <field name="Entry" start="0" end="63" type="SO_DECL_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_STENCIL_BUFFER" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="6"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Stencil Buffer Object Control State" start="57" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface Pitch" start="32" end="48" type="uint"/> + <field name="Surface Base Address" start="64" end="95" type="address"/> + </instruction> + + <instruction name="3DSTATE_STREAMOUT" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="30"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="SO Function Enable" start="63" end="63" type="uint"/> + <field name="Rendering Disable" start="62" end="62" type="uint"/> + <field name="Render Stream Select" start="59" end="60" type="uint"/> + <field name="Reorder Mode" start="58" end="58" type="uint"> + <value name="LEADING" value="0"/> + <value name="TRAILING" value="1"/> + </field> + <field name="SO Statistics Enable" start="57" end="57" type="bool"/> + <field name="SO Buffer Enable [3]" start="43" end="43" type="uint"/> + <field name="SO Buffer Enable [2]" start="42" end="42" type="uint"/> + <field name="SO Buffer Enable [1]" start="41" end="41" type="uint"/> + <field name="SO Buffer Enable [0]" start="40" end="40" type="uint"/> + <field name="Stream 3 Vertex Read Offset" start="93" end="93" type="uint"/> + <field name="Stream 3 Vertex Read Length" start="88" end="92" type="uint"/> + <field name="Stream 2 Vertex Read Offset" start="85" end="85" type="uint"/> + <field name="Stream 2 Vertex Read Length" start="80" end="84" type="uint"/> + <field name="Stream 1 Vertex Read Offset" start="77" end="77" type="uint"/> + <field name="Stream 1 Vertex Read Length" start="72" end="76" type="uint"/> + <field name="Stream 0 Vertex Read Offset" start="69" end="69" type="uint"/> + <field name="Stream 0 Vertex Read Length" start="64" end="68" type="uint"/> + </instruction> + + <instruction name="3DSTATE_TE" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="28"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Partitioning" start="44" end="45" type="uint"> + <value name="INTEGER" value="0"/> + <value name="ODD_FRACTIONAL" value="1"/> + <value name="EVEN_FRACTIONAL" value="2"/> + </field> + <field name="Output Topology" start="40" end="41" type="uint" prefix="OUTPUT"> + <value name="POINT" value="0"/> + <value name="LINE" value="1"/> + <value name="TRI_CW" value="2"/> + <value name="TRI_CCW" value="3"/> + </field> + <field name="TE Domain" start="36" end="37" type="uint"> + <value name="QUAD" value="0"/> + <value name="TRI" value="1"/> + <value name="ISOLINE" value="2"/> + </field> + <field name="TE Mode" start="33" end="34" type="uint"> + <value name="HW_TESS" value="0"/> + <value name="SW_TESS" value="1"/> + </field> + <field name="TE Enable" start="32" end="32" type="bool"/> + <field name="Maximum Tessellation Factor Odd" start="64" end="95" type="float"/> + <field name="Maximum Tessellation Factor Not Odd" start="96" end="127" type="float"/> + </instruction> + + <instruction name="3DSTATE_URB_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="50"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="DS URB Starting Address" start="57" end="61" type="uint"/> + <field name="DS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="DS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_URB_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="51"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="GS URB Starting Address" start="57" end="61" type="uint"/> + <field name="GS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="GS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_URB_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="49"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="HS URB Starting Address" start="57" end="61" type="uint"/> + <field name="HS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="HS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_URB_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="48"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="VS URB Starting Address" start="57" end="61" type="uint"/> + <field name="VS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="VS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VERTEX_BUFFERS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="8"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <group count="0" start="32" size="128"> + <field name="Vertex Buffer State" start="0" end="127" type="VERTEX_BUFFER_STATE"/> + </group> + </instruction> + + <instruction name="3DSTATE_VERTEX_ELEMENTS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="9"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <group count="0" start="32" size="64"> + <field name="Element" start="0" end="63" type="VERTEX_ELEMENT_STATE"/> + </group> + </instruction> + + <instruction name="3DSTATE_VF_STATISTICS" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="1"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="11"/> + <field name="Statistics Enable" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="3DSTATE_VIEWPORT_STATE_POINTERS_CC" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="35"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="CC Viewport Pointer" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="33"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="SF Clip Viewport Pointer" start="38" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_VS" bias="2" length="6"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="16"/> + <field name="DWord Length" start="0" end="7" type="uint" default="4"/> + <field name="Kernel Start Pointer" start="38" end="63" type="offset"/> + <field name="Single Vertex Dispatch" start="95" end="95" type="bool"/> + <field name="Vector Mask Enable (VME)" start="94" end="94" type="uint"/> + <field name="Sampler Count" start="91" end="93" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="82" end="89" type="uint"/> + <field name="Floating Point Mode" start="80" end="80" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="77" end="77" type="bool"/> + <field name="Software Exception Enable" start="71" end="71" type="bool"/> + <field name="Scratch Space Base Offset" start="106" end="127" type="offset"/> + <field name="Per-Thread Scratch Space" start="96" end="99" type="uint"/> + <field name="Dispatch GRF Start Register for URB Data" start="148" end="152" type="uint"/> + <field name="Vertex URB Entry Read Length" start="139" end="144" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="132" end="137" type="uint"/> + <field name="Maximum Number of Threads" start="185" end="191" type="uint"/> + <field name="Statistics Enable" start="170" end="170" type="bool"/> + <field name="Vertex Cache Disable" start="161" end="161" type="bool"/> + <field name="VS Function Enable" start="160" end="160" type="bool"/> + </instruction> + + <instruction name="3DSTATE_WM" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="20"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Statistics Enable" start="63" end="63" type="bool"/> + <field name="Depth Buffer Clear" start="62" end="62" type="bool"/> + <field name="Thread Dispatch Enable" start="61" end="61" type="bool"/> + <field name="Depth Buffer Resolve Enable" start="60" end="60" type="bool"/> + <field name="Hierarchical Depth Buffer Resolve Enable" start="59" end="59" type="bool"/> + <field name="Legacy Diamond Line Rasterization" start="58" end="58" type="bool"/> + <field name="Pixel Shader Kill Pixel" start="57" end="57" type="bool"/> + <field name="Pixel Shader Computed Depth Mode" start="55" end="56" type="uint"> + <value name="PSCDEPTH_OFF" value="0"/> + <value name="PSCDEPTH_ON" value="1"/> + <value name="PSCDEPTH_ON_GE" value="2"/> + <value name="PSCDEPTH_ON_LE" value="3"/> + </field> + <field name="Early Depth/Stencil Control" start="53" end="54" type="uint"> + <value name="EDSC_NORMAL" value="0"/> + <value name="EDSC_PSEXEC" value="1"/> + <value name="EDSC_PREPS" value="2"/> + </field> + <field name="Pixel Shader Uses Source Depth" start="52" end="52" type="bool"/> + <field name="Pixel Shader Uses Source W" start="51" end="51" type="bool"/> + <field name="Position ZW Interpolation Mode" start="49" end="50" type="uint"> + <value name="INTERP_PIXEL" value="0"/> + <value name="INTERP_CENTROID" value="2"/> + <value name="INTERP_SAMPLE" value="3"/> + </field> + <field name="Barycentric Interpolation Mode" start="43" end="48" type="uint"/> + <field name="Pixel Shader Uses Input Coverage Mask" start="42" end="42" type="bool"/> + <field name="Line End Cap Antialiasing Region Width" start="40" end="41" type="uint"/> + <field name="Line Antialiasing Region Width" start="38" end="39" type="uint"/> + <field name="Polygon Stipple Enable" start="36" end="36" type="bool"/> + <field name="Line Stipple Enable" start="35" end="35" type="bool"/> + <field name="Point Rasterization Rule" start="34" end="34" type="uint"> + <value name="RASTRULE_UPPER_LEFT" value="0"/> + <value name="RASTRULE_UPPER_RIGHT" value="1"/> + </field> + <field name="Multisample Rasterization Mode" start="32" end="33" type="uint"> + <value name="MSRASTMODE_OFF_PIXEL" value="0"/> + <value name="MSRASTMODE_OFF_PATTERN" value="1"/> + <value name="MSRASTMODE_ON_PIXEL" value="2"/> + <value name="MSRASTMODE_ON_PATTERN" value="3"/> + </field> + <field name="Multisample Dispatch Mode" start="95" end="95" type="uint"> + <value name="MSDISPMODE_PERSAMPLE" value="0"/> + <value name="MSDISPMODE_PERPIXEL" value="1"/> + </field> + </instruction> + + <instruction name="GPGPU_OBJECT" bias="2" length="8"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="4"/> + <field name="Predicate Enable" start="8" end="8" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="6"/> + <field name="Shared Local Memory Fixed Offset" start="39" end="39" type="uint"/> + <field name="Interface Descriptor Offset" start="32" end="36" type="uint"/> + <field name="Shared Local Memory Offset" start="92" end="95" type="uint"/> + <field name="End of Thread Group" start="88" end="88" type="uint"/> + <field name="Half-Slice Destination Select" start="81" end="82" type="uint"> + <value name="Half-Slice 1" value="2"/> + <value name="Half-Slice 0" value="1"/> + <value name="Either Half-Slice" value="0"/> + </field> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="96" end="127" type="offset"/> + <field name="Thread Group ID X" start="128" end="159" type="uint"/> + <field name="Thread Group ID Y" start="160" end="191" type="uint"/> + <field name="Thread Group ID Z" start="192" end="223" type="uint"/> + <field name="Execution Mask" start="224" end="255" type="uint"/> + </instruction> + + <instruction name="GPGPU_WALKER" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode A" start="16" end="23" type="uint" default="5"/> + <field name="Indirect Parameter Enable" start="10" end="10" type="bool"/> + <field name="Predicate Enable" start="8" end="8" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <field name="Interface Descriptor Offset" start="32" end="36" type="uint"/> + <field name="SIMD Size" start="94" end="95" type="uint"> + <value name="SIMD8" value="0"/> + <value name="SIMD16" value="1"/> + <value name="SIMD32" value="2"/> + </field> + <field name="Thread Depth Counter Maximum" start="80" end="85" type="uint"/> + <field name="Thread Height Counter Maximum" start="72" end="77" type="uint"/> + <field name="Thread Width Counter Maximum" start="64" end="69" type="uint"/> + <field name="Thread Group ID Starting X" start="96" end="127" type="uint"/> + <field name="Thread Group ID X Dimension" start="128" end="159" type="uint"/> + <field name="Thread Group ID Starting Y" start="160" end="191" type="uint"/> + <field name="Thread Group ID Y Dimension" start="192" end="223" type="uint"/> + <field name="Thread Group ID Starting Z" start="224" end="255" type="uint"/> + <field name="Thread Group ID Z Dimension" start="256" end="287" type="uint"/> + <field name="Right Execution Mask" start="288" end="319" type="uint"/> + <field name="Bottom Execution Mask" start="320" end="351" type="uint"/> + </instruction> + + <instruction name="MEDIA_CURBE_LOAD" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="1"/> + <field name="DWord Length" start="0" end="15" type="uint" default="2"/> + <field name="CURBE Total Data Length" start="64" end="80" type="uint"/> + <field name="CURBE Data Start Address" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="MEDIA_INTERFACE_DESCRIPTOR_LOAD" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="15" type="uint" default="2"/> + <field name="Interface Descriptor Total Length" start="64" end="80" type="uint"/> + <field name="Interface Descriptor Data Start Address" start="96" end="127" type="offset"/> + </instruction> + + <instruction name="MEDIA_OBJECT" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Media Command Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="Media Command Sub-Opcode" start="16" end="23" type="uint" default="0"/> + <field name="DWord Length" start="0" end="15" type="uint" default="4"/> + <field name="Interface Descriptor Offset" start="32" end="36" type="uint"/> + <field name="Children Present" start="95" end="95" type="bool"/> + <field name="Thread Synchronization" start="88" end="88" type="uint"> + <value name="No thread synchronization" value="0"/> + <value name="Thread dispatch is synchronized by the 'spawn root thread' message" value="1"/> + </field> + <field name="Use Scoreboard" start="85" end="85" type="uint"> + <value name="Not using scoreboard" value="0"/> + <value name="Using scoreboard" value="1"/> + </field> + <field name="Half-Slice Destination Select" start="81" end="82" type="uint"> + <value name="Half-Slice 1" value="2"/> + <value name="Half-Slice 0" value="1"/> + <value name="Either half-slice" value="0"/> + </field> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="96" end="127" type="address"/> + <field name="Scoredboard Y" start="144" end="152" type="uint"/> + <field name="Scoreboard X" start="128" end="136" type="uint"/> + <field name="Scoreboard Color" start="176" end="179" type="uint"/> + <field name="Scoreboard Mask" start="160" end="167" type="uint"/> + <group count="0" start="192" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_OBJECT_PRT" bias="2" length="16"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="15" type="uint" default="14"/> + <field name="Interface Descriptor Offset" start="32" end="36" type="uint"/> + <field name="Children Present" start="95" end="95" type="bool"/> + <field name="PRT_Fence Needed" start="87" end="87" type="bool"/> + <field name="PRT_FenceType" start="86" end="86" type="uint"> + <value name="Root thread queue" value="0"/> + <value name="VFE state flush" value="1"/> + </field> + <group count="12" start="128" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_OBJECT_WALKER" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="3"/> + <field name="DWord Length" start="0" end="15" type="uint" default="15"/> + <field name="Interface Descriptor Offset" start="32" end="36" type="uint"/> + <field name="Children Present" start="95" end="95" type="uint"/> + <field name="Thread Synchronization" start="88" end="88" type="uint"> + <value name="No thread synchronization" value="0"/> + <value name="Thread dispatch is synchronized by the 'spawn root thread' message" value="1"/> + </field> + <field name="Use Scoreboard" start="85" end="85" type="uint"> + <value name="Not using scoreboard" value="0"/> + <value name="Using scoreboard" value="1"/> + </field> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="96" end="127" type="offset"/> + <field name="Scoreboard Mask" start="160" end="167" type="uint"/> + <field name="Dual Mode" start="223" end="223" type="uint"/> + <field name="Repel" start="222" end="222" type="uint"/> + <field name="Color Count Minus One" start="216" end="219" type="uint"/> + <field name="Middle Loop Extra Steps" start="208" end="212" type="uint"/> + <field name="Local Mid-Loop Unit Y" start="204" end="205" type="int"/> + <field name="Mid-Loop Unit X" start="200" end="201" type="int"/> + <field name="Global Loop Exec Count" start="240" end="249" type="uint"/> + <field name="Local Loop Exec Count" start="224" end="233" type="uint"/> + <field name="Block Resolution Y" start="272" end="280" type="uint"/> + <field name="Block Resolution X" start="256" end="264" type="uint"/> + <field name="Local Start Y" start="304" end="312" type="uint"/> + <field name="Local Start X" start="288" end="296" type="uint"/> + <field name="Local End Y" start="336" end="344" type="uint"/> + <field name="Local End X" start="320" end="328" type="uint"/> + <field name="Local Outer Loop Stride Y" start="368" end="377" type="int"/> + <field name="Local Outer Loop Stride X" start="352" end="361" type="int"/> + <field name="Local Inner Loop Unit Y" start="400" end="409" type="int"/> + <field name="Local Inner Loop Unit X" start="384" end="393" type="int"/> + <field name="Global Resolution Y" start="432" end="440" type="uint"/> + <field name="Global Resolution X" start="416" end="424" type="uint"/> + <field name="Global Start Y" start="464" end="473" type="int"/> + <field name="Global Start X" start="448" end="457" type="int"/> + <field name="Global Outer Loop Stride Y" start="496" end="505" type="int"/> + <field name="Global Outer Loop Stride X" start="480" end="489" type="int"/> + <field name="Global Inner Loop Unit Y" start="528" end="537" type="int"/> + <field name="Global Inner Loop Unit X" start="512" end="521" type="int"/> + <group count="0" start="544" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_STATE_FLUSH" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="15" type="uint" default="0"/> + <field name="Watermark Required" start="38" end="38" type="uint"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="MEDIA_VFE_STATE" bias="2" length="8"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="0"/> + <field name="DWord Length" start="0" end="15" type="uint" default="6"/> + <field name="Scratch Space Base Pointer" start="42" end="63" type="offset"/> + <field name="Per Thread Scratch Space" start="32" end="35" type="uint"/> + <field name="Maximum Number of Threads" start="80" end="95" type="uint"/> + <field name="Number of URB Entries" start="72" end="79" type="uint"/> + <field name="Reset Gateway Timer" start="71" end="71" type="uint"> + <value name="Maintaining the existing timestamp state" value="0"/> + <value name="Resetting relative timer and latching the global timestamp" value="1"/> + </field> + <field name="Bypass Gateway Control" start="70" end="70" type="uint"> + <value name="Maintaining OpenGateway/ForwardMsg/CloseGateway protocol (legacy mode)" value="0"/> + <value name="Bypassing OpenGateway/CloseGateway protocol" value="1"/> + </field> + <field name="Gateway MMIO Access Control" start="67" end="68" type="uint"> + <value name="No MMIO read/write allowed" value="0"/> + <value name="MMIO read/write to any address" value="2"/> + </field> + <field name="GPGPU Mode" start="66" end="66" type="uint"/> + <field name="URB Entry Allocation Size" start="144" end="159" type="uint"/> + <field name="CURBE Allocation Size" start="128" end="143" type="uint"/> + <field name="Scoreboard Enable" start="191" end="191" type="uint"> + <value name="Scoreboard disabled" value="0"/> + <value name="Scoreboard enabled" value="1"/> + </field> + <field name="Scoreboard Type" start="190" end="190" type="uint"> + <value name="Stalling Scoreboard" value="0"/> + <value name="Non-Stalling Scoreboard" value="1"/> + </field> + <field name="Scoreboard Mask" start="160" end="167" type="uint"/> + <field name="Scoreboard 3 Delta Y" start="220" end="223" type="int"/> + <field name="Scoreboard 3 Delta X" start="216" end="219" type="int"/> + <field name="Scoreboard 2 Delta Y" start="212" end="215" type="int"/> + <field name="Scoreboard 2 Delta X" start="208" end="211" type="int"/> + <field name="Scoreboard 1 Delta Y" start="204" end="207" type="int"/> + <field name="Scoreboard 1 Delta X" start="200" end="203" type="int"/> + <field name="Scoreboard 0 Delta Y" start="196" end="199" type="int"/> + <field name="Scoreboard 0 Delta X" start="192" end="195" type="int"/> + <field name="Scoreboard 7 Delta Y" start="252" end="255" type="int"/> + <field name="Scoreboard 7 Delta X" start="248" end="251" type="int"/> + <field name="Scoreboard 6 Delta Y" start="244" end="247" type="int"/> + <field name="Scoreboard 6 Delta X" start="240" end="243" type="int"/> + <field name="Scoreboard 5 Delta Y" start="236" end="239" type="int"/> + <field name="Scoreboard 5 Delta X" start="232" end="235" type="int"/> + <field name="Scoreboard 4 Delta Y" start="228" end="231" type="int"/> + <field name="Scoreboard 4 Delta X" start="224" end="227" type="int"/> + </instruction> + + <instruction name="MI_ARB_CHECK" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="5"/> + </instruction> + + <instruction name="MI_ARB_ON_OFF" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="8"/> + <field name="Arbitration Enable" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="MI_BATCH_BUFFER_END" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="10"/> + </instruction> + + <instruction name="MI_BATCH_BUFFER_START" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="49"/> + <field name="Clear Command Buffer Enable" start="11" end="11" type="bool"/> + <field name="Address Space Indicator" start="8" end="8" type="uint" prefix="ASI"> + <value name="GGTT" value="0"/> + <value name="PPGTT" value="1"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Batch Buffer Start Address" start="34" end="63" type="address"/> + </instruction> + + <instruction name="MI_CLFLUSH" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="39"/> + <field name="Use Global GTT" start="22" end="22" type="uint"> + <value name="Per Process Graphics Address" value="0"/> + <value name="Global Graphics Address" value="1"/> + </field> + <field name="DWord Length" start="0" end="9" type="uint" default="1"/> + <field name="Page Base Address" start="44" end="63" type="address"/> + <field name="Starting Cacheline Offset" start="38" end="43" type="uint"/> + <field name="Page Base Address High" start="64" end="79" type="address"/> + <group count="0" start="96" size="32"> + <field name="DW Representing a Half Cache Line" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MI_CONDITIONAL_BATCH_BUFFER_END" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="54"/> + <field name="Use Global GTT" start="22" end="22" type="uint" default="0"/> + <field name="Compare Semaphore" start="21" end="21" type="uint" default="0"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Compare Data Dword" start="32" end="63" type="uint"/> + <field name="Compare Address" start="67" end="95" type="address"/> + </instruction> + + <instruction name="MI_FLUSH" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="4"/> + <field name="Indirect State Pointers Disable" start="5" end="5" type="bool"/> + <field name="Generic Media State Clear" start="4" end="4" type="bool"/> + <field name="Global Snapshot Count Reset" start="3" end="3" type="uint"> + <value name="Don't Reset" value="0"/> + <value name="Reset" value="1"/> + </field> + <field name="Render Cache Flush Inhibit" start="2" end="2" type="uint"> + <value name="Flush" value="0"/> + <value name="Don't Flush" value="1"/> + </field> + <field name="State/Instruction Cache Invalidate" start="1" end="1" type="uint"> + <value name="Don't Invalidate" value="0"/> + <value name="Invalidate" value="1"/> + </field> + </instruction> + + <instruction name="MI_LOAD_REGISTER_IMM" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="34"/> + <field name="Byte Write Disables" start="8" end="11" type="uint"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Register Offset" start="34" end="54" type="offset"/> + <field name="Data DWord" start="64" end="95" type="uint"/> + </instruction> + + <instruction name="MI_LOAD_REGISTER_MEM" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="41"/> + <field name="Use Global GTT" start="22" end="22" type="uint"/> + <field name="Async Mode Enable" start="21" end="21" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Register Address" start="34" end="54" type="offset"/> + <field name="Memory Address" start="66" end="95" type="address"/> + </instruction> + + <instruction name="MI_NOOP" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="0"/> + <field name="Identification Number Register Write Enable" start="22" end="22" type="bool"/> + <field name="Identification Number" start="0" end="21" type="uint"/> + </instruction> + + <instruction name="MI_PREDICATE" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="12"/> + <field name="Load Operation" start="6" end="7" type="uint" prefix="LOAD"> + <value name="KEEP" value="0"/> + <value name="LOAD" value="2"/> + <value name="LOADINV" value="3"/> + </field> + <field name="Combine Operation" start="3" end="4" type="uint" prefix="COMBINE"> + <value name="SET" value="0"/> + <value name="AND" value="1"/> + <value name="OR" value="2"/> + <value name="XOR" value="3"/> + </field> + <field name="Compare Operation" start="0" end="1" type="uint" prefix="COMPARE"> + <value name="SRCS_EQUAL" value="2"/> + <value name="DELTAS_EQUAL" value="3"/> + </field> + </instruction> + + <instruction name="MI_REPORT_HEAD" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="7"/> + </instruction> + + <instruction name="MI_REPORT_PERF_COUNT" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="40"/> + <field name="DWord Length" start="0" end="5" type="uint" default="1"/> + <field name="Memory Address" start="38" end="63" type="address"/> + <field name="Use Global GTT" start="32" end="32" type="uint"/> + <field name="Report ID" start="64" end="95" type="uint"/> + </instruction> + + <instruction name="MI_SEMAPHORE_MBOX" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="22"/> + <field name="Register Select" start="16" end="17" type="uint"> + <value name="RVSYNC" value="0"/> + <value name="RBSYNC" value="2"/> + <value name="Use General Register Select" value="3"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Semaphore Data Dword" start="32" end="63" type="uint"/> + </instruction> + + <instruction name="MI_SET_CONTEXT" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="24"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Logical Context Address" start="44" end="63" type="address"/> + <field name="Reserved, Must be 1" start="40" end="40" type="uint"/> + <field name="Extended State Save Enable" start="35" end="35" type="bool"/> + <field name="Extended State Restore Enable" start="34" end="34" type="bool"/> + <field name="Force Restore" start="33" end="33" type="uint"/> + <field name="Restore Inhibit" start="32" end="32" type="uint"/> + </instruction> + + <instruction name="MI_STORE_DATA_IMM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="32"/> + <field name="Use Global GTT" start="22" end="22" type="uint"/> + <field name="DWord Length" start="0" end="5" type="uint" default="2"/> + <field name="Address" start="66" end="95" type="uint"/> + <field name="Core Mode Enable" start="64" end="64" type="uint"/> + <field name="Data DWord 0" start="96" end="127" type="uint"/> + <field name="Data DWord 1" start="128" end="159" type="uint"/> + </instruction> + + <instruction name="MI_STORE_DATA_INDEX" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="33"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Offset" start="34" end="43" type="uint"/> + <field name="Data DWord 0" start="64" end="95" type="uint"/> + <field name="Data DWord 1" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="MI_STORE_REGISTER_MEM" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="36"/> + <field name="Use Global GTT" start="22" end="22" type="uint"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Register Address" start="34" end="54" type="offset"/> + <field name="Memory Address" start="66" end="95" type="address"/> + </instruction> + + <instruction name="MI_SUSPEND_FLUSH" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="11"/> + <field name="Suspend Flush" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="MI_TOPOLOGY_FILTER" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="13"/> + <field name="Topology Filter Value" start="0" end="5" type="uint"/> + </instruction> + + <instruction name="MI_URB_CLEAR" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="25"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="URB Clear Length" start="48" end="60" type="uint"/> + <field name="URB Address" start="32" end="45" type="offset"/> + </instruction> + + <instruction name="MI_USER_INTERRUPT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="2"/> + </instruction> + + <instruction name="MI_WAIT_FOR_EVENT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="3"/> + <field name="Display Pipe C Horizontal Blank Wait Enable" start="22" end="22" type="bool"/> + <field name="Display Pipe C Vertical Blank Wait Enable" start="21" end="21" type="bool"/> + <field name="Display Sprite C Flip Pending Wait Enable" start="20" end="20" type="bool"/> + <field name="Condition Code Wait Select" start="16" end="19" type="uint"> + <value name="Not enabled" value="0"/> + </field> + <field name="Display Plane C Flip Pending Wait Enable" start="15" end="15" type="bool"/> + <field name="Display Pipe C Scan Line Wait Enable" start="14" end="14" type="bool"/> + <field name="Display Pipe B Horizontal Blank Wait Enable" start="13" end="13" type="bool"/> + <field name="Display Pipe B Vertical Blank Wait Enable" start="11" end="11" type="bool"/> + <field name="Display Sprite B Flip Pending Wait Enable" start="10" end="10" type="bool"/> + <field name="Display Plane B Flip Pending Wait Enable" start="9" end="9" type="bool"/> + <field name="Display Pipe B Scan Line Wait Enable" start="8" end="8" type="bool"/> + <field name="Display Pipe A Horizontal Blank Wait Enable" start="5" end="5" type="bool"/> + <field name="Display Pipe A Vertical Blank Wait Enable" start="3" end="3" type="bool"/> + <field name="Display Sprite A Flip Pending Wait Enable" start="2" end="2" type="bool"/> + <field name="Display Plane A Flip Pending Wait Enable" start="1" end="1" type="bool"/> + <field name="Display Pipe A Scan Line Wait Enable" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="PIPELINE_SELECT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="1"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="Pipeline Selection" start="0" end="1" type="uint"> + <value name="3D" value="0"/> + <value name="Media" value="1"/> + <value name="GPGPU" value="2"/> + </field> + </instruction> + + <instruction name="PIPE_CONTROL" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="2"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="0"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Destination Address Type" start="56" end="56" type="uint" prefix="DAT"> + <value name="PPGTT" value="0"/> + <value name="GGTT" value="1"/> + </field> + <field name="LRI Post Sync Operation" start="55" end="55" type="uint"> + <value name="No LRI Operation" value="0"/> + <value name="MMIO Write Immediate Data" value="1"/> + </field> + <field name="Store Data Index" start="53" end="53" type="uint"/> + <field name="Command Streamer Stall Enable" start="52" end="52" type="uint"/> + <field name="Global Snapshot Count Reset" start="51" end="51" type="uint"> + <value name="Don't Reset" value="0"/> + <value name="Reset" value="1"/> + </field> + <field name="TLB Invalidate" start="50" end="50" type="uint"/> + <field name="Generic Media State Clear" start="48" end="48" type="bool"/> + <field name="Post Sync Operation" start="46" end="47" type="uint"> + <value name="No Write" value="0"/> + <value name="Write Immediate Data" value="1"/> + <value name="Write PS Depth Count" value="2"/> + <value name="Write Timestamp" value="3"/> + </field> + <field name="Depth Stall Enable" start="45" end="45" type="bool"/> + <field name="Render Target Cache Flush Enable" start="44" end="44" type="bool"/> + <field name="Instruction Cache Invalidate Enable" start="43" end="43" type="bool"/> + <field name="Texture Cache Invalidation Enable" start="42" end="42" type="bool"/> + <field name="Indirect State Pointers Disable" start="41" end="41" type="bool"/> + <field name="Notify Enable" start="40" end="40" type="bool"/> + <field name="Pipe Control Flush Enable" start="39" end="39" type="bool"/> + <field name="DC Flush Enable" start="37" end="37" type="bool"/> + <field name="VF Cache Invalidation Enable" start="36" end="36" type="bool"/> + <field name="Constant Cache Invalidation Enable" start="35" end="35" type="bool"/> + <field name="State Cache Invalidation Enable" start="34" end="34" type="bool"/> + <field name="Stall At Pixel Scoreboard" start="33" end="33" type="bool"/> + <field name="Depth Cache Flush Enable" start="32" end="32" type="bool"/> + <field name="Address" start="66" end="95" type="address"/> + <field name="Immediate Data" start="96" end="159" type="uint"/> + </instruction> + + <instruction name="STATE_BASE_ADDRESS" bias="2" length="10"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="1"/> + <field name="DWord Length" start="0" end="7" type="uint" default="8"/> + <field name="General State Base Address" start="44" end="63" type="address"/> + <field name="General State Memory Object Control State" start="40" end="43" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Stateless Data Port Access Memory Object Control State" start="36" end="39" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Stateless Data Port Access Force Write Thru" start="35" end="35" type="uint"/> + <field name="General State Base Address Modify Enable" start="32" end="32" type="bool"/> + <field name="Surface State Base Address" start="76" end="95" type="address"/> + <field name="Surface State Memory Object Control State" start="72" end="75" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface State Base Address Modify Enable" start="64" end="64" type="bool"/> + <field name="Dynamic State Base Address" start="108" end="127" type="address"/> + <field name="Dynamic State Memory Object Control State" start="104" end="107" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Dynamic State Base Address Modify Enable" start="96" end="96" type="bool"/> + <field name="Indirect Object Base Address" start="140" end="159" type="address"/> + <field name="Indirect Object Memory Object Control State" start="136" end="139" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Indirect Object Base Address Modify Enable" start="128" end="128" type="bool"/> + <field name="Instruction Base Address" start="172" end="191" type="address"/> + <field name="Instruction Memory Object Control State" start="168" end="171" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Instruction Base Address Modify Enable" start="160" end="160" type="bool"/> + <field name="General State Access Upper Bound" start="204" end="223" type="address"/> + <field name="General State Access Upper Bound Modify Enable" start="192" end="192" type="bool"/> + <field name="Dynamic State Access Upper Bound" start="236" end="255" type="address"/> + <field name="Dynamic State Access Upper Bound Modify Enable" start="224" end="224" type="bool"/> + <field name="Indirect Object Access Upper Bound" start="268" end="287" type="address"/> + <field name="Indirect Object Access Upper Bound Modify Enable" start="256" end="256" type="bool"/> + <field name="Instruction Access Upper Bound" start="300" end="319" type="address"/> + <field name="Instruction Access Upper Bound Modify Enable" start="288" end="288" type="bool"/> + </instruction> + + <instruction name="STATE_PREFETCH" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="3"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Prefetch Pointer" start="38" end="63" type="address"/> + <field name="Prefetch Count" start="32" end="34" type="uint"/> + </instruction> + + <instruction name="STATE_SIP" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="System Instruction Pointer" start="36" end="63" type="offset"/> + </instruction> + + <instruction name="SWTESS_BASE_ADDRESS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="3"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="SW Tessellation Base Address" start="44" end="63" type="address"/> + <field name="SW Tessellation Memory Object Control State" start="40" end="43" type="MEMORY_OBJECT_CONTROL_STATE"/> + </instruction> + +</genxml> diff --git a/src/vulkan/gen75.xml b/src/vulkan/gen75.xml new file mode 100644 index 00000000000..afdccd0f6a4 --- /dev/null +++ b/src/vulkan/gen75.xml @@ -0,0 +1,2912 @@ +<genxml name="HSW" gen="7.5"> + <struct name="MEMORY_OBJECT_CONTROL_STATE" length="1"> + <field name="LLC/eLLC Cacheability Control (LLCCC)" start="1" end="2" type="uint"/> + <field name="L3 Cacheability Control (L3CC)" start="0" end="0" type="uint"/> + </struct> + + <struct name="3DSTATE_CONSTANT_BODY" length="6"> + <field name="Constant Buffer 1 Read Length" start="16" end="31" type="uint"/> + <field name="Constant Buffer 0 Read Length" start="0" end="15" type="uint"/> + <field name="Constant Buffer 3 Read Length" start="48" end="63" type="uint"/> + <field name="Constant Buffer 2 Read Length" start="32" end="47" type="uint"/> + <field name="Pointer To Constant Buffer 0" start="69" end="95" type="address"/> + <field name="Constant Buffer Object Control State" start="64" end="68" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Pointer To Constant Buffer 1" start="101" end="127" type="address"/> + <field name="Pointer To Constant Buffer 2" start="133" end="159" type="address"/> + <field name="Pointer To Constant Buffer 3" start="165" end="191" type="address"/> + </struct> + + <struct name="BINDING_TABLE_EDIT_ENTRY" length="1"> + <field name="Binding Table Index" start="16" end="23" type="uint"/> + <field name="Surface State Pointer" start="0" end="15" type="offset"/> + </struct> + + <struct name="GATHER_CONSTANT_ENTRY" length="1"> + <field name="Constant Buffer Offset" start="8" end="15" type="offset"/> + <field name="Channel Mask" start="4" end="7" type="uint"/> + <field name="Binding Table Index Offset" start="0" end="3" type="uint"/> + </struct> + + <struct name="VERTEX_BUFFER_STATE" length="4"> + <field name="Vertex Buffer Index" start="26" end="31" type="uint"/> + <field name="Buffer Access Type" start="20" end="20" type="uint"> + <value name="VERTEXDATA" value="0"/> + <value name="INSTANCEDATA" value="1"/> + </field> + <field name="Vertex Buffer Memory Object Control State" start="16" end="19" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Address Modify Enable" start="14" end="14" type="uint"/> + <field name="Null Vertex Buffer" start="13" end="13" type="bool"/> + <field name="Vertex Fetch Invalidate" start="12" end="12" type="uint" default="0"/> + <field name="Buffer Pitch" start="0" end="11" type="uint"/> + <field name="Buffer Starting Address" start="32" end="63" type="address"/> + <field name="End Address" start="64" end="95" type="address"/> + <field name="Instance Data Step Rate" start="96" end="127" type="uint"/> + </struct> + + <struct name="VERTEX_ELEMENT_STATE" length="2"> + <field name="Vertex Buffer Index" start="26" end="31" type="uint"/> + <field name="Valid" start="25" end="25" type="uint"/> + <field name="Source Element Format" start="16" end="24" type="uint"/> + <field name="Edge Flag Enable" start="15" end="15" type="bool"/> + <field name="Source Element Offset" start="0" end="11" type="uint"/> + <field name="Component 0 Control" start="60" end="62" type="uint"/> + <field name="Component 1 Control" start="56" end="58" type="uint"/> + <field name="Component 2 Control" start="52" end="54" type="uint"/> + <field name="Component 3 Control" start="48" end="50" type="uint"/> + </struct> + + <struct name="SO_DECL" length="1"> + <field name="Output Buffer Slot" start="12" end="13" type="uint"/> + <field name="Hole Flag" start="11" end="11" type="uint"/> + <field name="Register Index" start="4" end="9" type="uint"/> + <field name="Component Mask" start="0" end="3" type="uint" default="0"/> + </struct> + + <struct name="SO_DECL_ENTRY" length="2"> + <field name="Stream 3 Decl" start="48" end="63" type="SO_DECL"/> + <field name="Stream 2 Decl" start="32" end="47" type="SO_DECL"/> + <field name="Stream 1 Decl" start="16" end="31" type="SO_DECL"/> + <field name="Stream 0 Decl" start="0" end="15" type="SO_DECL"/> + </struct> + + <struct name="SCISSOR_RECT" length="2"> + <field name="Scissor Rectangle Y Min" start="16" end="31" type="uint"/> + <field name="Scissor Rectangle X Min" start="0" end="15" type="uint"/> + <field name="Scissor Rectangle Y Max" start="48" end="63" type="uint"/> + <field name="Scissor Rectangle X Max" start="32" end="47" type="uint"/> + </struct> + + <struct name="SF_CLIP_VIEWPORT" length="16"> + <field name="Viewport Matrix Element m00" start="0" end="31" type="float"/> + <field name="Viewport Matrix Element m11" start="32" end="63" type="float"/> + <field name="Viewport Matrix Element m22" start="64" end="95" type="float"/> + <field name="Viewport Matrix Element m30" start="96" end="127" type="float"/> + <field name="Viewport Matrix Element m31" start="128" end="159" type="float"/> + <field name="Viewport Matrix Element m32" start="160" end="191" type="float"/> + <field name="X Min Clip Guardband" start="256" end="287" type="float"/> + <field name="X Max Clip Guardband" start="288" end="319" type="float"/> + <field name="Y Min Clip Guardband" start="320" end="351" type="float"/> + <field name="Y Max Clip Guardband" start="352" end="383" type="float"/> + <group count="4" start="384" size="32"> + </group> + </struct> + + <struct name="BLEND_STATE" length="2"> + <field name="Color Buffer Blend Enable" start="31" end="31" type="bool"/> + <field name="Independent Alpha Blend Enable" start="30" end="30" type="bool"/> + <field name="Alpha Blend Function" start="26" end="28" type="uint"> + <value name="BLENDFUNCTION_ADD" value="0"/> + <value name="BLENDFUNCTION_SUBTRACT" value="1"/> + <value name="BLENDFUNCTION_REVERSE_SUBTRACT" value="2"/> + <value name="BLENDFUNCTION_MIN" value="3"/> + <value name="BLENDFUNCTION_MAX" value="4"/> + </field> + <field name="Source Alpha Blend Factor" start="20" end="24" type="uint"> + <value name="BLENDFACTOR_ONE" value="1"/> + <value name="BLENDFACTOR_SRC_COLOR" value="2"/> + <value name="BLENDFACTOR_SRC_ALPHA" value="3"/> + <value name="BLENDFACTOR_DST_ALPHA" value="4"/> + <value name="BLENDFACTOR_DST_COLOR" value="5"/> + <value name="BLENDFACTOR_SRC_ALPHA_SATURATE" value="6"/> + <value name="BLENDFACTOR_CONST_COLOR" value="7"/> + <value name="BLENDFACTOR_CONST_ALPHA" value="8"/> + <value name="BLENDFACTOR_SRC1_COLOR" value="9"/> + <value name="BLENDFACTOR_SRC1_ALPHA" value="10"/> + <value name="BLENDFACTOR_ZERO" value="17"/> + <value name="BLENDFACTOR_INV_SRC_COLOR" value="18"/> + <value name="BLENDFACTOR_INV_SRC_ALPHA" value="19"/> + <value name="BLENDFACTOR_INV_DST_ALPHA" value="20"/> + <value name="BLENDFACTOR_INV_DST_COLOR" value="21"/> + <value name="BLENDFACTOR_INV_CONST_COLOR" value="23"/> + <value name="BLENDFACTOR_INV_CONST_ALPHA" value="24"/> + <value name="BLENDFACTOR_INV_SRC1_COLOR" value="25"/> + <value name="BLENDFACTOR_INV_SRC1_ALPHA" value="26"/> + </field> + <field name="Destination Alpha Blend Factor" start="15" end="19" type="uint"/> + <field name="Color Blend Function" start="11" end="13" type="uint"> + <value name="BLENDFUNCTION_ADD" value="0"/> + <value name="BLENDFUNCTION_SUBTRACT" value="1"/> + <value name="BLENDFUNCTION_REVERSE_SUBTRACT" value="2"/> + <value name="BLENDFUNCTION_MIN " value="3"/> + <value name="BLENDFUNCTION_MAX" value="4"/> + </field> + <field name="Source Blend Factor" start="5" end="9" type="uint"/> + <field name="Destination Blend Factor" start="0" end="4" type="uint"/> + <field name="AlphaToCoverage Enable" start="63" end="63" type="bool"/> + <field name="AlphaToOne Enable" start="62" end="62" type="bool"/> + <field name="AlphaToCoverage Dither Enable" start="61" end="61" type="bool"/> + <field name="Write Disable Alpha" start="59" end="59" type="bool"/> + <field name="Write Disable Red" start="58" end="58" type="bool"/> + <field name="Write Disable Green" start="57" end="57" type="bool"/> + <field name="Write Disable Blue" start="56" end="56" type="bool"/> + <field name="Logic Op Enable" start="54" end="54" type="bool"/> + <field name="Logic Op Function" start="50" end="53" type="uint"> + <value name="LOGICOP_CLEAR" value="0"/> + <value name="LOGICOP_NOR" value="1"/> + <value name="LOGICOP_AND_INVERTED" value="2"/> + <value name="LOGICOP_COPY_INVERTED" value="3"/> + <value name="LOGICOP_AND_REVERSE" value="4"/> + <value name="LOGICOP_INVERT" value="5"/> + <value name="LOGICOP_XOR" value="6"/> + <value name="LOGICOP_NAND" value="7"/> + <value name="LOGICOP_AND" value="8"/> + <value name="LOGICOP_EQUIV" value="9"/> + <value name="LOGICOP_NOOP" value="10"/> + <value name="LOGICOP_OR_INVERTED" value="11"/> + <value name="LOGICOP_COPY" value="12"/> + <value name="LOGICOP_OR_REVERSE" value="13"/> + <value name="LOGICOP_OR" value="14"/> + <value name="LOGICOP_SET" value="15"/> + </field> + <field name="Alpha Test Enable" start="48" end="48" type="bool"/> + <field name="Alpha Test Function" start="45" end="47" type="uint"> + <value name="COMPAREFUNCTION_ALWAYS" value="0"/> + <value name="COMPAREFUNCTION_NEVER" value="1"/> + <value name="COMPAREFUNCTION_LESS" value="2"/> + <value name="COMPAREFUNCTION_EQUAL" value="3"/> + <value name="COMPAREFUNCTION_LEQUAL" value="4"/> + <value name="COMPAREFUNCTION_GREATER" value="5"/> + <value name="COMPAREFUNCTION_NOTEQUAL" value="6"/> + <value name="COMPAREFUNCTION_GEQUAL" value="7"/> + </field> + <field name="Color Dither Enable" start="44" end="44" type="bool"/> + <field name="X Dither Offset" start="42" end="43" type="uint"/> + <field name="Y Dither Offset" start="40" end="41" type="uint"/> + <field name="Color Clamp Range" start="34" end="35" type="uint"> + <value name="COLORCLAMP_UNORM" value="0"/> + <value name="COLORCLAMP_SNORM" value="1"/> + <value name="COLORCLAMP_RTFORMAT" value="2"/> + </field> + <field name="Pre-Blend Color Clamp Enable" start="33" end="33" type="bool"/> + <field name="Post-Blend Color Clamp Enable" start="32" end="32" type="bool"/> + </struct> + + <struct name="CC_VIEWPORT" length="2"> + <field name="Minimum Depth" start="0" end="31" type="float"/> + <field name="Maximum Depth" start="32" end="63" type="float"/> + </struct> + + <struct name="COLOR_CALC_STATE" length="6"> + <field name="Stencil Reference Value" start="24" end="31" type="uint"/> + <field name="BackFace Stencil Reference Value" start="16" end="23" type="uint"/> + <field name="Round Disable Function Disable" start="15" end="15" type="bool"/> + <field name="Alpha Test Format" start="0" end="0" type="uint"> + <value name="ALPHATEST_UNORM8" value="0"/> + <value name="ALPHATEST_FLOAT32" value="1"/> + </field> + <field name="Alpha Reference Value As UNORM8" start="32" end="63" type="uint"/> + <field name="Alpha Reference Value As FLOAT32" start="32" end="63" type="float"/> + <field name="Blend Constant Color Red" start="64" end="95" type="float"/> + <field name="Blend Constant Color Green" start="96" end="127" type="float"/> + <field name="Blend Constant Color Blue" start="128" end="159" type="float"/> + <field name="Blend Constant Color Alpha" start="160" end="191" type="float"/> + </struct> + + <struct name="DEPTH_STENCIL_STATE" length="3"> + <field name="Stencil Test Enable" start="31" end="31" type="bool"/> + <field name="Stencil Test Function" start="28" end="30" type="uint"> + <value name="COMPAREFUNCTION_ALWAYS" value="0"/> + <value name="COMPAREFUNCTION_NEVER" value="1"/> + <value name="COMPAREFUNCTION_LESS" value="2"/> + <value name="COMPAREFUNCTION_EQUAL" value="3"/> + <value name="COMPAREFUNCTION_LEQUAL" value="4"/> + <value name="COMPAREFUNCTION_GREATER" value="5"/> + <value name="COMPAREFUNCTION_NOTEQUAL" value="6"/> + <value name="COMPAREFUNCTION_GEQUAL" value="7"/> + </field> + <field name="Stencil Fail Op" start="25" end="27" type="uint"> + <value name="STENCILOP_KEEP" value="0"/> + <value name="STENCILOP_ZERO" value="1"/> + <value name="STENCILOP_REPLACE" value="2"/> + <value name="STENCILOP_INCRSAT" value="3"/> + <value name="STENCILOP_DECRSAT" value="4"/> + <value name="STENCILOP_INCR" value="5"/> + <value name="STENCILOP_DECR" value="6"/> + <value name="STENCILOP_INVERT" value="7"/> + </field> + <field name="Stencil Pass Depth Fail Op" start="22" end="24" type="uint"/> + <field name="Stencil Pass Depth Pass Op" start="19" end="21" type="uint"/> + <field name="Stencil Buffer Write Enable" start="18" end="18" type="bool"/> + <field name="Double Sided Stencil Enable" start="15" end="15" type="bool"/> + <field name="BackFace Stencil Test Function" start="12" end="14" type="uint"> + <value name="COMPAREFUNCTION_ALWAYS" value="0"/> + <value name="COMPAREFUNCTION_NEVER" value="1"/> + <value name="COMPAREFUNCTION_LESS" value="2"/> + <value name="COMPAREFUNCTION_EQUAL" value="3"/> + <value name="COMPAREFUNCTION_LEQUAL" value="4"/> + <value name="COMPAREFUNCTION_GREATER" value="5"/> + <value name="COMPAREFUNCTION_NOTEQUAL" value="6"/> + <value name="COMPAREFUNCTION_GEQUAL" value="7"/> + </field> + <field name="Backface Stencil Fail Op" start="9" end="11" type="uint"> + <value name="STENCILOP_KEEP" value="0"/> + <value name="STENCILOP_ZERO" value="1"/> + <value name="STENCILOP_REPLACE" value="2"/> + <value name="STENCILOP_INCRSAT" value="3"/> + <value name="STENCILOP_DECRSAT" value="4"/> + <value name="STENCILOP_INCR" value="5"/> + <value name="STENCILOP_DECR" value="6"/> + <value name="STENCILOP_INVERT" value="7"/> + </field> + <field name="Backface Stencil Pass Depth Fail Op" start="6" end="8" type="uint"/> + <field name="Backface Stencil Pass Depth Pass Op" start="3" end="5" type="uint"/> + <field name="Stencil Test Mask" start="56" end="63" type="uint"/> + <field name="Stencil Write Mask" start="48" end="55" type="uint"/> + <field name="Backface Stencil Test Mask" start="40" end="47" type="uint"/> + <field name="Backface Stencil Write Mask" start="32" end="39" type="uint"/> + <field name="Depth Test Enable" start="95" end="95" type="bool"/> + <field name="Depth Test Function" start="91" end="93" type="uint"> + <value name="COMPAREFUNCTION_ALWAYS" value="0"/> + <value name="COMPAREFUNCTION_NEVER" value="1"/> + <value name="COMPAREFUNCTION_LESS" value="2"/> + <value name="COMPAREFUNCTION_EQUAL" value="3"/> + <value name="COMPAREFUNCTION_LEQUAL" value="4"/> + <value name="COMPAREFUNCTION_GREATER" value="5"/> + <value name="COMPAREFUNCTION_NOTEQUAL" value="6"/> + <value name="COMPAREFUNCTION_GEQUAL" value="7"/> + </field> + <field name="Depth Buffer Write Enable" start="90" end="90" type="bool"/> + </struct> + + <struct name="INTERFACE_DESCRIPTOR_DATA" length="8"> + <field name="Kernel Start Pointer" start="6" end="31" type="offset"/> + <field name="Single Program Flow" start="50" end="50" type="uint"/> + <field name="Thread Priority" start="49" end="49" type="uint"> + <value name="Normal Priority" value="0"/> + <value name="High Priority" value="1"/> + </field> + <field name="Floating Point Mode" start="48" end="48" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="45" end="45" type="bool"/> + <field name="Mask Stack Exception Enable" start="43" end="43" type="bool"/> + <field name="Software Exception Enable" start="39" end="39" type="bool"/> + <field name="Sampler State Pointer" start="69" end="95" type="offset"/> + <field name="Sampler Count" start="66" end="68" type="uint"> + <value name="No samplers used" value="0"/> + <value name="Between 1 and 4 samplers used" value="1"/> + <value name="Between 5 and 8 samplers used" value="2"/> + <value name="Between 9 and 12 samplers used" value="3"/> + <value name="Between 13 and 16 samplers used" value="4"/> + </field> + <field name="Binding Table Pointer" start="101" end="111" type="offset"/> + <field name="Binding Table Entry Count" start="96" end="100" type="uint"/> + <field name="Constant URB Entry Read Length" start="144" end="159" type="uint"/> + <field name="Rounding Mode" start="182" end="183" type="uint"> + <value name="RTNE" value="0"/> + <value name="RU" value="1"/> + <value name="RD" value="2"/> + <value name="RTZ" value="3"/> + </field> + <field name="Barrier Enable" start="181" end="181" type="bool"/> + <field name="Shared Local Memory Size" start="176" end="180" type="uint"/> + <field name="Number of Threads in GPGPU Thread Group" start="160" end="167" type="uint"/> + <field name="Cross-Thread Constant Data Read Length" start="192" end="199" type="uint"/> + </struct> + + <struct name="PALETTE_ENTRY" length="1"> + <field name="Alpha" start="24" end="31" type="uint"/> + <field name="Red" start="16" end="23" type="uint"/> + <field name="Green" start="8" end="15" type="uint"/> + <field name="Blue" start="0" end="7" type="uint"/> + </struct> + + <struct name="BINDING_TABLE_STATE" length="1"> + <field name="Surface State Pointer" start="5" end="31" type="offset"/> + </struct> + + <struct name="RENDER_SURFACE_STATE" length="8"> + <field name="Surface Type" start="29" end="31" type="uint"> + <value name="SURFTYPE_1D" value="0"/> + <value name="SURFTYPE_2D" value="1"/> + <value name="SURFTYPE_3D" value="2"/> + <value name="SURFTYPE_CUBE" value="3"/> + <value name="SURFTYPE_BUFFER" value="4"/> + <value name="SURFTYPE_STRBUF" value="5"/> + <value name="SURFTYPE_NULL" value="7"/> + </field> + <field name="Surface Array" start="28" end="28" type="bool"/> + <field name="Surface Format" start="18" end="26" type="uint"/> + <field name="Surface Vertical Alignment" start="16" end="17" type="uint"> + <value name="VALIGN_2" value="0"/> + <value name="VALIGN_4" value="1"/> + </field> + <field name="Surface Horizontal Alignment" start="15" end="15" type="uint"> + <value name="HALIGN_4" value="0"/> + <value name="HALIGN_8" value="1"/> + </field> + <field name="Tiled Surface" start="14" end="14" type="uint"/> + <field name="Tile Walk" start="13" end="13" type="uint"> + <value name="TILEWALK_XMAJOR" value="0"/> + <value name="TILEWALK_YMAJOR" value="1"/> + </field> + <field name="Vertical Line Stride" start="12" end="12" type="uint"/> + <field name="Vertical Line Stride Offset" start="11" end="11" type="uint"/> + <field name="Surface Array Spacing" start="10" end="10" type="uint"> + <value name="ARYSPC_FULL" value="0"/> + <value name="ARYSPC_LOD0" value="1"/> + </field> + <field name="Render Cache Read Write Mode" start="8" end="8" type="uint"/> + <field name="Media Boundary Pixel Mode" start="6" end="7" type="uint"> + <value name="NORMAL_MODE" value="0"/> + <value name="PROGRESSIVE_FRAME" value="2"/> + <value name="INTERLACED_FRAME" value="3"/> + </field> + <field name="Cube Face Enables" start="0" end="5" type="uint"/> + <field name="Surface Base Address" start="32" end="63" type="address"/> + <field name="Height" start="80" end="93" type="uint"/> + <field name="Width" start="64" end="77" type="uint"/> + <field name="Depth" start="117" end="127" type="uint"/> + <field name="Integer Surface Format" start="114" end="116" type="uint"/> + <field name="Surface Pitch" start="96" end="113" type="uint"/> + <field name="Render Target Rotation" start="157" end="158" type="uint"> + <value name="RTROTATE_0DEG" value="0"/> + <value name="RTROTATE_90DEG" value="1"/> + <value name="RTROTATE_270DEG" value="3"/> + </field> + <field name="Minimum Array Element" start="146" end="156" type="uint"/> + <field name="Render Target View Extent" start="135" end="145" type="uint"/> + <field name="Multisampled Surface Storage Format" start="134" end="134" type="uint"> + <value name="MSFMT_MSS" value="0"/> + <value name="MSFMT_DEPTH_STENCIL" value="1"/> + </field> + <field name="Number of Multisamples" start="131" end="133" type="uint"> + <value name="MULTISAMPLECOUNT_1" value="0"/> + <value name="MULTISAMPLECOUNT_4" value="2"/> + <value name="MULTISAMPLECOUNT_8" value="3"/> + </field> + <field name="Multisample Position Palette Index" start="128" end="130" type="uint"/> + <field name="Strbuf Minimum Array Element" start="128" end="154" type="uint"/> + <field name="X Offset" start="185" end="191" type="offset"/> + <field name="Y Offset" start="180" end="183" type="offset"/> + <field name="Surface Object Control State" start="176" end="179" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface Min LOD" start="164" end="167" type="uint"/> + <field name="MIP Count / LOD" start="160" end="163" type="uint"/> + <field name="MCS Base Address" start="204" end="223" type="address"/> + <field name="MCS Surface Pitch" start="195" end="203" type="uint"/> + <field name="Append Counter Address" start="198" end="223" type="address"/> + <field name="Append Counter Enable" start="193" end="193" type="bool"/> + <field name="MCS Enable" start="192" end="192" type="bool"/> + <field name="Reserved: MBZ" start="222" end="223" type="uint"/> + <field name="X Offset for UV Plane" start="208" end="221" type="uint"/> + <field name="Y Offset for UV Plane" start="192" end="205" type="uint"/> + <field name="Shader Channel Select Red" start="249" end="251" type="uint"> + <value name="SCS_ZERO" value="0"/> + <value name="SCS_ONE" value="1"/> + <value name="SCS_RED" value="4"/> + <value name="SCS_GREEN" value="5"/> + <value name="SCS_BLUE" value="6"/> + <value name="SCS_ALPHA" value="7"/> + </field> + <field name="Shader Channel Select Green" start="246" end="248" type="uint"/> + <field name="Shader Channel Select Blue" start="243" end="245" type="uint"/> + <field name="Shader Channel Select Alpha" start="240" end="242" type="uint"/> + <field name="Resource Min LOD" start="224" end="235" type="u4.8"/> + </struct> + + <struct name="SAMPLER_STATE" length="4"> + <field name="Sampler Disable" start="31" end="31" type="bool"/> + <field name="Texture Border Color Mode" start="29" end="29" type="uint"> + <value name="DX10/OGL" value="0"/> + <value name="DX9" value="1"/> + </field> + <field name="LOD PreClamp Enable" start="28" end="28" type="uint" prefix="CLAMP_ENABLE"> + <value name="OGL" value="1"/> + </field> + <field name="Base Mip Level" start="22" end="26" type="u4.1"/> + <field name="Mip Mode Filter" start="20" end="21" type="uint" prefix="MIPFILTER"> + <value name="NONE" value="0"/> + <value name="NEAREST" value="1"/> + <value name="LINEAR" value="3"/> + </field> + <field name="Mag Mode Filter" start="17" end="19" type="uint" prefix="MAPFILTER"> + <value name="NEAREST" value="0"/> + <value name="LINEAR" value="1"/> + <value name="ANISOTROPIC" value="2"/> + <value name="MONO" value="6"/> + </field> + <field name="Min Mode Filter" start="14" end="16" type="uint" prefix="MAPFILTER"> + <value name="NEAREST" value="0"/> + <value name="LINEAR" value="1"/> + <value name="ANISOTROPIC" value="2"/> + <value name="MONO" value="6"/> + </field> + <field name="Texture LOD Bias" start="1" end="13" type="s4.8"/> + <field name="Anisotropic Algorithm" start="0" end="0" type="uint"> + <value name="LEGACY" value="0"/> + <value name="EWA Approximation" value="1"/> + </field> + <field name="Min LOD" start="52" end="63" type="u4.8"/> + <field name="Max LOD" start="40" end="51" type="u4.8"/> + <field name="Shadow Function" start="33" end="35" type="uint"> + <value name="PREFILTEROP ALWAYS" value="0"/> + <value name="PREFILTEROP NEVER" value="1"/> + <value name="PREFILTEROP LESS" value="2"/> + <value name="PREFILTEROP EQUAL" value="3"/> + <value name="PREFILTEROP LEQUAL" value="4"/> + <value name="PREFILTEROP GREATER" value="5"/> + <value name="PREFILTEROP NOTEQUAL" value="6"/> + <value name="PREFILTEROP GEQUAL" value="7"/> + </field> + <field name="Cube Surface Control Mode" start="32" end="32" type="uint"> + <value name="PROGRAMMED" value="0"/> + <value name="OVERRIDE" value="1"/> + </field> + <field name="Border Color Pointer" start="69" end="95" type="offset"/> + <field name="ChromaKey Enable" start="121" end="121" type="bool"/> + <field name="ChromaKey Index" start="119" end="120" type="uint"/> + <field name="ChromaKey Mode" start="118" end="118" type="uint"> + <value name="KEYFILTER_KILL_ON_ANY_MATCH" value="0"/> + <value name="KEYFILTER_REPLACE_BLACK" value="1"/> + </field> + <field name="Maximum Anisotropy" start="115" end="117" type="uint"> + <value name="RATIO 2:1" value="0"/> + <value name="RATIO 4:1" value="1"/> + <value name="RATIO 6:1" value="2"/> + <value name="RATIO 8:1" value="3"/> + <value name="RATIO 10:1" value="4"/> + <value name="RATIO 12:1" value="5"/> + <value name="RATIO 14:1" value="6"/> + <value name="RATIO 16:1" value="7"/> + </field> + <field name="R Address Min Filter Rounding Enable" start="109" end="109" type="bool"/> + <field name="R Address Mag Filter Rounding Enable" start="110" end="110" type="bool"/> + <field name="V Address Min Filter Rounding Enable" start="111" end="111" type="bool"/> + <field name="V Address Mag Filter Rounding Enable" start="112" end="112" type="bool"/> + <field name="U Address Min Filter Rounding Enable" start="113" end="113" type="bool"/> + <field name="U Address Mag Filter Rounding Enable" start="114" end="114" type="bool"/> + <field name="Trilinear Filter Quality" start="107" end="108" type="uint"> + <value name="FULL" value="0"/> + <value name="TRIQUAL_HIGH/MAG_CLAMP_MIPFILTER" value="1"/> + <value name="MED" value="2"/> + <value name="LOW" value="3"/> + </field> + <field name="Non-normalized Coordinate Enable" start="106" end="106" type="bool"/> + <field name="TCX Address Control Mode" start="102" end="104" type="uint"/> + <field name="TCY Address Control Mode" start="99" end="101" type="uint"/> + <field name="TCZ Address Control Mode" start="96" end="98" type="uint"/> + </struct> + + <enum name="3D_Prim_Topo_Type" prefix="3DPRIM"> + <value name="POINTLIST" value="1"/> + <value name="LINELIST" value="2"/> + <value name="LINESTRIP" value="3"/> + <value name="TRILIST" value="4"/> + <value name="TRISTRIP" value="5"/> + <value name="TRIFAN" value="6"/> + <value name="QUADLIST" value="7"/> + <value name="QUADSTRIP" value="8"/> + <value name="LINELIST_ADJ" value="9"/> + <value name="LINESTRIP_ADJ" value="10"/> + <value name="TRILIST_ADJ" value="11"/> + <value name="TRISTRIP_ADJ" value="12"/> + <value name="TRISTRIP_REVERSE" value="13"/> + <value name="POLYGON" value="14"/> + <value name="RECTLIST" value="15"/> + <value name="LINELOOP" value="16"/> + <value name="POINTLIST _BF" value="17"/> + <value name="LINESTRIP_CONT" value="18"/> + <value name="LINESTRIP_BF" value="19"/> + <value name="LINESTRIP_CONT_BF" value="20"/> + <value name="TRIFAN_NOSTIPPLE" value="22"/> + <value name="PATCHLIST_1" value="32"/> + <value name="PATCHLIST_2" value="33"/> + <value name="PATCHLIST_3" value="34"/> + <value name="PATCHLIST_4" value="35"/> + <value name="PATCHLIST_5" value="36"/> + <value name="PATCHLIST_6" value="37"/> + <value name="PATCHLIST_7" value="38"/> + <value name="PATCHLIST_8" value="39"/> + <value name="PATCHLIST_9" value="40"/> + <value name="PATCHLIST_10" value="41"/> + <value name="PATCHLIST_11" value="42"/> + <value name="PATCHLIST_12" value="43"/> + <value name="PATCHLIST_13" value="44"/> + <value name="PATCHLIST_14" value="45"/> + <value name="PATCHLIST_15" value="46"/> + <value name="PATCHLIST_16" value="47"/> + <value name="PATCHLIST_17" value="48"/> + <value name="PATCHLIST_18" value="49"/> + <value name="PATCHLIST_19" value="50"/> + <value name="PATCHLIST_20" value="51"/> + <value name="PATCHLIST_21" value="52"/> + <value name="PATCHLIST_22" value="53"/> + <value name="PATCHLIST_23" value="54"/> + <value name="PATCHLIST_24" value="55"/> + <value name="PATCHLIST_25" value="56"/> + <value name="PATCHLIST_26" value="57"/> + <value name="PATCHLIST_27" value="58"/> + <value name="PATCHLIST_28" value="59"/> + <value name="PATCHLIST_29" value="60"/> + <value name="PATCHLIST_30" value="61"/> + <value name="PATCHLIST_31" value="62"/> + <value name="PATCHLIST_32" value="63"/> + </enum> + + <enum name="3D_Vertex_Component_Control" prefix="VFCOMP"> + <value name="NOSTORE" value="0"/> + <value name="STORE_SRC" value="1"/> + <value name="STORE_0" value="2"/> + <value name="STORE_1_FP" value="3"/> + <value name="STORE_1_INT" value="4"/> + <value name="STORE_VID" value="5"/> + <value name="STORE_IID" value="6"/> + <value name="STORE_PID" value="7"/> + </enum> + + <enum name="3D_Compare_Function" prefix="COMPAREFUNCTION"> + <value name="ALWAYS" value="0"/> + <value name="NEVER" value="1"/> + <value name="LESS" value="2"/> + <value name="EQUAL" value="3"/> + <value name="LEQUAL" value="4"/> + <value name="GREATER" value="5"/> + <value name="NOTEQUAL" value="6"/> + <value name="GEQUAL" value="7"/> + </enum> + + <enum name="SURFACE_FORMAT" prefix="SF"> + <value name="R32G32B32A32_FLOAT" value="0"/> + <value name="R32G32B32A32_SINT" value="1"/> + <value name="R32G32B32A32_UINT" value="2"/> + <value name="R32G32B32A32_UNORM" value="3"/> + <value name="R32G32B32A32_SNORM" value="4"/> + <value name="R64G64_FLOAT" value="5"/> + <value name="R32G32B32X32_FLOAT" value="6"/> + <value name="R32G32B32A32_SSCALED" value="7"/> + <value name="R32G32B32A32_USCALED" value="8"/> + <value name="R32G32B32A32_SFIXED" value="32"/> + <value name="R64G64_PASSTHRU" value="33"/> + <value name="R32G32B32_FLOAT" value="64"/> + <value name="R32G32B32_SINT" value="65"/> + <value name="R32G32B32_UINT" value="66"/> + <value name="R32G32B32_UNORM" value="67"/> + <value name="R32G32B32_SNORM" value="68"/> + <value name="R32G32B32_SSCALED" value="69"/> + <value name="R32G32B32_USCALED" value="70"/> + <value name="R32G32B32_SFIXED" value="80"/> + <value name="R16G16B16A16_UNORM" value="128"/> + <value name="R16G16B16A16_SNORM" value="129"/> + <value name="R16G16B16A16_SINT" value="130"/> + <value name="R16G16B16A16_UINT" value="131"/> + <value name="R16G16B16A16_FLOAT" value="132"/> + <value name="R32G32_FLOAT" value="133"/> + <value name="R32G32_SINT" value="134"/> + <value name="R32G32_UINT" value="135"/> + <value name="R32_FLOAT_X8X24_TYPELESS" value="136"/> + <value name="X32_TYPELESS_G8X24_UINT" value="137"/> + <value name="L32A32_FLOAT" value="138"/> + <value name="R32G32_UNORM" value="139"/> + <value name="R32G32_SNORM" value="140"/> + <value name="R64_FLOAT" value="141"/> + <value name="R16G16B16X16_UNORM" value="142"/> + <value name="R16G16B16X16_FLOAT" value="143"/> + <value name="A32X32_FLOAT" value="144"/> + <value name="L32X32_FLOAT" value="145"/> + <value name="I32X32_FLOAT" value="146"/> + <value name="R16G16B16A16_SSCALED" value="147"/> + <value name="R16G16B16A16_USCALED" value="148"/> + <value name="R32G32_SSCALED" value="149"/> + <value name="R32G32_USCALED" value="150"/> + <value name="R32G32_SFIXED" value="160"/> + <value name="R64_PASSTHRU" value="161"/> + <value name="B8G8R8A8_UNORM" value="192"/> + <value name="B8G8R8A8_UNORM_SRGB" value="193"/> + <value name="R10G10B10A2_UNORM" value="194"/> + <value name="R10G10B10A2_UNORM_SRGB" value="195"/> + <value name="R10G10B10A2_UINT" value="196"/> + <value name="R10G10B10_SNORM_A2_UNORM" value="197"/> + <value name="R8G8B8A8_UNORM" value="199"/> + <value name="R8G8B8A8_UNORM_SRGB" value="200"/> + <value name="R8G8B8A8_SNORM" value="201"/> + <value name="R8G8B8A8_SINT" value="202"/> + <value name="R8G8B8A8_UINT" value="203"/> + <value name="R16G16_UNORM" value="204"/> + <value name="R16G16_SNORM" value="205"/> + <value name="R16G16_SINT" value="206"/> + <value name="R16G16_UINT" value="207"/> + <value name="R16G16_FLOAT" value="208"/> + <value name="B10G10R10A2_UNORM" value="209"/> + <value name="B10G10R10A2_UNORM_SRGB" value="210"/> + <value name="R11G11B10_FLOAT" value="211"/> + <value name="R32_SINT" value="214"/> + <value name="R32_UINT" value="215"/> + <value name="R32_FLOAT" value="216"/> + <value name="R24_UNORM_X8_TYPELESS" value="217"/> + <value name="X24_TYPELESS_G8_UINT" value="218"/> + <value name="L32_UNORM" value="221"/> + <value name="A32_UNORM" value="222"/> + <value name="L16A16_UNORM" value="223"/> + <value name="I24X8_UNORM" value="224"/> + <value name="L24X8_UNORM" value="225"/> + <value name="A24X8_UNORM" value="226"/> + <value name="I32_FLOAT" value="227"/> + <value name="L32_FLOAT" value="228"/> + <value name="A32_FLOAT" value="229"/> + <value name="X8B8_UNORM_G8R8_SNORM" value="230"/> + <value name="A8X8_UNORM_G8R8_SNORM" value="231"/> + <value name="B8X8_UNORM_G8R8_SNORM" value="232"/> + <value name="B8G8R8X8_UNORM" value="233"/> + <value name="B8G8R8X8_UNORM_SRGB" value="234"/> + <value name="R8G8B8X8_UNORM" value="235"/> + <value name="R8G8B8X8_UNORM_SRGB" value="236"/> + <value name="R9G9B9E5_SHAREDEXP" value="237"/> + <value name="B10G10R10X2_UNORM" value="238"/> + <value name="L16A16_FLOAT" value="240"/> + <value name="R32_UNORM" value="241"/> + <value name="R32_SNORM" value="242"/> + <value name="R10G10B10X2_USCALED" value="243"/> + <value name="R8G8B8A8_SSCALED" value="244"/> + <value name="R8G8B8A8_USCALED" value="245"/> + <value name="R16G16_SSCALED" value="246"/> + <value name="R16G16_USCALED" value="247"/> + <value name="R32_SSCALED" value="248"/> + <value name="R32_USCALED" value="249"/> + <value name="B5G6R5_UNORM" value="256"/> + <value name="B5G6R5_UNORM_SRGB" value="257"/> + <value name="B5G5R5A1_UNORM" value="258"/> + <value name="B5G5R5A1_UNORM_SRGB" value="259"/> + <value name="B4G4R4A4_UNORM" value="260"/> + <value name="B4G4R4A4_UNORM_SRGB" value="261"/> + <value name="R8G8_UNORM" value="262"/> + <value name="R8G8_SNORM" value="263"/> + <value name="R8G8_SINT" value="264"/> + <value name="R8G8_UINT" value="265"/> + <value name="R16_UNORM" value="266"/> + <value name="R16_SNORM" value="267"/> + <value name="R16_SINT" value="268"/> + <value name="R16_UINT" value="269"/> + <value name="R16_FLOAT" value="270"/> + <value name="A8P8_UNORM_PALETTE0" value="271"/> + <value name="A8P8_UNORM_PALETTE1" value="272"/> + <value name="I16_UNORM" value="273"/> + <value name="L16_UNORM" value="274"/> + <value name="A16_UNORM" value="275"/> + <value name="L8A8_UNORM" value="276"/> + <value name="I16_FLOAT" value="277"/> + <value name="L16_FLOAT" value="278"/> + <value name="A16_FLOAT" value="279"/> + <value name="L8A8_UNORM_SRGB" value="280"/> + <value name="R5G5_SNORM_B6_UNORM" value="281"/> + <value name="B5G5R5X1_UNORM" value="282"/> + <value name="B5G5R5X1_UNORM_SRGB" value="283"/> + <value name="R8G8_SSCALED" value="284"/> + <value name="R8G8_USCALED" value="285"/> + <value name="R16_SSCALED" value="286"/> + <value name="R16_USCALED" value="287"/> + <value name="P8A8_UNORM_PALETTE0" value="290"/> + <value name="P8A8_UNORM_PALETTE1" value="291"/> + <value name="A1B5G5R5_UNORM" value="292"/> + <value name="A4B4G4R4_UNORM" value="293"/> + <value name="L8A8_UINT" value="294"/> + <value name="L8A8_SINT" value="295"/> + <value name="R8_UNORM" value="320"/> + <value name="R8_SNORM" value="321"/> + <value name="R8_SINT" value="322"/> + <value name="R8_UINT" value="323"/> + <value name="A8_UNORM" value="324"/> + <value name="I8_UNORM" value="325"/> + <value name="L8_UNORM" value="326"/> + <value name="P4A4_UNORM_PALETTE0" value="327"/> + <value name="A4P4_UNORM_PALETTE0" value="328"/> + <value name="R8_SSCALED" value="329"/> + <value name="R8_USCALED" value="330"/> + <value name="P8_UNORM_PALETTE0" value="331"/> + <value name="L8_UNORM_SRGB" value="332"/> + <value name="P8_UNORM_PALETTE1" value="333"/> + <value name="P4A4_UNORM_PALETTE1" value="334"/> + <value name="A4P4_UNORM_PALETTE1" value="335"/> + <value name="Y8_UNORM" value="336"/> + <value name="L8_UINT" value="338"/> + <value name="L8_SINT" value="339"/> + <value name="I8_UINT" value="340"/> + <value name="I8_SINT" value="341"/> + <value name="DXT1_RGB_SRGB" value="384"/> + <value name="R1_UNORM" value="385"/> + <value name="YCRCB_NORMAL" value="386"/> + <value name="YCRCB_SWAPUVY" value="387"/> + <value name="P2_UNORM_PALETTE0" value="388"/> + <value name="P2_UNORM_PALETTE1" value="389"/> + <value name="BC1_UNORM" value="390"/> + <value name="BC2_UNORM" value="391"/> + <value name="BC3_UNORM" value="392"/> + <value name="BC4_UNORM" value="393"/> + <value name="BC5_UNORM" value="394"/> + <value name="BC1_UNORM_SRGB" value="395"/> + <value name="BC2_UNORM_SRGB" value="396"/> + <value name="BC3_UNORM_SRGB" value="397"/> + <value name="MONO8" value="398"/> + <value name="YCRCB_SWAPUV" value="399"/> + <value name="YCRCB_SWAPY" value="400"/> + <value name="DXT1_RGB" value="401"/> + <value name="FXT1" value="402"/> + <value name="R8G8B8_UNORM" value="403"/> + <value name="R8G8B8_SNORM" value="404"/> + <value name="R8G8B8_SSCALED" value="405"/> + <value name="R8G8B8_USCALED" value="406"/> + <value name="R64G64B64A64_FLOAT" value="407"/> + <value name="R64G64B64_FLOAT" value="408"/> + <value name="BC4_SNORM" value="409"/> + <value name="BC5_SNORM" value="410"/> + <value name="R16G16B16_FLOAT" value="411"/> + <value name="R16G16B16_UNORM" value="412"/> + <value name="R16G16B16_SNORM" value="413"/> + <value name="R16G16B16_SSCALED" value="414"/> + <value name="R16G16B16_USCALED" value="415"/> + <value name="BC6H_SF16" value="417"/> + <value name="BC7_UNORM" value="418"/> + <value name="BC7_UNORM_SRGB" value="419"/> + <value name="BC6H_UF16" value="420"/> + <value name="PLANAR_420_8" value="421"/> + <value name="R8G8B8_UNORM_SRGB" value="424"/> + <value name="ETC1_RGB8" value="425"/> + <value name="ETC2_RGB8" value="426"/> + <value name="EAC_R11" value="427"/> + <value name="EAC_RG11" value="428"/> + <value name="EAC_SIGNED_R11" value="429"/> + <value name="EAC_SIGNED_RG11" value="430"/> + <value name="ETC2_SRGB8" value="431"/> + <value name="R16G16B16_UINT" value="432"/> + <value name="R16G16B16_SINT" value="433"/> + <value name="R32_SFIXED" value="434"/> + <value name="R10G10B10A2_SNORM" value="435"/> + <value name="R10G10B10A2_USCALED" value="436"/> + <value name="R10G10B10A2_SSCALED" value="437"/> + <value name="R10G10B10A2_SINT" value="438"/> + <value name="B10G10R10A2_SNORM" value="439"/> + <value name="B10G10R10A2_USCALED" value="440"/> + <value name="B10G10R10A2_SSCALED" value="441"/> + <value name="B10G10R10A2_UINT" value="442"/> + <value name="B10G10R10A2_SINT" value="443"/> + <value name="R64G64B64A64_PASSTHRU" value="444"/> + <value name="R64G64B64_PASSTHRU" value="445"/> + <value name="ETC2_RGB8_PTA" value="448"/> + <value name="ETC2_SRGB8_PTA" value="449"/> + <value name="ETC2_EAC_RGBA8" value="450"/> + <value name="ETC2_EAC_SRGB8_A8" value="451"/> + <value name="R8G8B8_UINT" value="456"/> + <value name="R8G8B8_SINT" value="457"/> + <value name="RAW" value="511"/> + </enum> + + <enum name="Texture Coordinate Mode" prefix="TCM"> + <value name="WRAP" value="0"/> + <value name="MIRROR" value="1"/> + <value name="CLAMP" value="2"/> + <value name="CUBE" value="3"/> + <value name="CLAMP_BORDER" value="4"/> + <value name="MIRROR_ONCE" value="5"/> + </enum> + + <instruction name="3DPRIMITIVE" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="3"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="0"/> + <field name="Indirect Parameter Enable" start="10" end="10" type="bool"/> + <field name="UAV Coherency Required" start="9" end="9" type="bool"/> + <field name="Predicate Enable" start="8" end="8" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="End Offset Enable" start="41" end="41" type="bool"/> + <field name="Vertex Access Type" start="40" end="40" type="uint"> + <value name="SEQUENTIAL" value="0"/> + <value name="RANDOM" value="1"/> + </field> + <field name="Primitive Topology Type" start="32" end="37" type="uint"/> + <field name="Vertex Count Per Instance" start="64" end="95" type="uint"/> + <field name="Start Vertex Location" start="96" end="127" type="uint"/> + <field name="Instance Count" start="128" end="159" type="uint"/> + <field name="Start Instance Location" start="160" end="191" type="uint"/> + <field name="Base Vertex Location" start="192" end="223" type="int"/> + </instruction> + + <instruction name="3DSTATE_AA_LINE_PARAMETERS" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="10"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="AA Coverage Bias" start="48" end="55" type="u0.8"/> + <field name="AA Coverage Slope" start="32" end="39" type="u0.8"/> + <field name="AA Coverage EndCap Bias" start="80" end="87" type="u0.8"/> + <field name="AA Coverage EndCap Slope" start="64" end="71" type="u0.8"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_DS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="70"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_GS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="68"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_HS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="69"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_PS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="71"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_VS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="67"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="40"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to DS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="41"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to GS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="39"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to HS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_PS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="42"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to PS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="38"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to VS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POOL_ALLOC" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="25"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Binding Table Pool Base Address" start="44" end="63" type="address"/> + <field name="Binding Table Pool Enable" start="43" end="43" type="uint"/> + <field name="Surface Object Control State" start="39" end="42" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Binding Table Pool Upper Bound" start="76" end="95" type="address"/> + </instruction> + + <instruction name="3DSTATE_BLEND_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="36"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Blend State Pointer" start="38" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_CC_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="14"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Color Calc State Pointer" start="38" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_CHROMA_KEY" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="ChromaKey Table Index" start="62" end="63" type="uint"/> + <field name="ChromaKey Low Value" start="64" end="95" type="uint"/> + <field name="ChromaKey High Value" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="3DSTATE_CLEAR_PARAMS" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Depth Clear Value" start="32" end="63" type="uint"/> + <field name="Depth Clear Value Valid" start="64" end="64" type="bool"/> + </instruction> + + <instruction name="3DSTATE_CLIP" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="18"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Front Winding" start="52" end="52" type="uint"/> + <field name="Vertex Sub Pixel Precision Select" start="51" end="51" type="uint"/> + <field name="EarlyCull Enable" start="50" end="50" type="bool"/> + <field name="Cull Mode" start="48" end="49" type="uint" prefix="CULLMODE"> + <value name="BOTH" value="0"/> + <value name="NONE" value="1"/> + <value name="FRONT" value="2"/> + <value name="BACK" value="3"/> + </field> + <field name="Clipper Statistics Enable" start="42" end="42" type="bool"/> + <field name="User Clip Distance Cull Test Enable Bitmask" start="32" end="39" type="uint"/> + <field name="Clip Enable" start="95" end="95" type="bool"/> + <field name="API Mode" start="94" end="94" type="uint"> + <value name="APIMODE_OGL" value="0"/> + </field> + <field name="Viewport XY ClipTest Enable" start="92" end="92" type="bool"/> + <field name="Viewport Z ClipTest Enable" start="91" end="91" type="bool"/> + <field name="Guardband ClipTest Enable" start="90" end="90" type="bool"/> + <field name="User Clip Distance Clip Test Enable Bitmask" start="80" end="87" type="uint"/> + <field name="Clip Mode" start="77" end="79" type="uint"> + <value name="CLIPMODE_NORMAL" value="0"/> + <value name="CLIPMODE_REJECT_ALL" value="3"/> + <value name="CLIPMODE_ACCEPT_ALL" value="4"/> + </field> + <field name="Perspective Divide Disable" start="73" end="73" type="bool"/> + <field name="Non-Perspective Barycentric Enable" start="72" end="72" type="bool"/> + <field name="Triangle Strip/List Provoking Vertex Select" start="68" end="69" type="uint"> + <value name="Vertex 0" value="0"/> + <value name="Vertex 1" value="1"/> + <value name="Vertex 2" value="2"/> + </field> + <field name="Line Strip/List Provoking Vertex Select" start="66" end="67" type="uint"> + <value name="Vertex 0" value="0"/> + <value name="Vertex 1" value="1"/> + </field> + <field name="Triangle Fan Provoking Vertex Select" start="64" end="65" type="uint"> + <value name="Vertex 0" value="0"/> + <value name="Vertex 1" value="1"/> + <value name="Vertex 2" value="2"/> + </field> + <field name="Minimum Point Width" start="113" end="123" type="u8.3"/> + <field name="Maximum Point Width" start="102" end="112" type="u8.3"/> + <field name="Force Zero RTAIndex Enable" start="101" end="101" type="bool"/> + <field name="Maximum VPIndex" start="96" end="99" type="uint"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_DS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="26"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Constant Body" start="32" end="223" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_GS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="22"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Constant Body" start="32" end="223" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_HS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="25"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Constant Body" start="32" end="223" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_PS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="23"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Constant Body" start="32" end="223" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_VS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="21"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Constant Body" start="32" end="223" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_DEPTH_BUFFER" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="5"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Surface Type" start="61" end="63" type="uint"> + <value name="SURFTYPE_1D" value="0"/> + <value name="SURFTYPE_2D" value="1"/> + <value name="SURFTYPE_3D" value="2"/> + <value name="SURFTYPE_CUBE" value="3"/> + <value name="SURFTYPE_NULL" value="7"/> + </field> + <field name="Depth Write Enable" start="60" end="60" type="bool"/> + <field name="Stencil Write Enable" start="59" end="59" type="bool"/> + <field name="Hierarchical Depth Buffer Enable" start="54" end="54" type="bool"/> + <field name="Surface Format" start="50" end="52" type="uint"> + <value name="D32_FLOAT" value="1"/> + <value name="D24_UNORM_X8_UINT" value="3"/> + <value name="D16_UNORM" value="5"/> + </field> + <field name="Surface Pitch" start="32" end="49" type="uint"/> + <field name="Surface Base Address" start="64" end="95" type="address"/> + <field name="Height" start="114" end="127" type="uint"/> + <field name="Width" start="100" end="113" type="uint"/> + <field name="LOD" start="96" end="99" type="uint"/> + <field name="Depth" start="149" end="159" type="uint"> + <value name="SURFTYPE_CUBE (must be zero)" value="0"/> + </field> + <field name="Minimum Array Element" start="138" end="148" type="uint"/> + <field name="Depth Buffer Object Control State" start="128" end="131" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Depth Coordinate Offset Y" start="176" end="191" type="int"/> + <field name="Depth Coordinate Offset X" start="160" end="175" type="int"/> + <field name="Render Target View Extent" start="213" end="223" type="uint"/> + </instruction> + + <instruction name="3DSTATE_DEPTH_STENCIL_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="37"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to DEPTH_STENCIL_STATE" start="38" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_DRAWING_RECTANGLE" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="0"/> + <field name="Core Mode Select" start="14" end="15" type="uint"> + <value name="Legacy" value="0"/> + <value name="Core 0 Enabled" value="1"/> + <value name="Core 1 Enabled" value="2"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Clipped Drawing Rectangle Y Min" start="48" end="63" type="uint"/> + <field name="Clipped Drawing Rectangle X Min" start="32" end="47" type="uint"/> + <field name="Clipped Drawing Rectangle Y Max" start="80" end="95" type="uint"/> + <field name="Clipped Drawing Rectangle X Max" start="64" end="79" type="uint"/> + <field name="Drawing Rectangle Origin Y" start="112" end="127" type="int"/> + <field name="Drawing Rectangle Origin X" start="96" end="111" type="int"/> + </instruction> + + <instruction name="3DSTATE_DS" bias="2" length="6"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="29"/> + <field name="DWord Length" start="0" end="7" type="uint" default="4"/> + <field name="Kernel Start Pointer" start="38" end="63" type="offset"/> + <field name="Single Domain Point Dispatch" start="95" end="95" type="uint"/> + <field name="Vector Mask Enable" start="94" end="94" type="bool"/> + <field name="Sampler Count" start="91" end="93" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="82" end="89" type="uint"/> + <field name="Thread Dispatch Priority" start="81" end="81" type="uint"> + <value name="High" value="1"/> + </field> + <field name="Floating Point Mode" start="80" end="80" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Accesses UAV" start="78" end="78" type="bool"/> + <field name="Illegal Opcode Exception Enable" start="77" end="77" type="bool"/> + <field name="Software Exception Enable" start="71" end="71" type="bool"/> + <field name="Scratch Space Base Pointer" start="106" end="127" type="offset"/> + <field name="Per-Thread Scratch Space" start="96" end="99" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data" start="148" end="152" type="uint"/> + <field name="Patch URB Entry Read Length" start="139" end="145" type="uint"/> + <field name="Patch URB Entry Read Offset" start="132" end="137" type="uint"/> + <field name="Maximum Number of Threads" start="181" end="189" type="uint"/> + <field name="Statistics Enable" start="170" end="170" type="bool"/> + <field name="Compute W Coordinate Enable" start="162" end="162" type="bool"/> + <field name="DS Cache Disable" start="161" end="161" type="bool"/> + <field name="DS Function Enable" start="160" end="160" type="bool"/> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_DS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="55"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_GS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="53"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_HS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="54"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_PS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="56"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <field name="Constant Buffer Dx9 Enable" start="68" end="68" type="bool"/> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_VS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="52"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <field name="Constant Buffer Dx9 Enable" start="68" end="68" type="bool"/> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_POOL_ALLOC" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="26"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Gather Pool Base Address" start="44" end="63" type="address"/> + <field name="Gather Pool Enable" start="43" end="43" type="bool"/> + <field name="Memory Object Control State" start="32" end="35" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Gather Pool Upper Bound" start="76" end="95" type="address"/> + </instruction> + + <instruction name="3DSTATE_GS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="17"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Kernel Start Pointer" start="38" end="63" type="offset"/> + <field name="Single Program Flow (SPF)" start="95" end="95" type="uint"/> + <field name="Vector Mask Enable (VME)" start="94" end="94" type="uint"/> + <field name="Sampler Count" start="91" end="93" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="82" end="89" type="uint"/> + <field name="Thread Priority" start="81" end="81" type="uint"> + <value name="Normal Priority" value="0"/> + <value name="High Priority" value="1"/> + </field> + <field name="Floating Point Mode" start="80" end="80" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="77" end="77" type="bool"/> + <field name="GS accesses UAV" start="76" end="76" type="uint"/> + <field name="Mask Stack Exception Enable" start="75" end="75" type="bool"/> + <field name="Software Exception Enable" start="71" end="71" type="bool"/> + <field name="Scratch Space Base Pointer" start="106" end="127" type="offset"/> + <field name="Per-Thread Scratch Space" start="96" end="99" type="uint"/> + <field name="Output Vertex Size" start="151" end="156" type="uint"/> + <field name="Output Topology" start="145" end="150" type="uint" prefix="OUTPUT"/> + <field name="Vertex URB Entry Read Length" start="139" end="144" type="uint"/> + <field name="Include Vertex Handles" start="138" end="138" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="132" end="137" type="uint"/> + <field name="Dispatch GRF Start Register for URB Data" start="128" end="131" type="uint"/> + <field name="Maximum Number of Threads" start="184" end="191" type="uint"/> + <field name="Control Data Header Size" start="180" end="183" type="uint"/> + <field name="Instance Control" start="175" end="179" type="uint"/> + <field name="Default StreamID" start="173" end="174" type="uint"/> + <field name="Dispatch Mode" start="171" end="172" type="uint" prefix="DISPATCH_MODE"> + <value name="SINGLE" value="0"/> + <value name="DUAL_INSTANCE" value="1"/> + <value name="DUAL_OBJECT" value="2"/> + </field> + <field name="GS Statistics Enable" start="170" end="170" type="uint"/> + <field name="GS Invocations Increment Value" start="165" end="169" type="uint"/> + <field name="Include Primitive ID" start="164" end="164" type="uint"/> + <field name="Hint" start="163" end="163" type="uint"/> + <field name="Reorder Mode" start="162" end="162" type="uint"> + <value name="REORDER_LEADING" value="0"/> + <value name="REORDER_TRAILING" value="1"/> + </field> + <field name="Discard Adjacency" start="161" end="161" type="bool"/> + <field name="GS Enable" start="160" end="160" type="bool"/> + <field name="Control Data Format" start="223" end="223" type="uint"> + <value name="GSCTL_CUT" value="0"/> + <value name="GSCTL_SID" value="1"/> + </field> + <field name="Semaphore Handle" start="192" end="204" type="offset"/> + </instruction> + + <instruction name="3DSTATE_HIER_DEPTH_BUFFER" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="7"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Hierarchical Depth Buffer Object Control State" start="57" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface Pitch" start="32" end="48" type="uint"/> + <field name="Surface Base Address" start="64" end="95" type="address"/> + </instruction> + + <instruction name="3DSTATE_HS" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="27"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Sampler Count" start="59" end="61" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="50" end="57" type="uint"/> + <field name="Thread Dispatch Priority" start="49" end="49" type="uint"> + <value name="High" value="1"/> + </field> + <field name="Floating Point Mode" start="48" end="48" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="45" end="45" type="bool"/> + <field name="Software Exception Enable" start="44" end="44" type="bool"/> + <field name="Maximum Number of Threads" start="32" end="39" type="uint"/> + <field name="Enable" start="95" end="95" type="bool"/> + <field name="Statistics Enable" start="93" end="93" type="bool"/> + <field name="Instance Count" start="64" end="67" type="uint"/> + <field name="Kernel Start Pointer" start="102" end="127" type="offset"/> + <field name="Scratch Space Base Pointer" start="138" end="159" type="offset"/> + <field name="Per-Thread Scratch Space" start="128" end="131" type="uint"/> + <field name="Single Program Flow" start="187" end="187" type="uint"/> + <field name="Vector Mask Enable" start="186" end="186" type="bool"/> + <field name="HS accesses UAV" start="185" end="185" type="bool"/> + <field name="Include Vertex Handles" start="184" end="184" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data" start="179" end="183" type="uint"/> + <field name="Vertex URB Entry Read Length" start="171" end="176" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="164" end="169" type="uint"/> + <field name="Semaphore Handle" start="192" end="204" type="offset"/> + </instruction> + + <instruction name="3DSTATE_INDEX_BUFFER" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="10"/> + <field name="Memory Object Control State" start="12" end="15" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Index Format" start="8" end="9" type="uint" prefix="INDEX"> + <value name="BYTE" value="0"/> + <value name="WORD" value="1"/> + <value name="DWORD" value="2"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Buffer Starting Address" start="32" end="63" type="address"/> + <field name="Buffer Ending Address" start="64" end="95" type="address"/> + </instruction> + + <instruction name="3DSTATE_LINE_STIPPLE" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="8"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Modify Enable (Current Repeat Counter, Current Stipple Index)" start="63" end="63" type="bool"/> + <field name="Current Repeat Counter" start="53" end="61" type="uint"/> + <field name="Current Stipple Index" start="48" end="51" type="uint"/> + <field name="Line Stipple Pattern" start="32" end="47" type="uint"/> + <field name="Line Stipple Inverse Repeat Count" start="79" end="95" type="u1.16"/> + <field name="Line Stipple Repeat Count" start="64" end="72" type="uint"/> + </instruction> + + <instruction name="3DSTATE_MONOFILTER_SIZE" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="17"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Monochrome Filter Width" start="35" end="37" type="uint"/> + <field name="Monochrome Filter Height" start="32" end="34" type="uint"/> + </instruction> + + <instruction name="3DSTATE_MULTISAMPLE" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="13"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Multi Sample Enable" start="37" end="37" type="bool"/> + <field name="Pixel Location" start="36" end="36" type="uint"> + <value name="PIXLOC_CENTER" value="0"/> + <value name="PIXLOC_UL_CORNER" value="1"/> + </field> + <field name="Number of Multisamples" start="33" end="35" type="uint"> + <value name="NUMSAMPLES_1" value="0"/> + <value name="NUMSAMPLES_4" value="2"/> + <value name="NUMSAMPLES_8" value="3"/> + </field> + <field name="Sample3 X Offset" start="92" end="95" type="u0.4"/> + <field name="Sample3 Y Offset" start="88" end="91" type="u0.4"/> + <field name="Sample2 X Offset" start="84" end="87" type="u0.4"/> + <field name="Sample2 Y Offset" start="80" end="83" type="u0.4"/> + <field name="Sample1 X Offset" start="76" end="79" type="u0.4"/> + <field name="Sample1 Y Offset" start="72" end="75" type="u0.4"/> + <field name="Sample0 X Offset" start="68" end="71" type="u0.4"/> + <field name="Sample0 Y Offset" start="64" end="67" type="u0.4"/> + <field name="Sample7 X Offset" start="124" end="127" type="u0.4"/> + <field name="Sample7 Y Offset" start="120" end="123" type="u0.4"/> + <field name="Sample6 X Offset" start="116" end="119" type="u0.4"/> + <field name="Sample6 Y Offset" start="112" end="115" type="u0.4"/> + <field name="Sample5 X Offset" start="108" end="111" type="u0.4"/> + <field name="Sample5 Y Offset" start="104" end="107" type="u0.4"/> + <field name="Sample4 X Offset" start="100" end="103" type="u0.4"/> + <field name="Sample4 Y Offset" start="96" end="99" type="u0.4"/> + </instruction> + + <instruction name="3DSTATE_POLY_STIPPLE_OFFSET" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="6"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Polygon Stipple X Offset" start="40" end="44" type="uint"/> + <field name="Polygon Stipple Y Offset" start="32" end="36" type="uint"/> + </instruction> + + <instruction name="3DSTATE_POLY_STIPPLE_PATTERN" bias="2" length="33"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="7"/> + <field name="DWord Length" start="0" end="7" type="uint" default="31"/> + <group count="32" start="32" size="32"> + <field name="Pattern Row" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="3DSTATE_PS" bias="2" length="8"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="32"/> + <field name="DWord Length" start="0" end="7" type="uint" default="6"/> + <field name="Kernel Start Pointer[0]" start="38" end="63" type="offset"/> + <field name="Single Program Flow (SPF)" start="95" end="95" type="uint"/> + <field name="Vector Mask Enable (VME)" start="94" end="94" type="uint"/> + <field name="Sampler Count" start="91" end="93" type="uint"/> + <field name="Denormal Mode" start="90" end="90" type="uint"> + <value name="FTZ" value="0"/> + <value name="RET" value="1"/> + </field> + <field name="Binding Table Entry Count" start="82" end="89" type="uint"/> + <field name="Thread Priority" start="81" end="81" type="uint"> + <value name="High" value="1"/> + </field> + <field name="Floating Point Mode" start="80" end="80" type="uint"> + <value name="IEEE-745" value="0"/> + <value name="Alt" value="1"/> + </field> + <field name="Rounding Mode" start="78" end="79" type="uint"> + <value name="RTNE" value="0"/> + <value name="RU" value="1"/> + <value name="RD" value="2"/> + <value name="RTZ" value="3"/> + </field> + <field name="Illegal Opcode Exception Enable" start="77" end="77" type="bool"/> + <field name="Mask Stack Exception Enable" start="75" end="75" type="bool"/> + <field name="Software Exception Enable" start="71" end="71" type="bool"/> + <field name="Scratch Space Base Pointer" start="106" end="127" type="offset"/> + <field name="Per Thread Scratch Space" start="96" end="99" type="uint"/> + <field name="Maximum Number of Threads" start="151" end="159" type="uint"/> + <field name="Sample Mask" start="140" end="147" type="uint"/> + <field name="Push Constant Enable" start="139" end="139" type="bool"/> + <field name="Attribute Enable" start="138" end="138" type="bool"/> + <field name="oMask Present to RenderTarget" start="137" end="137" type="bool"/> + <field name="Render Target Fast Clear Enable" start="136" end="136" type="bool"/> + <field name="Dual Source Blend Enable" start="135" end="135" type="bool"/> + <field name="Render Target Resolve Enable" start="134" end="134" type="bool"/> + <field name="PS Accesses UAV" start="133" end="133" type="bool"/> + <field name="Position XY Offset Select" start="131" end="132" type="uint"> + <value name="POSOFFSET_NONE" value="0"/> + <value name="POSOFFSET_CENTROID" value="2"/> + <value name="POSOFFSET_SAMPLE" value="3"/> + </field> + <field name="32 Pixel Dispatch Enable" start="130" end="130" type="bool"/> + <field name="16 Pixel Dispatch Enable" start="129" end="129" type="bool"/> + <field name="8 Pixel Dispatch Enable" start="128" end="128" type="bool"/> + <field name="Dispatch GRF Start Register for Constant/Setup Data [0]" start="176" end="182" type="uint"/> + <field name="Dispatch GRF Start Register for Constant/Setup Data [1]" start="168" end="174" type="uint"/> + <field name="Dispatch GRF Start Register for Constant/Setup Data [2]" start="160" end="166" type="uint"/> + <field name="Kernel Start Pointer[1]" start="198" end="223" type="offset"/> + <field name="Kernel Start Pointer[2]" start="230" end="255" type="offset"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="20"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="21"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="19"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_PS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="22"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="18"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_RAST_MULTISAMPLE" bias="2" length="6"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="14"/> + <field name="DWord Length" start="0" end="7" type="uint" default="4"/> + <field name="Number of Rasterization Multisamples" start="33" end="35" type="uint" prefix="NRM"> + <value name="NUMRASTSAMPLES_1" value="0"/> + <value name="NUMRASTSAMPLES_2" value="1"/> + <value name="NUMRASTSAMPLES_4" value="2"/> + <value name="NUMRASTSAMPLES_8" value="3"/> + <value name="NUMRASTSAMPLES_16" value="4"/> + </field> + <field name="Sample3 X Offset" start="92" end="95" type="u0.4"/> + <field name="Sample3 Y Offset" start="88" end="91" type="u0.4"/> + <field name="Sample2 X Offset" start="84" end="87" type="u0.4"/> + <field name="Sample2 Y Offset" start="80" end="83" type="u0.4"/> + <field name="Sample1 X Offset" start="76" end="79" type="u0.4"/> + <field name="Sample1 Y Offset" start="72" end="75" type="u0.4"/> + <field name="Sample0 X Offset" start="68" end="71" type="u0.4"/> + <field name="Sample0 Y Offset" start="64" end="67" type="u0.4"/> + <field name="Sample7 X Offset" start="124" end="127" type="u0.4"/> + <field name="Sample7 Y Offset" start="120" end="123" type="u0.4"/> + <field name="Sample6 X Offset" start="116" end="119" type="u0.4"/> + <field name="Sample6 Y Offset" start="112" end="115" type="u0.4"/> + <field name="Sample5 X Offset" start="108" end="111" type="u0.4"/> + <field name="Sample5 Y Offset" start="104" end="107" type="u0.4"/> + <field name="Sample4 X Offset" start="100" end="103" type="u0.4"/> + <field name="Sample4 Y Offset" start="96" end="99" type="u0.4"/> + <field name="Sample11 X Offset" start="156" end="159" type="u0.4"/> + <field name="Sample11 Y Offset" start="152" end="155" type="u0.4"/> + <field name="Sample10 X Offset" start="148" end="151" type="u0.4"/> + <field name="Sample10 Y Offset" start="144" end="147" type="u0.4"/> + <field name="Sample9 X Offset" start="140" end="143" type="u0.4"/> + <field name="Sample9 Y Offset" start="136" end="139" type="u0.4"/> + <field name="Sample8 X Offset" start="132" end="135" type="u0.4"/> + <field name="Sample8 Y Offset" start="128" end="131" type="u0.4"/> + <field name="Sample15 X Offset" start="188" end="191" type="u0.4"/> + <field name="Sample15 Y Offset" start="184" end="187" type="u0.4"/> + <field name="Sample14 X Offset" start="180" end="183" type="u0.4"/> + <field name="Sample14 Y Offset" start="176" end="179" type="u0.4"/> + <field name="Sample13 X Offset" start="172" end="175" type="u0.4"/> + <field name="Sample13 Y Offset" start="168" end="171" type="u0.4"/> + <field name="Sample12 X Offset" start="164" end="167" type="u0.4"/> + <field name="Sample12 Y Offset" start="160" end="163" type="u0.4"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_PALETTE_LOAD0" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="7" type="uint"/> + <group count="0" start="32" size="32"> + <field name="Entry" start="0" end="31" type="PALETTE_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_SAMPLER_PALETTE_LOAD1" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="12"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <group count="0" start="32" size="32"> + <field name="Palette Alpha[0:N-1]" start="24" end="31" type="uint"/> + <field name="Palette Red[0:N-1]" start="16" end="23" type="uint"/> + <field name="Palette Green[0:N-1]" start="8" end="15" type="uint"/> + <field name="Palette Blue[0:N-1]" start="0" end="7" type="uint"/> + </group> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="45"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to DS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="46"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to GS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="44"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to HS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_PS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="47"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to PS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="43"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to VS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLE_MASK" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="24"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Sample Mask" start="32" end="39" type="uint"/> + </instruction> + + <instruction name="3DSTATE_SBE" bias="2" length="14"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="31"/> + <field name="DWord Length" start="0" end="7" type="uint" default="12"/> + <field name="Attribute Swizzle Control Mode" start="60" end="60" type="uint"/> + <field name="Number of SF Output Attributes" start="54" end="59" type="uint"/> + <field name="Attribute Swizzle Enable" start="53" end="53" type="bool"/> + <field name="Point Sprite Texture Coordinate Origin" start="52" end="52" type="uint"> + <value name="UPPERLEFT" value="0"/> + <value name="LOWERLEFT" value="1"/> + </field> + <field name="Vertex URB Entry Read Length" start="43" end="47" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="36" end="41" type="uint"/> + <group count="8" start="64" size="32"> + <field name="Attribute [2n+1] Component Override W" start="31" end="31" type="bool"/> + <field name="Attribute [2n+1] Component Override Z" start="30" end="30" type="bool"/> + <field name="Attribute [2n+1] Component Override Y" start="29" end="29" type="bool"/> + <field name="Attribute [2n+1] Component Override X" start="28" end="28" type="bool"/> + <field name="Attribute [2n+1] Constant Source" start="25" end="26" type="uint"> + <value name="CONST_0000" value="0"/> + <value name="CONST_0001_FLOAT" value="1"/> + <value name="CONST_1111_FLOAT" value="2"/> + <value name="PRIM_ID" value="3"/> + </field> + <field name="Attribute [2n+1] Swizzle Select" start="22" end="23" type="uint"> + <value name="INPUTATTR" value="0"/> + <value name="INPUTATTR_FACING" value="1"/> + <value name="INPUTATTR_W" value="2"/> + <value name="INPUTATTR_FACING_W" value="3"/> + </field> + <field name="Attribute [2n+1] Source Attribute" start="16" end="20" type="uint"/> + <field name="Attribute [2n] Component Override W" start="15" end="15" type="bool"/> + <field name="Attribute [2n] Component Override Z" start="14" end="14" type="bool"/> + <field name="Attribute [2n] Component Override Y" start="13" end="13" type="bool"/> + <field name="Attribute [2n] Component Override X" start="12" end="12" type="bool"/> + <field name="Attribute [2n] Constant Source" start="9" end="10" type="uint"> + <value name="CONST_0000" value="0"/> + <value name="CONST_0001_FLOAT" value="1"/> + <value name="CONST_1111_FLOAT" value="2"/> + <value name="PRIM_ID" value="3"/> + </field> + <field name="Attribute [2n] Swizzle Select" start="6" end="7" type="uint"> + <value name="INPUTATTR" value="0"/> + <value name="INPUTATTR_FACING" value="1"/> + <value name="INPUTATTR_W" value="2"/> + <value name="INPUTATTR_FACING_W" value="3"/> + </field> + <field name="Attribute [2n] Source Attribute" start="0" end="4" type="uint"/> + </group> + <field name="Point Sprite Texture Coordinate Enable" start="320" end="351" type="uint"/> + <field name="Constant Interpolation Enable[31:0]" start="352" end="383" type="uint"/> + <field name="Attribute 7 WrapShortest Enables" start="412" end="415" type="uint"/> + <field name="Attribute 6 WrapShortest Enables" start="408" end="411" type="uint"/> + <field name="Attribute 5 WrapShortest Enables" start="404" end="407" type="uint"/> + <field name="Attribute 4 WrapShortest Enables" start="400" end="403" type="uint"/> + <field name="Attribute 3 WrapShortest Enables" start="396" end="399" type="uint"/> + <field name="Attribute 2 WrapShortest Enables" start="392" end="395" type="uint"/> + <field name="Attribute 1 WrapShortest Enables" start="388" end="391" type="uint"/> + <field name="Attribute 0 WrapShortest Enables" start="384" end="387" type="uint"/> + <field name="Attribute 15 WrapShortest Enables" start="444" end="447" type="uint"/> + <field name="Attribute 14 WrapShortest Enables" start="440" end="443" type="uint"/> + <field name="Attribute 13 WrapShortest Enables" start="436" end="439" type="uint"/> + <field name="Attribute 12 WrapShortest Enables" start="432" end="435" type="uint"/> + <field name="Attribute 11 WrapShortest Enables" start="428" end="431" type="uint"/> + <field name="Attribute 10 WrapShortest Enables" start="424" end="427" type="uint"/> + <field name="Attribute 9 WrapShortest Enables" start="420" end="423" type="uint"/> + <field name="Attribute 8 WrapShortest Enables" start="416" end="419" type="uint"/> + </instruction> + + <instruction name="3DSTATE_SCISSOR_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="15"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Scissor Rect Pointer" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SF" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="19"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="Depth Buffer Surface Format" start="44" end="46" type="uint"> + <value name="D32_FLOAT_S8X24_UINT" value="0"/> + <value name="D32_FLOAT" value="1"/> + <value name="D24_UNORM_S8_UINT" value="2"/> + <value name="D24_UNORM_X8_UINT" value="3"/> + <value name="D16_UNORM" value="5"/> + </field> + <field name="Legacy Global Depth Bias Enable" start="43" end="43" type="bool"/> + <field name="Statistics Enable" start="42" end="42" type="bool"/> + <field name="Global Depth Offset Enable Solid" start="41" end="41" type="bool"/> + <field name="Global Depth Offset Enable Wireframe" start="40" end="40" type="bool"/> + <field name="Global Depth Offset Enable Point" start="39" end="39" type="bool"/> + <field name="FrontFace Fill Mode" start="37" end="38" type="uint" prefix="FILL_MODE"> + <value name="SOLID" value="0"/> + <value name="WIREFRAME" value="1"/> + <value name="POINT" value="2"/> + </field> + <field name="BackFace Fill Mode" start="35" end="36" type="uint" prefix="FILL_MODE"> + <value name="SOLID" value="0"/> + <value name="WIREFRAME" value="1"/> + <value name="POINT" value="2"/> + </field> + <field name="View Transform Enable" start="33" end="33" type="bool"/> + <field name="Front Winding" start="32" end="32" type="uint"/> + <field name="Anti-Aliasing Enable" start="95" end="95" type="bool"/> + <field name="Cull Mode" start="93" end="94" type="uint" prefix="CULLMODE"> + <value name="BOTH" value="0"/> + <value name="NONE" value="1"/> + <value name="FRONT" value="2"/> + <value name="BACK" value="3"/> + </field> + <field name="Line Width" start="82" end="91" type="u3.7"/> + <field name="Line End Cap Antialiasing Region Width" start="80" end="81" type="uint"/> + <field name="Line Stipple Enable" start="78" end="78" type="bool"/> + <field name="Scissor Rectangle Enable" start="75" end="75" type="bool"/> + <field name="RT Independent Rasterization Enable" start="74" end="74" type="bool"/> + <field name="Multisample Rasterization Mode" start="72" end="73" type="uint"/> + <field name="Last Pixel Enable" start="127" end="127" type="bool"/> + <field name="Triangle Strip/List Provoking Vertex Select" start="125" end="126" type="uint"> + <value name="Vertex 0" value="0"/> + <value name="Vertex 1" value="1"/> + <value name="Vertex 2" value="2"/> + </field> + <field name="Line Strip/List Provoking Vertex Select" start="123" end="124" type="uint"/> + <field name="Triangle Fan Provoking Vertex Select" start="121" end="122" type="uint"> + <value name="Vertex 0" value="0"/> + <value name="Vertex 1" value="1"/> + <value name="Vertex 2" value="2"/> + </field> + <field name="AA Line Distance Mode" start="110" end="110" type="uint"> + <value name="AALINEDISTANCE_TRUE" value="1"/> + </field> + <field name="Vertex Sub Pixel Precision Select" start="108" end="108" type="uint"/> + <field name="Use Point Width State" start="107" end="107" type="uint"/> + <field name="Point Width" start="96" end="106" type="u8.3"/> + <field name="Global Depth Offset Constant" start="128" end="159" type="float"/> + <field name="Global Depth Offset Scale" start="160" end="191" type="float"/> + <field name="Global Depth Offset Clamp" start="192" end="223" type="float"/> + </instruction> + + <instruction name="3DSTATE_SO_BUFFER" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="24"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="SO Buffer Index" start="61" end="62" type="uint"/> + <field name="SO Buffer Object Control State" start="57" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface Pitch" start="32" end="43" type="uint"/> + <field name="Surface Base Address" start="66" end="95" type="address"/> + <field name="Surface End Address" start="98" end="127" type="address"/> + </instruction> + + <instruction name="3DSTATE_SO_DECL_LIST" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="23"/> + <field name="DWord Length" start="0" end="8" type="uint"/> + <field name="Stream to Buffer Selects [3]" start="44" end="47" type="uint"/> + <field name="Stream to Buffer Selects [2]" start="40" end="43" type="uint"/> + <field name="Stream to Buffer Selects [1]" start="36" end="39" type="uint"/> + <field name="Stream to Buffer Selects [0]" start="32" end="35" type="uint"/> + <field name="Num Entries [3]" start="88" end="95" type="uint"/> + <field name="Num Entries [2]" start="80" end="87" type="uint"/> + <field name="Num Entries [1]" start="72" end="79" type="uint"/> + <field name="Num Entries [0]" start="64" end="71" type="uint"/> + <group count="0" start="96" size="64"> + <field name="Entry" start="0" end="63" type="SO_DECL_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_STENCIL_BUFFER" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="6"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Stencil Buffer Enable" start="63" end="63" type="uint"/> + <field name="Stencil Buffer Object Control State" start="57" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface Pitch" start="32" end="48" type="uint"/> + <field name="Surface Base Address" start="64" end="95" type="address"/> + </instruction> + + <instruction name="3DSTATE_STREAMOUT" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="30"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="SO Function Enable" start="63" end="63" type="uint"/> + <field name="Rendering Disable" start="62" end="62" type="uint"/> + <field name="Render Stream Select" start="59" end="60" type="uint"/> + <field name="Reorder Mode" start="58" end="58" type="uint"> + <value name="LEADING" value="0"/> + <value name="TRAILING" value="1"/> + </field> + <field name="SO Statistics Enable" start="57" end="57" type="bool"/> + <field name="SO Buffer Enable [3]" start="43" end="43" type="uint"/> + <field name="SO Buffer Enable [2]" start="42" end="42" type="uint"/> + <field name="SO Buffer Enable [1]" start="41" end="41" type="uint"/> + <field name="SO Buffer Enable [0]" start="40" end="40" type="uint"/> + <field name="Stream 3 Vertex Read Offset" start="93" end="93" type="uint"/> + <field name="Stream 3 Vertex Read Length" start="88" end="92" type="uint"/> + <field name="Stream 2 Vertex Read Offset" start="85" end="85" type="uint"/> + <field name="Stream 2 Vertex Read Length" start="80" end="84" type="uint"/> + <field name="Stream 1 Vertex Read Offset" start="77" end="77" type="uint"/> + <field name="Stream 1 Vertex Read Length" start="72" end="76" type="uint"/> + <field name="Stream 0 Vertex Read Offset" start="69" end="69" type="uint"/> + <field name="Stream 0 Vertex Read Length" start="64" end="68" type="uint"/> + </instruction> + + <instruction name="3DSTATE_TE" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="28"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Partitioning" start="44" end="45" type="uint"> + <value name="INTEGER" value="0"/> + <value name="ODD_FRACTIONAL" value="1"/> + <value name="EVEN_FRACTIONAL" value="2"/> + </field> + <field name="Output Topology" start="40" end="41" type="uint" prefix="OUTPUT"> + <value name="POINT" value="0"/> + <value name="LINE" value="1"/> + <value name="TRI_CW" value="2"/> + <value name="TRI_CCW" value="3"/> + </field> + <field name="TE Domain" start="36" end="37" type="uint"> + <value name="QUAD" value="0"/> + <value name="TRI" value="1"/> + <value name="ISOLINE" value="2"/> + </field> + <field name="TE Mode" start="33" end="34" type="uint"> + <value name="HW_TESS" value="0"/> + <value name="SW_TESS" value="1"/> + </field> + <field name="TE Enable" start="32" end="32" type="bool"/> + <field name="Maximum Tessellation Factor Odd" start="64" end="95" type="float"/> + <field name="Maximum Tessellation Factor Not Odd" start="96" end="127" type="float"/> + </instruction> + + <instruction name="3DSTATE_URB_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="50"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="DS URB Starting Address" start="57" end="62" type="uint"/> + <field name="DS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="DS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_URB_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="51"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="GS URB Starting Address" start="57" end="62" type="uint"/> + <field name="GS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="GS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_URB_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="49"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="HS URB Starting Address" start="57" end="62" type="uint"/> + <field name="HS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="HS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_URB_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="48"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="VS URB Starting Address" start="57" end="62" type="uint"/> + <field name="VS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="VS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VERTEX_BUFFERS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="8"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <group count="0" start="32" size="128"> + <field name="Vertex Buffer State" start="0" end="127" type="VERTEX_BUFFER_STATE"/> + </group> + </instruction> + + <instruction name="3DSTATE_VERTEX_ELEMENTS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="9"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <group count="0" start="32" size="64"> + <field name="Element" start="0" end="63" type="VERTEX_ELEMENT_STATE"/> + </group> + </instruction> + + <instruction name="3DSTATE_VF" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="12"/> + <field name="Indexed Draw Cut Index Enable" start="8" end="8" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Cut Index" start="32" end="63" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VF_STATISTICS" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="1"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="11"/> + <field name="Statistics Enable" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="3DSTATE_VIEWPORT_STATE_POINTERS_CC" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="35"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="CC Viewport Pointer" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="33"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="SF Clip Viewport Pointer" start="38" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_VS" bias="2" length="6"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="16"/> + <field name="DWord Length" start="0" end="7" type="uint" default="4"/> + <field name="Kernel Start Pointer" start="38" end="63" type="offset"/> + <field name="Single Vertex Dispatch" start="95" end="95" type="bool"/> + <field name="Vector Mask Enable (VME)" start="94" end="94" type="uint"/> + <field name="Sampler Count" start="91" end="93" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="82" end="89" type="uint"/> + <field name="Thread Priority" start="81" end="81" type="uint"> + <value name="Normal Priority" value="0"/> + <value name="High Priority" value="1"/> + </field> + <field name="Floating Point Mode" start="80" end="80" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="77" end="77" type="bool"/> + <field name="VS accesses UAV" start="76" end="76" type="bool"/> + <field name="Software Exception Enable" start="71" end="71" type="bool"/> + <field name="Scratch Space Base Offset" start="106" end="127" type="offset"/> + <field name="Per-Thread Scratch Space" start="96" end="99" type="uint"/> + <field name="Dispatch GRF Start Register for URB Data" start="148" end="152" type="uint"/> + <field name="Vertex URB Entry Read Length" start="139" end="144" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="132" end="137" type="uint"/> + <field name="Maximum Number of Threads" start="183" end="191" type="uint"/> + <field name="Statistics Enable" start="170" end="170" type="bool"/> + <field name="Vertex Cache Disable" start="161" end="161" type="bool"/> + <field name="VS Function Enable" start="160" end="160" type="bool"/> + </instruction> + + <instruction name="3DSTATE_WM" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="20"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Statistics Enable" start="63" end="63" type="bool"/> + <field name="Depth Buffer Clear" start="62" end="62" type="bool"/> + <field name="Thread Dispatch Enable" start="61" end="61" type="bool"/> + <field name="Depth Buffer Resolve Enable" start="60" end="60" type="bool"/> + <field name="Hierarchical Depth Buffer Resolve Enable" start="59" end="59" type="bool"/> + <field name="Legacy Diamond Line Rasterization" start="58" end="58" type="bool"/> + <field name="Pixel Shader Kill Pixel" start="57" end="57" type="bool"/> + <field name="Pixel Shader Computed Depth Mode" start="55" end="56" type="uint"> + <value name="PSCDEPTH_OFF" value="0"/> + <value name="PSCDEPTH_ON" value="1"/> + <value name="PSCDEPTH_ON_GE" value="2"/> + <value name="PSCDEPTH_ON_LE" value="3"/> + </field> + <field name="Early Depth/Stencil Control" start="53" end="54" type="uint"> + <value name="EDSC_NORMAL" value="0"/> + <value name="EDSC_PSEXEC" value="1"/> + <value name="EDSC_PREPS" value="2"/> + </field> + <field name="Pixel Shader Uses Source Depth" start="52" end="52" type="bool"/> + <field name="Pixel Shader Uses Source W" start="51" end="51" type="bool"/> + <field name="Position ZW Interpolation Mode" start="49" end="50" type="uint"> + <value name="INTERP_PIXEL" value="0"/> + <value name="INTERP_CENTROID" value="2"/> + <value name="INTERP_SAMPLE" value="3"/> + </field> + <field name="Barycentric Interpolation Mode" start="43" end="48" type="uint"/> + <field name="Pixel Shader Uses Input Coverage Mask" start="42" end="42" type="bool"/> + <field name="Line End Cap Antialiasing Region Width" start="40" end="41" type="uint"/> + <field name="Line Antialiasing Region Width" start="38" end="39" type="uint"/> + <field name="RT Independent Rasterization Enable" start="37" end="37" type="bool"/> + <field name="Polygon Stipple Enable" start="36" end="36" type="bool"/> + <field name="Line Stipple Enable" start="35" end="35" type="bool"/> + <field name="Point Rasterization Rule" start="34" end="34" type="uint"> + <value name="RASTRULE_UPPER_LEFT" value="0"/> + <value name="RASTRULE_UPPER_RIGHT" value="1"/> + </field> + <field name="Multisample Rasterization Mode" start="32" end="33" type="uint"> + <value name="MSRASTMODE_OFF_PIXEL" value="0"/> + <value name="MSRASTMODE_OFF_PATTERN" value="1"/> + <value name="MSRASTMODE_ON_PIXEL" value="2"/> + <value name="MSRASTMODE_ON_PATTERN" value="3"/> + </field> + <field name="Multisample Dispatch Mode" start="95" end="95" type="uint"> + <value name="MSDISPMODE_PERSAMPLE" value="0"/> + <value name="MSDISPMODE_PERPIXEL" value="1"/> + </field> + <field name="PS UAV-only" start="94" end="94" type="uint"> + <value name="OFF" value="0"/> + <value name="ON" value="1"/> + </field> + </instruction> + + <instruction name="GPGPU_CSR_BASE_ADDRESS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="GPGPU CSR Base Address" start="44" end="63" type="address"/> + </instruction> + + <instruction name="GPGPU_OBJECT" bias="2" length="8"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="4"/> + <field name="Predicate Enable" start="8" end="8" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="6"/> + <field name="Shared Local Memory Fixed Offset" start="39" end="39" type="uint"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="Shared Local Memory Offset" start="92" end="95" type="uint"/> + <field name="End of Thread Group" start="88" end="88" type="uint"/> + <field name="Slice Destination Select" start="83" end="83" type="uint"> + <value name="Slice 0" value="0"/> + <value name="Slice 1" value="1"/> + </field> + <field name="Half-Slice Destination Select" start="81" end="82" type="uint"> + <value name="Half-Slice 1" value="2"/> + <value name="Half-Slice 0" value="1"/> + <value name="Either Half-Slice" value="0"/> + </field> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="96" end="127" type="offset"/> + <field name="Thread Group ID X" start="128" end="159" type="uint"/> + <field name="Thread Group ID Y" start="160" end="191" type="uint"/> + <field name="Thread Group ID Z" start="192" end="223" type="uint"/> + <field name="Execution Mask" start="224" end="255" type="uint"/> + </instruction> + + <instruction name="GPGPU_WALKER" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode A" start="16" end="23" type="uint" default="5"/> + <field name="Indirect Parameter Enable" start="10" end="10" type="bool"/> + <field name="Predicate Enable" start="8" end="8" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="SIMD Size" start="94" end="95" type="uint"> + <value name="SIMD8" value="0"/> + <value name="SIMD16" value="1"/> + <value name="SIMD32" value="2"/> + </field> + <field name="Thread Depth Counter Maximum" start="80" end="85" type="uint"/> + <field name="Thread Height Counter Maximum" start="72" end="77" type="uint"/> + <field name="Thread Width Counter Maximum" start="64" end="69" type="uint"/> + <field name="Thread Group ID Starting X" start="96" end="127" type="uint"/> + <field name="Thread Group ID X Dimension" start="128" end="159" type="uint"/> + <field name="Thread Group ID Starting Y" start="160" end="191" type="uint"/> + <field name="Thread Group ID Y Dimension" start="192" end="223" type="uint"/> + <field name="Thread Group ID Starting Z" start="224" end="255" type="uint"/> + <field name="Thread Group ID Z Dimension" start="256" end="287" type="uint"/> + <field name="Right Execution Mask" start="288" end="319" type="uint"/> + <field name="Bottom Execution Mask" start="320" end="351" type="uint"/> + </instruction> + + <instruction name="MEDIA_CURBE_LOAD" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="1"/> + <field name="DWord Length" start="0" end="15" type="uint" default="2"/> + <field name="CURBE Total Data Length" start="64" end="80" type="uint"/> + <field name="CURBE Data Start Address" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="MEDIA_INTERFACE_DESCRIPTOR_LOAD" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="15" type="uint" default="2"/> + <field name="Interface Descriptor Total Length" start="64" end="80" type="uint"/> + <field name="Interface Descriptor Data Start Address" start="96" end="127" type="offset"/> + </instruction> + + <instruction name="MEDIA_OBJECT" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Media Command Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="Media Command Sub-Opcode" start="16" end="23" type="uint" default="0"/> + <field name="DWord Length" start="0" end="15" type="uint" default="4"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="Children Present" start="95" end="95" type="bool"/> + <field name="Thread Synchronization" start="88" end="88" type="uint"> + <value name="No thread synchronization" value="0"/> + <value name="Thread dispatch is synchronized by the 'spawn root thread' message" value="1"/> + </field> + <field name="Use Scoreboard" start="85" end="85" type="uint"> + <value name="Not using scoreboard" value="0"/> + <value name="Using scoreboard" value="1"/> + </field> + <field name="Slice Destination Select" start="83" end="83" type="uint"> + <value name="Slice 0" value="0"/> + <value name="Slice 1" value="1"/> + <value name="Either Slice" value="0"/> + </field> + <field name="Half-Slice Destination Select" start="81" end="82" type="uint"> + <value name="Half-Slice 1" value="2"/> + <value name="Half-Slice 0" value="1"/> + <value name="Either half-slice" value="0"/> + </field> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="96" end="127" type="address"/> + <field name="Scoredboard Y" start="144" end="152" type="uint"/> + <field name="Scoreboard X" start="128" end="136" type="uint"/> + <field name="Scoreboard Color" start="176" end="179" type="uint"/> + <field name="Scoreboard Mask" start="160" end="167" type="uint"/> + <group count="0" start="192" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_OBJECT_PRT" bias="2" length="16"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="15" type="uint" default="14"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="Children Present" start="95" end="95" type="bool"/> + <field name="PRT_Fence Needed" start="87" end="87" type="bool"/> + <field name="PRT_FenceType" start="86" end="86" type="uint"> + <value name="Root thread queue" value="0"/> + <value name="VFE state flush" value="1"/> + </field> + <group count="12" start="128" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_OBJECT_WALKER" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="3"/> + <field name="DWord Length" start="0" end="15" type="uint" default="15"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="Children Present" start="95" end="95" type="uint"/> + <field name="Thread Synchronization" start="88" end="88" type="uint"> + <value name="No thread synchronization" value="0"/> + <value name="Thread dispatch is synchronized by the 'spawn root thread' message" value="1"/> + </field> + <field name="Use Scoreboard" start="85" end="85" type="uint"> + <value name="Not using scoreboard" value="0"/> + <value name="Using scoreboard" value="1"/> + </field> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="96" end="127" type="offset"/> + <field name="Scoreboard Mask" start="160" end="167" type="uint"/> + <field name="Dual Mode" start="223" end="223" type="uint"/> + <field name="Repel" start="222" end="222" type="uint"/> + <field name="Quad Mode" start="221" end="221" type="uint"/> + <field name="Color Count Minus One" start="216" end="219" type="uint"/> + <field name="Middle Loop Extra Steps" start="208" end="212" type="uint"/> + <field name="Local Mid-Loop Unit Y" start="204" end="205" type="int"/> + <field name="Mid-Loop Unit X" start="200" end="201" type="int"/> + <field name="Global Loop Exec Count" start="240" end="249" type="uint"/> + <field name="Local Loop Exec Count" start="224" end="233" type="uint"/> + <field name="Block Resolution Y" start="272" end="280" type="uint"/> + <field name="Block Resolution X" start="256" end="264" type="uint"/> + <field name="Local Start Y" start="304" end="312" type="uint"/> + <field name="Local Start X" start="288" end="296" type="uint"/> + <field name="Local Outer Loop Stride Y" start="368" end="377" type="int"/> + <field name="Local Outer Loop Stride X" start="352" end="361" type="int"/> + <field name="Local Inner Loop Unit Y" start="400" end="409" type="int"/> + <field name="Local Inner Loop Unit X" start="384" end="393" type="int"/> + <field name="Global Resolution Y" start="432" end="440" type="uint"/> + <field name="Global Resolution X" start="416" end="424" type="uint"/> + <field name="Global Start Y" start="464" end="473" type="int"/> + <field name="Global Start X" start="448" end="457" type="int"/> + <field name="Global Outer Loop Stride Y" start="496" end="505" type="int"/> + <field name="Global Outer Loop Stride X" start="480" end="489" type="int"/> + <field name="Global Inner Loop Unit Y" start="528" end="537" type="int"/> + <field name="Global Inner Loop Unit X" start="512" end="521" type="int"/> + <group count="0" start="544" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_STATE_FLUSH" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="15" type="uint" default="0"/> + <field name="Disable Preemption" start="40" end="40" type="bool"/> + <field name="Flush to GO" start="39" end="39" type="bool"/> + <field name="Watermark Required" start="38" end="38" type="uint"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="MEDIA_VFE_STATE" bias="2" length="8"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="0"/> + <field name="DWord Length" start="0" end="15" type="uint" default="6"/> + <field name="Scratch Space Base Pointer" start="42" end="63" type="offset"/> + <field name="Stack Size" start="36" end="39" type="uint"/> + <field name="Per Thread Scratch Space" start="32" end="35" type="uint"/> + <field name="Maximum Number of Threads" start="80" end="95" type="uint"/> + <field name="Number of URB Entries" start="72" end="79" type="uint"/> + <field name="Reset Gateway Timer" start="71" end="71" type="uint"> + <value name="Maintaining the existing timestamp state" value="0"/> + <value name="Resetting relative timer and latching the global timestamp" value="1"/> + </field> + <field name="Bypass Gateway Control" start="70" end="70" type="uint"> + <value name="Maintaining OpenGateway/ForwardMsg/CloseGateway protocol (legacy mode)" value="0"/> + <value name="Bypassing OpenGateway/CloseGateway protocol" value="1"/> + </field> + <field name="GPGPU Mode" start="66" end="66" type="uint"/> + <field name="Half-Slice Disable" start="96" end="97" type="uint"/> + <field name="URB Entry Allocation Size" start="144" end="159" type="uint"/> + <field name="CURBE Allocation Size" start="128" end="143" type="uint"/> + <field name="Scoreboard Enable" start="191" end="191" type="uint"> + <value name="Scoreboard disabled" value="0"/> + <value name="Scoreboard enabled" value="1"/> + </field> + <field name="Scoreboard Type" start="190" end="190" type="uint"> + <value name="Stalling Scoreboard" value="0"/> + <value name="Non-Stalling Scoreboard" value="1"/> + </field> + <field name="Scoreboard Mask" start="160" end="167" type="uint"/> + <field name="Scoreboard 3 Delta Y" start="220" end="223" type="int"/> + <field name="Scoreboard 3 Delta X" start="216" end="219" type="int"/> + <field name="Scoreboard 2 Delta Y" start="212" end="215" type="int"/> + <field name="Scoreboard 2 Delta X" start="208" end="211" type="int"/> + <field name="Scoreboard 1 Delta Y" start="204" end="207" type="int"/> + <field name="Scoreboard 1 Delta X" start="200" end="203" type="int"/> + <field name="Scoreboard 0 Delta Y" start="196" end="199" type="int"/> + <field name="Scoreboard 0 Delta X" start="192" end="195" type="int"/> + <field name="Scoreboard 7 Delta Y" start="252" end="255" type="int"/> + <field name="Scoreboard 7 Delta X" start="248" end="251" type="int"/> + <field name="Scoreboard 6 Delta Y" start="244" end="247" type="int"/> + <field name="Scoreboard 6 Delta X" start="240" end="243" type="int"/> + <field name="Scoreboard 5 Delta Y" start="236" end="239" type="int"/> + <field name="Scoreboard 5 Delta X" start="232" end="235" type="int"/> + <field name="Scoreboard 4 Delta Y" start="228" end="231" type="int"/> + <field name="Scoreboard 4 Delta X" start="224" end="227" type="int"/> + </instruction> + + <instruction name="MI_ARB_CHECK" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="5"/> + </instruction> + + <instruction name="MI_ARB_ON_OFF" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="8"/> + <field name="Arbitration Enable" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="MI_BATCH_BUFFER_END" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="10"/> + </instruction> + + <instruction name="MI_BATCH_BUFFER_START" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="49"/> + <field name="2nd Level Batch Buffer" start="22" end="22" type="uint"> + <value name="1st level batch" value="0"/> + <value name="2nd level batch" value="1"/> + </field> + <field name="Add Offset Enable" start="16" end="16" type="bool"/> + <field name="Predication Enable" start="15" end="15" type="bool"/> + <field name="Non-Privileged" start="13" end="13" type="bool"/> + <field name="Clear Command Buffer Enable" start="11" end="11" type="bool"/> + <field name="Resource Streamer Enable" start="10" end="10" type="bool"/> + <field name="Address Space Indicator" start="8" end="8" type="uint" prefix="ASI"> + <value name="GGTT" value="0"/> + <value name="PPGTT" value="1"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Batch Buffer Start Address" start="34" end="63" type="address"/> + </instruction> + + <instruction name="MI_CLFLUSH" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="39"/> + <field name="Use Global GTT" start="22" end="22" type="uint"> + <value name="Per Process Graphics Address" value="0"/> + <value name="Global Graphics Address" value="1"/> + </field> + <field name="DWord Length" start="0" end="9" type="uint" default="1"/> + <field name="Page Base Address" start="44" end="63" type="address"/> + <field name="Starting Cacheline Offset" start="38" end="43" type="uint"/> + <field name="Page Base Address High" start="64" end="79" type="address"/> + <group count="0" start="96" size="32"> + <field name="DW Representing a Half Cache Line" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MI_CONDITIONAL_BATCH_BUFFER_END" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="54"/> + <field name="Use Global GTT" start="22" end="22" type="uint" default="0"/> + <field name="Compare Semaphore" start="21" end="21" type="uint" default="0"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Compare Data Dword" start="32" end="63" type="uint"/> + <field name="Compare Address" start="67" end="95" type="address"/> + </instruction> + + <instruction name="MI_FLUSH" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="4"/> + <field name="Indirect State Pointers Disable" start="5" end="5" type="bool"/> + <field name="Generic Media State Clear" start="4" end="4" type="bool"/> + <field name="Global Snapshot Count Reset" start="3" end="3" type="uint"> + <value name="Don't Reset" value="0"/> + <value name="Reset" value="1"/> + </field> + <field name="Render Cache Flush Inhibit" start="2" end="2" type="uint"> + <value name="Flush" value="0"/> + <value name="Don't Flush" value="1"/> + </field> + <field name="State/Instruction Cache Invalidate" start="1" end="1" type="uint"> + <value name="Don't Invalidate" value="0"/> + <value name="Invalidate" value="1"/> + </field> + </instruction> + + <instruction name="MI_LOAD_REGISTER_IMM" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="34"/> + <field name="Byte Write Disables" start="8" end="11" type="uint"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Register Offset" start="34" end="54" type="offset"/> + <field name="Data DWord" start="64" end="95" type="uint"/> + </instruction> + + <instruction name="MI_LOAD_REGISTER_MEM" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="41"/> + <field name="Use Global GTT" start="22" end="22" type="uint"/> + <field name="Async Mode Enable" start="21" end="21" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Register Address" start="34" end="54" type="offset"/> + <field name="Memory Address" start="66" end="95" type="address"/> + </instruction> + + <instruction name="MI_LOAD_REGISTER_REG" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="42"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Source Register Address" start="34" end="54" type="offset"/> + <field name="Destination Register Address" start="66" end="86" type="offset"/> + </instruction> + + <instruction name="MI_LOAD_SCAN_LINES_EXCL" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="19"/> + <field name="Display (Plane) Select" start="19" end="21" type="uint"> + <value name="Display Plane A" value="0"/> + <value name="Display Plane B" value="1"/> + <value name="Display Plane C" value="4"/> + </field> + <field name="DWord Length" start="0" end="5" type="uint" default="0"/> + <field name="Start Scan Line Number" start="48" end="60" type="uint"/> + <field name="End Scan Line Number" start="32" end="44" type="uint"/> + </instruction> + + <instruction name="MI_LOAD_SCAN_LINES_INCL" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="18"/> + <field name="Display (Plane) Select" start="19" end="21" type="uint"> + <value name="Display Plane A" value="0"/> + <value name="Display Plane B" value="1"/> + <value name="Display Plane C" value="4"/> + </field> + <field name="DWord Length" start="0" end="5" type="uint" default="0"/> + <field name="Start Scan Line Number" start="48" end="60" type="uint"/> + <field name="End Scan Line Number" start="32" end="44" type="uint"/> + </instruction> + + <instruction name="MI_LOAD_URB_MEM" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="44"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="URB Address" start="34" end="46" type="uint"/> + <field name="Memory Address" start="70" end="95" type="address"/> + </instruction> + + <instruction name="MI_MATH" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="26"/> + <field name="DWord Length" start="0" end="5" type="uint" default="0"/> + <field name="ALU INSTRUCTION 1" start="32" end="63" type="uint"/> + <field name="ALU INSTRUCTION 2" start="64" end="95" type="uint"/> + <group count="0" start="96" size="32"> + <field name="ALU INSTRUCTION n" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MI_NOOP" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="0"/> + <field name="Identification Number Register Write Enable" start="22" end="22" type="bool"/> + <field name="Identification Number" start="0" end="21" type="uint"/> + </instruction> + + <instruction name="MI_PREDICATE" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="12"/> + <field name="Load Operation" start="6" end="7" type="uint" prefix="LOAD"> + <value name="KEEP" value="0"/> + <value name="LOAD" value="2"/> + <value name="LOADINV" value="3"/> + </field> + <field name="Combine Operation" start="3" end="4" type="uint" prefix="COMBINE"> + <value name="SET" value="0"/> + <value name="AND" value="1"/> + <value name="OR" value="2"/> + <value name="XOR" value="3"/> + </field> + <field name="Compare Operation" start="0" end="1" type="uint" prefix="COMPARE"> + <value name="SRCS_EQUAL" value="2"/> + <value name="DELTAS_EQUAL" value="3"/> + </field> + </instruction> + + <instruction name="MI_REPORT_HEAD" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="7"/> + </instruction> + + <instruction name="MI_REPORT_PERF_COUNT" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="40"/> + <field name="DWord Length" start="0" end="5" type="uint" default="1"/> + <field name="Memory Address" start="38" end="63" type="address"/> + <field name="Core Mode Enable" start="36" end="36" type="uint"/> + <field name="Use Global GTT" start="32" end="32" type="uint"/> + <field name="Report ID" start="64" end="95" type="uint"/> + </instruction> + + <instruction name="MI_RS_CONTEXT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="15"/> + <field name="Resource Streamer Save" start="0" end="0" type="uint" prefix="RS"> + <value name="Restore" value="0"/> + <value name="Save" value="1"/> + </field> + </instruction> + + <instruction name="MI_RS_CONTROL" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="6"/> + <field name="Resource Streamer Control" start="0" end="0" type="uint" prefix="RS"> + <value name="Stop" value="0"/> + <value name="Start" value="1"/> + </field> + </instruction> + + <instruction name="MI_RS_STORE_DATA_IMM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="43"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Destination Address" start="66" end="95" type="address"/> + <field name="Core Mode Enable" start="64" end="64" type="uint"/> + <field name="Data DWord 0" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="MI_SEMAPHORE_MBOX" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="22"/> + <field name="Register Select" start="16" end="17" type="uint"> + <value name="RVSYNC" value="0"/> + <value name="RVESYNC" value="1"/> + <value name="RBSYNC" value="2"/> + <value name="Use General Register Select" value="3"/> + </field> + <field name="General Register Select" start="8" end="13" type="uint"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Semaphore Data Dword" start="32" end="63" type="uint"/> + </instruction> + + <instruction name="MI_SET_CONTEXT" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="24"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Logical Context Address" start="44" end="63" type="address"/> + <field name="Reserved, Must be 1" start="40" end="40" type="uint"/> + <field name="Core Mode Enable" start="36" end="36" type="bool"/> + <field name="Resource Streamer State Save Enable" start="35" end="35" type="bool"/> + <field name="Resource Streamer State Restore Enable" start="34" end="34" type="bool"/> + <field name="Force Restore" start="33" end="33" type="uint"/> + <field name="Restore Inhibit" start="32" end="32" type="uint"/> + </instruction> + + <instruction name="MI_SET_PREDICATE" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="1"/> + <field name="PREDICATE ENABLE" start="0" end="1" type="bool" default="6"/> + </instruction> + + <instruction name="MI_STORE_DATA_IMM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="32"/> + <field name="Use Global GTT" start="22" end="22" type="uint"/> + <field name="DWord Length" start="0" end="5" type="uint" default="2"/> + <field name="Address" start="66" end="95" type="uint"/> + <field name="Core Mode Enable" start="64" end="64" type="uint"/> + <field name="Data DWord 0" start="96" end="127" type="uint"/> + <field name="Data DWord 1" start="128" end="159" type="uint"/> + </instruction> + + <instruction name="MI_STORE_DATA_INDEX" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="33"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Offset" start="34" end="43" type="uint"/> + <field name="Data DWord 0" start="64" end="95" type="uint"/> + <field name="Data DWord 1" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="MI_STORE_REGISTER_MEM" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="36"/> + <field name="Use Global GTT" start="22" end="22" type="uint"/> + <field name="Predicate Enable" start="21" end="21" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Register Address" start="34" end="54" type="offset"/> + <field name="Memory Address" start="66" end="95" type="address"/> + </instruction> + + <instruction name="MI_STORE_URB_MEM" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="45"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="URB Address" start="34" end="46" type="uint"/> + <field name="Memory Address" start="70" end="95" type="address"/> + </instruction> + + <instruction name="MI_SUSPEND_FLUSH" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="11"/> + <field name="Suspend Flush" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="MI_TOPOLOGY_FILTER" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="13"/> + <field name="Topology Filter Value" start="0" end="5" type="uint"/> + </instruction> + + <instruction name="MI_URB_ATOMIC_ALLOC" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="9"/> + <field name="URB Atomic Storage Offset" start="12" end="19" type="uint"/> + <field name="URB Atomic Storage Size" start="0" end="8" type="uint"/> + </instruction> + + <instruction name="MI_URB_CLEAR" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="25"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="URB Clear Length" start="48" end="61" type="uint"/> + <field name="URB Address" start="32" end="46" type="offset"/> + </instruction> + + <instruction name="MI_USER_INTERRUPT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="2"/> + </instruction> + + <instruction name="MI_WAIT_FOR_EVENT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="3"/> + <field name="Display Pipe C Horizontal Blank Wait Enable" start="22" end="22" type="bool"/> + <field name="Display Pipe C Vertical Blank Wait Enable" start="21" end="21" type="bool"/> + <field name="Display Sprite C Flip Pending Wait Enable" start="20" end="20" type="bool"/> + <field name="Condition Code Wait Select" start="16" end="19" type="uint"> + <value name="Not enabled" value="0"/> + </field> + <field name="Display Plane C Flip Pending Wait Enable" start="15" end="15" type="bool"/> + <field name="Display Pipe C Scan Line Wait Enable" start="14" end="14" type="bool"/> + <field name="Display Pipe B Horizontal Blank Wait Enable" start="13" end="13" type="bool"/> + <field name="Display Pipe B Vertical Blank Wait Enable" start="11" end="11" type="bool"/> + <field name="Display Sprite B Flip Pending Wait Enable" start="10" end="10" type="bool"/> + <field name="Display Plane B Flip Pending Wait Enable" start="9" end="9" type="bool"/> + <field name="Display Pipe B Scan Line Wait Enable" start="8" end="8" type="bool"/> + <field name="Display Pipe A Horizontal Blank Wait Enable" start="5" end="5" type="bool"/> + <field name="Display Pipe A Vertical Blank Wait Enable" start="3" end="3" type="bool"/> + <field name="Display Sprite A Flip Pending Wait Enable" start="2" end="2" type="bool"/> + <field name="Display Plane A Flip Pending Wait Enable" start="1" end="1" type="bool"/> + <field name="Display Pipe A Scan Line Wait Enable" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="PIPELINE_SELECT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="1"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="Pipeline Selection" start="0" end="1" type="uint"> + <value name="3D" value="0"/> + <value name="Media" value="1"/> + <value name="GPGPU" value="2"/> + </field> + </instruction> + + <instruction name="PIPE_CONTROL" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="2"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="0"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Destination Address Type" start="56" end="56" type="uint" prefix="DAT"> + <value name="PPGTT" value="0"/> + <value name="GGTT" value="1"/> + </field> + <field name="LRI Post Sync Operation" start="55" end="55" type="uint"> + <value name="No LRI Operation" value="0"/> + <value name="MMIO Write Immediate Data" value="1"/> + </field> + <field name="Store Data Index" start="53" end="53" type="uint"/> + <field name="Command Streamer Stall Enable" start="52" end="52" type="uint"/> + <field name="Global Snapshot Count Reset" start="51" end="51" type="uint"> + <value name="Don't Reset" value="0"/> + <value name="Reset" value="1"/> + </field> + <field name="TLB Invalidate" start="50" end="50" type="uint"/> + <field name="Generic Media State Clear" start="48" end="48" type="bool"/> + <field name="Post Sync Operation" start="46" end="47" type="uint"> + <value name="No Write" value="0"/> + <value name="Write Immediate Data" value="1"/> + <value name="Write PS Depth Count" value="2"/> + <value name="Write Timestamp" value="3"/> + </field> + <field name="Depth Stall Enable" start="45" end="45" type="bool"/> + <field name="Render Target Cache Flush Enable" start="44" end="44" type="bool"/> + <field name="Instruction Cache Invalidate Enable" start="43" end="43" type="bool"/> + <field name="Texture Cache Invalidation Enable" start="42" end="42" type="bool"/> + <field name="Indirect State Pointers Disable" start="41" end="41" type="bool"/> + <field name="Notify Enable" start="40" end="40" type="bool"/> + <field name="Pipe Control Flush Enable" start="39" end="39" type="bool"/> + <field name="DC Flush Enable" start="37" end="37" type="bool"/> + <field name="VF Cache Invalidation Enable" start="36" end="36" type="bool"/> + <field name="Constant Cache Invalidation Enable" start="35" end="35" type="bool"/> + <field name="State Cache Invalidation Enable" start="34" end="34" type="bool"/> + <field name="Stall At Pixel Scoreboard" start="33" end="33" type="bool"/> + <field name="Depth Cache Flush Enable" start="32" end="32" type="bool"/> + <field name="Address" start="66" end="95" type="address"/> + <field name="Immediate Data" start="96" end="159" type="uint"/> + </instruction> + + <instruction name="STATE_BASE_ADDRESS" bias="2" length="10"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="1"/> + <field name="DWord Length" start="0" end="7" type="uint" default="8"/> + <field name="General State Base Address" start="44" end="63" type="address"/> + <field name="General State Memory Object Control State" start="40" end="43" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Stateless Data Port Access Memory Object Control State" start="36" end="39" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="General State Base Address Modify Enable" start="32" end="32" type="bool"/> + <field name="Surface State Base Address" start="76" end="95" type="address"/> + <field name="Surface State Memory Object Control State" start="72" end="75" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface State Base Address Modify Enable" start="64" end="64" type="bool"/> + <field name="Dynamic State Base Address" start="108" end="127" type="address"/> + <field name="Dynamic State Memory Object Control State" start="104" end="107" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Dynamic State Base Address Modify Enable" start="96" end="96" type="bool"/> + <field name="Indirect Object Base Address" start="140" end="159" type="address"/> + <field name="Indirect Object Memory Object Control State" start="136" end="139" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Indirect Object Base Address Modify Enable" start="128" end="128" type="bool"/> + <field name="Instruction Base Address" start="172" end="191" type="address"/> + <field name="Instruction Memory Object Control State" start="168" end="171" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Instruction Base Address Modify Enable" start="160" end="160" type="bool"/> + <field name="General State Access Upper Bound" start="204" end="223" type="address"/> + <field name="General State Access Upper Bound Modify Enable" start="192" end="192" type="bool"/> + <field name="Dynamic State Access Upper Bound" start="236" end="255" type="address"/> + <field name="Dynamic State Access Upper Bound Modify Enable" start="224" end="224" type="bool"/> + <field name="Indirect Object Access Upper Bound" start="268" end="287" type="address"/> + <field name="Indirect Object Access Upper Bound Modify Enable" start="256" end="256" type="bool"/> + <field name="Instruction Access Upper Bound" start="300" end="319" type="address"/> + <field name="Instruction Access Upper Bound Modify Enable" start="288" end="288" type="bool"/> + </instruction> + + <instruction name="STATE_PREFETCH" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="3"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Prefetch Pointer" start="38" end="63" type="address"/> + <field name="Prefetch Count" start="32" end="34" type="uint"/> + </instruction> + + <instruction name="STATE_SIP" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="System Instruction Pointer" start="36" end="63" type="offset"/> + </instruction> + + <instruction name="SWTESS_BASE_ADDRESS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="3"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="SW Tessellation Base Address" start="44" end="63" type="address"/> + <field name="SW Tessellation Memory Object Control State" start="40" end="43" type="MEMORY_OBJECT_CONTROL_STATE"/> + </instruction> + +</genxml> diff --git a/src/vulkan/gen75_pack.h b/src/vulkan/gen75_pack.h deleted file mode 100644 index 7b098894ee2..00000000000 --- a/src/vulkan/gen75_pack.h +++ /dev/null @@ -1,8421 +0,0 @@ -/* - * Copyright © 2015 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - - -/* Instructions, enums and structures for HSW. - * - * This file has been generated, do not hand edit. - */ - -#pragma once - -#include <stdio.h> -#include <assert.h> - -#ifndef __gen_validate_value -#define __gen_validate_value(x) -#endif - -#ifndef __gen_field_functions -#define __gen_field_functions - -union __gen_value { - float f; - uint32_t dw; -}; - -static inline uint64_t -__gen_mbo(uint32_t start, uint32_t end) -{ - return (~0ull >> (64 - (end - start + 1))) << start; -} - -static inline uint64_t -__gen_field(uint64_t v, uint32_t start, uint32_t end) -{ - __gen_validate_value(v); -#if DEBUG - if (end - start + 1 < 64) - assert(v < 1ull << (end - start + 1)); -#endif - - return v << start; -} - -static inline uint64_t -__gen_fixed(float v, uint32_t start, uint32_t end, - bool is_signed, uint32_t fract_bits) -{ - __gen_validate_value(v); - - const float factor = (1 << fract_bits); - - float max, min; - if (is_signed) { - max = ((1 << (end - start)) - 1) / factor; - min = -(1 << (end - start)) / factor; - } else { - max = ((1 << (end - start + 1)) - 1) / factor; - min = 0.0f; - } - - if (v > max) - v = max; - else if (v < min) - v = min; - - int32_t int_val = roundf(v * factor); - - if (is_signed) - int_val &= (1 << (end - start + 1)) - 1; - - return int_val << start; -} - -static inline uint64_t -__gen_offset(uint64_t v, uint32_t start, uint32_t end) -{ - __gen_validate_value(v); -#if DEBUG - uint64_t mask = (~0ull >> (64 - (end - start + 1))) << start; - - assert((v & ~mask) == 0); -#endif - - return v; -} - -static inline uint32_t -__gen_float(float v) -{ - __gen_validate_value(v); - return ((union __gen_value) { .f = (v) }).dw; -} - -#ifndef __gen_address_type -#error #define __gen_address_type before including this file -#endif - -#ifndef __gen_user_data -#error #define __gen_combine_address before including this file -#endif - -#endif - -#define GEN75_3DSTATE_URB_VS_length_bias 0x00000002 -#define GEN75_3DSTATE_URB_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 48, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_URB_VS_length 0x00000002 - -struct GEN75_3DSTATE_URB_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t VSURBStartingAddress; - uint32_t VSURBEntryAllocationSize; - uint32_t VSNumberofURBEntries; -}; - -static inline void -GEN75_3DSTATE_URB_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_URB_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->VSURBStartingAddress, 25, 30) | - __gen_field(values->VSURBEntryAllocationSize, 16, 24) | - __gen_field(values->VSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN75_GPGPU_CSR_BASE_ADDRESS_length_bias 0x00000002 -#define GEN75_GPGPU_CSR_BASE_ADDRESS_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 4, \ - .DwordLength = 0 - -#define GEN75_GPGPU_CSR_BASE_ADDRESS_length 0x00000002 - -struct GEN75_GPGPU_CSR_BASE_ADDRESS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type GPGPUCSRBaseAddress; -}; - -static inline void -GEN75_GPGPU_CSR_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_GPGPU_CSR_BASE_ADDRESS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->GPGPUCSRBaseAddress, dw1); - -} - -#define GEN75_MI_STORE_REGISTER_MEM_length_bias 0x00000002 -#define GEN75_MI_STORE_REGISTER_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 36, \ - .DwordLength = 1 - -#define GEN75_MI_STORE_REGISTER_MEM_length 0x00000003 - -struct GEN75_MI_STORE_REGISTER_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool UseGlobalGTT; - uint32_t PredicateEnable; - uint32_t DwordLength; - uint32_t RegisterAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN75_MI_STORE_REGISTER_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_STORE_REGISTER_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->PredicateEnable, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->RegisterAddress, 2, 22) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - -} - -#define GEN75_PIPELINE_SELECT_length_bias 0x00000001 -#define GEN75_PIPELINE_SELECT_header \ - .CommandType = 3, \ - .CommandSubType = 1, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 4 - -#define GEN75_PIPELINE_SELECT_length 0x00000001 - -struct GEN75_PIPELINE_SELECT { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; -#define _3D 0 -#define Media 1 -#define GPGPU 2 - uint32_t PipelineSelection; -}; - -static inline void -GEN75_PIPELINE_SELECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_PIPELINE_SELECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->PipelineSelection, 0, 1) | - 0; - -} - -#define GEN75_STATE_BASE_ADDRESS_length_bias 0x00000002 -#define GEN75_STATE_BASE_ADDRESS_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 1, \ - .DwordLength = 8 - -#define GEN75_STATE_BASE_ADDRESS_length 0x0000000a - -#define GEN75_MEMORY_OBJECT_CONTROL_STATE_length 0x00000001 - -struct GEN75_MEMORY_OBJECT_CONTROL_STATE { - uint32_t LLCeLLCCacheabilityControlLLCCC; - uint32_t L3CacheabilityControlL3CC; -}; - -static inline void -GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MEMORY_OBJECT_CONTROL_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->LLCeLLCCacheabilityControlLLCCC, 1, 2) | - __gen_field(values->L3CacheabilityControlL3CC, 0, 0) | - 0; - -} - -struct GEN75_STATE_BASE_ADDRESS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type GeneralStateBaseAddress; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE GeneralStateMemoryObjectControlState; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE StatelessDataPortAccessMemoryObjectControlState; - bool GeneralStateBaseAddressModifyEnable; - __gen_address_type SurfaceStateBaseAddress; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE SurfaceStateMemoryObjectControlState; - bool SurfaceStateBaseAddressModifyEnable; - __gen_address_type DynamicStateBaseAddress; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE DynamicStateMemoryObjectControlState; - bool DynamicStateBaseAddressModifyEnable; - __gen_address_type IndirectObjectBaseAddress; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE IndirectObjectMemoryObjectControlState; - bool IndirectObjectBaseAddressModifyEnable; - __gen_address_type InstructionBaseAddress; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE InstructionMemoryObjectControlState; - bool InstructionBaseAddressModifyEnable; - __gen_address_type GeneralStateAccessUpperBound; - bool GeneralStateAccessUpperBoundModifyEnable; - __gen_address_type DynamicStateAccessUpperBound; - bool DynamicStateAccessUpperBoundModifyEnable; - __gen_address_type IndirectObjectAccessUpperBound; - bool IndirectObjectAccessUpperBoundModifyEnable; - __gen_address_type InstructionAccessUpperBound; - bool InstructionAccessUpperBoundModifyEnable; -}; - -static inline void -GEN75_STATE_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_STATE_BASE_ADDRESS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_GeneralStateMemoryObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_GeneralStateMemoryObjectControlState, &values->GeneralStateMemoryObjectControlState); - uint32_t dw_StatelessDataPortAccessMemoryObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StatelessDataPortAccessMemoryObjectControlState, &values->StatelessDataPortAccessMemoryObjectControlState); - uint32_t dw1 = - __gen_field(dw_GeneralStateMemoryObjectControlState, 8, 11) | - __gen_field(dw_StatelessDataPortAccessMemoryObjectControlState, 4, 7) | - __gen_field(values->GeneralStateBaseAddressModifyEnable, 0, 0) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->GeneralStateBaseAddress, dw1); - - uint32_t dw_SurfaceStateMemoryObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceStateMemoryObjectControlState, &values->SurfaceStateMemoryObjectControlState); - uint32_t dw2 = - __gen_field(dw_SurfaceStateMemoryObjectControlState, 8, 11) | - __gen_field(values->SurfaceStateBaseAddressModifyEnable, 0, 0) | - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->SurfaceStateBaseAddress, dw2); - - uint32_t dw_DynamicStateMemoryObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DynamicStateMemoryObjectControlState, &values->DynamicStateMemoryObjectControlState); - uint32_t dw3 = - __gen_field(dw_DynamicStateMemoryObjectControlState, 8, 11) | - __gen_field(values->DynamicStateBaseAddressModifyEnable, 0, 0) | - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->DynamicStateBaseAddress, dw3); - - uint32_t dw_IndirectObjectMemoryObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_IndirectObjectMemoryObjectControlState, &values->IndirectObjectMemoryObjectControlState); - uint32_t dw4 = - __gen_field(dw_IndirectObjectMemoryObjectControlState, 8, 11) | - __gen_field(values->IndirectObjectBaseAddressModifyEnable, 0, 0) | - 0; - - dw[4] = - __gen_combine_address(data, &dw[4], values->IndirectObjectBaseAddress, dw4); - - uint32_t dw_InstructionMemoryObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_InstructionMemoryObjectControlState, &values->InstructionMemoryObjectControlState); - uint32_t dw5 = - __gen_field(dw_InstructionMemoryObjectControlState, 8, 11) | - __gen_field(values->InstructionBaseAddressModifyEnable, 0, 0) | - 0; - - dw[5] = - __gen_combine_address(data, &dw[5], values->InstructionBaseAddress, dw5); - - uint32_t dw6 = - __gen_field(values->GeneralStateAccessUpperBoundModifyEnable, 0, 0) | - 0; - - dw[6] = - __gen_combine_address(data, &dw[6], values->GeneralStateAccessUpperBound, dw6); - - uint32_t dw7 = - __gen_field(values->DynamicStateAccessUpperBoundModifyEnable, 0, 0) | - 0; - - dw[7] = - __gen_combine_address(data, &dw[7], values->DynamicStateAccessUpperBound, dw7); - - uint32_t dw8 = - __gen_field(values->IndirectObjectAccessUpperBoundModifyEnable, 0, 0) | - 0; - - dw[8] = - __gen_combine_address(data, &dw[8], values->IndirectObjectAccessUpperBound, dw8); - - uint32_t dw9 = - __gen_field(values->InstructionAccessUpperBoundModifyEnable, 0, 0) | - 0; - - dw[9] = - __gen_combine_address(data, &dw[9], values->InstructionAccessUpperBound, dw9); - -} - -#define GEN75_STATE_PREFETCH_length_bias 0x00000002 -#define GEN75_STATE_PREFETCH_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 3, \ - .DwordLength = 0 - -#define GEN75_STATE_PREFETCH_length 0x00000002 - -struct GEN75_STATE_PREFETCH { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type PrefetchPointer; - uint32_t PrefetchCount; -}; - -static inline void -GEN75_STATE_PREFETCH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_STATE_PREFETCH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - __gen_field(values->PrefetchCount, 0, 2) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->PrefetchPointer, dw1); - -} - -#define GEN75_STATE_SIP_length_bias 0x00000002 -#define GEN75_STATE_SIP_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 2, \ - .DwordLength = 0 - -#define GEN75_STATE_SIP_length 0x00000002 - -struct GEN75_STATE_SIP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SystemInstructionPointer; -}; - -static inline void -GEN75_STATE_SIP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_STATE_SIP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->SystemInstructionPointer, 4, 31) | - 0; - -} - -#define GEN75_SWTESS_BASE_ADDRESS_length_bias 0x00000002 -#define GEN75_SWTESS_BASE_ADDRESS_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 3, \ - .DwordLength = 0 - -#define GEN75_SWTESS_BASE_ADDRESS_length 0x00000002 - -struct GEN75_SWTESS_BASE_ADDRESS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type SWTessellationBaseAddress; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE SWTessellationMemoryObjectControlState; -}; - -static inline void -GEN75_SWTESS_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_SWTESS_BASE_ADDRESS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_SWTessellationMemoryObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SWTessellationMemoryObjectControlState, &values->SWTessellationMemoryObjectControlState); - uint32_t dw1 = - __gen_field(dw_SWTessellationMemoryObjectControlState, 8, 11) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->SWTessellationBaseAddress, dw1); - -} - -#define GEN75_3DPRIMITIVE_length_bias 0x00000002 -#define GEN75_3DPRIMITIVE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 3, \ - ._3DCommandSubOpcode = 0, \ - .DwordLength = 5 - -#define GEN75_3DPRIMITIVE_length 0x00000007 - -struct GEN75_3DPRIMITIVE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - bool IndirectParameterEnable; - uint32_t UAVCoherencyRequired; - bool PredicateEnable; - uint32_t DwordLength; - bool EndOffsetEnable; -#define SEQUENTIAL 0 -#define RANDOM 1 - uint32_t VertexAccessType; - uint32_t PrimitiveTopologyType; - uint32_t VertexCountPerInstance; - uint32_t StartVertexLocation; - uint32_t InstanceCount; - uint32_t StartInstanceLocation; - uint32_t BaseVertexLocation; -}; - -static inline void -GEN75_3DPRIMITIVE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DPRIMITIVE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->IndirectParameterEnable, 10, 10) | - __gen_field(values->UAVCoherencyRequired, 9, 9) | - __gen_field(values->PredicateEnable, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->EndOffsetEnable, 9, 9) | - __gen_field(values->VertexAccessType, 8, 8) | - __gen_field(values->PrimitiveTopologyType, 0, 5) | - 0; - - dw[2] = - __gen_field(values->VertexCountPerInstance, 0, 31) | - 0; - - dw[3] = - __gen_field(values->StartVertexLocation, 0, 31) | - 0; - - dw[4] = - __gen_field(values->InstanceCount, 0, 31) | - 0; - - dw[5] = - __gen_field(values->StartInstanceLocation, 0, 31) | - 0; - - dw[6] = - __gen_field(values->BaseVertexLocation, 0, 31) | - 0; - -} - -#define GEN75_3DSTATE_AA_LINE_PARAMETERS_length_bias 0x00000002 -#define GEN75_3DSTATE_AA_LINE_PARAMETERS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 10, \ - .DwordLength = 1 - -#define GEN75_3DSTATE_AA_LINE_PARAMETERS_length 0x00000003 - -struct GEN75_3DSTATE_AA_LINE_PARAMETERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - float AACoverageBias; - float AACoverageSlope; - float AACoverageEndCapBias; - float AACoverageEndCapSlope; -}; - -static inline void -GEN75_3DSTATE_AA_LINE_PARAMETERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_AA_LINE_PARAMETERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->AACoverageBias * (1 << 8), 16, 23) | - __gen_field(values->AACoverageSlope * (1 << 8), 0, 7) | - 0; - - dw[2] = - __gen_field(values->AACoverageEndCapBias * (1 << 8), 16, 23) | - __gen_field(values->AACoverageEndCapSlope * (1 << 8), 0, 7) | - 0; - -} - -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_DS_length_bias 0x00000002 -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 70 - -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_DS_length 0x00000000 - -#define GEN75_BINDING_TABLE_EDIT_ENTRY_length 0x00000001 - -struct GEN75_BINDING_TABLE_EDIT_ENTRY { - uint32_t BindingTableIndex; - uint32_t SurfaceStatePointer; -}; - -static inline void -GEN75_BINDING_TABLE_EDIT_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_BINDING_TABLE_EDIT_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->BindingTableIndex, 16, 23) | - __gen_offset(values->SurfaceStatePointer, 0, 15) | - 0; - -} - -struct GEN75_3DSTATE_BINDING_TABLE_EDIT_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_BINDING_TABLE_EDIT_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_BINDING_TABLE_EDIT_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_GS_length_bias 0x00000002 -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 68 - -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_GS_length 0x00000000 - -struct GEN75_3DSTATE_BINDING_TABLE_EDIT_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_BINDING_TABLE_EDIT_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_BINDING_TABLE_EDIT_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_HS_length_bias 0x00000002 -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 69 - -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_HS_length 0x00000000 - -struct GEN75_3DSTATE_BINDING_TABLE_EDIT_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_BINDING_TABLE_EDIT_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_BINDING_TABLE_EDIT_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_PS_length_bias 0x00000002 -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 71 - -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_PS_length 0x00000000 - -struct GEN75_3DSTATE_BINDING_TABLE_EDIT_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_BINDING_TABLE_EDIT_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_BINDING_TABLE_EDIT_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_VS_length_bias 0x00000002 -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 67 - -#define GEN75_3DSTATE_BINDING_TABLE_EDIT_VS_length 0x00000000 - -struct GEN75_3DSTATE_BINDING_TABLE_EDIT_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_BINDING_TABLE_EDIT_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_BINDING_TABLE_EDIT_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_DS_length_bias 0x00000002 -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 40, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_DS_length 0x00000002 - -struct GEN75_3DSTATE_BINDING_TABLE_POINTERS_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoDSBindingTable; -}; - -static inline void -GEN75_3DSTATE_BINDING_TABLE_POINTERS_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_BINDING_TABLE_POINTERS_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoDSBindingTable, 5, 15) | - 0; - -} - -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_GS_length_bias 0x00000002 -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 41, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_GS_length 0x00000002 - -struct GEN75_3DSTATE_BINDING_TABLE_POINTERS_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoGSBindingTable; -}; - -static inline void -GEN75_3DSTATE_BINDING_TABLE_POINTERS_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_BINDING_TABLE_POINTERS_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoGSBindingTable, 5, 15) | - 0; - -} - -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_HS_length_bias 0x00000002 -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 39, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_HS_length 0x00000002 - -struct GEN75_3DSTATE_BINDING_TABLE_POINTERS_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoHSBindingTable; -}; - -static inline void -GEN75_3DSTATE_BINDING_TABLE_POINTERS_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_BINDING_TABLE_POINTERS_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoHSBindingTable, 5, 15) | - 0; - -} - -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_PS_length_bias 0x00000002 -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 42, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_PS_length 0x00000002 - -struct GEN75_3DSTATE_BINDING_TABLE_POINTERS_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoPSBindingTable; -}; - -static inline void -GEN75_3DSTATE_BINDING_TABLE_POINTERS_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_BINDING_TABLE_POINTERS_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoPSBindingTable, 5, 15) | - 0; - -} - -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_VS_length_bias 0x00000002 -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 38, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_BINDING_TABLE_POINTERS_VS_length 0x00000002 - -struct GEN75_3DSTATE_BINDING_TABLE_POINTERS_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoVSBindingTable; -}; - -static inline void -GEN75_3DSTATE_BINDING_TABLE_POINTERS_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_BINDING_TABLE_POINTERS_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoVSBindingTable, 5, 15) | - 0; - -} - -#define GEN75_3DSTATE_BINDING_TABLE_POOL_ALLOC_length_bias 0x00000002 -#define GEN75_3DSTATE_BINDING_TABLE_POOL_ALLOC_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 25, \ - .DwordLength = 1 - -#define GEN75_3DSTATE_BINDING_TABLE_POOL_ALLOC_length 0x00000003 - -struct GEN75_3DSTATE_BINDING_TABLE_POOL_ALLOC { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type BindingTablePoolBaseAddress; - uint32_t BindingTablePoolEnable; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE SurfaceObjectControlState; - __gen_address_type BindingTablePoolUpperBound; -}; - -static inline void -GEN75_3DSTATE_BINDING_TABLE_POOL_ALLOC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_BINDING_TABLE_POOL_ALLOC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_SurfaceObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceObjectControlState, &values->SurfaceObjectControlState); - uint32_t dw1 = - __gen_field(values->BindingTablePoolEnable, 11, 11) | - __gen_field(dw_SurfaceObjectControlState, 7, 10) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->BindingTablePoolBaseAddress, dw1); - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->BindingTablePoolUpperBound, dw2); - -} - -#define GEN75_3DSTATE_BLEND_STATE_POINTERS_length_bias 0x00000002 -#define GEN75_3DSTATE_BLEND_STATE_POINTERS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 36, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_BLEND_STATE_POINTERS_length 0x00000002 - -struct GEN75_3DSTATE_BLEND_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BlendStatePointer; -}; - -static inline void -GEN75_3DSTATE_BLEND_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_BLEND_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->BlendStatePointer, 6, 31) | - __gen_mbo(0, 0) | - 0; - -} - -#define GEN75_3DSTATE_CC_STATE_POINTERS_length_bias 0x00000002 -#define GEN75_3DSTATE_CC_STATE_POINTERS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 14, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_CC_STATE_POINTERS_length 0x00000002 - -struct GEN75_3DSTATE_CC_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ColorCalcStatePointer; -}; - -static inline void -GEN75_3DSTATE_CC_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_CC_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->ColorCalcStatePointer, 6, 31) | - __gen_mbo(0, 0) | - 0; - -} - -#define GEN75_3DSTATE_CHROMA_KEY_length_bias 0x00000002 -#define GEN75_3DSTATE_CHROMA_KEY_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 4, \ - .DwordLength = 2 - -#define GEN75_3DSTATE_CHROMA_KEY_length 0x00000004 - -struct GEN75_3DSTATE_CHROMA_KEY { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ChromaKeyTableIndex; - uint32_t ChromaKeyLowValue; - uint32_t ChromaKeyHighValue; -}; - -static inline void -GEN75_3DSTATE_CHROMA_KEY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_CHROMA_KEY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ChromaKeyTableIndex, 30, 31) | - 0; - - dw[2] = - __gen_field(values->ChromaKeyLowValue, 0, 31) | - 0; - - dw[3] = - __gen_field(values->ChromaKeyHighValue, 0, 31) | - 0; - -} - -#define GEN75_3DSTATE_CLEAR_PARAMS_length_bias 0x00000002 -#define GEN75_3DSTATE_CLEAR_PARAMS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 4, \ - .DwordLength = 1 - -#define GEN75_3DSTATE_CLEAR_PARAMS_length 0x00000003 - -struct GEN75_3DSTATE_CLEAR_PARAMS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t DepthClearValue; - bool DepthClearValueValid; -}; - -static inline void -GEN75_3DSTATE_CLEAR_PARAMS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_CLEAR_PARAMS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->DepthClearValue, 0, 31) | - 0; - - dw[2] = - __gen_field(values->DepthClearValueValid, 0, 0) | - 0; - -} - -#define GEN75_3DSTATE_CLIP_length_bias 0x00000002 -#define GEN75_3DSTATE_CLIP_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 18, \ - .DwordLength = 2 - -#define GEN75_3DSTATE_CLIP_length 0x00000004 - -struct GEN75_3DSTATE_CLIP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t FrontWinding; - uint32_t VertexSubPixelPrecisionSelect; - bool EarlyCullEnable; -#define CULLMODE_BOTH 0 -#define CULLMODE_NONE 1 -#define CULLMODE_FRONT 2 -#define CULLMODE_BACK 3 - uint32_t CullMode; - bool ClipperStatisticsEnable; - uint32_t UserClipDistanceCullTestEnableBitmask; - bool ClipEnable; -#define APIMODE_OGL 0 - uint32_t APIMode; - bool ViewportXYClipTestEnable; - bool ViewportZClipTestEnable; - bool GuardbandClipTestEnable; - uint32_t UserClipDistanceClipTestEnableBitmask; -#define CLIPMODE_NORMAL 0 -#define CLIPMODE_REJECT_ALL 3 -#define CLIPMODE_ACCEPT_ALL 4 - uint32_t ClipMode; - bool PerspectiveDivideDisable; - bool NonPerspectiveBarycentricEnable; -#define Vertex0 0 -#define Vertex1 1 -#define Vertex2 2 - uint32_t TriangleStripListProvokingVertexSelect; -#define Vertex0 0 -#define Vertex1 1 - uint32_t LineStripListProvokingVertexSelect; -#define Vertex0 0 -#define Vertex1 1 -#define Vertex2 2 - uint32_t TriangleFanProvokingVertexSelect; - float MinimumPointWidth; - float MaximumPointWidth; - bool ForceZeroRTAIndexEnable; - uint32_t MaximumVPIndex; -}; - -static inline void -GEN75_3DSTATE_CLIP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_CLIP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->FrontWinding, 20, 20) | - __gen_field(values->VertexSubPixelPrecisionSelect, 19, 19) | - __gen_field(values->EarlyCullEnable, 18, 18) | - __gen_field(values->CullMode, 16, 17) | - __gen_field(values->ClipperStatisticsEnable, 10, 10) | - __gen_field(values->UserClipDistanceCullTestEnableBitmask, 0, 7) | - 0; - - dw[2] = - __gen_field(values->ClipEnable, 31, 31) | - __gen_field(values->APIMode, 30, 30) | - __gen_field(values->ViewportXYClipTestEnable, 28, 28) | - __gen_field(values->ViewportZClipTestEnable, 27, 27) | - __gen_field(values->GuardbandClipTestEnable, 26, 26) | - __gen_field(values->UserClipDistanceClipTestEnableBitmask, 16, 23) | - __gen_field(values->ClipMode, 13, 15) | - __gen_field(values->PerspectiveDivideDisable, 9, 9) | - __gen_field(values->NonPerspectiveBarycentricEnable, 8, 8) | - __gen_field(values->TriangleStripListProvokingVertexSelect, 4, 5) | - __gen_field(values->LineStripListProvokingVertexSelect, 2, 3) | - __gen_field(values->TriangleFanProvokingVertexSelect, 0, 1) | - 0; - - dw[3] = - __gen_field(values->MinimumPointWidth * (1 << 3), 17, 27) | - __gen_field(values->MaximumPointWidth * (1 << 3), 6, 16) | - __gen_field(values->ForceZeroRTAIndexEnable, 5, 5) | - __gen_field(values->MaximumVPIndex, 0, 3) | - 0; - -} - -#define GEN75_3DSTATE_CONSTANT_DS_length_bias 0x00000002 -#define GEN75_3DSTATE_CONSTANT_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 26, \ - .DwordLength = 5 - -#define GEN75_3DSTATE_CONSTANT_DS_length 0x00000007 - -#define GEN75_3DSTATE_CONSTANT_BODY_length 0x00000006 - -struct GEN75_3DSTATE_CONSTANT_BODY { - uint32_t ConstantBuffer1ReadLength; - uint32_t ConstantBuffer0ReadLength; - uint32_t ConstantBuffer3ReadLength; - uint32_t ConstantBuffer2ReadLength; - __gen_address_type PointerToConstantBuffer0; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState; - __gen_address_type PointerToConstantBuffer1; - __gen_address_type PointerToConstantBuffer2; - __gen_address_type PointerToConstantBuffer3; -}; - -static inline void -GEN75_3DSTATE_CONSTANT_BODY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_CONSTANT_BODY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->ConstantBuffer1ReadLength, 16, 31) | - __gen_field(values->ConstantBuffer0ReadLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->ConstantBuffer3ReadLength, 16, 31) | - __gen_field(values->ConstantBuffer2ReadLength, 0, 15) | - 0; - - uint32_t dw_ConstantBufferObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState); - uint32_t dw2 = - __gen_field(dw_ConstantBufferObjectControlState, 0, 4) | - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->PointerToConstantBuffer0, dw2); - - uint32_t dw3 = - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->PointerToConstantBuffer1, dw3); - - uint32_t dw4 = - 0; - - dw[4] = - __gen_combine_address(data, &dw[4], values->PointerToConstantBuffer2, dw4); - - uint32_t dw5 = - 0; - - dw[5] = - __gen_combine_address(data, &dw[5], values->PointerToConstantBuffer3, dw5); - -} - -struct GEN75_3DSTATE_CONSTANT_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN75_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN75_3DSTATE_CONSTANT_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_CONSTANT_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN75_3DSTATE_CONSTANT_GS_length_bias 0x00000002 -#define GEN75_3DSTATE_CONSTANT_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 22, \ - .DwordLength = 5 - -#define GEN75_3DSTATE_CONSTANT_GS_length 0x00000007 - -struct GEN75_3DSTATE_CONSTANT_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN75_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN75_3DSTATE_CONSTANT_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_CONSTANT_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN75_3DSTATE_CONSTANT_HS_length_bias 0x00000002 -#define GEN75_3DSTATE_CONSTANT_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 25, \ - .DwordLength = 5 - -#define GEN75_3DSTATE_CONSTANT_HS_length 0x00000007 - -struct GEN75_3DSTATE_CONSTANT_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN75_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN75_3DSTATE_CONSTANT_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_CONSTANT_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN75_3DSTATE_CONSTANT_PS_length_bias 0x00000002 -#define GEN75_3DSTATE_CONSTANT_PS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 23, \ - .DwordLength = 5 - -#define GEN75_3DSTATE_CONSTANT_PS_length 0x00000007 - -struct GEN75_3DSTATE_CONSTANT_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN75_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN75_3DSTATE_CONSTANT_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_CONSTANT_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN75_3DSTATE_CONSTANT_VS_length_bias 0x00000002 -#define GEN75_3DSTATE_CONSTANT_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 21, \ - .DwordLength = 5 - -#define GEN75_3DSTATE_CONSTANT_VS_length 0x00000007 - -struct GEN75_3DSTATE_CONSTANT_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN75_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN75_3DSTATE_CONSTANT_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_CONSTANT_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN75_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN75_3DSTATE_DEPTH_BUFFER_length_bias 0x00000002 -#define GEN75_3DSTATE_DEPTH_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 5, \ - .DwordLength = 5 - -#define GEN75_3DSTATE_DEPTH_BUFFER_length 0x00000007 - -struct GEN75_3DSTATE_DEPTH_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define SURFTYPE_1D 0 -#define SURFTYPE_2D 1 -#define SURFTYPE_3D 2 -#define SURFTYPE_CUBE 3 -#define SURFTYPE_NULL 7 - uint32_t SurfaceType; - bool DepthWriteEnable; - bool StencilWriteEnable; - bool HierarchicalDepthBufferEnable; -#define D32_FLOAT 1 -#define D24_UNORM_X8_UINT 3 -#define D16_UNORM 5 - uint32_t SurfaceFormat; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; - uint32_t Height; - uint32_t Width; - uint32_t LOD; -#define SURFTYPE_CUBEmustbezero 0 - uint32_t Depth; - uint32_t MinimumArrayElement; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE DepthBufferObjectControlState; - uint32_t DepthCoordinateOffsetY; - uint32_t DepthCoordinateOffsetX; - uint32_t RenderTargetViewExtent; -}; - -static inline void -GEN75_3DSTATE_DEPTH_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_DEPTH_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SurfaceType, 29, 31) | - __gen_field(values->DepthWriteEnable, 28, 28) | - __gen_field(values->StencilWriteEnable, 27, 27) | - __gen_field(values->HierarchicalDepthBufferEnable, 22, 22) | - __gen_field(values->SurfaceFormat, 18, 20) | - __gen_field(values->SurfacePitch, 0, 17) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - - dw[3] = - __gen_field(values->Height, 18, 31) | - __gen_field(values->Width, 4, 17) | - __gen_field(values->LOD, 0, 3) | - 0; - - uint32_t dw_DepthBufferObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DepthBufferObjectControlState, &values->DepthBufferObjectControlState); - dw[4] = - __gen_field(values->Depth, 21, 31) | - __gen_field(values->MinimumArrayElement, 10, 20) | - __gen_field(dw_DepthBufferObjectControlState, 0, 3) | - 0; - - dw[5] = - __gen_field(values->DepthCoordinateOffsetY, 16, 31) | - __gen_field(values->DepthCoordinateOffsetX, 0, 15) | - 0; - - dw[6] = - __gen_field(values->RenderTargetViewExtent, 21, 31) | - 0; - -} - -#define GEN75_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_length_bias 0x00000002 -#define GEN75_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 37, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_length 0x00000002 - -struct GEN75_3DSTATE_DEPTH_STENCIL_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoDEPTH_STENCIL_STATE; -}; - -static inline void -GEN75_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_DEPTH_STENCIL_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoDEPTH_STENCIL_STATE, 6, 31) | - __gen_mbo(0, 0) | - 0; - -} - -#define GEN75_3DSTATE_DRAWING_RECTANGLE_length_bias 0x00000002 -#define GEN75_3DSTATE_DRAWING_RECTANGLE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 0, \ - .DwordLength = 2 - -#define GEN75_3DSTATE_DRAWING_RECTANGLE_length 0x00000004 - -struct GEN75_3DSTATE_DRAWING_RECTANGLE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; -#define Legacy 0 -#define Core0Enabled 1 -#define Core1Enabled 2 - uint32_t CoreModeSelect; - uint32_t DwordLength; - uint32_t ClippedDrawingRectangleYMin; - uint32_t ClippedDrawingRectangleXMin; - uint32_t ClippedDrawingRectangleYMax; - uint32_t ClippedDrawingRectangleXMax; - uint32_t DrawingRectangleOriginY; - uint32_t DrawingRectangleOriginX; -}; - -static inline void -GEN75_3DSTATE_DRAWING_RECTANGLE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_DRAWING_RECTANGLE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->CoreModeSelect, 14, 15) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ClippedDrawingRectangleYMin, 16, 31) | - __gen_field(values->ClippedDrawingRectangleXMin, 0, 15) | - 0; - - dw[2] = - __gen_field(values->ClippedDrawingRectangleYMax, 16, 31) | - __gen_field(values->ClippedDrawingRectangleXMax, 0, 15) | - 0; - - dw[3] = - __gen_field(values->DrawingRectangleOriginY, 16, 31) | - __gen_field(values->DrawingRectangleOriginX, 0, 15) | - 0; - -} - -#define GEN75_3DSTATE_DS_length_bias 0x00000002 -#define GEN75_3DSTATE_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 29, \ - .DwordLength = 4 - -#define GEN75_3DSTATE_DS_length 0x00000006 - -struct GEN75_3DSTATE_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t KernelStartPointer; -#define Multiple 0 -#define Single 1 - uint32_t SingleDomainPointDispatch; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define Normal 0 -#define High 1 - uint32_t ThreadDispatchPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool AccessesUAV; - bool IllegalOpcodeExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t DispatchGRFStartRegisterForURBData; - uint32_t PatchURBEntryReadLength; - uint32_t PatchURBEntryReadOffset; - uint32_t MaximumNumberofThreads; - bool StatisticsEnable; - bool ComputeWCoordinateEnable; - bool DSCacheDisable; - bool DSFunctionEnable; -}; - -static inline void -GEN75_3DSTATE_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->KernelStartPointer, 6, 31) | - 0; - - dw[2] = - __gen_field(values->SingleDomainPointDispatch, 31, 31) | - __gen_field(values->VectorMaskEnable, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadDispatchPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->AccessesUAV, 14, 14) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - dw[3] = - __gen_offset(values->ScratchSpaceBasePointer, 10, 31) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = - __gen_field(values->DispatchGRFStartRegisterForURBData, 20, 24) | - __gen_field(values->PatchURBEntryReadLength, 11, 17) | - __gen_field(values->PatchURBEntryReadOffset, 4, 9) | - 0; - - dw[5] = - __gen_field(values->MaximumNumberofThreads, 21, 29) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->ComputeWCoordinateEnable, 2, 2) | - __gen_field(values->DSCacheDisable, 1, 1) | - __gen_field(values->DSFunctionEnable, 0, 0) | - 0; - -} - -#define GEN75_3DSTATE_GATHER_CONSTANT_DS_length_bias 0x00000002 -#define GEN75_3DSTATE_GATHER_CONSTANT_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 55 - -#define GEN75_3DSTATE_GATHER_CONSTANT_DS_length 0x00000000 - -#define GEN75_GATHER_CONSTANT_ENTRY_length 0x00000001 - -struct GEN75_GATHER_CONSTANT_ENTRY { - uint32_t ConstantBufferOffset; - uint32_t ChannelMask; - uint32_t BindingTableIndexOffset; -}; - -static inline void -GEN75_GATHER_CONSTANT_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_GATHER_CONSTANT_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_offset(values->ConstantBufferOffset, 8, 15) | - __gen_field(values->ChannelMask, 4, 7) | - __gen_field(values->BindingTableIndexOffset, 0, 3) | - 0; - -} - -struct GEN75_3DSTATE_GATHER_CONSTANT_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; - uint32_t GatherBufferOffset; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_GATHER_CONSTANT_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_GATHER_CONSTANT_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_GATHER_CONSTANT_GS_length_bias 0x00000002 -#define GEN75_3DSTATE_GATHER_CONSTANT_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 53 - -#define GEN75_3DSTATE_GATHER_CONSTANT_GS_length 0x00000000 - -struct GEN75_3DSTATE_GATHER_CONSTANT_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; - uint32_t GatherBufferOffset; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_GATHER_CONSTANT_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_GATHER_CONSTANT_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_GATHER_CONSTANT_HS_length_bias 0x00000002 -#define GEN75_3DSTATE_GATHER_CONSTANT_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 54 - -#define GEN75_3DSTATE_GATHER_CONSTANT_HS_length 0x00000000 - -struct GEN75_3DSTATE_GATHER_CONSTANT_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; - uint32_t GatherBufferOffset; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_GATHER_CONSTANT_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_GATHER_CONSTANT_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_GATHER_CONSTANT_PS_length_bias 0x00000002 -#define GEN75_3DSTATE_GATHER_CONSTANT_PS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 56 - -#define GEN75_3DSTATE_GATHER_CONSTANT_PS_length 0x00000000 - -struct GEN75_3DSTATE_GATHER_CONSTANT_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; - uint32_t GatherBufferOffset; - bool ConstantBufferDx9Enable; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_GATHER_CONSTANT_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_GATHER_CONSTANT_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - __gen_field(values->ConstantBufferDx9Enable, 4, 4) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_GATHER_CONSTANT_VS_length_bias 0x00000002 -#define GEN75_3DSTATE_GATHER_CONSTANT_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 52 - -#define GEN75_3DSTATE_GATHER_CONSTANT_VS_length 0x00000000 - -struct GEN75_3DSTATE_GATHER_CONSTANT_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; - uint32_t GatherBufferOffset; - bool ConstantBufferDx9Enable; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_GATHER_CONSTANT_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_GATHER_CONSTANT_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - __gen_field(values->ConstantBufferDx9Enable, 4, 4) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_GATHER_POOL_ALLOC_length_bias 0x00000002 -#define GEN75_3DSTATE_GATHER_POOL_ALLOC_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 26, \ - .DwordLength = 1 - -#define GEN75_3DSTATE_GATHER_POOL_ALLOC_length 0x00000003 - -struct GEN75_3DSTATE_GATHER_POOL_ALLOC { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type GatherPoolBaseAddress; - bool GatherPoolEnable; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; - __gen_address_type GatherPoolUpperBound; -}; - -static inline void -GEN75_3DSTATE_GATHER_POOL_ALLOC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_GATHER_POOL_ALLOC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_MemoryObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState); - uint32_t dw1 = - __gen_field(values->GatherPoolEnable, 11, 11) | - __gen_mbo(4, 5) | - __gen_field(dw_MemoryObjectControlState, 0, 3) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->GatherPoolBaseAddress, dw1); - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->GatherPoolUpperBound, dw2); - -} - -#define GEN75_3DSTATE_GS_length_bias 0x00000002 -#define GEN75_3DSTATE_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 17, \ - .DwordLength = 5 - -#define GEN75_3DSTATE_GS_length 0x00000007 - -struct GEN75_3DSTATE_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t KernelStartPointer; - uint32_t SingleProgramFlowSPF; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnableVME; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define NormalPriority 0 -#define HighPriority 1 - uint32_t ThreadPriority; -#define IEEE754 0 -#define alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - uint32_t GSaccessesUAV; - bool MaskStackExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t OutputVertexSize; - uint32_t OutputTopology; - uint32_t VertexURBEntryReadLength; - bool IncludeVertexHandles; - uint32_t VertexURBEntryReadOffset; - uint32_t DispatchGRFStartRegisterforURBData; - uint32_t MaximumNumberofThreads; - uint32_t ControlDataHeaderSize; - uint32_t InstanceControl; - uint32_t DefaultStreamID; -#define SINGLE 0 -#define DUAL_INSTANCE 1 -#define DUAL_OBJECT 2 - uint32_t DispatchMode; - uint32_t GSStatisticsEnable; - uint32_t GSInvocationsIncrementValue; - bool IncludePrimitiveID; - uint32_t Hint; -#define REORDER_LEADING 0 -#define REORDER_TRAILING 1 - uint32_t ReorderMode; - bool DiscardAdjacency; - bool GSEnable; -#define GSCTL_CUT 0 -#define GSCTL_SID 1 - uint32_t ControlDataFormat; - uint32_t SemaphoreHandle; -}; - -static inline void -GEN75_3DSTATE_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->KernelStartPointer, 6, 31) | - 0; - - dw[2] = - __gen_field(values->SingleProgramFlowSPF, 31, 31) | - __gen_field(values->VectorMaskEnableVME, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->GSaccessesUAV, 12, 12) | - __gen_field(values->MaskStackExceptionEnable, 11, 11) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - dw[3] = - __gen_offset(values->ScratchSpaceBasePointer, 10, 31) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = - __gen_field(values->OutputVertexSize, 23, 28) | - __gen_field(values->OutputTopology, 17, 22) | - __gen_field(values->VertexURBEntryReadLength, 11, 16) | - __gen_field(values->IncludeVertexHandles, 10, 10) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - __gen_field(values->DispatchGRFStartRegisterforURBData, 0, 3) | - 0; - - dw[5] = - __gen_field(values->MaximumNumberofThreads, 24, 31) | - __gen_field(values->ControlDataHeaderSize, 20, 23) | - __gen_field(values->InstanceControl, 15, 19) | - __gen_field(values->DefaultStreamID, 13, 14) | - __gen_field(values->DispatchMode, 11, 12) | - __gen_field(values->GSStatisticsEnable, 10, 10) | - __gen_field(values->GSInvocationsIncrementValue, 5, 9) | - __gen_field(values->IncludePrimitiveID, 4, 4) | - __gen_field(values->Hint, 3, 3) | - __gen_field(values->ReorderMode, 2, 2) | - __gen_field(values->DiscardAdjacency, 1, 1) | - __gen_field(values->GSEnable, 0, 0) | - 0; - - dw[6] = - __gen_field(values->ControlDataFormat, 31, 31) | - __gen_offset(values->SemaphoreHandle, 0, 12) | - 0; - -} - -#define GEN75_3DSTATE_HIER_DEPTH_BUFFER_length_bias 0x00000002 -#define GEN75_3DSTATE_HIER_DEPTH_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 7, \ - .DwordLength = 1 - -#define GEN75_3DSTATE_HIER_DEPTH_BUFFER_length 0x00000003 - -struct GEN75_3DSTATE_HIER_DEPTH_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE HierarchicalDepthBufferObjectControlState; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; -}; - -static inline void -GEN75_3DSTATE_HIER_DEPTH_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_HIER_DEPTH_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_HierarchicalDepthBufferObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_HierarchicalDepthBufferObjectControlState, &values->HierarchicalDepthBufferObjectControlState); - dw[1] = - __gen_field(dw_HierarchicalDepthBufferObjectControlState, 25, 28) | - __gen_field(values->SurfacePitch, 0, 16) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - -} - -#define GEN75_3DSTATE_HS_length_bias 0x00000002 -#define GEN75_3DSTATE_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 27, \ - .DwordLength = 5 - -#define GEN75_3DSTATE_HS_length 0x00000007 - -struct GEN75_3DSTATE_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define Normal 0 -#define High 1 - uint32_t ThreadDispatchPriority; -#define IEEE754 0 -#define alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t MaximumNumberofThreads; - bool Enable; - bool StatisticsEnable; - uint32_t InstanceCount; - uint32_t KernelStartPointer; - uint32_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t SingleProgramFlow; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; - bool HSaccessesUAV; - bool IncludeVertexHandles; - uint32_t DispatchGRFStartRegisterForURBData; - uint32_t VertexURBEntryReadLength; - uint32_t VertexURBEntryReadOffset; - uint32_t SemaphoreHandle; -}; - -static inline void -GEN75_3DSTATE_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadDispatchPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->SoftwareExceptionEnable, 12, 12) | - __gen_field(values->MaximumNumberofThreads, 0, 7) | - 0; - - dw[2] = - __gen_field(values->Enable, 31, 31) | - __gen_field(values->StatisticsEnable, 29, 29) | - __gen_field(values->InstanceCount, 0, 3) | - 0; - - dw[3] = - __gen_offset(values->KernelStartPointer, 6, 31) | - 0; - - dw[4] = - __gen_offset(values->ScratchSpaceBasePointer, 10, 31) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[5] = - __gen_field(values->SingleProgramFlow, 27, 27) | - __gen_field(values->VectorMaskEnable, 26, 26) | - __gen_field(values->HSaccessesUAV, 25, 25) | - __gen_field(values->IncludeVertexHandles, 24, 24) | - __gen_field(values->DispatchGRFStartRegisterForURBData, 19, 23) | - __gen_field(values->VertexURBEntryReadLength, 11, 16) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - 0; - - dw[6] = - __gen_offset(values->SemaphoreHandle, 0, 12) | - 0; - -} - -#define GEN75_3DSTATE_INDEX_BUFFER_length_bias 0x00000002 -#define GEN75_3DSTATE_INDEX_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 10, \ - .DwordLength = 1 - -#define GEN75_3DSTATE_INDEX_BUFFER_length 0x00000003 - -struct GEN75_3DSTATE_INDEX_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; -#define INDEX_BYTE 0 -#define INDEX_WORD 1 -#define INDEX_DWORD 2 - uint32_t IndexFormat; - uint32_t DwordLength; - __gen_address_type BufferStartingAddress; - __gen_address_type BufferEndingAddress; -}; - -static inline void -GEN75_3DSTATE_INDEX_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_INDEX_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_MemoryObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState); - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(dw_MemoryObjectControlState, 12, 15) | - __gen_field(values->IndexFormat, 8, 9) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->BufferStartingAddress, dw1); - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->BufferEndingAddress, dw2); - -} - -#define GEN75_3DSTATE_LINE_STIPPLE_length_bias 0x00000002 -#define GEN75_3DSTATE_LINE_STIPPLE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 8, \ - .DwordLength = 1 - -#define GEN75_3DSTATE_LINE_STIPPLE_length 0x00000003 - -struct GEN75_3DSTATE_LINE_STIPPLE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool ModifyEnableCurrentRepeatCounterCurrentStippleIndex; - uint32_t CurrentRepeatCounter; - uint32_t CurrentStippleIndex; - uint32_t LineStipplePattern; - float LineStippleInverseRepeatCount; - uint32_t LineStippleRepeatCount; -}; - -static inline void -GEN75_3DSTATE_LINE_STIPPLE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_LINE_STIPPLE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ModifyEnableCurrentRepeatCounterCurrentStippleIndex, 31, 31) | - __gen_field(values->CurrentRepeatCounter, 21, 29) | - __gen_field(values->CurrentStippleIndex, 16, 19) | - __gen_field(values->LineStipplePattern, 0, 15) | - 0; - - dw[2] = - __gen_field(values->LineStippleInverseRepeatCount * (1 << 16), 15, 31) | - __gen_field(values->LineStippleRepeatCount, 0, 8) | - 0; - -} - -#define GEN75_3DSTATE_MONOFILTER_SIZE_length_bias 0x00000002 -#define GEN75_3DSTATE_MONOFILTER_SIZE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 17, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_MONOFILTER_SIZE_length 0x00000002 - -struct GEN75_3DSTATE_MONOFILTER_SIZE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t MonochromeFilterWidth; - uint32_t MonochromeFilterHeight; -}; - -static inline void -GEN75_3DSTATE_MONOFILTER_SIZE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_MONOFILTER_SIZE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->MonochromeFilterWidth, 3, 5) | - __gen_field(values->MonochromeFilterHeight, 0, 2) | - 0; - -} - -#define GEN75_3DSTATE_MULTISAMPLE_length_bias 0x00000002 -#define GEN75_3DSTATE_MULTISAMPLE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 13, \ - .DwordLength = 2 - -#define GEN75_3DSTATE_MULTISAMPLE_length 0x00000004 - -struct GEN75_3DSTATE_MULTISAMPLE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool MultiSampleEnable; -#define PIXLOC_CENTER 0 -#define PIXLOC_UL_CORNER 1 - uint32_t PixelLocation; -#define NUMSAMPLES_1 0 -#define NUMSAMPLES_4 2 -#define NUMSAMPLES_8 3 - uint32_t NumberofMultisamples; - float Sample3XOffset; - float Sample3YOffset; - float Sample2XOffset; - float Sample2YOffset; - float Sample1XOffset; - float Sample1YOffset; - float Sample0XOffset; - float Sample0YOffset; - float Sample7XOffset; - float Sample7YOffset; - float Sample6XOffset; - float Sample6YOffset; - float Sample5XOffset; - float Sample5YOffset; - float Sample4XOffset; - float Sample4YOffset; -}; - -static inline void -GEN75_3DSTATE_MULTISAMPLE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_MULTISAMPLE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->MultiSampleEnable, 5, 5) | - __gen_field(values->PixelLocation, 4, 4) | - __gen_field(values->NumberofMultisamples, 1, 3) | - 0; - - dw[2] = - __gen_field(values->Sample3XOffset * (1 << 4), 28, 31) | - __gen_field(values->Sample3YOffset * (1 << 4), 24, 27) | - __gen_field(values->Sample2XOffset * (1 << 4), 20, 23) | - __gen_field(values->Sample2YOffset * (1 << 4), 16, 19) | - __gen_field(values->Sample1XOffset * (1 << 4), 12, 15) | - __gen_field(values->Sample1YOffset * (1 << 4), 8, 11) | - __gen_field(values->Sample0XOffset * (1 << 4), 4, 7) | - __gen_field(values->Sample0YOffset * (1 << 4), 0, 3) | - 0; - - dw[3] = - __gen_field(values->Sample7XOffset * (1 << 4), 28, 31) | - __gen_field(values->Sample7YOffset * (1 << 4), 24, 27) | - __gen_field(values->Sample6XOffset * (1 << 4), 20, 23) | - __gen_field(values->Sample6YOffset * (1 << 4), 16, 19) | - __gen_field(values->Sample5XOffset * (1 << 4), 12, 15) | - __gen_field(values->Sample5YOffset * (1 << 4), 8, 11) | - __gen_field(values->Sample4XOffset * (1 << 4), 4, 7) | - __gen_field(values->Sample4YOffset * (1 << 4), 0, 3) | - 0; - -} - -#define GEN75_3DSTATE_POLY_STIPPLE_OFFSET_length_bias 0x00000002 -#define GEN75_3DSTATE_POLY_STIPPLE_OFFSET_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 6, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_POLY_STIPPLE_OFFSET_length 0x00000002 - -struct GEN75_3DSTATE_POLY_STIPPLE_OFFSET { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PolygonStippleXOffset; - uint32_t PolygonStippleYOffset; -}; - -static inline void -GEN75_3DSTATE_POLY_STIPPLE_OFFSET_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_POLY_STIPPLE_OFFSET * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->PolygonStippleXOffset, 8, 12) | - __gen_field(values->PolygonStippleYOffset, 0, 4) | - 0; - -} - -#define GEN75_3DSTATE_POLY_STIPPLE_PATTERN_length_bias 0x00000002 -#define GEN75_3DSTATE_POLY_STIPPLE_PATTERN_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 7, \ - .DwordLength = 31 - -#define GEN75_3DSTATE_POLY_STIPPLE_PATTERN_length 0x00000021 - -struct GEN75_3DSTATE_POLY_STIPPLE_PATTERN { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PatternRow[32]; -}; - -static inline void -GEN75_3DSTATE_POLY_STIPPLE_PATTERN_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_POLY_STIPPLE_PATTERN * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - for (uint32_t i = 0, j = 1; i < 32; i += 1, j++) { - dw[j] = - __gen_field(values->PatternRow[i + 0], 0, 31) | - 0; - } - -} - -#define GEN75_3DSTATE_PS_length_bias 0x00000002 -#define GEN75_3DSTATE_PS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 32, \ - .DwordLength = 6 - -#define GEN75_3DSTATE_PS_length 0x00000008 - -struct GEN75_3DSTATE_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t KernelStartPointer0; -#define Multiple 0 -#define Single 1 - uint32_t SingleProgramFlowSPF; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnableVME; - uint32_t SamplerCount; -#define FTZ 0 -#define RET 1 - uint32_t DenormalMode; - uint32_t BindingTableEntryCount; -#define Normal 0 -#define High 1 - uint32_t ThreadPriority; -#define IEEE745 0 -#define Alt 1 - uint32_t FloatingPointMode; -#define RTNE 0 -#define RU 1 -#define RD 2 -#define RTZ 3 - uint32_t RoundingMode; - bool IllegalOpcodeExceptionEnable; - bool MaskStackExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t MaximumNumberofThreads; - uint32_t SampleMask; - bool PushConstantEnable; - bool AttributeEnable; - bool oMaskPresenttoRenderTarget; - bool RenderTargetFastClearEnable; - bool DualSourceBlendEnable; - bool RenderTargetResolveEnable; - bool PSAccessesUAV; -#define POSOFFSET_NONE 0 -#define POSOFFSET_CENTROID 2 -#define POSOFFSET_SAMPLE 3 - uint32_t PositionXYOffsetSelect; - bool _32PixelDispatchEnable; - bool _16PixelDispatchEnable; - bool _8PixelDispatchEnable; - uint32_t DispatchGRFStartRegisterforConstantSetupData0; - uint32_t DispatchGRFStartRegisterforConstantSetupData1; - uint32_t DispatchGRFStartRegisterforConstantSetupData2; - uint32_t KernelStartPointer1; - uint32_t KernelStartPointer2; -}; - -static inline void -GEN75_3DSTATE_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->KernelStartPointer0, 6, 31) | - 0; - - dw[2] = - __gen_field(values->SingleProgramFlowSPF, 31, 31) | - __gen_field(values->VectorMaskEnableVME, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->DenormalMode, 26, 26) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->RoundingMode, 14, 15) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->MaskStackExceptionEnable, 11, 11) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - dw[3] = - __gen_offset(values->ScratchSpaceBasePointer, 10, 31) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = - __gen_field(values->MaximumNumberofThreads, 23, 31) | - __gen_field(values->SampleMask, 12, 19) | - __gen_field(values->PushConstantEnable, 11, 11) | - __gen_field(values->AttributeEnable, 10, 10) | - __gen_field(values->oMaskPresenttoRenderTarget, 9, 9) | - __gen_field(values->RenderTargetFastClearEnable, 8, 8) | - __gen_field(values->DualSourceBlendEnable, 7, 7) | - __gen_field(values->RenderTargetResolveEnable, 6, 6) | - __gen_field(values->PSAccessesUAV, 5, 5) | - __gen_field(values->PositionXYOffsetSelect, 3, 4) | - __gen_field(values->_32PixelDispatchEnable, 2, 2) | - __gen_field(values->_16PixelDispatchEnable, 1, 1) | - __gen_field(values->_8PixelDispatchEnable, 0, 0) | - 0; - - dw[5] = - __gen_field(values->DispatchGRFStartRegisterforConstantSetupData0, 16, 22) | - __gen_field(values->DispatchGRFStartRegisterforConstantSetupData1, 8, 14) | - __gen_field(values->DispatchGRFStartRegisterforConstantSetupData2, 0, 6) | - 0; - - dw[6] = - __gen_offset(values->KernelStartPointer1, 6, 31) | - 0; - - dw[7] = - __gen_offset(values->KernelStartPointer2, 6, 31) | - 0; - -} - -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_DS_length_bias 0x00000002 -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 20, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_DS_length 0x00000002 - -struct GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_GS_length_bias 0x00000002 -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 21, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_GS_length 0x00000002 - -struct GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_HS_length_bias 0x00000002 -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 19, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_HS_length 0x00000002 - -struct GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_PS_length_bias 0x00000002 -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 22, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_PS_length 0x00000002 - -struct GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_VS_length_bias 0x00000002 -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 18, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_VS_length 0x00000002 - -struct GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_PUSH_CONSTANT_ALLOC_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN75_3DSTATE_RAST_MULTISAMPLE_length_bias 0x00000002 -#define GEN75_3DSTATE_RAST_MULTISAMPLE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 14, \ - .DwordLength = 4 - -#define GEN75_3DSTATE_RAST_MULTISAMPLE_length 0x00000006 - -struct GEN75_3DSTATE_RAST_MULTISAMPLE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define NRM_NUMRASTSAMPLES_1 0 -#define NRM_NUMRASTSAMPLES_2 1 -#define NRM_NUMRASTSAMPLES_4 2 -#define NRM_NUMRASTSAMPLES_8 3 -#define NRM_NUMRASTSAMPLES_16 4 - uint32_t NumberofRasterizationMultisamples; - float Sample3XOffset; - float Sample3YOffset; - float Sample2XOffset; - float Sample2YOffset; - float Sample1XOffset; - float Sample1YOffset; - float Sample0XOffset; - float Sample0YOffset; - float Sample7XOffset; - float Sample7YOffset; - float Sample6XOffset; - float Sample6YOffset; - float Sample5XOffset; - float Sample5YOffset; - float Sample4XOffset; - float Sample4YOffset; - float Sample11XOffset; - float Sample11YOffset; - float Sample10XOffset; - float Sample10YOffset; - float Sample9XOffset; - float Sample9YOffset; - float Sample8XOffset; - float Sample8YOffset; - float Sample15XOffset; - float Sample15YOffset; - float Sample14XOffset; - float Sample14YOffset; - float Sample13XOffset; - float Sample13YOffset; - float Sample12XOffset; - float Sample12YOffset; -}; - -static inline void -GEN75_3DSTATE_RAST_MULTISAMPLE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_RAST_MULTISAMPLE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->NumberofRasterizationMultisamples, 1, 3) | - 0; - - dw[2] = - __gen_field(values->Sample3XOffset * (1 << 4), 28, 31) | - __gen_field(values->Sample3YOffset * (1 << 4), 24, 27) | - __gen_field(values->Sample2XOffset * (1 << 4), 20, 23) | - __gen_field(values->Sample2YOffset * (1 << 4), 16, 19) | - __gen_field(values->Sample1XOffset * (1 << 4), 12, 15) | - __gen_field(values->Sample1YOffset * (1 << 4), 8, 11) | - __gen_field(values->Sample0XOffset * (1 << 4), 4, 7) | - __gen_field(values->Sample0YOffset * (1 << 4), 0, 3) | - 0; - - dw[3] = - __gen_field(values->Sample7XOffset * (1 << 4), 28, 31) | - __gen_field(values->Sample7YOffset * (1 << 4), 24, 27) | - __gen_field(values->Sample6XOffset * (1 << 4), 20, 23) | - __gen_field(values->Sample6YOffset * (1 << 4), 16, 19) | - __gen_field(values->Sample5XOffset * (1 << 4), 12, 15) | - __gen_field(values->Sample5YOffset * (1 << 4), 8, 11) | - __gen_field(values->Sample4XOffset * (1 << 4), 4, 7) | - __gen_field(values->Sample4YOffset * (1 << 4), 0, 3) | - 0; - - dw[4] = - __gen_field(values->Sample11XOffset * (1 << 4), 28, 31) | - __gen_field(values->Sample11YOffset * (1 << 4), 24, 27) | - __gen_field(values->Sample10XOffset * (1 << 4), 20, 23) | - __gen_field(values->Sample10YOffset * (1 << 4), 16, 19) | - __gen_field(values->Sample9XOffset * (1 << 4), 12, 15) | - __gen_field(values->Sample9YOffset * (1 << 4), 8, 11) | - __gen_field(values->Sample8XOffset * (1 << 4), 4, 7) | - __gen_field(values->Sample8YOffset * (1 << 4), 0, 3) | - 0; - - dw[5] = - __gen_field(values->Sample15XOffset * (1 << 4), 28, 31) | - __gen_field(values->Sample15YOffset * (1 << 4), 24, 27) | - __gen_field(values->Sample14XOffset * (1 << 4), 20, 23) | - __gen_field(values->Sample14YOffset * (1 << 4), 16, 19) | - __gen_field(values->Sample13XOffset * (1 << 4), 12, 15) | - __gen_field(values->Sample13YOffset * (1 << 4), 8, 11) | - __gen_field(values->Sample12XOffset * (1 << 4), 4, 7) | - __gen_field(values->Sample12YOffset * (1 << 4), 0, 3) | - 0; - -} - -#define GEN75_3DSTATE_SAMPLER_PALETTE_LOAD0_length_bias 0x00000002 -#define GEN75_3DSTATE_SAMPLER_PALETTE_LOAD0_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 2 - -#define GEN75_3DSTATE_SAMPLER_PALETTE_LOAD0_length 0x00000000 - -#define GEN75_PALETTE_ENTRY_length 0x00000001 - -struct GEN75_PALETTE_ENTRY { - uint32_t Alpha; - uint32_t Red; - uint32_t Green; - uint32_t Blue; -}; - -static inline void -GEN75_PALETTE_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_PALETTE_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->Alpha, 24, 31) | - __gen_field(values->Red, 16, 23) | - __gen_field(values->Green, 8, 15) | - __gen_field(values->Blue, 0, 7) | - 0; - -} - -struct GEN75_3DSTATE_SAMPLER_PALETTE_LOAD0 { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_SAMPLER_PALETTE_LOAD0_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_SAMPLER_PALETTE_LOAD0 * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_SAMPLER_PALETTE_LOAD1_length_bias 0x00000002 -#define GEN75_3DSTATE_SAMPLER_PALETTE_LOAD1_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 12 - -#define GEN75_3DSTATE_SAMPLER_PALETTE_LOAD1_length 0x00000000 - -struct GEN75_3DSTATE_SAMPLER_PALETTE_LOAD1 { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_SAMPLER_PALETTE_LOAD1_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_SAMPLER_PALETTE_LOAD1 * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_DS_length_bias 0x00000002 -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 45, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_DS_length 0x00000002 - -struct GEN75_3DSTATE_SAMPLER_STATE_POINTERS_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoDSSamplerState; -}; - -static inline void -GEN75_3DSTATE_SAMPLER_STATE_POINTERS_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_SAMPLER_STATE_POINTERS_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoDSSamplerState, 5, 31) | - 0; - -} - -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_GS_length_bias 0x00000002 -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 46, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_GS_length 0x00000002 - -struct GEN75_3DSTATE_SAMPLER_STATE_POINTERS_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoGSSamplerState; -}; - -static inline void -GEN75_3DSTATE_SAMPLER_STATE_POINTERS_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_SAMPLER_STATE_POINTERS_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoGSSamplerState, 5, 31) | - 0; - -} - -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_HS_length_bias 0x00000002 -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 44, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_HS_length 0x00000002 - -struct GEN75_3DSTATE_SAMPLER_STATE_POINTERS_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoHSSamplerState; -}; - -static inline void -GEN75_3DSTATE_SAMPLER_STATE_POINTERS_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_SAMPLER_STATE_POINTERS_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoHSSamplerState, 5, 31) | - 0; - -} - -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_PS_length_bias 0x00000002 -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 47, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_PS_length 0x00000002 - -struct GEN75_3DSTATE_SAMPLER_STATE_POINTERS_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoPSSamplerState; -}; - -static inline void -GEN75_3DSTATE_SAMPLER_STATE_POINTERS_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_SAMPLER_STATE_POINTERS_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoPSSamplerState, 5, 31) | - 0; - -} - -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_VS_length_bias 0x00000002 -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 43, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_SAMPLER_STATE_POINTERS_VS_length 0x00000002 - -struct GEN75_3DSTATE_SAMPLER_STATE_POINTERS_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoVSSamplerState; -}; - -static inline void -GEN75_3DSTATE_SAMPLER_STATE_POINTERS_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_SAMPLER_STATE_POINTERS_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoVSSamplerState, 5, 31) | - 0; - -} - -#define GEN75_3DSTATE_SAMPLE_MASK_length_bias 0x00000002 -#define GEN75_3DSTATE_SAMPLE_MASK_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 24, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_SAMPLE_MASK_length 0x00000002 - -struct GEN75_3DSTATE_SAMPLE_MASK { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SampleMask; -}; - -static inline void -GEN75_3DSTATE_SAMPLE_MASK_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_SAMPLE_MASK * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SampleMask, 0, 7) | - 0; - -} - -#define GEN75_3DSTATE_SBE_length_bias 0x00000002 -#define GEN75_3DSTATE_SBE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 31, \ - .DwordLength = 12 - -#define GEN75_3DSTATE_SBE_length 0x0000000e - -struct GEN75_3DSTATE_SBE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t AttributeSwizzleControlMode; - uint32_t NumberofSFOutputAttributes; - bool AttributeSwizzleEnable; -#define UPPERLEFT 0 -#define LOWERLEFT 1 - uint32_t PointSpriteTextureCoordinateOrigin; - uint32_t VertexURBEntryReadLength; - uint32_t VertexURBEntryReadOffset; - bool Attribute2n1ComponentOverrideW; - bool Attribute2n1ComponentOverrideZ; - bool Attribute2n1ComponentOverrideY; - bool Attribute2n1ComponentOverrideX; -#define CONST_0000 0 -#define CONST_0001_FLOAT 1 -#define CONST_1111_FLOAT 2 -#define PRIM_ID 3 - uint32_t Attribute2n1ConstantSource; -#define INPUTATTR 0 -#define INPUTATTR_FACING 1 -#define INPUTATTR_W 2 -#define INPUTATTR_FACING_W 3 - uint32_t Attribute2n1SwizzleSelect; - uint32_t Attribute2n1SourceAttribute; - bool Attribute2nComponentOverrideW; - bool Attribute2nComponentOverrideZ; - bool Attribute2nComponentOverrideY; - bool Attribute2nComponentOverrideX; -#define CONST_0000 0 -#define CONST_0001_FLOAT 1 -#define CONST_1111_FLOAT 2 -#define PRIM_ID 3 - uint32_t Attribute2nConstantSource; -#define INPUTATTR 0 -#define INPUTATTR_FACING 1 -#define INPUTATTR_W 2 -#define INPUTATTR_FACING_W 3 - uint32_t Attribute2nSwizzleSelect; - uint32_t Attribute2nSourceAttribute; - uint32_t PointSpriteTextureCoordinateEnable; - uint32_t ConstantInterpolationEnable310; - uint32_t Attribute7WrapShortestEnables; - uint32_t Attribute6WrapShortestEnables; - uint32_t Attribute5WrapShortestEnables; - uint32_t Attribute4WrapShortestEnables; - uint32_t Attribute3WrapShortestEnables; - uint32_t Attribute2WrapShortestEnables; - uint32_t Attribute1WrapShortestEnables; - uint32_t Attribute0WrapShortestEnables; - uint32_t Attribute15WrapShortestEnables; - uint32_t Attribute14WrapShortestEnables; - uint32_t Attribute13WrapShortestEnables; - uint32_t Attribute12WrapShortestEnables; - uint32_t Attribute11WrapShortestEnables; - uint32_t Attribute10WrapShortestEnables; - uint32_t Attribute9WrapShortestEnables; - uint32_t Attribute8WrapShortestEnables; -}; - -static inline void -GEN75_3DSTATE_SBE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_SBE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->AttributeSwizzleControlMode, 28, 28) | - __gen_field(values->NumberofSFOutputAttributes, 22, 27) | - __gen_field(values->AttributeSwizzleEnable, 21, 21) | - __gen_field(values->PointSpriteTextureCoordinateOrigin, 20, 20) | - __gen_field(values->VertexURBEntryReadLength, 11, 15) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - 0; - - dw[2] = - __gen_field(values->Attribute2n1ComponentOverrideW, 31, 31) | - __gen_field(values->Attribute2n1ComponentOverrideZ, 30, 30) | - __gen_field(values->Attribute2n1ComponentOverrideY, 29, 29) | - __gen_field(values->Attribute2n1ComponentOverrideX, 28, 28) | - __gen_field(values->Attribute2n1ConstantSource, 25, 26) | - __gen_field(values->Attribute2n1SwizzleSelect, 22, 23) | - __gen_field(values->Attribute2n1SourceAttribute, 16, 20) | - __gen_field(values->Attribute2nComponentOverrideW, 15, 15) | - __gen_field(values->Attribute2nComponentOverrideZ, 14, 14) | - __gen_field(values->Attribute2nComponentOverrideY, 13, 13) | - __gen_field(values->Attribute2nComponentOverrideX, 12, 12) | - __gen_field(values->Attribute2nConstantSource, 9, 10) | - __gen_field(values->Attribute2nSwizzleSelect, 6, 7) | - __gen_field(values->Attribute2nSourceAttribute, 0, 4) | - 0; - - dw[10] = - __gen_field(values->PointSpriteTextureCoordinateEnable, 0, 31) | - 0; - - dw[11] = - __gen_field(values->ConstantInterpolationEnable310, 0, 31) | - 0; - - dw[12] = - __gen_field(values->Attribute7WrapShortestEnables, 28, 31) | - __gen_field(values->Attribute6WrapShortestEnables, 24, 27) | - __gen_field(values->Attribute5WrapShortestEnables, 20, 23) | - __gen_field(values->Attribute4WrapShortestEnables, 16, 19) | - __gen_field(values->Attribute3WrapShortestEnables, 12, 15) | - __gen_field(values->Attribute2WrapShortestEnables, 8, 11) | - __gen_field(values->Attribute1WrapShortestEnables, 4, 7) | - __gen_field(values->Attribute0WrapShortestEnables, 0, 3) | - 0; - - dw[13] = - __gen_field(values->Attribute15WrapShortestEnables, 28, 31) | - __gen_field(values->Attribute14WrapShortestEnables, 24, 27) | - __gen_field(values->Attribute13WrapShortestEnables, 20, 23) | - __gen_field(values->Attribute12WrapShortestEnables, 16, 19) | - __gen_field(values->Attribute11WrapShortestEnables, 12, 15) | - __gen_field(values->Attribute10WrapShortestEnables, 8, 11) | - __gen_field(values->Attribute9WrapShortestEnables, 4, 7) | - __gen_field(values->Attribute8WrapShortestEnables, 0, 3) | - 0; - -} - -#define GEN75_3DSTATE_SCISSOR_STATE_POINTERS_length_bias 0x00000002 -#define GEN75_3DSTATE_SCISSOR_STATE_POINTERS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 15, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_SCISSOR_STATE_POINTERS_length 0x00000002 - -struct GEN75_3DSTATE_SCISSOR_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ScissorRectPointer; -}; - -static inline void -GEN75_3DSTATE_SCISSOR_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_SCISSOR_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->ScissorRectPointer, 5, 31) | - 0; - -} - -#define GEN75_3DSTATE_SF_length_bias 0x00000002 -#define GEN75_3DSTATE_SF_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 19, \ - .DwordLength = 5 - -#define GEN75_3DSTATE_SF_length 0x00000007 - -struct GEN75_3DSTATE_SF { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define D32_FLOAT_S8X24_UINT 0 -#define D32_FLOAT 1 -#define D24_UNORM_S8_UINT 2 -#define D24_UNORM_X8_UINT 3 -#define D16_UNORM 5 - uint32_t DepthBufferSurfaceFormat; - bool LegacyGlobalDepthBiasEnable; - bool StatisticsEnable; - bool GlobalDepthOffsetEnableSolid; - bool GlobalDepthOffsetEnableWireframe; - bool GlobalDepthOffsetEnablePoint; -#define RASTER_SOLID 0 -#define RASTER_WIREFRAME 1 -#define RASTER_POINT 2 - uint32_t FrontFaceFillMode; -#define RASTER_SOLID 0 -#define RASTER_WIREFRAME 1 -#define RASTER_POINT 2 - uint32_t BackFaceFillMode; - bool ViewTransformEnable; - uint32_t FrontWinding; - bool AntiAliasingEnable; -#define CULLMODE_BOTH 0 -#define CULLMODE_NONE 1 -#define CULLMODE_FRONT 2 -#define CULLMODE_BACK 3 - uint32_t CullMode; - float LineWidth; - uint32_t LineEndCapAntialiasingRegionWidth; - bool LineStippleEnable; - bool ScissorRectangleEnable; - bool RTIndependentRasterizationEnable; - uint32_t MultisampleRasterizationMode; - bool LastPixelEnable; -#define Vertex0 0 -#define Vertex1 1 -#define Vertex2 2 - uint32_t TriangleStripListProvokingVertexSelect; - uint32_t LineStripListProvokingVertexSelect; -#define Vertex0 0 -#define Vertex1 1 -#define Vertex2 2 - uint32_t TriangleFanProvokingVertexSelect; -#define AALINEDISTANCE_TRUE 1 - uint32_t AALineDistanceMode; - uint32_t VertexSubPixelPrecisionSelect; - uint32_t UsePointWidthState; - float PointWidth; - float GlobalDepthOffsetConstant; - float GlobalDepthOffsetScale; - float GlobalDepthOffsetClamp; -}; - -static inline void -GEN75_3DSTATE_SF_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_SF * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->DepthBufferSurfaceFormat, 12, 14) | - __gen_field(values->LegacyGlobalDepthBiasEnable, 11, 11) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->GlobalDepthOffsetEnableSolid, 9, 9) | - __gen_field(values->GlobalDepthOffsetEnableWireframe, 8, 8) | - __gen_field(values->GlobalDepthOffsetEnablePoint, 7, 7) | - __gen_field(values->FrontFaceFillMode, 5, 6) | - __gen_field(values->BackFaceFillMode, 3, 4) | - __gen_field(values->ViewTransformEnable, 1, 1) | - __gen_field(values->FrontWinding, 0, 0) | - 0; - - dw[2] = - __gen_field(values->AntiAliasingEnable, 31, 31) | - __gen_field(values->CullMode, 29, 30) | - __gen_field(values->LineWidth * (1 << 7), 18, 27) | - __gen_field(values->LineEndCapAntialiasingRegionWidth, 16, 17) | - __gen_field(values->LineStippleEnable, 14, 14) | - __gen_field(values->ScissorRectangleEnable, 11, 11) | - __gen_field(values->RTIndependentRasterizationEnable, 10, 10) | - __gen_field(values->MultisampleRasterizationMode, 8, 9) | - 0; - - dw[3] = - __gen_field(values->LastPixelEnable, 31, 31) | - __gen_field(values->TriangleStripListProvokingVertexSelect, 29, 30) | - __gen_field(values->LineStripListProvokingVertexSelect, 27, 28) | - __gen_field(values->TriangleFanProvokingVertexSelect, 25, 26) | - __gen_field(values->AALineDistanceMode, 14, 14) | - __gen_field(values->VertexSubPixelPrecisionSelect, 12, 12) | - __gen_field(values->UsePointWidthState, 11, 11) | - __gen_field(values->PointWidth * (1 << 3), 0, 10) | - 0; - - dw[4] = - __gen_float(values->GlobalDepthOffsetConstant) | - 0; - - dw[5] = - __gen_float(values->GlobalDepthOffsetScale) | - 0; - - dw[6] = - __gen_float(values->GlobalDepthOffsetClamp) | - 0; - -} - -#define GEN75_3DSTATE_SO_BUFFER_length_bias 0x00000002 -#define GEN75_3DSTATE_SO_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 24, \ - .DwordLength = 2 - -#define GEN75_3DSTATE_SO_BUFFER_length 0x00000004 - -struct GEN75_3DSTATE_SO_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SOBufferIndex; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE SOBufferObjectControlState; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; - __gen_address_type SurfaceEndAddress; -}; - -static inline void -GEN75_3DSTATE_SO_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_SO_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_SOBufferObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SOBufferObjectControlState, &values->SOBufferObjectControlState); - dw[1] = - __gen_field(values->SOBufferIndex, 29, 30) | - __gen_field(dw_SOBufferObjectControlState, 25, 28) | - __gen_field(values->SurfacePitch, 0, 11) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - - uint32_t dw3 = - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->SurfaceEndAddress, dw3); - -} - -#define GEN75_3DSTATE_SO_DECL_LIST_length_bias 0x00000002 -#define GEN75_3DSTATE_SO_DECL_LIST_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 23 - -#define GEN75_3DSTATE_SO_DECL_LIST_length 0x00000000 - -#define GEN75_SO_DECL_ENTRY_length 0x00000002 - -#define GEN75_SO_DECL_length 0x00000001 - -struct GEN75_SO_DECL { - uint32_t OutputBufferSlot; - uint32_t HoleFlag; - uint32_t RegisterIndex; - uint32_t ComponentMask; -}; - -static inline void -GEN75_SO_DECL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_SO_DECL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->OutputBufferSlot, 12, 13) | - __gen_field(values->HoleFlag, 11, 11) | - __gen_field(values->RegisterIndex, 4, 9) | - __gen_field(values->ComponentMask, 0, 3) | - 0; - -} - -struct GEN75_SO_DECL_ENTRY { - struct GEN75_SO_DECL Stream3Decl; - struct GEN75_SO_DECL Stream2Decl; - struct GEN75_SO_DECL Stream1Decl; - struct GEN75_SO_DECL Stream0Decl; -}; - -static inline void -GEN75_SO_DECL_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_SO_DECL_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_Stream3Decl; - GEN75_SO_DECL_pack(data, &dw_Stream3Decl, &values->Stream3Decl); - uint32_t dw_Stream2Decl; - GEN75_SO_DECL_pack(data, &dw_Stream2Decl, &values->Stream2Decl); - uint32_t dw_Stream1Decl; - GEN75_SO_DECL_pack(data, &dw_Stream1Decl, &values->Stream1Decl); - uint32_t dw_Stream0Decl; - GEN75_SO_DECL_pack(data, &dw_Stream0Decl, &values->Stream0Decl); - uint64_t qw0 = - __gen_field(dw_Stream3Decl, 48, 63) | - __gen_field(dw_Stream2Decl, 32, 47) | - __gen_field(dw_Stream1Decl, 16, 31) | - __gen_field(dw_Stream0Decl, 0, 15) | - 0; - - dw[0] = qw0; - dw[1] = qw0 >> 32; - -} - -struct GEN75_3DSTATE_SO_DECL_LIST { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t StreamtoBufferSelects3; - uint32_t StreamtoBufferSelects2; - uint32_t StreamtoBufferSelects1; - uint32_t StreamtoBufferSelects0; - uint32_t NumEntries3; - uint32_t NumEntries2; - uint32_t NumEntries1; - uint32_t NumEntries0; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_SO_DECL_LIST_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_SO_DECL_LIST * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->StreamtoBufferSelects3, 12, 15) | - __gen_field(values->StreamtoBufferSelects2, 8, 11) | - __gen_field(values->StreamtoBufferSelects1, 4, 7) | - __gen_field(values->StreamtoBufferSelects0, 0, 3) | - 0; - - dw[2] = - __gen_field(values->NumEntries3, 24, 31) | - __gen_field(values->NumEntries2, 16, 23) | - __gen_field(values->NumEntries1, 8, 15) | - __gen_field(values->NumEntries0, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_STENCIL_BUFFER_length_bias 0x00000002 -#define GEN75_3DSTATE_STENCIL_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 6, \ - .DwordLength = 1 - -#define GEN75_3DSTATE_STENCIL_BUFFER_length 0x00000003 - -struct GEN75_3DSTATE_STENCIL_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t StencilBufferEnable; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE StencilBufferObjectControlState; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; -}; - -static inline void -GEN75_3DSTATE_STENCIL_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_STENCIL_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_StencilBufferObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StencilBufferObjectControlState, &values->StencilBufferObjectControlState); - dw[1] = - __gen_field(values->StencilBufferEnable, 31, 31) | - __gen_field(dw_StencilBufferObjectControlState, 25, 28) | - __gen_field(values->SurfacePitch, 0, 16) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - -} - -#define GEN75_3DSTATE_STREAMOUT_length_bias 0x00000002 -#define GEN75_3DSTATE_STREAMOUT_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 30, \ - .DwordLength = 1 - -#define GEN75_3DSTATE_STREAMOUT_length 0x00000003 - -struct GEN75_3DSTATE_STREAMOUT { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SOFunctionEnable; - uint32_t RenderingDisable; - uint32_t RenderStreamSelect; -#define LEADING 0 -#define TRAILING 1 - uint32_t ReorderMode; - bool SOStatisticsEnable; - uint32_t SOBufferEnable3; - uint32_t SOBufferEnable2; - uint32_t SOBufferEnable1; - uint32_t SOBufferEnable0; - uint32_t Stream3VertexReadOffset; - uint32_t Stream3VertexReadLength; - uint32_t Stream2VertexReadOffset; - uint32_t Stream2VertexReadLength; - uint32_t Stream1VertexReadOffset; - uint32_t Stream1VertexReadLength; - uint32_t Stream0VertexReadOffset; - uint32_t Stream0VertexReadLength; -}; - -static inline void -GEN75_3DSTATE_STREAMOUT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_STREAMOUT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SOFunctionEnable, 31, 31) | - __gen_field(values->RenderingDisable, 30, 30) | - __gen_field(values->RenderStreamSelect, 27, 28) | - __gen_field(values->ReorderMode, 26, 26) | - __gen_field(values->SOStatisticsEnable, 25, 25) | - __gen_field(values->SOBufferEnable3, 11, 11) | - __gen_field(values->SOBufferEnable2, 10, 10) | - __gen_field(values->SOBufferEnable1, 9, 9) | - __gen_field(values->SOBufferEnable0, 8, 8) | - 0; - - dw[2] = - __gen_field(values->Stream3VertexReadOffset, 29, 29) | - __gen_field(values->Stream3VertexReadLength, 24, 28) | - __gen_field(values->Stream2VertexReadOffset, 21, 21) | - __gen_field(values->Stream2VertexReadLength, 16, 20) | - __gen_field(values->Stream1VertexReadOffset, 13, 13) | - __gen_field(values->Stream1VertexReadLength, 8, 12) | - __gen_field(values->Stream0VertexReadOffset, 5, 5) | - __gen_field(values->Stream0VertexReadLength, 0, 4) | - 0; - -} - -#define GEN75_3DSTATE_TE_length_bias 0x00000002 -#define GEN75_3DSTATE_TE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 28, \ - .DwordLength = 2 - -#define GEN75_3DSTATE_TE_length 0x00000004 - -struct GEN75_3DSTATE_TE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define INTEGER 0 -#define ODD_FRACTIONAL 1 -#define EVEN_FRACTIONAL 2 - uint32_t Partitioning; -#define POINT 0 -#define OUTPUT_LINE 1 -#define OUTPUT_TRI_CW 2 -#define OUTPUT_TRI_CCW 3 - uint32_t OutputTopology; -#define QUAD 0 -#define TRI 1 -#define ISOLINE 2 - uint32_t TEDomain; -#define HW_TESS 0 -#define SW_TESS 1 - uint32_t TEMode; - bool TEEnable; - float MaximumTessellationFactorOdd; - float MaximumTessellationFactorNotOdd; -}; - -static inline void -GEN75_3DSTATE_TE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_TE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->Partitioning, 12, 13) | - __gen_field(values->OutputTopology, 8, 9) | - __gen_field(values->TEDomain, 4, 5) | - __gen_field(values->TEMode, 1, 2) | - __gen_field(values->TEEnable, 0, 0) | - 0; - - dw[2] = - __gen_float(values->MaximumTessellationFactorOdd) | - 0; - - dw[3] = - __gen_float(values->MaximumTessellationFactorNotOdd) | - 0; - -} - -#define GEN75_3DSTATE_URB_DS_length_bias 0x00000002 -#define GEN75_3DSTATE_URB_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 50, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_URB_DS_length 0x00000002 - -struct GEN75_3DSTATE_URB_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t DSURBStartingAddress; - uint32_t DSURBEntryAllocationSize; - uint32_t DSNumberofURBEntries; -}; - -static inline void -GEN75_3DSTATE_URB_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_URB_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->DSURBStartingAddress, 25, 30) | - __gen_field(values->DSURBEntryAllocationSize, 16, 24) | - __gen_field(values->DSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN75_3DSTATE_URB_GS_length_bias 0x00000002 -#define GEN75_3DSTATE_URB_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 51, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_URB_GS_length 0x00000002 - -struct GEN75_3DSTATE_URB_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t GSURBStartingAddress; - uint32_t GSURBEntryAllocationSize; - uint32_t GSNumberofURBEntries; -}; - -static inline void -GEN75_3DSTATE_URB_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_URB_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->GSURBStartingAddress, 25, 30) | - __gen_field(values->GSURBEntryAllocationSize, 16, 24) | - __gen_field(values->GSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN75_3DSTATE_URB_HS_length_bias 0x00000002 -#define GEN75_3DSTATE_URB_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 49, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_URB_HS_length 0x00000002 - -struct GEN75_3DSTATE_URB_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t HSURBStartingAddress; - uint32_t HSURBEntryAllocationSize; - uint32_t HSNumberofURBEntries; -}; - -static inline void -GEN75_3DSTATE_URB_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_URB_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->HSURBStartingAddress, 25, 30) | - __gen_field(values->HSURBEntryAllocationSize, 16, 24) | - __gen_field(values->HSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN75_3DSTATE_VERTEX_BUFFERS_length_bias 0x00000002 -#define GEN75_3DSTATE_VERTEX_BUFFERS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 8 - -#define GEN75_3DSTATE_VERTEX_BUFFERS_length 0x00000000 - -#define GEN75_VERTEX_BUFFER_STATE_length 0x00000004 - -struct GEN75_VERTEX_BUFFER_STATE { - uint32_t VertexBufferIndex; -#define VERTEXDATA 0 -#define INSTANCEDATA 1 - uint32_t BufferAccessType; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE VertexBufferMemoryObjectControlState; - uint32_t AddressModifyEnable; - bool NullVertexBuffer; - uint32_t VertexFetchInvalidate; - uint32_t BufferPitch; - __gen_address_type BufferStartingAddress; - __gen_address_type EndAddress; - uint32_t InstanceDataStepRate; -}; - -static inline void -GEN75_VERTEX_BUFFER_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_VERTEX_BUFFER_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_VertexBufferMemoryObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_VertexBufferMemoryObjectControlState, &values->VertexBufferMemoryObjectControlState); - dw[0] = - __gen_field(values->VertexBufferIndex, 26, 31) | - __gen_field(values->BufferAccessType, 20, 20) | - __gen_field(dw_VertexBufferMemoryObjectControlState, 16, 19) | - __gen_field(values->AddressModifyEnable, 14, 14) | - __gen_field(values->NullVertexBuffer, 13, 13) | - __gen_field(values->VertexFetchInvalidate, 12, 12) | - __gen_field(values->BufferPitch, 0, 11) | - 0; - - uint32_t dw1 = - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->BufferStartingAddress, dw1); - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->EndAddress, dw2); - - dw[3] = - __gen_field(values->InstanceDataStepRate, 0, 31) | - 0; - -} - -struct GEN75_3DSTATE_VERTEX_BUFFERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_VERTEX_BUFFERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_VERTEX_BUFFERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_VERTEX_ELEMENTS_length_bias 0x00000002 -#define GEN75_3DSTATE_VERTEX_ELEMENTS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 9 - -#define GEN75_3DSTATE_VERTEX_ELEMENTS_length 0x00000000 - -#define GEN75_VERTEX_ELEMENT_STATE_length 0x00000002 - -struct GEN75_VERTEX_ELEMENT_STATE { - uint32_t VertexBufferIndex; - bool Valid; - uint32_t SourceElementFormat; - bool EdgeFlagEnable; - uint32_t SourceElementOffset; - uint32_t Component0Control; - uint32_t Component1Control; - uint32_t Component2Control; - uint32_t Component3Control; -}; - -static inline void -GEN75_VERTEX_ELEMENT_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_VERTEX_ELEMENT_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->VertexBufferIndex, 26, 31) | - __gen_field(values->Valid, 25, 25) | - __gen_field(values->SourceElementFormat, 16, 24) | - __gen_field(values->EdgeFlagEnable, 15, 15) | - __gen_field(values->SourceElementOffset, 0, 11) | - 0; - - dw[1] = - __gen_field(values->Component0Control, 28, 30) | - __gen_field(values->Component1Control, 24, 26) | - __gen_field(values->Component2Control, 20, 22) | - __gen_field(values->Component3Control, 16, 18) | - 0; - -} - -struct GEN75_3DSTATE_VERTEX_ELEMENTS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN75_3DSTATE_VERTEX_ELEMENTS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_VERTEX_ELEMENTS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_3DSTATE_VF_length_bias 0x00000002 -#define GEN75_3DSTATE_VF_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 12, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_VF_length 0x00000002 - -struct GEN75_3DSTATE_VF { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - bool IndexedDrawCutIndexEnable; - uint32_t DwordLength; - uint32_t CutIndex; -}; - -static inline void -GEN75_3DSTATE_VF_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_VF * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->IndexedDrawCutIndexEnable, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->CutIndex, 0, 31) | - 0; - -} - -#define GEN75_3DSTATE_VF_STATISTICS_length_bias 0x00000001 -#define GEN75_3DSTATE_VF_STATISTICS_header \ - .CommandType = 3, \ - .CommandSubType = 1, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 11 - -#define GEN75_3DSTATE_VF_STATISTICS_length 0x00000001 - -struct GEN75_3DSTATE_VF_STATISTICS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - bool StatisticsEnable; -}; - -static inline void -GEN75_3DSTATE_VF_STATISTICS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_VF_STATISTICS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->StatisticsEnable, 0, 0) | - 0; - -} - -#define GEN75_3DSTATE_VIEWPORT_STATE_POINTERS_CC_length_bias 0x00000002 -#define GEN75_3DSTATE_VIEWPORT_STATE_POINTERS_CC_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 35, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_VIEWPORT_STATE_POINTERS_CC_length 0x00000002 - -struct GEN75_3DSTATE_VIEWPORT_STATE_POINTERS_CC { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t CCViewportPointer; -}; - -static inline void -GEN75_3DSTATE_VIEWPORT_STATE_POINTERS_CC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_VIEWPORT_STATE_POINTERS_CC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->CCViewportPointer, 5, 31) | - 0; - -} - -#define GEN75_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_length_bias 0x00000002 -#define GEN75_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 33, \ - .DwordLength = 0 - -#define GEN75_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_length 0x00000002 - -struct GEN75_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SFClipViewportPointer; -}; - -static inline void -GEN75_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->SFClipViewportPointer, 6, 31) | - 0; - -} - -#define GEN75_3DSTATE_VS_length_bias 0x00000002 -#define GEN75_3DSTATE_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 16, \ - .DwordLength = 4 - -#define GEN75_3DSTATE_VS_length 0x00000006 - -struct GEN75_3DSTATE_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t KernelStartPointer; -#define Multiple 0 -#define Single 1 - uint32_t SingleVertexDispatch; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnableVME; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define NormalPriority 0 -#define HighPriority 1 - uint32_t ThreadPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool VSaccessesUAV; - bool SoftwareExceptionEnable; - uint32_t ScratchSpaceBaseOffset; - uint32_t PerThreadScratchSpace; - uint32_t DispatchGRFStartRegisterforURBData; - uint32_t VertexURBEntryReadLength; - uint32_t VertexURBEntryReadOffset; - uint32_t MaximumNumberofThreads; - bool StatisticsEnable; - bool VertexCacheDisable; - bool VSFunctionEnable; -}; - -static inline void -GEN75_3DSTATE_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->KernelStartPointer, 6, 31) | - 0; - - dw[2] = - __gen_field(values->SingleVertexDispatch, 31, 31) | - __gen_field(values->VectorMaskEnableVME, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->VSaccessesUAV, 12, 12) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - dw[3] = - __gen_offset(values->ScratchSpaceBaseOffset, 10, 31) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = - __gen_field(values->DispatchGRFStartRegisterforURBData, 20, 24) | - __gen_field(values->VertexURBEntryReadLength, 11, 16) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - 0; - - dw[5] = - __gen_field(values->MaximumNumberofThreads, 23, 31) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->VertexCacheDisable, 1, 1) | - __gen_field(values->VSFunctionEnable, 0, 0) | - 0; - -} - -#define GEN75_3DSTATE_WM_length_bias 0x00000002 -#define GEN75_3DSTATE_WM_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 20, \ - .DwordLength = 1 - -#define GEN75_3DSTATE_WM_length 0x00000003 - -struct GEN75_3DSTATE_WM { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool StatisticsEnable; - bool DepthBufferClear; - bool ThreadDispatchEnable; - bool DepthBufferResolveEnable; - bool HierarchicalDepthBufferResolveEnable; - bool LegacyDiamondLineRasterization; - bool PixelShaderKillPixel; -#define PSCDEPTH_OFF 0 -#define PSCDEPTH_ON 1 -#define PSCDEPTH_ON_GE 2 -#define PSCDEPTH_ON_LE 3 - uint32_t PixelShaderComputedDepthMode; -#define EDSC_NORMAL 0 -#define EDSC_PSEXEC 1 -#define EDSC_PREPS 2 - uint32_t EarlyDepthStencilControl; - bool PixelShaderUsesSourceDepth; - bool PixelShaderUsesSourceW; -#define INTERP_PIXEL 0 -#define INTERP_CENTROID 2 -#define INTERP_SAMPLE 3 - uint32_t PositionZWInterpolationMode; - uint32_t BarycentricInterpolationMode; - bool PixelShaderUsesInputCoverageMask; - uint32_t LineEndCapAntialiasingRegionWidth; - uint32_t LineAntialiasingRegionWidth; - bool RTIndependentRasterizationEnable; - bool PolygonStippleEnable; - bool LineStippleEnable; -#define RASTRULE_UPPER_LEFT 0 -#define RASTRULE_UPPER_RIGHT 1 - uint32_t PointRasterizationRule; -#define MSRASTMODE_OFF_PIXEL 0 -#define MSRASTMODE_OFF_PATTERN 1 -#define MSRASTMODE_ON_PIXEL 2 -#define MSRASTMODE_ON_PATTERN 3 - uint32_t MultisampleRasterizationMode; -#define MSDISPMODE_PERSAMPLE 0 -#define MSDISPMODE_PERPIXEL 1 - uint32_t MultisampleDispatchMode; -#define OFF 0 -#define ON 1 - uint32_t PSUAVonly; -}; - -static inline void -GEN75_3DSTATE_WM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_3DSTATE_WM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->StatisticsEnable, 31, 31) | - __gen_field(values->DepthBufferClear, 30, 30) | - __gen_field(values->ThreadDispatchEnable, 29, 29) | - __gen_field(values->DepthBufferResolveEnable, 28, 28) | - __gen_field(values->HierarchicalDepthBufferResolveEnable, 27, 27) | - __gen_field(values->LegacyDiamondLineRasterization, 26, 26) | - __gen_field(values->PixelShaderKillPixel, 25, 25) | - __gen_field(values->PixelShaderComputedDepthMode, 23, 24) | - __gen_field(values->EarlyDepthStencilControl, 21, 22) | - __gen_field(values->PixelShaderUsesSourceDepth, 20, 20) | - __gen_field(values->PixelShaderUsesSourceW, 19, 19) | - __gen_field(values->PositionZWInterpolationMode, 17, 18) | - __gen_field(values->BarycentricInterpolationMode, 11, 16) | - __gen_field(values->PixelShaderUsesInputCoverageMask, 10, 10) | - __gen_field(values->LineEndCapAntialiasingRegionWidth, 8, 9) | - __gen_field(values->LineAntialiasingRegionWidth, 6, 7) | - __gen_field(values->RTIndependentRasterizationEnable, 5, 5) | - __gen_field(values->PolygonStippleEnable, 4, 4) | - __gen_field(values->LineStippleEnable, 3, 3) | - __gen_field(values->PointRasterizationRule, 2, 2) | - __gen_field(values->MultisampleRasterizationMode, 0, 1) | - 0; - - dw[2] = - __gen_field(values->MultisampleDispatchMode, 31, 31) | - __gen_field(values->PSUAVonly, 30, 30) | - 0; - -} - -#define GEN75_GPGPU_OBJECT_length_bias 0x00000002 -#define GEN75_GPGPU_OBJECT_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcode = 4, \ - .DwordLength = 6 - -#define GEN75_GPGPU_OBJECT_length 0x00000008 - -struct GEN75_GPGPU_OBJECT { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - bool PredicateEnable; - uint32_t DwordLength; - uint32_t SharedLocalMemoryFixedOffset; - uint32_t InterfaceDescriptorOffset; - uint32_t SharedLocalMemoryOffset; - uint32_t EndofThreadGroup; -#define Slice0 0 -#define Slice1 1 - uint32_t SliceDestinationSelect; -#define HalfSlice1 2 -#define HalfSlice0 1 -#define EitherHalfSlice 0 - uint32_t HalfSliceDestinationSelect; - uint32_t IndirectDataLength; - uint32_t IndirectDataStartAddress; - uint32_t ThreadGroupIDX; - uint32_t ThreadGroupIDY; - uint32_t ThreadGroupIDZ; - uint32_t ExecutionMask; -}; - -static inline void -GEN75_GPGPU_OBJECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_GPGPU_OBJECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->PredicateEnable, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SharedLocalMemoryFixedOffset, 7, 7) | - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->SharedLocalMemoryOffset, 28, 31) | - __gen_field(values->EndofThreadGroup, 24, 24) | - __gen_field(values->SliceDestinationSelect, 19, 19) | - __gen_field(values->HalfSliceDestinationSelect, 17, 18) | - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - dw[3] = - __gen_offset(values->IndirectDataStartAddress, 0, 31) | - 0; - - dw[4] = - __gen_field(values->ThreadGroupIDX, 0, 31) | - 0; - - dw[5] = - __gen_field(values->ThreadGroupIDY, 0, 31) | - 0; - - dw[6] = - __gen_field(values->ThreadGroupIDZ, 0, 31) | - 0; - - dw[7] = - __gen_field(values->ExecutionMask, 0, 31) | - 0; - -} - -#define GEN75_GPGPU_WALKER_length_bias 0x00000002 -#define GEN75_GPGPU_WALKER_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcodeA = 5, \ - .DwordLength = 9 - -#define GEN75_GPGPU_WALKER_length 0x0000000b - -struct GEN75_GPGPU_WALKER { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcodeA; - bool IndirectParameterEnable; - bool PredicateEnable; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; -#define SIMD8 0 -#define SIMD16 1 -#define SIMD32 2 - uint32_t SIMDSize; - uint32_t ThreadDepthCounterMaximum; - uint32_t ThreadHeightCounterMaximum; - uint32_t ThreadWidthCounterMaximum; - uint32_t ThreadGroupIDStartingX; - uint32_t ThreadGroupIDXDimension; - uint32_t ThreadGroupIDStartingY; - uint32_t ThreadGroupIDYDimension; - uint32_t ThreadGroupIDStartingZ; - uint32_t ThreadGroupIDZDimension; - uint32_t RightExecutionMask; - uint32_t BottomExecutionMask; -}; - -static inline void -GEN75_GPGPU_WALKER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_GPGPU_WALKER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcodeA, 16, 23) | - __gen_field(values->IndirectParameterEnable, 10, 10) | - __gen_field(values->PredicateEnable, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->SIMDSize, 30, 31) | - __gen_field(values->ThreadDepthCounterMaximum, 16, 21) | - __gen_field(values->ThreadHeightCounterMaximum, 8, 13) | - __gen_field(values->ThreadWidthCounterMaximum, 0, 5) | - 0; - - dw[3] = - __gen_field(values->ThreadGroupIDStartingX, 0, 31) | - 0; - - dw[4] = - __gen_field(values->ThreadGroupIDXDimension, 0, 31) | - 0; - - dw[5] = - __gen_field(values->ThreadGroupIDStartingY, 0, 31) | - 0; - - dw[6] = - __gen_field(values->ThreadGroupIDYDimension, 0, 31) | - 0; - - dw[7] = - __gen_field(values->ThreadGroupIDStartingZ, 0, 31) | - 0; - - dw[8] = - __gen_field(values->ThreadGroupIDZDimension, 0, 31) | - 0; - - dw[9] = - __gen_field(values->RightExecutionMask, 0, 31) | - 0; - - dw[10] = - __gen_field(values->BottomExecutionMask, 0, 31) | - 0; - -} - -#define GEN75_MEDIA_CURBE_LOAD_length_bias 0x00000002 -#define GEN75_MEDIA_CURBE_LOAD_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 1, \ - .DwordLength = 2 - -#define GEN75_MEDIA_CURBE_LOAD_length 0x00000004 - -struct GEN75_MEDIA_CURBE_LOAD { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t CURBETotalDataLength; - uint32_t CURBEDataStartAddress; -}; - -static inline void -GEN75_MEDIA_CURBE_LOAD_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MEDIA_CURBE_LOAD * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - 0; - - dw[2] = - __gen_field(values->CURBETotalDataLength, 0, 16) | - 0; - - dw[3] = - __gen_field(values->CURBEDataStartAddress, 0, 31) | - 0; - -} - -#define GEN75_MEDIA_INTERFACE_DESCRIPTOR_LOAD_length_bias 0x00000002 -#define GEN75_MEDIA_INTERFACE_DESCRIPTOR_LOAD_header\ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 2, \ - .DwordLength = 2 - -#define GEN75_MEDIA_INTERFACE_DESCRIPTOR_LOAD_length 0x00000004 - -struct GEN75_MEDIA_INTERFACE_DESCRIPTOR_LOAD { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorTotalLength; - uint32_t InterfaceDescriptorDataStartAddress; -}; - -static inline void -GEN75_MEDIA_INTERFACE_DESCRIPTOR_LOAD_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MEDIA_INTERFACE_DESCRIPTOR_LOAD * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - 0; - - dw[2] = - __gen_field(values->InterfaceDescriptorTotalLength, 0, 16) | - 0; - - dw[3] = - __gen_offset(values->InterfaceDescriptorDataStartAddress, 0, 31) | - 0; - -} - -#define GEN75_MEDIA_OBJECT_length_bias 0x00000002 -#define GEN75_MEDIA_OBJECT_header \ - .CommandType = 3, \ - .MediaCommandPipeline = 2, \ - .MediaCommandOpcode = 1, \ - .MediaCommandSubOpcode = 0 - -#define GEN75_MEDIA_OBJECT_length 0x00000000 - -struct GEN75_MEDIA_OBJECT { - uint32_t CommandType; - uint32_t MediaCommandPipeline; - uint32_t MediaCommandOpcode; - uint32_t MediaCommandSubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - bool ChildrenPresent; -#define Nothreadsynchronization 0 -#define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 - uint32_t ThreadSynchronization; -#define Notusingscoreboard 0 -#define Usingscoreboard 1 - uint32_t UseScoreboard; -#define Slice0 0 -#define Slice1 1 -#define EitherSlice 0 - uint32_t SliceDestinationSelect; -#define HalfSlice1 2 -#define HalfSlice0 1 -#define Eitherhalfslice 0 - uint32_t HalfSliceDestinationSelect; - uint32_t IndirectDataLength; - __gen_address_type IndirectDataStartAddress; - uint32_t ScoredboardY; - uint32_t ScoreboardX; - uint32_t ScoreboardColor; - bool ScoreboardMask; - /* variable length fields follow */ -}; - -static inline void -GEN75_MEDIA_OBJECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MEDIA_OBJECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MediaCommandPipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->MediaCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->ChildrenPresent, 31, 31) | - __gen_field(values->ThreadSynchronization, 24, 24) | - __gen_field(values->UseScoreboard, 21, 21) | - __gen_field(values->SliceDestinationSelect, 19, 19) | - __gen_field(values->HalfSliceDestinationSelect, 17, 18) | - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - uint32_t dw3 = - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->IndirectDataStartAddress, dw3); - - dw[4] = - __gen_field(values->ScoredboardY, 16, 24) | - __gen_field(values->ScoreboardX, 0, 8) | - 0; - - dw[5] = - __gen_field(values->ScoreboardColor, 16, 19) | - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_MEDIA_OBJECT_PRT_length_bias 0x00000002 -#define GEN75_MEDIA_OBJECT_PRT_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcode = 2, \ - .DwordLength = 14 - -#define GEN75_MEDIA_OBJECT_PRT_length 0x00000010 - -struct GEN75_MEDIA_OBJECT_PRT { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - bool ChildrenPresent; - bool PRT_FenceNeeded; -#define Rootthreadqueue 0 -#define VFEstateflush 1 - uint32_t PRT_FenceType; - uint32_t InlineData[12]; -}; - -static inline void -GEN75_MEDIA_OBJECT_PRT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MEDIA_OBJECT_PRT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->ChildrenPresent, 31, 31) | - __gen_field(values->PRT_FenceNeeded, 23, 23) | - __gen_field(values->PRT_FenceType, 22, 22) | - 0; - - dw[3] = - 0; - - for (uint32_t i = 0, j = 4; i < 12; i += 1, j++) { - dw[j] = - __gen_field(values->InlineData[i + 0], 0, 31) | - 0; - } - -} - -#define GEN75_MEDIA_OBJECT_WALKER_length_bias 0x00000002 -#define GEN75_MEDIA_OBJECT_WALKER_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcode = 3 - -#define GEN75_MEDIA_OBJECT_WALKER_length 0x00000000 - -struct GEN75_MEDIA_OBJECT_WALKER { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - bool ChildrenPresent; -#define Nothreadsynchronization 0 -#define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 - uint32_t ThreadSynchronization; -#define Notusingscoreboard 0 -#define Usingscoreboard 1 - uint32_t UseScoreboard; - uint32_t IndirectDataLength; - uint32_t IndirectDataStartAddress; - bool ScoreboardMask; - bool DualMode; - bool Repel; - bool QuadMode; - uint32_t ColorCountMinusOne; - uint32_t MiddleLoopExtraSteps; - uint32_t LocalMidLoopUnitY; - uint32_t MidLoopUnitX; - uint32_t GlobalLoopExecCount; - uint32_t LocalLoopExecCount; - uint32_t BlockResolutionY; - uint32_t BlockResolutionX; - uint32_t LocalStartY; - uint32_t LocalStartX; - uint32_t LocalOuterLoopStrideY; - uint32_t LocalOuterLoopStrideX; - uint32_t LocalInnerLoopUnitY; - uint32_t LocalInnerLoopUnitX; - uint32_t GlobalResolutionY; - uint32_t GlobalResolutionX; - uint32_t GlobalStartY; - uint32_t GlobalStartX; - uint32_t GlobalOuterLoopStrideY; - uint32_t GlobalOuterLoopStrideX; - uint32_t GlobalInnerLoopUnitY; - uint32_t GlobalInnerLoopUnitX; - /* variable length fields follow */ -}; - -static inline void -GEN75_MEDIA_OBJECT_WALKER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MEDIA_OBJECT_WALKER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->ChildrenPresent, 31, 31) | - __gen_field(values->ThreadSynchronization, 24, 24) | - __gen_field(values->UseScoreboard, 21, 21) | - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - dw[3] = - __gen_offset(values->IndirectDataStartAddress, 0, 31) | - 0; - - dw[4] = - 0; - - dw[5] = - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - dw[6] = - __gen_field(values->DualMode, 31, 31) | - __gen_field(values->Repel, 30, 30) | - __gen_field(values->QuadMode, 29, 29) | - __gen_field(values->ColorCountMinusOne, 24, 27) | - __gen_field(values->MiddleLoopExtraSteps, 16, 20) | - __gen_field(values->LocalMidLoopUnitY, 12, 13) | - __gen_field(values->MidLoopUnitX, 8, 9) | - 0; - - dw[7] = - __gen_field(values->GlobalLoopExecCount, 16, 25) | - __gen_field(values->LocalLoopExecCount, 0, 9) | - 0; - - dw[8] = - __gen_field(values->BlockResolutionY, 16, 24) | - __gen_field(values->BlockResolutionX, 0, 8) | - 0; - - dw[9] = - __gen_field(values->LocalStartY, 16, 24) | - __gen_field(values->LocalStartX, 0, 8) | - 0; - - dw[10] = - 0; - - dw[11] = - __gen_field(values->LocalOuterLoopStrideY, 16, 25) | - __gen_field(values->LocalOuterLoopStrideX, 0, 9) | - 0; - - dw[12] = - __gen_field(values->LocalInnerLoopUnitY, 16, 25) | - __gen_field(values->LocalInnerLoopUnitX, 0, 9) | - 0; - - dw[13] = - __gen_field(values->GlobalResolutionY, 16, 24) | - __gen_field(values->GlobalResolutionX, 0, 8) | - 0; - - dw[14] = - __gen_field(values->GlobalStartY, 16, 25) | - __gen_field(values->GlobalStartX, 0, 9) | - 0; - - dw[15] = - __gen_field(values->GlobalOuterLoopStrideY, 16, 25) | - __gen_field(values->GlobalOuterLoopStrideX, 0, 9) | - 0; - - dw[16] = - __gen_field(values->GlobalInnerLoopUnitY, 16, 25) | - __gen_field(values->GlobalInnerLoopUnitX, 0, 9) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_MEDIA_STATE_FLUSH_length_bias 0x00000002 -#define GEN75_MEDIA_STATE_FLUSH_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 4, \ - .DwordLength = 0 - -#define GEN75_MEDIA_STATE_FLUSH_length 0x00000002 - -struct GEN75_MEDIA_STATE_FLUSH { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - bool DisablePreemption; - bool FlushtoGO; - uint32_t WatermarkRequired; - uint32_t InterfaceDescriptorOffset; -}; - -static inline void -GEN75_MEDIA_STATE_FLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MEDIA_STATE_FLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->DisablePreemption, 8, 8) | - __gen_field(values->FlushtoGO, 7, 7) | - __gen_field(values->WatermarkRequired, 6, 6) | - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - -} - -#define GEN75_MEDIA_VFE_STATE_length_bias 0x00000002 -#define GEN75_MEDIA_VFE_STATE_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 0, \ - .DwordLength = 6 - -#define GEN75_MEDIA_VFE_STATE_length 0x00000008 - -struct GEN75_MEDIA_VFE_STATE { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t ScratchSpaceBasePointer; - uint32_t StackSize; - uint32_t PerThreadScratchSpace; - uint32_t MaximumNumberofThreads; - uint32_t NumberofURBEntries; -#define Maintainingtheexistingtimestampstate 0 -#define Resettingrelativetimerandlatchingtheglobaltimestamp 1 - uint32_t ResetGatewayTimer; -#define MaintainingOpenGatewayForwardMsgCloseGatewayprotocollegacymode 0 -#define BypassingOpenGatewayCloseGatewayprotocol 1 - uint32_t BypassGatewayControl; - uint32_t GPGPUMode; - uint32_t HalfSliceDisable; - uint32_t URBEntryAllocationSize; - uint32_t CURBEAllocationSize; -#define Scoreboarddisabled 0 -#define Scoreboardenabled 1 - uint32_t ScoreboardEnable; -#define StallingScoreboard 0 -#define NonStallingScoreboard 1 - uint32_t ScoreboardType; - uint32_t ScoreboardMask; - uint32_t Scoreboard3DeltaY; - uint32_t Scoreboard3DeltaX; - uint32_t Scoreboard2DeltaY; - uint32_t Scoreboard2DeltaX; - uint32_t Scoreboard1DeltaY; - uint32_t Scoreboard1DeltaX; - uint32_t Scoreboard0DeltaY; - uint32_t Scoreboard0DeltaX; - uint32_t Scoreboard7DeltaY; - uint32_t Scoreboard7DeltaX; - uint32_t Scoreboard6DeltaY; - uint32_t Scoreboard6DeltaX; - uint32_t Scoreboard5DeltaY; - uint32_t Scoreboard5DeltaX; - uint32_t Scoreboard4DeltaY; - uint32_t Scoreboard4DeltaX; -}; - -static inline void -GEN75_MEDIA_VFE_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MEDIA_VFE_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_offset(values->ScratchSpaceBasePointer, 10, 31) | - __gen_field(values->StackSize, 4, 7) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[2] = - __gen_field(values->MaximumNumberofThreads, 16, 31) | - __gen_field(values->NumberofURBEntries, 8, 15) | - __gen_field(values->ResetGatewayTimer, 7, 7) | - __gen_field(values->BypassGatewayControl, 6, 6) | - __gen_field(values->GPGPUMode, 2, 2) | - 0; - - dw[3] = - __gen_field(values->HalfSliceDisable, 0, 1) | - 0; - - dw[4] = - __gen_field(values->URBEntryAllocationSize, 16, 31) | - __gen_field(values->CURBEAllocationSize, 0, 15) | - 0; - - dw[5] = - __gen_field(values->ScoreboardEnable, 31, 31) | - __gen_field(values->ScoreboardType, 30, 30) | - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - dw[6] = - __gen_field(values->Scoreboard3DeltaY, 28, 31) | - __gen_field(values->Scoreboard3DeltaX, 24, 27) | - __gen_field(values->Scoreboard2DeltaY, 20, 23) | - __gen_field(values->Scoreboard2DeltaX, 16, 19) | - __gen_field(values->Scoreboard1DeltaY, 12, 15) | - __gen_field(values->Scoreboard1DeltaX, 8, 11) | - __gen_field(values->Scoreboard0DeltaY, 4, 7) | - __gen_field(values->Scoreboard0DeltaX, 0, 3) | - 0; - - dw[7] = - __gen_field(values->Scoreboard7DeltaY, 28, 31) | - __gen_field(values->Scoreboard7DeltaX, 24, 27) | - __gen_field(values->Scoreboard6DeltaY, 20, 23) | - __gen_field(values->Scoreboard6DeltaX, 16, 19) | - __gen_field(values->Scoreboard5DeltaY, 12, 15) | - __gen_field(values->Scoreboard5DeltaX, 8, 11) | - __gen_field(values->Scoreboard4DeltaY, 4, 7) | - __gen_field(values->Scoreboard4DeltaX, 0, 3) | - 0; - -} - -#define GEN75_MI_ARB_CHECK_length_bias 0x00000001 -#define GEN75_MI_ARB_CHECK_header \ - .CommandType = 0, \ - .MICommandOpcode = 5 - -#define GEN75_MI_ARB_CHECK_length 0x00000001 - -struct GEN75_MI_ARB_CHECK { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN75_MI_ARB_CHECK_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_ARB_CHECK * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN75_MI_ARB_ON_OFF_length_bias 0x00000001 -#define GEN75_MI_ARB_ON_OFF_header \ - .CommandType = 0, \ - .MICommandOpcode = 8 - -#define GEN75_MI_ARB_ON_OFF_length 0x00000001 - -struct GEN75_MI_ARB_ON_OFF { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool ArbitrationEnable; -}; - -static inline void -GEN75_MI_ARB_ON_OFF_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_ARB_ON_OFF * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->ArbitrationEnable, 0, 0) | - 0; - -} - -#define GEN75_MI_BATCH_BUFFER_END_length_bias 0x00000001 -#define GEN75_MI_BATCH_BUFFER_END_header \ - .CommandType = 0, \ - .MICommandOpcode = 10 - -#define GEN75_MI_BATCH_BUFFER_END_length 0x00000001 - -struct GEN75_MI_BATCH_BUFFER_END { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN75_MI_BATCH_BUFFER_END_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_BATCH_BUFFER_END * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN75_MI_BATCH_BUFFER_START_length_bias 0x00000002 -#define GEN75_MI_BATCH_BUFFER_START_header \ - .CommandType = 0, \ - .MICommandOpcode = 49, \ - .DwordLength = 0 - -#define GEN75_MI_BATCH_BUFFER_START_length 0x00000002 - -struct GEN75_MI_BATCH_BUFFER_START { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define _1stlevelbatch 0 -#define _2ndlevelbatch 1 - uint32_t _2ndLevelBatchBuffer; - bool AddOffsetEnable; - bool PredicationEnable; - uint32_t NonPrivileged; - bool ClearCommandBufferEnable; - bool ResourceStreamerEnable; -#define ASI_GGTT 0 -#define ASI_PPGTT 1 - uint32_t AddressSpaceIndicator; - uint32_t DwordLength; - __gen_address_type BatchBufferStartAddress; -}; - -static inline void -GEN75_MI_BATCH_BUFFER_START_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_BATCH_BUFFER_START * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->_2ndLevelBatchBuffer, 22, 22) | - __gen_field(values->AddOffsetEnable, 16, 16) | - __gen_field(values->PredicationEnable, 15, 15) | - __gen_field(values->NonPrivileged, 13, 13) | - __gen_field(values->ClearCommandBufferEnable, 11, 11) | - __gen_field(values->ResourceStreamerEnable, 10, 10) | - __gen_field(values->AddressSpaceIndicator, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->BatchBufferStartAddress, dw1); - -} - -#define GEN75_MI_CLFLUSH_length_bias 0x00000002 -#define GEN75_MI_CLFLUSH_header \ - .CommandType = 0, \ - .MICommandOpcode = 39 - -#define GEN75_MI_CLFLUSH_length 0x00000000 - -struct GEN75_MI_CLFLUSH { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t UseGlobalGTT; - uint32_t DwordLength; - __gen_address_type PageBaseAddress; - uint32_t StartingCachelineOffset; - __gen_address_type PageBaseAddressHigh; - /* variable length fields follow */ -}; - -static inline void -GEN75_MI_CLFLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_CLFLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->DwordLength, 0, 9) | - 0; - - uint32_t dw1 = - __gen_field(values->StartingCachelineOffset, 6, 11) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->PageBaseAddress, dw1); - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->PageBaseAddressHigh, dw2); - - /* variable length fields follow */ -} - -#define GEN75_MI_CONDITIONAL_BATCH_BUFFER_END_length_bias 0x00000002 -#define GEN75_MI_CONDITIONAL_BATCH_BUFFER_END_header\ - .CommandType = 0, \ - .MICommandOpcode = 54, \ - .UseGlobalGTT = 0, \ - .CompareSemaphore = 0, \ - .DwordLength = 0 - -#define GEN75_MI_CONDITIONAL_BATCH_BUFFER_END_length 0x00000002 - -struct GEN75_MI_CONDITIONAL_BATCH_BUFFER_END { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t UseGlobalGTT; - uint32_t CompareSemaphore; - uint32_t DwordLength; - uint32_t CompareDataDword; - __gen_address_type CompareAddress; -}; - -static inline void -GEN75_MI_CONDITIONAL_BATCH_BUFFER_END_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_CONDITIONAL_BATCH_BUFFER_END * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->CompareSemaphore, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->CompareDataDword, 0, 31) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->CompareAddress, dw2); - -} - -#define GEN75_MI_FLUSH_length_bias 0x00000001 -#define GEN75_MI_FLUSH_header \ - .CommandType = 0, \ - .MICommandOpcode = 4 - -#define GEN75_MI_FLUSH_length 0x00000001 - -struct GEN75_MI_FLUSH { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool IndirectStatePointersDisable; - bool GenericMediaStateClear; -#define DontReset 0 -#define Reset 1 - bool GlobalSnapshotCountReset; -#define Flush 0 -#define DontFlush 1 - bool RenderCacheFlushInhibit; -#define DontInvalidate 0 -#define Invalidate 1 - bool StateInstructionCacheInvalidate; -}; - -static inline void -GEN75_MI_FLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_FLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->IndirectStatePointersDisable, 5, 5) | - __gen_field(values->GenericMediaStateClear, 4, 4) | - __gen_field(values->GlobalSnapshotCountReset, 3, 3) | - __gen_field(values->RenderCacheFlushInhibit, 2, 2) | - __gen_field(values->StateInstructionCacheInvalidate, 1, 1) | - 0; - -} - -#define GEN75_MI_LOAD_REGISTER_IMM_length_bias 0x00000002 -#define GEN75_MI_LOAD_REGISTER_IMM_header \ - .CommandType = 0, \ - .MICommandOpcode = 34, \ - .DwordLength = 1 - -#define GEN75_MI_LOAD_REGISTER_IMM_length 0x00000003 - -struct GEN75_MI_LOAD_REGISTER_IMM { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t ByteWriteDisables; - uint32_t DwordLength; - uint32_t RegisterOffset; - uint32_t DataDWord; -}; - -static inline void -GEN75_MI_LOAD_REGISTER_IMM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_LOAD_REGISTER_IMM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->ByteWriteDisables, 8, 11) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->RegisterOffset, 2, 22) | - 0; - - dw[2] = - __gen_field(values->DataDWord, 0, 31) | - 0; - -} - -#define GEN75_MI_LOAD_REGISTER_MEM_length_bias 0x00000002 -#define GEN75_MI_LOAD_REGISTER_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 41, \ - .DwordLength = 1 - -#define GEN75_MI_LOAD_REGISTER_MEM_length 0x00000003 - -struct GEN75_MI_LOAD_REGISTER_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool UseGlobalGTT; - uint32_t AsyncModeEnable; - uint32_t DwordLength; - uint32_t RegisterAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN75_MI_LOAD_REGISTER_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_LOAD_REGISTER_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->AsyncModeEnable, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->RegisterAddress, 2, 22) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - -} - -#define GEN75_MI_LOAD_REGISTER_REG_length_bias 0x00000002 -#define GEN75_MI_LOAD_REGISTER_REG_header \ - .CommandType = 0, \ - .MICommandOpcode = 42, \ - .DwordLength = 1 - -#define GEN75_MI_LOAD_REGISTER_REG_length 0x00000003 - -struct GEN75_MI_LOAD_REGISTER_REG { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t SourceRegisterAddress; - uint32_t DestinationRegisterAddress; -}; - -static inline void -GEN75_MI_LOAD_REGISTER_REG_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_LOAD_REGISTER_REG * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->SourceRegisterAddress, 2, 22) | - 0; - - dw[2] = - __gen_offset(values->DestinationRegisterAddress, 2, 22) | - 0; - -} - -#define GEN75_MI_LOAD_SCAN_LINES_EXCL_length_bias 0x00000002 -#define GEN75_MI_LOAD_SCAN_LINES_EXCL_header \ - .CommandType = 0, \ - .MICommandOpcode = 19, \ - .DwordLength = 0 - -#define GEN75_MI_LOAD_SCAN_LINES_EXCL_length 0x00000002 - -struct GEN75_MI_LOAD_SCAN_LINES_EXCL { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define DisplayPlaneA 0 -#define DisplayPlaneB 1 -#define DisplayPlaneC 4 - uint32_t DisplayPlaneSelect; - uint32_t DwordLength; - uint32_t StartScanLineNumber; - uint32_t EndScanLineNumber; -}; - -static inline void -GEN75_MI_LOAD_SCAN_LINES_EXCL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_LOAD_SCAN_LINES_EXCL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DisplayPlaneSelect, 19, 21) | - __gen_field(values->DwordLength, 0, 5) | - 0; - - dw[1] = - __gen_field(values->StartScanLineNumber, 16, 28) | - __gen_field(values->EndScanLineNumber, 0, 12) | - 0; - -} - -#define GEN75_MI_LOAD_SCAN_LINES_INCL_length_bias 0x00000002 -#define GEN75_MI_LOAD_SCAN_LINES_INCL_header \ - .CommandType = 0, \ - .MICommandOpcode = 18, \ - .DwordLength = 0 - -#define GEN75_MI_LOAD_SCAN_LINES_INCL_length 0x00000002 - -struct GEN75_MI_LOAD_SCAN_LINES_INCL { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define DisplayPlaneA 0 -#define DisplayPlaneB 1 -#define DisplayPlaneC 4 - uint32_t DisplayPlaneSelect; - uint32_t DwordLength; - uint32_t StartScanLineNumber; - uint32_t EndScanLineNumber; -}; - -static inline void -GEN75_MI_LOAD_SCAN_LINES_INCL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_LOAD_SCAN_LINES_INCL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DisplayPlaneSelect, 19, 21) | - __gen_field(values->DwordLength, 0, 5) | - 0; - - dw[1] = - __gen_field(values->StartScanLineNumber, 16, 28) | - __gen_field(values->EndScanLineNumber, 0, 12) | - 0; - -} - -#define GEN75_MI_LOAD_URB_MEM_length_bias 0x00000002 -#define GEN75_MI_LOAD_URB_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 44, \ - .DwordLength = 1 - -#define GEN75_MI_LOAD_URB_MEM_length 0x00000003 - -struct GEN75_MI_LOAD_URB_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t URBAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN75_MI_LOAD_URB_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_LOAD_URB_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->URBAddress, 2, 14) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - -} - -#define GEN75_MI_MATH_length_bias 0x00000002 -#define GEN75_MI_MATH_header \ - .CommandType = 0, \ - .MICommandOpcode = 26 - -#define GEN75_MI_MATH_length 0x00000000 - -struct GEN75_MI_MATH { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t ALUINSTRUCTION1; - uint32_t ALUINSTRUCTION2; - /* variable length fields follow */ -}; - -static inline void -GEN75_MI_MATH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_MATH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 5) | - 0; - - dw[1] = - __gen_field(values->ALUINSTRUCTION1, 0, 31) | - 0; - - dw[2] = - __gen_field(values->ALUINSTRUCTION2, 0, 31) | - 0; - - /* variable length fields follow */ -} - -#define GEN75_MI_NOOP_length_bias 0x00000001 -#define GEN75_MI_NOOP_header \ - .CommandType = 0, \ - .MICommandOpcode = 0 - -#define GEN75_MI_NOOP_length 0x00000001 - -struct GEN75_MI_NOOP { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool IdentificationNumberRegisterWriteEnable; - uint32_t IdentificationNumber; -}; - -static inline void -GEN75_MI_NOOP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_NOOP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->IdentificationNumberRegisterWriteEnable, 22, 22) | - __gen_field(values->IdentificationNumber, 0, 21) | - 0; - -} - -#define GEN75_MI_PREDICATE_length_bias 0x00000001 -#define GEN75_MI_PREDICATE_header \ - .CommandType = 0, \ - .MICommandOpcode = 12 - -#define GEN75_MI_PREDICATE_length 0x00000001 - -struct GEN75_MI_PREDICATE { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define LOAD_KEEP 0 -#define LOAD_LOAD 2 -#define LOAD_LOADINV 3 - uint32_t LoadOperation; -#define COMBINE_SET 0 -#define COMBINE_AND 1 -#define COMBINE_OR 2 -#define COMBINE_XOR 3 - uint32_t CombineOperation; -#define COMPARE_SRCS_EQUAL 2 -#define COMPARE_DELTAS_EQUAL 3 - uint32_t CompareOperation; -}; - -static inline void -GEN75_MI_PREDICATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_PREDICATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->LoadOperation, 6, 7) | - __gen_field(values->CombineOperation, 3, 4) | - __gen_field(values->CompareOperation, 0, 1) | - 0; - -} - -#define GEN75_MI_REPORT_HEAD_length_bias 0x00000001 -#define GEN75_MI_REPORT_HEAD_header \ - .CommandType = 0, \ - .MICommandOpcode = 7 - -#define GEN75_MI_REPORT_HEAD_length 0x00000001 - -struct GEN75_MI_REPORT_HEAD { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN75_MI_REPORT_HEAD_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_REPORT_HEAD * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN75_MI_RS_CONTEXT_length_bias 0x00000001 -#define GEN75_MI_RS_CONTEXT_header \ - .CommandType = 0, \ - .MICommandOpcode = 15 - -#define GEN75_MI_RS_CONTEXT_length 0x00000001 - -struct GEN75_MI_RS_CONTEXT { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define RS_RESTORE 0 -#define RS_SAVE 1 - uint32_t ResourceStreamerSave; -}; - -static inline void -GEN75_MI_RS_CONTEXT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_RS_CONTEXT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->ResourceStreamerSave, 0, 0) | - 0; - -} - -#define GEN75_MI_RS_CONTROL_length_bias 0x00000001 -#define GEN75_MI_RS_CONTROL_header \ - .CommandType = 0, \ - .MICommandOpcode = 6 - -#define GEN75_MI_RS_CONTROL_length 0x00000001 - -struct GEN75_MI_RS_CONTROL { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define RS_STOP 0 -#define RS_START 1 - uint32_t ResourceStreamerControl; -}; - -static inline void -GEN75_MI_RS_CONTROL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_RS_CONTROL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->ResourceStreamerControl, 0, 0) | - 0; - -} - -#define GEN75_MI_RS_STORE_DATA_IMM_length_bias 0x00000002 -#define GEN75_MI_RS_STORE_DATA_IMM_header \ - .CommandType = 0, \ - .MICommandOpcode = 43, \ - .DwordLength = 2 - -#define GEN75_MI_RS_STORE_DATA_IMM_length 0x00000004 - -struct GEN75_MI_RS_STORE_DATA_IMM { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - __gen_address_type DestinationAddress; - uint32_t CoreModeEnable; - uint32_t DataDWord0; -}; - -static inline void -GEN75_MI_RS_STORE_DATA_IMM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_RS_STORE_DATA_IMM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - 0; - - uint32_t dw2 = - __gen_field(values->CoreModeEnable, 0, 0) | - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->DestinationAddress, dw2); - - dw[3] = - __gen_field(values->DataDWord0, 0, 31) | - 0; - -} - -#define GEN75_MI_SEMAPHORE_MBOX_length_bias 0x00000002 -#define GEN75_MI_SEMAPHORE_MBOX_header \ - .CommandType = 0, \ - .MICommandOpcode = 22, \ - .DwordLength = 1 - -#define GEN75_MI_SEMAPHORE_MBOX_length 0x00000003 - -struct GEN75_MI_SEMAPHORE_MBOX { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define RVSYNC 0 -#define RVESYNC 1 -#define RBSYNC 2 -#define UseGeneralRegisterSelect 3 - uint32_t RegisterSelect; - uint32_t GeneralRegisterSelect; - uint32_t DwordLength; - uint32_t SemaphoreDataDword; -}; - -static inline void -GEN75_MI_SEMAPHORE_MBOX_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_SEMAPHORE_MBOX * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->RegisterSelect, 16, 17) | - __gen_field(values->GeneralRegisterSelect, 8, 13) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SemaphoreDataDword, 0, 31) | - 0; - - dw[2] = - 0; - -} - -#define GEN75_MI_SET_CONTEXT_length_bias 0x00000002 -#define GEN75_MI_SET_CONTEXT_header \ - .CommandType = 0, \ - .MICommandOpcode = 24, \ - .DwordLength = 0 - -#define GEN75_MI_SET_CONTEXT_length 0x00000002 - -struct GEN75_MI_SET_CONTEXT { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - __gen_address_type LogicalContextAddress; - uint32_t ReservedMustbe1; - bool CoreModeEnable; - bool ResourceStreamerStateSaveEnable; - bool ResourceStreamerStateRestoreEnable; - uint32_t ForceRestore; - uint32_t RestoreInhibit; -}; - -static inline void -GEN75_MI_SET_CONTEXT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_SET_CONTEXT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - __gen_field(values->ReservedMustbe1, 8, 8) | - __gen_field(values->CoreModeEnable, 4, 4) | - __gen_field(values->ResourceStreamerStateSaveEnable, 3, 3) | - __gen_field(values->ResourceStreamerStateRestoreEnable, 2, 2) | - __gen_field(values->ForceRestore, 1, 1) | - __gen_field(values->RestoreInhibit, 0, 0) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->LogicalContextAddress, dw1); - -} - -#define GEN75_MI_SET_PREDICATE_length_bias 0x00000001 -#define GEN75_MI_SET_PREDICATE_header \ - .CommandType = 0, \ - .MICommandOpcode = 1, \ - .PREDICATEENABLE = 6 - -#define GEN75_MI_SET_PREDICATE_length 0x00000001 - -struct GEN75_MI_SET_PREDICATE { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define PredicateAlways 0 -#define PredicateonClear 1 -#define PredicateonSet 2 -#define PredicateDisable 3 - bool PREDICATEENABLE; -}; - -static inline void -GEN75_MI_SET_PREDICATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_SET_PREDICATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->PREDICATEENABLE, 0, 1) | - 0; - -} - -#define GEN75_MI_STORE_DATA_IMM_length_bias 0x00000002 -#define GEN75_MI_STORE_DATA_IMM_header \ - .CommandType = 0, \ - .MICommandOpcode = 32, \ - .DwordLength = 2 - -#define GEN75_MI_STORE_DATA_IMM_length 0x00000004 - -struct GEN75_MI_STORE_DATA_IMM { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool UseGlobalGTT; - uint32_t DwordLength; - uint32_t Address; - uint32_t CoreModeEnable; - uint32_t DataDWord0; - uint32_t DataDWord1; -}; - -static inline void -GEN75_MI_STORE_DATA_IMM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_STORE_DATA_IMM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->DwordLength, 0, 5) | - 0; - - dw[1] = - 0; - - dw[2] = - __gen_field(values->Address, 2, 31) | - __gen_field(values->CoreModeEnable, 0, 0) | - 0; - - dw[3] = - __gen_field(values->DataDWord0, 0, 31) | - 0; - - dw[4] = - __gen_field(values->DataDWord1, 0, 31) | - 0; - -} - -#define GEN75_MI_STORE_DATA_INDEX_length_bias 0x00000002 -#define GEN75_MI_STORE_DATA_INDEX_header \ - .CommandType = 0, \ - .MICommandOpcode = 33, \ - .DwordLength = 1 - -#define GEN75_MI_STORE_DATA_INDEX_length 0x00000003 - -struct GEN75_MI_STORE_DATA_INDEX { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t Offset; - uint32_t DataDWord0; - uint32_t DataDWord1; -}; - -static inline void -GEN75_MI_STORE_DATA_INDEX_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_STORE_DATA_INDEX * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->Offset, 2, 11) | - 0; - - dw[2] = - __gen_field(values->DataDWord0, 0, 31) | - 0; - - dw[3] = - __gen_field(values->DataDWord1, 0, 31) | - 0; - -} - -#define GEN75_MI_STORE_URB_MEM_length_bias 0x00000002 -#define GEN75_MI_STORE_URB_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 45, \ - .DwordLength = 1 - -#define GEN75_MI_STORE_URB_MEM_length 0x00000003 - -struct GEN75_MI_STORE_URB_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t URBAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN75_MI_STORE_URB_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_STORE_URB_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->URBAddress, 2, 14) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - -} - -#define GEN75_MI_SUSPEND_FLUSH_length_bias 0x00000001 -#define GEN75_MI_SUSPEND_FLUSH_header \ - .CommandType = 0, \ - .MICommandOpcode = 11 - -#define GEN75_MI_SUSPEND_FLUSH_length 0x00000001 - -struct GEN75_MI_SUSPEND_FLUSH { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool SuspendFlush; -}; - -static inline void -GEN75_MI_SUSPEND_FLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_SUSPEND_FLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->SuspendFlush, 0, 0) | - 0; - -} - -#define GEN75_MI_TOPOLOGY_FILTER_length_bias 0x00000001 -#define GEN75_MI_TOPOLOGY_FILTER_header \ - .CommandType = 0, \ - .MICommandOpcode = 13 - -#define GEN75_MI_TOPOLOGY_FILTER_length 0x00000001 - -struct GEN75_MI_TOPOLOGY_FILTER { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t TopologyFilterValue; -}; - -static inline void -GEN75_MI_TOPOLOGY_FILTER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_TOPOLOGY_FILTER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->TopologyFilterValue, 0, 5) | - 0; - -} - -#define GEN75_MI_UPDATE_GTT_length_bias 0x00000002 -#define GEN75_MI_UPDATE_GTT_header \ - .CommandType = 0, \ - .MICommandOpcode = 35 - -#define GEN75_MI_UPDATE_GTT_length 0x00000000 - -struct GEN75_MI_UPDATE_GTT { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t UseGlobalGTT; - uint32_t DwordLength; - __gen_address_type EntryAddress; - /* variable length fields follow */ -}; - -static inline void -GEN75_MI_UPDATE_GTT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_UPDATE_GTT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->EntryAddress, dw1); - - /* variable length fields follow */ -} - -#define GEN75_MI_URB_ATOMIC_ALLOC_length_bias 0x00000001 -#define GEN75_MI_URB_ATOMIC_ALLOC_header \ - .CommandType = 0, \ - .MICommandOpcode = 9 - -#define GEN75_MI_URB_ATOMIC_ALLOC_length 0x00000001 - -struct GEN75_MI_URB_ATOMIC_ALLOC { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t URBAtomicStorageOffset; - uint32_t URBAtomicStorageSize; -}; - -static inline void -GEN75_MI_URB_ATOMIC_ALLOC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_URB_ATOMIC_ALLOC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->URBAtomicStorageOffset, 12, 19) | - __gen_field(values->URBAtomicStorageSize, 0, 8) | - 0; - -} - -#define GEN75_MI_URB_CLEAR_length_bias 0x00000002 -#define GEN75_MI_URB_CLEAR_header \ - .CommandType = 0, \ - .MICommandOpcode = 25, \ - .DwordLength = 0 - -#define GEN75_MI_URB_CLEAR_length 0x00000002 - -struct GEN75_MI_URB_CLEAR { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t URBClearLength; - uint32_t URBAddress; -}; - -static inline void -GEN75_MI_URB_CLEAR_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_URB_CLEAR * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->URBClearLength, 16, 29) | - __gen_offset(values->URBAddress, 0, 14) | - 0; - -} - -#define GEN75_MI_USER_INTERRUPT_length_bias 0x00000001 -#define GEN75_MI_USER_INTERRUPT_header \ - .CommandType = 0, \ - .MICommandOpcode = 2 - -#define GEN75_MI_USER_INTERRUPT_length 0x00000001 - -struct GEN75_MI_USER_INTERRUPT { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN75_MI_USER_INTERRUPT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_USER_INTERRUPT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN75_MI_WAIT_FOR_EVENT_length_bias 0x00000001 -#define GEN75_MI_WAIT_FOR_EVENT_header \ - .CommandType = 0, \ - .MICommandOpcode = 3 - -#define GEN75_MI_WAIT_FOR_EVENT_length 0x00000001 - -struct GEN75_MI_WAIT_FOR_EVENT { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool DisplayPipeCHorizontalBlankWaitEnable; - bool DisplayPipeCVerticalBlankWaitEnable; - bool DisplaySpriteCFlipPendingWaitEnable; -#define Notenabled 0 - uint32_t ConditionCodeWaitSelect; - bool DisplayPlaneCFlipPendingWaitEnable; - bool DisplayPipeCScanLineWaitEnable; - bool DisplayPipeBHorizontalBlankWaitEnable; - bool DisplayPipeBVerticalBlankWaitEnable; - bool DisplaySpriteBFlipPendingWaitEnable; - bool DisplayPlaneBFlipPendingWaitEnable; - bool DisplayPipeBScanLineWaitEnable; - bool DisplayPipeAHorizontalBlankWaitEnable; - bool DisplayPipeAVerticalBlankWaitEnable; - bool DisplaySpriteAFlipPendingWaitEnable; - bool DisplayPlaneAFlipPendingWaitEnable; - bool DisplayPipeAScanLineWaitEnable; -}; - -static inline void -GEN75_MI_WAIT_FOR_EVENT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_MI_WAIT_FOR_EVENT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DisplayPipeCHorizontalBlankWaitEnable, 22, 22) | - __gen_field(values->DisplayPipeCVerticalBlankWaitEnable, 21, 21) | - __gen_field(values->DisplaySpriteCFlipPendingWaitEnable, 20, 20) | - __gen_field(values->ConditionCodeWaitSelect, 16, 19) | - __gen_field(values->DisplayPlaneCFlipPendingWaitEnable, 15, 15) | - __gen_field(values->DisplayPipeCScanLineWaitEnable, 14, 14) | - __gen_field(values->DisplayPipeBHorizontalBlankWaitEnable, 13, 13) | - __gen_field(values->DisplayPipeBVerticalBlankWaitEnable, 11, 11) | - __gen_field(values->DisplaySpriteBFlipPendingWaitEnable, 10, 10) | - __gen_field(values->DisplayPlaneBFlipPendingWaitEnable, 9, 9) | - __gen_field(values->DisplayPipeBScanLineWaitEnable, 8, 8) | - __gen_field(values->DisplayPipeAHorizontalBlankWaitEnable, 5, 5) | - __gen_field(values->DisplayPipeAVerticalBlankWaitEnable, 3, 3) | - __gen_field(values->DisplaySpriteAFlipPendingWaitEnable, 2, 2) | - __gen_field(values->DisplayPlaneAFlipPendingWaitEnable, 1, 1) | - __gen_field(values->DisplayPipeAScanLineWaitEnable, 0, 0) | - 0; - -} - -#define GEN75_PIPE_CONTROL_length_bias 0x00000002 -#define GEN75_PIPE_CONTROL_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 2, \ - ._3DCommandSubOpcode = 0, \ - .DwordLength = 3 - -#define GEN75_PIPE_CONTROL_length 0x00000005 - -struct GEN75_PIPE_CONTROL { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define DAT_PPGTT 0 -#define DAT_GGTT 1 - uint32_t DestinationAddressType; -#define NoLRIOperation 0 -#define MMIOWriteImmediateData 1 - uint32_t LRIPostSyncOperation; - uint32_t StoreDataIndex; - uint32_t CommandStreamerStallEnable; -#define DontReset 0 -#define Reset 1 - uint32_t GlobalSnapshotCountReset; - uint32_t TLBInvalidate; - bool GenericMediaStateClear; -#define NoWrite 0 -#define WriteImmediateData 1 -#define WritePSDepthCount 2 -#define WriteTimestamp 3 - uint32_t PostSyncOperation; - bool DepthStallEnable; -#define DisableFlush 0 -#define EnableFlush 1 - bool RenderTargetCacheFlushEnable; - bool InstructionCacheInvalidateEnable; - bool TextureCacheInvalidationEnable; - bool IndirectStatePointersDisable; - bool NotifyEnable; - bool PipeControlFlushEnable; - bool DCFlushEnable; - bool VFCacheInvalidationEnable; - bool ConstantCacheInvalidationEnable; - bool StateCacheInvalidationEnable; - bool StallAtPixelScoreboard; -#define FlushDisabled 0 -#define FlushEnabled 1 - bool DepthCacheFlushEnable; - __gen_address_type Address; - uint32_t ImmediateData; - uint32_t ImmediateData0; -}; - -static inline void -GEN75_PIPE_CONTROL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_PIPE_CONTROL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->DestinationAddressType, 24, 24) | - __gen_field(values->LRIPostSyncOperation, 23, 23) | - __gen_field(values->StoreDataIndex, 21, 21) | - __gen_field(values->CommandStreamerStallEnable, 20, 20) | - __gen_field(values->GlobalSnapshotCountReset, 19, 19) | - __gen_field(values->TLBInvalidate, 18, 18) | - __gen_field(values->GenericMediaStateClear, 16, 16) | - __gen_field(values->PostSyncOperation, 14, 15) | - __gen_field(values->DepthStallEnable, 13, 13) | - __gen_field(values->RenderTargetCacheFlushEnable, 12, 12) | - __gen_field(values->InstructionCacheInvalidateEnable, 11, 11) | - __gen_field(values->TextureCacheInvalidationEnable, 10, 10) | - __gen_field(values->IndirectStatePointersDisable, 9, 9) | - __gen_field(values->NotifyEnable, 8, 8) | - __gen_field(values->PipeControlFlushEnable, 7, 7) | - __gen_field(values->DCFlushEnable, 5, 5) | - __gen_field(values->VFCacheInvalidationEnable, 4, 4) | - __gen_field(values->ConstantCacheInvalidationEnable, 3, 3) | - __gen_field(values->StateCacheInvalidationEnable, 2, 2) | - __gen_field(values->StallAtPixelScoreboard, 1, 1) | - __gen_field(values->DepthCacheFlushEnable, 0, 0) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->Address, dw2); - - dw[3] = - __gen_field(values->ImmediateData, 0, 31) | - 0; - - dw[4] = - __gen_field(values->ImmediateData, 0, 31) | - 0; - -} - -#define GEN75_SCISSOR_RECT_length 0x00000002 - -struct GEN75_SCISSOR_RECT { - uint32_t ScissorRectangleYMin; - uint32_t ScissorRectangleXMin; - uint32_t ScissorRectangleYMax; - uint32_t ScissorRectangleXMax; -}; - -static inline void -GEN75_SCISSOR_RECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_SCISSOR_RECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->ScissorRectangleYMin, 16, 31) | - __gen_field(values->ScissorRectangleXMin, 0, 15) | - 0; - - dw[1] = - __gen_field(values->ScissorRectangleYMax, 16, 31) | - __gen_field(values->ScissorRectangleXMax, 0, 15) | - 0; - -} - -#define GEN75_SF_CLIP_VIEWPORT_length 0x00000010 - -struct GEN75_SF_CLIP_VIEWPORT { - float ViewportMatrixElementm00; - float ViewportMatrixElementm11; - float ViewportMatrixElementm22; - float ViewportMatrixElementm30; - float ViewportMatrixElementm31; - float ViewportMatrixElementm32; - float XMinClipGuardband; - float XMaxClipGuardband; - float YMinClipGuardband; - float YMaxClipGuardband; -}; - -static inline void -GEN75_SF_CLIP_VIEWPORT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_SF_CLIP_VIEWPORT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_float(values->ViewportMatrixElementm00) | - 0; - - dw[1] = - __gen_float(values->ViewportMatrixElementm11) | - 0; - - dw[2] = - __gen_float(values->ViewportMatrixElementm22) | - 0; - - dw[3] = - __gen_float(values->ViewportMatrixElementm30) | - 0; - - dw[4] = - __gen_float(values->ViewportMatrixElementm31) | - 0; - - dw[5] = - __gen_float(values->ViewportMatrixElementm32) | - 0; - - dw[6] = - 0; - - dw[7] = - 0; - - dw[8] = - __gen_float(values->XMinClipGuardband) | - 0; - - dw[9] = - __gen_float(values->XMaxClipGuardband) | - 0; - - dw[10] = - __gen_float(values->YMinClipGuardband) | - 0; - - dw[11] = - __gen_float(values->YMaxClipGuardband) | - 0; - - for (uint32_t i = 0, j = 12; i < 4; i += 1, j++) { - dw[j] = - 0; - } - -} - -#define GEN75_BLEND_STATE_length 0x00000002 - -struct GEN75_BLEND_STATE { - bool ColorBufferBlendEnable; - bool IndependentAlphaBlendEnable; -#define BLENDFUNCTION_ADD 0 -#define BLENDFUNCTION_SUBTRACT 1 -#define BLENDFUNCTION_REVERSE_SUBTRACT 2 -#define BLENDFUNCTION_MIN 3 -#define BLENDFUNCTION_MAX 4 - uint32_t AlphaBlendFunction; -#define BLENDFACTOR_ONE 1 -#define BLENDFACTOR_SRC_COLOR 2 -#define BLENDFACTOR_SRC_ALPHA 3 -#define BLENDFACTOR_DST_ALPHA 4 -#define BLENDFACTOR_DST_COLOR 5 -#define BLENDFACTOR_SRC_ALPHA_SATURATE 6 -#define BLENDFACTOR_CONST_COLOR 7 -#define BLENDFACTOR_CONST_ALPHA 8 -#define BLENDFACTOR_SRC1_COLOR 9 -#define BLENDFACTOR_SRC1_ALPHA 10 -#define BLENDFACTOR_ZERO 17 -#define BLENDFACTOR_INV_SRC_COLOR 18 -#define BLENDFACTOR_INV_SRC_ALPHA 19 -#define BLENDFACTOR_INV_DST_ALPHA 20 -#define BLENDFACTOR_INV_DST_COLOR 21 -#define BLENDFACTOR_INV_CONST_COLOR 23 -#define BLENDFACTOR_INV_CONST_ALPHA 24 -#define BLENDFACTOR_INV_SRC1_COLOR 25 -#define BLENDFACTOR_INV_SRC1_ALPHA 26 - uint32_t SourceAlphaBlendFactor; - uint32_t DestinationAlphaBlendFactor; -#define BLENDFUNCTION_ADD 0 -#define BLENDFUNCTION_SUBTRACT 1 -#define BLENDFUNCTION_REVERSE_SUBTRACT 2 -#define BLENDFUNCTION_MIN 3 -#define BLENDFUNCTION_MAX 4 - uint32_t ColorBlendFunction; - uint32_t SourceBlendFactor; - uint32_t DestinationBlendFactor; - bool AlphaToCoverageEnable; - bool AlphaToOneEnable; - bool AlphaToCoverageDitherEnable; - bool WriteDisableAlpha; - bool WriteDisableRed; - bool WriteDisableGreen; - bool WriteDisableBlue; - bool LogicOpEnable; -#define LOGICOP_CLEAR 0 -#define LOGICOP_NOR 1 -#define LOGICOP_AND_INVERTED 2 -#define LOGICOP_COPY_INVERTED 3 -#define LOGICOP_AND_REVERSE 4 -#define LOGICOP_INVERT 5 -#define LOGICOP_XOR 6 -#define LOGICOP_NAND 7 -#define LOGICOP_AND 8 -#define LOGICOP_EQUIV 9 -#define LOGICOP_NOOP 10 -#define LOGICOP_OR_INVERTED 11 -#define LOGICOP_COPY 12 -#define LOGICOP_OR_REVERSE 13 -#define LOGICOP_OR 14 -#define LOGICOP_SET 15 - uint32_t LogicOpFunction; - bool AlphaTestEnable; -#define COMPAREFUNCTION_ALWAYS 0 -#define COMPAREFUNCTION_NEVER 1 -#define COMPAREFUNCTION_LESS 2 -#define COMPAREFUNCTION_EQUAL 3 -#define COMPAREFUNCTION_LEQUAL 4 -#define COMPAREFUNCTION_GREATER 5 -#define COMPAREFUNCTION_NOTEQUAL 6 -#define COMPAREFUNCTION_GEQUAL 7 - uint32_t AlphaTestFunction; - bool ColorDitherEnable; - uint32_t XDitherOffset; - uint32_t YDitherOffset; -#define COLORCLAMP_UNORM 0 -#define COLORCLAMP_SNORM 1 -#define COLORCLAMP_RTFORMAT 2 - uint32_t ColorClampRange; - bool PreBlendColorClampEnable; - bool PostBlendColorClampEnable; -}; - -static inline void -GEN75_BLEND_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_BLEND_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->ColorBufferBlendEnable, 31, 31) | - __gen_field(values->IndependentAlphaBlendEnable, 30, 30) | - __gen_field(values->AlphaBlendFunction, 26, 28) | - __gen_field(values->SourceAlphaBlendFactor, 20, 24) | - __gen_field(values->DestinationAlphaBlendFactor, 15, 19) | - __gen_field(values->ColorBlendFunction, 11, 13) | - __gen_field(values->SourceBlendFactor, 5, 9) | - __gen_field(values->DestinationBlendFactor, 0, 4) | - 0; - - dw[1] = - __gen_field(values->AlphaToCoverageEnable, 31, 31) | - __gen_field(values->AlphaToOneEnable, 30, 30) | - __gen_field(values->AlphaToCoverageDitherEnable, 29, 29) | - __gen_field(values->WriteDisableAlpha, 27, 27) | - __gen_field(values->WriteDisableRed, 26, 26) | - __gen_field(values->WriteDisableGreen, 25, 25) | - __gen_field(values->WriteDisableBlue, 24, 24) | - __gen_field(values->LogicOpEnable, 22, 22) | - __gen_field(values->LogicOpFunction, 18, 21) | - __gen_field(values->AlphaTestEnable, 16, 16) | - __gen_field(values->AlphaTestFunction, 13, 15) | - __gen_field(values->ColorDitherEnable, 12, 12) | - __gen_field(values->XDitherOffset, 10, 11) | - __gen_field(values->YDitherOffset, 8, 9) | - __gen_field(values->ColorClampRange, 2, 3) | - __gen_field(values->PreBlendColorClampEnable, 1, 1) | - __gen_field(values->PostBlendColorClampEnable, 0, 0) | - 0; - -} - -#define GEN75_CC_VIEWPORT_length 0x00000002 - -struct GEN75_CC_VIEWPORT { - float MinimumDepth; - float MaximumDepth; -}; - -static inline void -GEN75_CC_VIEWPORT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_CC_VIEWPORT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_float(values->MinimumDepth) | - 0; - - dw[1] = - __gen_float(values->MaximumDepth) | - 0; - -} - -#define GEN75_COLOR_CALC_STATE_length 0x00000006 - -struct GEN75_COLOR_CALC_STATE { - uint32_t StencilReferenceValue; - uint32_t BackFaceStencilReferenceValue; -#define Cancelled 0 -#define NotCancelled 1 - uint32_t RoundDisableFunctionDisable; -#define ALPHATEST_UNORM8 0 -#define ALPHATEST_FLOAT32 1 - uint32_t AlphaTestFormat; - uint32_t AlphaReferenceValueAsUNORM8; - float AlphaReferenceValueAsFLOAT32; - float BlendConstantColorRed; - float BlendConstantColorGreen; - float BlendConstantColorBlue; - float BlendConstantColorAlpha; -}; - -static inline void -GEN75_COLOR_CALC_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_COLOR_CALC_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->StencilReferenceValue, 24, 31) | - __gen_field(values->BackFaceStencilReferenceValue, 16, 23) | - __gen_field(values->RoundDisableFunctionDisable, 15, 15) | - __gen_field(values->AlphaTestFormat, 0, 0) | - 0; - - dw[1] = - __gen_field(values->AlphaReferenceValueAsUNORM8, 0, 31) | - __gen_float(values->AlphaReferenceValueAsFLOAT32) | - 0; - - dw[2] = - __gen_float(values->BlendConstantColorRed) | - 0; - - dw[3] = - __gen_float(values->BlendConstantColorGreen) | - 0; - - dw[4] = - __gen_float(values->BlendConstantColorBlue) | - 0; - - dw[5] = - __gen_float(values->BlendConstantColorAlpha) | - 0; - -} - -#define GEN75_DEPTH_STENCIL_STATE_length 0x00000003 - -struct GEN75_DEPTH_STENCIL_STATE { - bool StencilTestEnable; -#define COMPAREFUNCTION_ALWAYS 0 -#define COMPAREFUNCTION_NEVER 1 -#define COMPAREFUNCTION_LESS 2 -#define COMPAREFUNCTION_EQUAL 3 -#define COMPAREFUNCTION_LEQUAL 4 -#define COMPAREFUNCTION_GREATER 5 -#define COMPAREFUNCTION_NOTEQUAL 6 -#define COMPAREFUNCTION_GEQUAL 7 - uint32_t StencilTestFunction; -#define STENCILOP_KEEP 0 -#define STENCILOP_ZERO 1 -#define STENCILOP_REPLACE 2 -#define STENCILOP_INCRSAT 3 -#define STENCILOP_DECRSAT 4 -#define STENCILOP_INCR 5 -#define STENCILOP_DECR 6 -#define STENCILOP_INVERT 7 - uint32_t StencilFailOp; - uint32_t StencilPassDepthFailOp; - uint32_t StencilPassDepthPassOp; - bool StencilBufferWriteEnable; - bool DoubleSidedStencilEnable; -#define COMPAREFUNCTION_ALWAYS 0 -#define COMPAREFUNCTION_NEVER 1 -#define COMPAREFUNCTION_LESS 2 -#define COMPAREFUNCTION_EQUAL 3 -#define COMPAREFUNCTION_LEQUAL 4 -#define COMPAREFUNCTION_GREATER 5 -#define COMPAREFUNCTION_NOTEQUAL 6 -#define COMPAREFUNCTION_GEQUAL 7 - uint32_t BackFaceStencilTestFunction; -#define STENCILOP_KEEP 0 -#define STENCILOP_ZERO 1 -#define STENCILOP_REPLACE 2 -#define STENCILOP_INCRSAT 3 -#define STENCILOP_DECRSAT 4 -#define STENCILOP_INCR 5 -#define STENCILOP_DECR 6 -#define STENCILOP_INVERT 7 - uint32_t BackfaceStencilFailOp; - uint32_t BackfaceStencilPassDepthFailOp; - uint32_t BackfaceStencilPassDepthPassOp; - uint32_t StencilTestMask; - uint32_t StencilWriteMask; - uint32_t BackfaceStencilTestMask; - uint32_t BackfaceStencilWriteMask; - bool DepthTestEnable; -#define COMPAREFUNCTION_ALWAYS 0 -#define COMPAREFUNCTION_NEVER 1 -#define COMPAREFUNCTION_LESS 2 -#define COMPAREFUNCTION_EQUAL 3 -#define COMPAREFUNCTION_LEQUAL 4 -#define COMPAREFUNCTION_GREATER 5 -#define COMPAREFUNCTION_NOTEQUAL 6 -#define COMPAREFUNCTION_GEQUAL 7 - uint32_t DepthTestFunction; - bool DepthBufferWriteEnable; -}; - -static inline void -GEN75_DEPTH_STENCIL_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_DEPTH_STENCIL_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->StencilTestEnable, 31, 31) | - __gen_field(values->StencilTestFunction, 28, 30) | - __gen_field(values->StencilFailOp, 25, 27) | - __gen_field(values->StencilPassDepthFailOp, 22, 24) | - __gen_field(values->StencilPassDepthPassOp, 19, 21) | - __gen_field(values->StencilBufferWriteEnable, 18, 18) | - __gen_field(values->DoubleSidedStencilEnable, 15, 15) | - __gen_field(values->BackFaceStencilTestFunction, 12, 14) | - __gen_field(values->BackfaceStencilFailOp, 9, 11) | - __gen_field(values->BackfaceStencilPassDepthFailOp, 6, 8) | - __gen_field(values->BackfaceStencilPassDepthPassOp, 3, 5) | - 0; - - dw[1] = - __gen_field(values->StencilTestMask, 24, 31) | - __gen_field(values->StencilWriteMask, 16, 23) | - __gen_field(values->BackfaceStencilTestMask, 8, 15) | - __gen_field(values->BackfaceStencilWriteMask, 0, 7) | - 0; - - dw[2] = - __gen_field(values->DepthTestEnable, 31, 31) | - __gen_field(values->DepthTestFunction, 27, 29) | - __gen_field(values->DepthBufferWriteEnable, 26, 26) | - 0; - -} - -#define GEN75_INTERFACE_DESCRIPTOR_DATA_length 0x00000008 - -struct GEN75_INTERFACE_DESCRIPTOR_DATA { - uint32_t KernelStartPointer; -#define Multiple 0 -#define Single 1 - uint32_t SingleProgramFlow; -#define NormalPriority 0 -#define HighPriority 1 - uint32_t ThreadPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool MaskStackExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t SamplerStatePointer; -#define Nosamplersused 0 -#define Between1and4samplersused 1 -#define Between5and8samplersused 2 -#define Between9and12samplersused 3 -#define Between13and16samplersused 4 - uint32_t SamplerCount; - uint32_t BindingTablePointer; - uint32_t BindingTableEntryCount; - uint32_t ConstantURBEntryReadLength; -#define RTNE 0 -#define RU 1 -#define RD 2 -#define RTZ 3 - uint32_t RoundingMode; - bool BarrierEnable; - uint32_t SharedLocalMemorySize; - uint32_t NumberofThreadsinGPGPUThreadGroup; - uint32_t CrossThreadConstantDataReadLength; -}; - -static inline void -GEN75_INTERFACE_DESCRIPTOR_DATA_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_INTERFACE_DESCRIPTOR_DATA * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_offset(values->KernelStartPointer, 6, 31) | - 0; - - dw[1] = - __gen_field(values->SingleProgramFlow, 18, 18) | - __gen_field(values->ThreadPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->MaskStackExceptionEnable, 11, 11) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - dw[2] = - __gen_offset(values->SamplerStatePointer, 5, 31) | - __gen_field(values->SamplerCount, 2, 4) | - 0; - - dw[3] = - __gen_offset(values->BindingTablePointer, 5, 15) | - __gen_field(values->BindingTableEntryCount, 0, 4) | - 0; - - dw[4] = - __gen_field(values->ConstantURBEntryReadLength, 16, 31) | - 0; - - dw[5] = - __gen_field(values->RoundingMode, 22, 23) | - __gen_field(values->BarrierEnable, 21, 21) | - __gen_field(values->SharedLocalMemorySize, 16, 20) | - __gen_field(values->NumberofThreadsinGPGPUThreadGroup, 0, 7) | - 0; - - dw[6] = - __gen_field(values->CrossThreadConstantDataReadLength, 0, 7) | - 0; - - dw[7] = - 0; - -} - -#define GEN75_BINDING_TABLE_STATE_length 0x00000001 - -struct GEN75_BINDING_TABLE_STATE { - uint32_t SurfaceStatePointer; -}; - -static inline void -GEN75_BINDING_TABLE_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_BINDING_TABLE_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_offset(values->SurfaceStatePointer, 5, 31) | - 0; - -} - -#define GEN75_RENDER_SURFACE_STATE_length 0x00000008 - -struct GEN75_RENDER_SURFACE_STATE { -#define SURFTYPE_1D 0 -#define SURFTYPE_2D 1 -#define SURFTYPE_3D 2 -#define SURFTYPE_CUBE 3 -#define SURFTYPE_BUFFER 4 -#define SURFTYPE_STRBUF 5 -#define SURFTYPE_NULL 7 - uint32_t SurfaceType; - bool SurfaceArray; - uint32_t SurfaceFormat; -#define VALIGN_2 0 -#define VALIGN_4 1 - uint32_t SurfaceVerticalAlignment; -#define HALIGN_4 0 -#define HALIGN_8 1 - uint32_t SurfaceHorizontalAlignment; - uint32_t TiledSurface; -#define TILEWALK_XMAJOR 0 -#define TILEWALK_YMAJOR 1 - uint32_t TileWalk; - uint32_t VerticalLineStride; - uint32_t VerticalLineStrideOffset; -#define ARYSPC_FULL 0 -#define ARYSPC_LOD0 1 - uint32_t SurfaceArraySpacing; - uint32_t RenderCacheReadWriteMode; -#define NORMAL_MODE 0 -#define PROGRESSIVE_FRAME 2 -#define INTERLACED_FRAME 3 - uint32_t MediaBoundaryPixelMode; - uint32_t CubeFaceEnables; - __gen_address_type SurfaceBaseAddress; - uint32_t Height; - uint32_t Width; - uint32_t Depth; - uint32_t IntegerSurfaceFormat; - uint32_t SurfacePitch; -#define RTROTATE_0DEG 0 -#define RTROTATE_90DEG 1 -#define RTROTATE_270DEG 3 - uint32_t RenderTargetRotation; - uint32_t MinimumArrayElement; - uint32_t RenderTargetViewExtent; -#define MSFMT_MSS 0 -#define MSFMT_DEPTH_STENCIL 1 - uint32_t MultisampledSurfaceStorageFormat; -#define MULTISAMPLECOUNT_1 0 -#define MULTISAMPLECOUNT_4 2 -#define MULTISAMPLECOUNT_8 3 - uint32_t NumberofMultisamples; - uint32_t MultisamplePositionPaletteIndex; - uint32_t MinimumArrayElement0; - uint32_t XOffset; - uint32_t YOffset; - struct GEN75_MEMORY_OBJECT_CONTROL_STATE SurfaceObjectControlState; - uint32_t SurfaceMinLOD; - uint32_t MIPCountLOD; - __gen_address_type MCSBaseAddress; - uint32_t MCSSurfacePitch; - __gen_address_type AppendCounterAddress; - bool AppendCounterEnable; - bool MCSEnable; - uint32_t XOffsetforUVPlane; - uint32_t YOffsetforUVPlane; -#define SCS_ZERO 0 -#define SCS_ONE 1 -#define SCS_RED 4 -#define SCS_GREEN 5 -#define SCS_BLUE 6 -#define SCS_ALPHA 7 - uint32_t ShaderChannelSelectR; - uint32_t ShaderChannelSelectG; - uint32_t ShaderChannelSelectB; - uint32_t ShaderChannelSelectA; - float ResourceMinLOD; -}; - -static inline void -GEN75_RENDER_SURFACE_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_RENDER_SURFACE_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->SurfaceType, 29, 31) | - __gen_field(values->SurfaceArray, 28, 28) | - __gen_field(values->SurfaceFormat, 18, 26) | - __gen_field(values->SurfaceVerticalAlignment, 16, 17) | - __gen_field(values->SurfaceHorizontalAlignment, 15, 15) | - __gen_field(values->TiledSurface, 14, 14) | - __gen_field(values->TileWalk, 13, 13) | - __gen_field(values->VerticalLineStride, 12, 12) | - __gen_field(values->VerticalLineStrideOffset, 11, 11) | - __gen_field(values->SurfaceArraySpacing, 10, 10) | - __gen_field(values->RenderCacheReadWriteMode, 8, 8) | - __gen_field(values->MediaBoundaryPixelMode, 6, 7) | - __gen_field(values->CubeFaceEnables, 0, 5) | - 0; - - uint32_t dw1 = - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->SurfaceBaseAddress, dw1); - - dw[2] = - __gen_field(values->Height, 16, 29) | - __gen_field(values->Width, 0, 13) | - 0; - - dw[3] = - __gen_field(values->Depth, 21, 31) | - __gen_field(values->IntegerSurfaceFormat, 18, 20) | - __gen_field(values->SurfacePitch, 0, 17) | - 0; - - dw[4] = - __gen_field(values->RenderTargetRotation, 29, 30) | - __gen_field(values->MinimumArrayElement, 18, 28) | - __gen_field(values->RenderTargetViewExtent, 7, 17) | - __gen_field(values->MultisampledSurfaceStorageFormat, 6, 6) | - __gen_field(values->NumberofMultisamples, 3, 5) | - __gen_field(values->MultisamplePositionPaletteIndex, 0, 2) | - __gen_field(values->MinimumArrayElement, 0, 26) | - 0; - - uint32_t dw_SurfaceObjectControlState; - GEN75_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceObjectControlState, &values->SurfaceObjectControlState); - dw[5] = - __gen_offset(values->XOffset, 25, 31) | - __gen_offset(values->YOffset, 20, 23) | - __gen_field(dw_SurfaceObjectControlState, 16, 19) | - __gen_field(values->SurfaceMinLOD, 4, 7) | - __gen_field(values->MIPCountLOD, 0, 3) | - 0; - - uint32_t dw6 = - __gen_field(values->MCSSurfacePitch, 3, 11) | - __gen_field(values->AppendCounterEnable, 1, 1) | - __gen_field(values->MCSEnable, 0, 0) | - __gen_field(values->XOffsetforUVPlane, 16, 29) | - __gen_field(values->YOffsetforUVPlane, 0, 13) | - 0; - - dw[6] = - __gen_combine_address(data, &dw[6], values->AppendCounterAddress, dw6); - - dw[7] = - __gen_field(values->ShaderChannelSelectR, 25, 27) | - __gen_field(values->ShaderChannelSelectG, 22, 24) | - __gen_field(values->ShaderChannelSelectB, 19, 21) | - __gen_field(values->ShaderChannelSelectA, 16, 18) | - __gen_field(values->ResourceMinLOD * (1 << 8), 0, 11) | - 0; - -} - -#define GEN75_SAMPLER_BORDER_COLOR_STATE_length 0x00000014 - -#define GEN75_BORDER_COLOR_UINT32_SINT32_length 0x00000004 - -struct GEN75_BORDER_COLOR_UINT32_SINT32 { - uint32_t BorderColorRedui32integerunclamp; - uint32_t BorderColorRedsi32integerunclamp; - uint32_t BorderColorGreenui32integerunclamp; - uint32_t BorderColorGreensi32integerunclamp; - uint32_t BorderColorBlueui32integerunclamp; - uint32_t BorderColorBluesi32integerunclamp; - uint32_t BorderColorGreenui32integerunclamp0; - uint32_t BorderColorGreensi32integerunclamp0; - uint32_t BorderColorAlphaui32integerunclamp; - uint32_t BorderColorAlphasi32integerunclamp; -}; - -static inline void -GEN75_BORDER_COLOR_UINT32_SINT32_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_BORDER_COLOR_UINT32_SINT32 * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->BorderColorRedui32integerunclamp, 0, 31) | - __gen_field(values->BorderColorRedsi32integerunclamp, 0, 31) | - 0; - - dw[1] = - __gen_field(values->BorderColorGreenui32integerunclamp, 0, 31) | - __gen_field(values->BorderColorGreensi32integerunclamp, 0, 31) | - 0; - - dw[2] = - __gen_field(values->BorderColorBlueui32integerunclamp, 0, 31) | - __gen_field(values->BorderColorBluesi32integerunclamp, 0, 31) | - __gen_field(values->BorderColorGreenui32integerunclamp, 0, 31) | - __gen_field(values->BorderColorGreensi32integerunclamp, 0, 31) | - 0; - - dw[3] = - __gen_field(values->BorderColorAlphaui32integerunclamp, 0, 31) | - __gen_field(values->BorderColorAlphasi32integerunclamp, 0, 31) | - 0; - -} - -#define GEN75_BORDER_COLOR_UINT16_SINT16_length 0x00000004 - -struct GEN75_BORDER_COLOR_UINT16_SINT16 { - uint32_t BorderColorGreenclamptouint16; - uint32_t BorderColorGreenclamptosint16; - uint32_t BorderColorRedclamptouint16; - uint32_t BorderColorRedclamptosint16; - uint32_t BorderColorAlphaclamptouint16; - uint32_t BorderColorAlphaclamptosint16; - uint32_t BorderColorBlueclamptouint16; - uint32_t BorderColorBlueclamptosint16; -}; - -static inline void -GEN75_BORDER_COLOR_UINT16_SINT16_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_BORDER_COLOR_UINT16_SINT16 * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->BorderColorGreenclamptouint16, 16, 31) | - __gen_field(values->BorderColorGreenclamptosint16, 16, 31) | - __gen_field(values->BorderColorRedclamptouint16, 0, 15) | - __gen_field(values->BorderColorRedclamptosint16, 0, 15) | - 0; - - dw[1] = - 0; - - dw[2] = - __gen_field(values->BorderColorAlphaclamptouint16, 16, 31) | - __gen_field(values->BorderColorAlphaclamptosint16, 16, 31) | - __gen_field(values->BorderColorBlueclamptouint16, 0, 15) | - __gen_field(values->BorderColorBlueclamptosint16, 0, 15) | - 0; - - dw[3] = - 0; - -} - -#define GEN75_BORDER_COLOR_UINT8_SINT8_length 0x00000004 - -struct GEN75_BORDER_COLOR_UINT8_SINT8 { - uint32_t BorderColorAlphaclamptouint8; - uint32_t BorderColorAlphaclamptosint8; - uint32_t BorderColorBlueclamptouint8; - uint32_t BorderColorBlueclamptosint8; - uint32_t BorderColorGreenclamptouint8; - uint32_t BorderColorGreenclamptosint8; - uint32_t BorderRedAlphaclamptouint8; - uint32_t BorderRedAlphaclamptosint8; -}; - -static inline void -GEN75_BORDER_COLOR_UINT8_SINT8_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_BORDER_COLOR_UINT8_SINT8 * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->BorderColorAlphaclamptouint8, 24, 31) | - __gen_field(values->BorderColorAlphaclamptosint8, 24, 31) | - __gen_field(values->BorderColorBlueclamptouint8, 16, 23) | - __gen_field(values->BorderColorBlueclamptosint8, 16, 23) | - __gen_field(values->BorderColorGreenclamptouint8, 8, 15) | - __gen_field(values->BorderColorGreenclamptosint8, 8, 15) | - __gen_field(values->BorderRedAlphaclamptouint8, 0, 7) | - __gen_field(values->BorderRedAlphaclamptosint8, 0, 7) | - 0; - - dw[1] = - 0; - - dw[2] = - 0; - - dw[3] = - 0; - -} - -struct GEN75_SAMPLER_BORDER_COLOR_STATE { - float BorderColorRedDX100GL; - uint32_t BorderColorAlpha; - uint32_t BorderColorBlue; - uint32_t BorderColorGreen; - uint32_t BorderColorRedDX9; - float BorderColorGreen0; - float BorderColorBlue0; - float BorderColorAlpha0; - struct GEN75_BORDER_COLOR_UINT32_SINT32 BorderColor; - struct GEN75_BORDER_COLOR_UINT16_SINT16 BorderColor0; - struct GEN75_BORDER_COLOR_UINT8_SINT8 BorderColor1; -}; - -static inline void -GEN75_SAMPLER_BORDER_COLOR_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_SAMPLER_BORDER_COLOR_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_float(values->BorderColorRedDX100GL) | - __gen_field(values->BorderColorAlpha, 24, 31) | - __gen_field(values->BorderColorBlue, 16, 23) | - __gen_field(values->BorderColorGreen, 8, 15) | - __gen_field(values->BorderColorRedDX9, 0, 7) | - 0; - - dw[1] = - __gen_float(values->BorderColorGreen) | - 0; - - dw[2] = - __gen_float(values->BorderColorBlue) | - 0; - - dw[3] = - __gen_float(values->BorderColorAlpha) | - 0; - - for (uint32_t i = 0, j = 4; i < 12; i += 1, j++) { - dw[j] = - 0; - } - - GEN75_BORDER_COLOR_UINT32_SINT32_pack(data, &dw[16], &values->BorderColor); -} - -#define GEN75_SAMPLER_STATE_length 0x00000004 - -struct GEN75_SAMPLER_STATE { - bool SamplerDisable; -#define DX10OGL 0 -#define DX9 1 - uint32_t TextureBorderColorMode; -#define OGL 1 - uint32_t LODPreClampEnable; - float BaseMipLevel; -#define MIPFILTER_NONE 0 -#define MIPFILTER_NEAREST 1 -#define MIPFILTER_LINEAR 3 - uint32_t MipModeFilter; -#define MAPFILTER_NEAREST 0 -#define MAPFILTER_LINEAR 1 -#define MAPFILTER_ANISOTROPIC 2 -#define MAPFILTER_MONO 6 - uint32_t MagModeFilter; -#define MAPFILTER_NEAREST 0 -#define MAPFILTER_LINEAR 1 -#define MAPFILTER_ANISOTROPIC 2 -#define MAPFILTER_MONO 6 - uint32_t MinModeFilter; - float TextureLODBias; -#define LEGACY 0 -#define EWAApproximation 1 - uint32_t AnisotropicAlgorithm; - float MinLOD; - float MaxLOD; -#define PREFILTEROPALWAYS 0 -#define PREFILTEROPNEVER 1 -#define PREFILTEROPLESS 2 -#define PREFILTEROPEQUAL 3 -#define PREFILTEROPLEQUAL 4 -#define PREFILTEROPGREATER 5 -#define PREFILTEROPNOTEQUAL 6 -#define PREFILTEROPGEQUAL 7 - uint32_t ShadowFunction; -#define PROGRAMMED 0 -#define OVERRIDE 1 - uint32_t CubeSurfaceControlMode; - uint32_t BorderColorPointer; - bool ChromaKeyEnable; - uint32_t ChromaKeyIndex; -#define KEYFILTER_KILL_ON_ANY_MATCH 0 -#define KEYFILTER_REPLACE_BLACK 1 - uint32_t ChromaKeyMode; -#define RATIO21 0 -#define RATIO41 1 -#define RATIO61 2 -#define RATIO81 3 -#define RATIO101 4 -#define RATIO121 5 -#define RATIO141 6 -#define RATIO161 7 - uint32_t MaximumAnisotropy; - bool RAddressMinFilterRoundingEnable; - bool RAddressMagFilterRoundingEnable; - bool VAddressMinFilterRoundingEnable; - bool VAddressMagFilterRoundingEnable; - bool UAddressMinFilterRoundingEnable; - bool UAddressMagFilterRoundingEnable; -#define FULL 0 -#define TRIQUAL_HIGHMAG_CLAMP_MIPFILTER 1 -#define MED 2 -#define LOW 3 - uint32_t TrilinearFilterQuality; - bool NonnormalizedCoordinateEnable; - uint32_t TCXAddressControlMode; - uint32_t TCYAddressControlMode; - uint32_t TCZAddressControlMode; -}; - -static inline void -GEN75_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN75_SAMPLER_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->SamplerDisable, 31, 31) | - __gen_field(values->TextureBorderColorMode, 29, 29) | - __gen_field(values->LODPreClampEnable, 28, 28) | - __gen_field(values->BaseMipLevel * (1 << 1), 22, 26) | - __gen_field(values->MipModeFilter, 20, 21) | - __gen_field(values->MagModeFilter, 17, 19) | - __gen_field(values->MinModeFilter, 14, 16) | - __gen_fixed(values->TextureLODBias, 1, 13, true, 8) | - __gen_field(values->AnisotropicAlgorithm, 0, 0) | - 0; - - dw[1] = - __gen_field(values->MinLOD * (1 << 8), 20, 31) | - __gen_field(values->MaxLOD * (1 << 8), 8, 19) | - __gen_field(values->ShadowFunction, 1, 3) | - __gen_field(values->CubeSurfaceControlMode, 0, 0) | - 0; - - dw[2] = - __gen_offset(values->BorderColorPointer, 5, 31) | - 0; - - dw[3] = - __gen_field(values->ChromaKeyEnable, 25, 25) | - __gen_field(values->ChromaKeyIndex, 23, 24) | - __gen_field(values->ChromaKeyMode, 22, 22) | - __gen_field(values->MaximumAnisotropy, 19, 21) | - __gen_field(values->RAddressMinFilterRoundingEnable, 13, 13) | - __gen_field(values->RAddressMagFilterRoundingEnable, 14, 14) | - __gen_field(values->VAddressMinFilterRoundingEnable, 15, 15) | - __gen_field(values->VAddressMagFilterRoundingEnable, 16, 16) | - __gen_field(values->UAddressMinFilterRoundingEnable, 17, 17) | - __gen_field(values->UAddressMagFilterRoundingEnable, 18, 18) | - __gen_field(values->TrilinearFilterQuality, 11, 12) | - __gen_field(values->NonnormalizedCoordinateEnable, 10, 10) | - __gen_field(values->TCXAddressControlMode, 6, 8) | - __gen_field(values->TCYAddressControlMode, 3, 5) | - __gen_field(values->TCZAddressControlMode, 0, 2) | - 0; - -} - -/* Enum 3D_Prim_Topo_Type */ -#define _3DPRIM_POINTLIST 1 -#define _3DPRIM_LINELIST 2 -#define _3DPRIM_LINESTRIP 3 -#define _3DPRIM_TRILIST 4 -#define _3DPRIM_TRISTRIP 5 -#define _3DPRIM_TRIFAN 6 -#define _3DPRIM_QUADLIST 7 -#define _3DPRIM_QUADSTRIP 8 -#define _3DPRIM_LINELIST_ADJ 9 -#define _3DPRIM_LINESTRIP_ADJ 10 -#define _3DPRIM_TRILIST_ADJ 11 -#define _3DPRIM_TRISTRIP_ADJ 12 -#define _3DPRIM_TRISTRIP_REVERSE 13 -#define _3DPRIM_POLYGON 14 -#define _3DPRIM_RECTLIST 15 -#define _3DPRIM_LINELOOP 16 -#define _3DPRIM_POINTLIST_BF 17 -#define _3DPRIM_LINESTRIP_CONT 18 -#define _3DPRIM_LINESTRIP_BF 19 -#define _3DPRIM_LINESTRIP_CONT_BF 20 -#define _3DPRIM_TRIFAN_NOSTIPPLE 22 -#define _3DPRIM_PATCHLIST_1 32 -#define _3DPRIM_PATCHLIST_2 33 -#define _3DPRIM_PATCHLIST_3 34 -#define _3DPRIM_PATCHLIST_4 35 -#define _3DPRIM_PATCHLIST_5 36 -#define _3DPRIM_PATCHLIST_6 37 -#define _3DPRIM_PATCHLIST_7 38 -#define _3DPRIM_PATCHLIST_8 39 -#define _3DPRIM_PATCHLIST_9 40 -#define _3DPRIM_PATCHLIST_10 41 -#define _3DPRIM_PATCHLIST_11 42 -#define _3DPRIM_PATCHLIST_12 43 -#define _3DPRIM_PATCHLIST_13 44 -#define _3DPRIM_PATCHLIST_14 45 -#define _3DPRIM_PATCHLIST_15 46 -#define _3DPRIM_PATCHLIST_16 47 -#define _3DPRIM_PATCHLIST_17 48 -#define _3DPRIM_PATCHLIST_18 49 -#define _3DPRIM_PATCHLIST_19 50 -#define _3DPRIM_PATCHLIST_20 51 -#define _3DPRIM_PATCHLIST_21 52 -#define _3DPRIM_PATCHLIST_22 53 -#define _3DPRIM_PATCHLIST_23 54 -#define _3DPRIM_PATCHLIST_24 55 -#define _3DPRIM_PATCHLIST_25 56 -#define _3DPRIM_PATCHLIST_26 57 -#define _3DPRIM_PATCHLIST_27 58 -#define _3DPRIM_PATCHLIST_28 59 -#define _3DPRIM_PATCHLIST_29 60 -#define _3DPRIM_PATCHLIST_30 61 -#define _3DPRIM_PATCHLIST_31 62 -#define _3DPRIM_PATCHLIST_32 63 - -/* Enum 3D_Vertex_Component_Control */ -#define VFCOMP_NOSTORE 0 -#define VFCOMP_STORE_SRC 1 -#define VFCOMP_STORE_0 2 -#define VFCOMP_STORE_1_FP 3 -#define VFCOMP_STORE_1_INT 4 -#define VFCOMP_STORE_VID 5 -#define VFCOMP_STORE_IID 6 -#define VFCOMP_STORE_PID 7 - -/* Enum 3D_Compare_Function */ -#define COMPAREFUNCTION_ALWAYS 0 -#define COMPAREFUNCTION_NEVER 1 -#define COMPAREFUNCTION_LESS 2 -#define COMPAREFUNCTION_EQUAL 3 -#define COMPAREFUNCTION_LEQUAL 4 -#define COMPAREFUNCTION_GREATER 5 -#define COMPAREFUNCTION_NOTEQUAL 6 -#define COMPAREFUNCTION_GEQUAL 7 - -/* Enum SURFACE_FORMAT */ -#define R32G32B32A32_FLOAT 0 -#define R32G32B32A32_SINT 1 -#define R32G32B32A32_UINT 2 -#define R32G32B32A32_UNORM 3 -#define R32G32B32A32_SNORM 4 -#define R64G64_FLOAT 5 -#define R32G32B32X32_FLOAT 6 -#define R32G32B32A32_SSCALED 7 -#define R32G32B32A32_USCALED 8 -#define R32G32B32A32_SFIXED 32 -#define R64G64_PASSTHRU 33 -#define R32G32B32_FLOAT 64 -#define R32G32B32_SINT 65 -#define R32G32B32_UINT 66 -#define R32G32B32_UNORM 67 -#define R32G32B32_SNORM 68 -#define R32G32B32_SSCALED 69 -#define R32G32B32_USCALED 70 -#define R32G32B32_SFIXED 80 -#define R16G16B16A16_UNORM 128 -#define R16G16B16A16_SNORM 129 -#define R16G16B16A16_SINT 130 -#define R16G16B16A16_UINT 131 -#define R16G16B16A16_FLOAT 132 -#define R32G32_FLOAT 133 -#define R32G32_SINT 134 -#define R32G32_UINT 135 -#define R32_FLOAT_X8X24_TYPELESS 136 -#define X32_TYPELESS_G8X24_UINT 137 -#define L32A32_FLOAT 138 -#define R32G32_UNORM 139 -#define R32G32_SNORM 140 -#define R64_FLOAT 141 -#define R16G16B16X16_UNORM 142 -#define R16G16B16X16_FLOAT 143 -#define A32X32_FLOAT 144 -#define L32X32_FLOAT 145 -#define I32X32_FLOAT 146 -#define R16G16B16A16_SSCALED 147 -#define R16G16B16A16_USCALED 148 -#define R32G32_SSCALED 149 -#define R32G32_USCALED 150 -#define R32G32_SFIXED 160 -#define R64_PASSTHRU 161 -#define B8G8R8A8_UNORM 192 -#define B8G8R8A8_UNORM_SRGB 193 -#define R10G10B10A2_UNORM 194 -#define R10G10B10A2_UNORM_SRGB 195 -#define R10G10B10A2_UINT 196 -#define R10G10B10_SNORM_A2_UNORM 197 -#define R8G8B8A8_UNORM 199 -#define R8G8B8A8_UNORM_SRGB 200 -#define R8G8B8A8_SNORM 201 -#define R8G8B8A8_SINT 202 -#define R8G8B8A8_UINT 203 -#define R16G16_UNORM 204 -#define R16G16_SNORM 205 -#define R16G16_SINT 206 -#define R16G16_UINT 207 -#define R16G16_FLOAT 208 -#define B10G10R10A2_UNORM 209 -#define B10G10R10A2_UNORM_SRGB 210 -#define R11G11B10_FLOAT 211 -#define R32_SINT 214 -#define R32_UINT 215 -#define R32_FLOAT 216 -#define R24_UNORM_X8_TYPELESS 217 -#define X24_TYPELESS_G8_UINT 218 -#define L32_UNORM 221 -#define A32_UNORM 222 -#define L16A16_UNORM 223 -#define I24X8_UNORM 224 -#define L24X8_UNORM 225 -#define A24X8_UNORM 226 -#define I32_FLOAT 227 -#define L32_FLOAT 228 -#define A32_FLOAT 229 -#define X8B8_UNORM_G8R8_SNORM 230 -#define A8X8_UNORM_G8R8_SNORM 231 -#define B8X8_UNORM_G8R8_SNORM 232 -#define B8G8R8X8_UNORM 233 -#define B8G8R8X8_UNORM_SRGB 234 -#define R8G8B8X8_UNORM 235 -#define R8G8B8X8_UNORM_SRGB 236 -#define R9G9B9E5_SHAREDEXP 237 -#define B10G10R10X2_UNORM 238 -#define L16A16_FLOAT 240 -#define R32_UNORM 241 -#define R32_SNORM 242 -#define R10G10B10X2_USCALED 243 -#define R8G8B8A8_SSCALED 244 -#define R8G8B8A8_USCALED 245 -#define R16G16_SSCALED 246 -#define R16G16_USCALED 247 -#define R32_SSCALED 248 -#define R32_USCALED 249 -#define B5G6R5_UNORM 256 -#define B5G6R5_UNORM_SRGB 257 -#define B5G5R5A1_UNORM 258 -#define B5G5R5A1_UNORM_SRGB 259 -#define B4G4R4A4_UNORM 260 -#define B4G4R4A4_UNORM_SRGB 261 -#define R8G8_UNORM 262 -#define R8G8_SNORM 263 -#define R8G8_SINT 264 -#define R8G8_UINT 265 -#define R16_UNORM 266 -#define R16_SNORM 267 -#define R16_SINT 268 -#define R16_UINT 269 -#define R16_FLOAT 270 -#define A8P8_UNORM_PALETTE0 271 -#define A8P8_UNORM_PALETTE1 272 -#define I16_UNORM 273 -#define L16_UNORM 274 -#define A16_UNORM 275 -#define L8A8_UNORM 276 -#define I16_FLOAT 277 -#define L16_FLOAT 278 -#define A16_FLOAT 279 -#define L8A8_UNORM_SRGB 280 -#define R5G5_SNORM_B6_UNORM 281 -#define B5G5R5X1_UNORM 282 -#define B5G5R5X1_UNORM_SRGB 283 -#define R8G8_SSCALED 284 -#define R8G8_USCALED 285 -#define R16_SSCALED 286 -#define R16_USCALED 287 -#define P8A8_UNORM_PALETTE0 290 -#define P8A8_UNORM_PALETTE1 291 -#define A1B5G5R5_UNORM 292 -#define A4B4G4R4_UNORM 293 -#define L8A8_UINT 294 -#define L8A8_SINT 295 -#define R8_UNORM 320 -#define R8_SNORM 321 -#define R8_SINT 322 -#define R8_UINT 323 -#define A8_UNORM 324 -#define I8_UNORM 325 -#define L8_UNORM 326 -#define P4A4_UNORM_PALETTE0 327 -#define A4P4_UNORM_PALETTE0 328 -#define R8_SSCALED 329 -#define R8_USCALED 330 -#define P8_UNORM_PALETTE0 331 -#define L8_UNORM_SRGB 332 -#define P8_UNORM_PALETTE1 333 -#define P4A4_UNORM_PALETTE1 334 -#define A4P4_UNORM_PALETTE1 335 -#define Y8_UNORM 336 -#define L8_UINT 338 -#define L8_SINT 339 -#define I8_UINT 340 -#define I8_SINT 341 -#define DXT1_RGB_SRGB 384 -#define R1_UNORM 385 -#define YCRCB_NORMAL 386 -#define YCRCB_SWAPUVY 387 -#define P2_UNORM_PALETTE0 388 -#define P2_UNORM_PALETTE1 389 -#define BC1_UNORM 390 -#define BC2_UNORM 391 -#define BC3_UNORM 392 -#define BC4_UNORM 393 -#define BC5_UNORM 394 -#define BC1_UNORM_SRGB 395 -#define BC2_UNORM_SRGB 396 -#define BC3_UNORM_SRGB 397 -#define MONO8 398 -#define YCRCB_SWAPUV 399 -#define YCRCB_SWAPY 400 -#define DXT1_RGB 401 -#define FXT1 402 -#define R8G8B8_UNORM 403 -#define R8G8B8_SNORM 404 -#define R8G8B8_SSCALED 405 -#define R8G8B8_USCALED 406 -#define R64G64B64A64_FLOAT 407 -#define R64G64B64_FLOAT 408 -#define BC4_SNORM 409 -#define BC5_SNORM 410 -#define R16G16B16_FLOAT 411 -#define R16G16B16_UNORM 412 -#define R16G16B16_SNORM 413 -#define R16G16B16_SSCALED 414 -#define R16G16B16_USCALED 415 -#define BC6H_SF16 417 -#define BC7_UNORM 418 -#define BC7_UNORM_SRGB 419 -#define BC6H_UF16 420 -#define PLANAR_420_8 421 -#define R8G8B8_UNORM_SRGB 424 -#define ETC1_RGB8 425 -#define ETC2_RGB8 426 -#define EAC_R11 427 -#define EAC_RG11 428 -#define EAC_SIGNED_R11 429 -#define EAC_SIGNED_RG11 430 -#define ETC2_SRGB8 431 -#define R16G16B16_UINT 432 -#define R16G16B16_SINT 433 -#define R32_SFIXED 434 -#define R10G10B10A2_SNORM 435 -#define R10G10B10A2_USCALED 436 -#define R10G10B10A2_SSCALED 437 -#define R10G10B10A2_SINT 438 -#define B10G10R10A2_SNORM 439 -#define B10G10R10A2_USCALED 440 -#define B10G10R10A2_SSCALED 441 -#define B10G10R10A2_UINT 442 -#define B10G10R10A2_SINT 443 -#define R64G64B64A64_PASSTHRU 444 -#define R64G64B64_PASSTHRU 445 -#define ETC2_RGB8_PTA 448 -#define ETC2_SRGB8_PTA 449 -#define ETC2_EAC_RGBA8 450 -#define ETC2_EAC_SRGB8_A8 451 -#define R8G8B8_UINT 456 -#define R8G8B8_SINT 457 -#define RAW 511 - -/* Enum Texture Coordinate Mode */ -#define TCM_WRAP 0 -#define TCM_MIRROR 1 -#define TCM_CLAMP 2 -#define TCM_CUBE 3 -#define TCM_CLAMP_BORDER 4 -#define TCM_MIRROR_ONCE 5 - diff --git a/src/vulkan/gen7_pack.h b/src/vulkan/gen7_pack.h deleted file mode 100644 index 7b104c3ab3c..00000000000 --- a/src/vulkan/gen7_pack.h +++ /dev/null @@ -1,7003 +0,0 @@ -/* - * Copyright © 2015 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - - -/* Instructions, enums and structures for IVB. - * - * This file has been generated, do not hand edit. - */ - -#pragma once - -#include <stdio.h> -#include <assert.h> - -#ifndef __gen_validate_value -#define __gen_validate_value(x) -#endif - -#ifndef __gen_field_functions -#define __gen_field_functions - -union __gen_value { - float f; - uint32_t dw; -}; - -static inline uint64_t -__gen_mbo(uint32_t start, uint32_t end) -{ - return (~0ull >> (64 - (end - start + 1))) << start; -} - -static inline uint64_t -__gen_field(uint64_t v, uint32_t start, uint32_t end) -{ - __gen_validate_value(v); -#if DEBUG - if (end - start + 1 < 64) - assert(v < 1ull << (end - start + 1)); -#endif - - return v << start; -} - -static inline uint64_t -__gen_fixed(float v, uint32_t start, uint32_t end, - bool is_signed, uint32_t fract_bits) -{ - __gen_validate_value(v); - - const float factor = (1 << fract_bits); - - float max, min; - if (is_signed) { - max = ((1 << (end - start)) - 1) / factor; - min = -(1 << (end - start)) / factor; - } else { - max = ((1 << (end - start + 1)) - 1) / factor; - min = 0.0f; - } - - if (v > max) - v = max; - else if (v < min) - v = min; - - int32_t int_val = roundf(v * factor); - - if (is_signed) - int_val &= (1 << (end - start + 1)) - 1; - - return int_val << start; -} - -static inline uint64_t -__gen_offset(uint64_t v, uint32_t start, uint32_t end) -{ - __gen_validate_value(v); -#if DEBUG - uint64_t mask = (~0ull >> (64 - (end - start + 1))) << start; - - assert((v & ~mask) == 0); -#endif - - return v; -} - -static inline uint32_t -__gen_float(float v) -{ - __gen_validate_value(v); - return ((union __gen_value) { .f = (v) }).dw; -} - -#ifndef __gen_address_type -#error #define __gen_address_type before including this file -#endif - -#ifndef __gen_user_data -#error #define __gen_combine_address before including this file -#endif - -#endif - -#define GEN7_3DSTATE_URB_VS_length_bias 0x00000002 -#define GEN7_3DSTATE_URB_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 48, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_URB_VS_length 0x00000002 - -struct GEN7_3DSTATE_URB_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t VSURBStartingAddress; - uint32_t VSURBEntryAllocationSize; - uint32_t VSNumberofURBEntries; -}; - -static inline void -GEN7_3DSTATE_URB_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_URB_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->VSURBStartingAddress, 25, 29) | - __gen_field(values->VSURBEntryAllocationSize, 16, 24) | - __gen_field(values->VSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN7_MI_STORE_REGISTER_MEM_length_bias 0x00000002 -#define GEN7_MI_STORE_REGISTER_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 36, \ - .DwordLength = 1 - -#define GEN7_MI_STORE_REGISTER_MEM_length 0x00000003 - -struct GEN7_MI_STORE_REGISTER_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool UseGlobalGTT; - uint32_t DwordLength; - uint32_t RegisterAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN7_MI_STORE_REGISTER_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_STORE_REGISTER_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->RegisterAddress, 2, 22) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - -} - -#define GEN7_PIPELINE_SELECT_length_bias 0x00000001 -#define GEN7_PIPELINE_SELECT_header \ - .CommandType = 3, \ - .CommandSubType = 1, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 4 - -#define GEN7_PIPELINE_SELECT_length 0x00000001 - -struct GEN7_PIPELINE_SELECT { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; -#define _3D 0 -#define Media 1 -#define GPGPU 2 - uint32_t PipelineSelection; -}; - -static inline void -GEN7_PIPELINE_SELECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_PIPELINE_SELECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->PipelineSelection, 0, 1) | - 0; - -} - -#define GEN7_STATE_BASE_ADDRESS_length_bias 0x00000002 -#define GEN7_STATE_BASE_ADDRESS_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 1, \ - .DwordLength = 8 - -#define GEN7_STATE_BASE_ADDRESS_length 0x0000000a - -#define GEN7_MEMORY_OBJECT_CONTROL_STATE_length 0x00000001 - -struct GEN7_MEMORY_OBJECT_CONTROL_STATE { - uint32_t GraphicsDataTypeGFDT; - uint32_t LLCCacheabilityControlLLCCC; - uint32_t L3CacheabilityControlL3CC; -}; - -static inline void -GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MEMORY_OBJECT_CONTROL_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->GraphicsDataTypeGFDT, 2, 2) | - __gen_field(values->LLCCacheabilityControlLLCCC, 1, 1) | - __gen_field(values->L3CacheabilityControlL3CC, 0, 0) | - 0; - -} - -struct GEN7_STATE_BASE_ADDRESS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type GeneralStateBaseAddress; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE GeneralStateMemoryObjectControlState; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE StatelessDataPortAccessMemoryObjectControlState; - uint32_t StatelessDataPortAccessForceWriteThru; - bool GeneralStateBaseAddressModifyEnable; - __gen_address_type SurfaceStateBaseAddress; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE SurfaceStateMemoryObjectControlState; - bool SurfaceStateBaseAddressModifyEnable; - __gen_address_type DynamicStateBaseAddress; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE DynamicStateMemoryObjectControlState; - bool DynamicStateBaseAddressModifyEnable; - __gen_address_type IndirectObjectBaseAddress; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE IndirectObjectMemoryObjectControlState; - bool IndirectObjectBaseAddressModifyEnable; - __gen_address_type InstructionBaseAddress; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE InstructionMemoryObjectControlState; - bool InstructionBaseAddressModifyEnable; - __gen_address_type GeneralStateAccessUpperBound; - bool GeneralStateAccessUpperBoundModifyEnable; - __gen_address_type DynamicStateAccessUpperBound; - bool DynamicStateAccessUpperBoundModifyEnable; - __gen_address_type IndirectObjectAccessUpperBound; - bool IndirectObjectAccessUpperBoundModifyEnable; - __gen_address_type InstructionAccessUpperBound; - bool InstructionAccessUpperBoundModifyEnable; -}; - -static inline void -GEN7_STATE_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_STATE_BASE_ADDRESS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_GeneralStateMemoryObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_GeneralStateMemoryObjectControlState, &values->GeneralStateMemoryObjectControlState); - uint32_t dw_StatelessDataPortAccessMemoryObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StatelessDataPortAccessMemoryObjectControlState, &values->StatelessDataPortAccessMemoryObjectControlState); - uint32_t dw1 = - __gen_field(dw_GeneralStateMemoryObjectControlState, 8, 11) | - __gen_field(dw_StatelessDataPortAccessMemoryObjectControlState, 4, 7) | - __gen_field(values->StatelessDataPortAccessForceWriteThru, 3, 3) | - __gen_field(values->GeneralStateBaseAddressModifyEnable, 0, 0) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->GeneralStateBaseAddress, dw1); - - uint32_t dw_SurfaceStateMemoryObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceStateMemoryObjectControlState, &values->SurfaceStateMemoryObjectControlState); - uint32_t dw2 = - __gen_field(dw_SurfaceStateMemoryObjectControlState, 8, 11) | - __gen_field(values->SurfaceStateBaseAddressModifyEnable, 0, 0) | - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->SurfaceStateBaseAddress, dw2); - - uint32_t dw_DynamicStateMemoryObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DynamicStateMemoryObjectControlState, &values->DynamicStateMemoryObjectControlState); - uint32_t dw3 = - __gen_field(dw_DynamicStateMemoryObjectControlState, 8, 11) | - __gen_field(values->DynamicStateBaseAddressModifyEnable, 0, 0) | - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->DynamicStateBaseAddress, dw3); - - uint32_t dw_IndirectObjectMemoryObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_IndirectObjectMemoryObjectControlState, &values->IndirectObjectMemoryObjectControlState); - uint32_t dw4 = - __gen_field(dw_IndirectObjectMemoryObjectControlState, 8, 11) | - __gen_field(values->IndirectObjectBaseAddressModifyEnable, 0, 0) | - 0; - - dw[4] = - __gen_combine_address(data, &dw[4], values->IndirectObjectBaseAddress, dw4); - - uint32_t dw_InstructionMemoryObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_InstructionMemoryObjectControlState, &values->InstructionMemoryObjectControlState); - uint32_t dw5 = - __gen_field(dw_InstructionMemoryObjectControlState, 8, 11) | - __gen_field(values->InstructionBaseAddressModifyEnable, 0, 0) | - 0; - - dw[5] = - __gen_combine_address(data, &dw[5], values->InstructionBaseAddress, dw5); - - uint32_t dw6 = - __gen_field(values->GeneralStateAccessUpperBoundModifyEnable, 0, 0) | - 0; - - dw[6] = - __gen_combine_address(data, &dw[6], values->GeneralStateAccessUpperBound, dw6); - - uint32_t dw7 = - __gen_field(values->DynamicStateAccessUpperBoundModifyEnable, 0, 0) | - 0; - - dw[7] = - __gen_combine_address(data, &dw[7], values->DynamicStateAccessUpperBound, dw7); - - uint32_t dw8 = - __gen_field(values->IndirectObjectAccessUpperBoundModifyEnable, 0, 0) | - 0; - - dw[8] = - __gen_combine_address(data, &dw[8], values->IndirectObjectAccessUpperBound, dw8); - - uint32_t dw9 = - __gen_field(values->InstructionAccessUpperBoundModifyEnable, 0, 0) | - 0; - - dw[9] = - __gen_combine_address(data, &dw[9], values->InstructionAccessUpperBound, dw9); - -} - -#define GEN7_STATE_PREFETCH_length_bias 0x00000002 -#define GEN7_STATE_PREFETCH_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 3, \ - .DwordLength = 0 - -#define GEN7_STATE_PREFETCH_length 0x00000002 - -struct GEN7_STATE_PREFETCH { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type PrefetchPointer; - uint32_t PrefetchCount; -}; - -static inline void -GEN7_STATE_PREFETCH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_STATE_PREFETCH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - __gen_field(values->PrefetchCount, 0, 2) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->PrefetchPointer, dw1); - -} - -#define GEN7_STATE_SIP_length_bias 0x00000002 -#define GEN7_STATE_SIP_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 2, \ - .DwordLength = 0 - -#define GEN7_STATE_SIP_length 0x00000002 - -struct GEN7_STATE_SIP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SystemInstructionPointer; -}; - -static inline void -GEN7_STATE_SIP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_STATE_SIP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->SystemInstructionPointer, 4, 31) | - 0; - -} - -#define GEN7_SWTESS_BASE_ADDRESS_length_bias 0x00000002 -#define GEN7_SWTESS_BASE_ADDRESS_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 3, \ - .DwordLength = 0 - -#define GEN7_SWTESS_BASE_ADDRESS_length 0x00000002 - -struct GEN7_SWTESS_BASE_ADDRESS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type SWTessellationBaseAddress; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE SWTessellationMemoryObjectControlState; -}; - -static inline void -GEN7_SWTESS_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_SWTESS_BASE_ADDRESS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_SWTessellationMemoryObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SWTessellationMemoryObjectControlState, &values->SWTessellationMemoryObjectControlState); - uint32_t dw1 = - __gen_field(dw_SWTessellationMemoryObjectControlState, 8, 11) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->SWTessellationBaseAddress, dw1); - -} - -#define GEN7_3DPRIMITIVE_length_bias 0x00000002 -#define GEN7_3DPRIMITIVE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 3, \ - ._3DCommandSubOpcode = 0, \ - .DwordLength = 5 - -#define GEN7_3DPRIMITIVE_length 0x00000007 - -struct GEN7_3DPRIMITIVE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - bool IndirectParameterEnable; - bool PredicateEnable; - uint32_t DwordLength; - bool EndOffsetEnable; -#define SEQUENTIAL 0 -#define RANDOM 1 - uint32_t VertexAccessType; - uint32_t PrimitiveTopologyType; - uint32_t VertexCountPerInstance; - uint32_t StartVertexLocation; - uint32_t InstanceCount; - uint32_t StartInstanceLocation; - uint32_t BaseVertexLocation; -}; - -static inline void -GEN7_3DPRIMITIVE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DPRIMITIVE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->IndirectParameterEnable, 10, 10) | - __gen_field(values->PredicateEnable, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->EndOffsetEnable, 9, 9) | - __gen_field(values->VertexAccessType, 8, 8) | - __gen_field(values->PrimitiveTopologyType, 0, 5) | - 0; - - dw[2] = - __gen_field(values->VertexCountPerInstance, 0, 31) | - 0; - - dw[3] = - __gen_field(values->StartVertexLocation, 0, 31) | - 0; - - dw[4] = - __gen_field(values->InstanceCount, 0, 31) | - 0; - - dw[5] = - __gen_field(values->StartInstanceLocation, 0, 31) | - 0; - - dw[6] = - __gen_field(values->BaseVertexLocation, 0, 31) | - 0; - -} - -#define GEN7_3DSTATE_AA_LINE_PARAMETERS_length_bias 0x00000002 -#define GEN7_3DSTATE_AA_LINE_PARAMETERS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 10, \ - .DwordLength = 1 - -#define GEN7_3DSTATE_AA_LINE_PARAMETERS_length 0x00000003 - -struct GEN7_3DSTATE_AA_LINE_PARAMETERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - float AACoverageBias; - float AACoverageSlope; - float AACoverageEndCapBias; - float AACoverageEndCapSlope; -}; - -static inline void -GEN7_3DSTATE_AA_LINE_PARAMETERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_AA_LINE_PARAMETERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->AACoverageBias * (1 << 8), 16, 23) | - __gen_field(values->AACoverageSlope * (1 << 8), 0, 7) | - 0; - - dw[2] = - __gen_field(values->AACoverageEndCapBias * (1 << 8), 16, 23) | - __gen_field(values->AACoverageEndCapSlope * (1 << 8), 0, 7) | - 0; - -} - -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS_length_bias 0x00000002 -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 40, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS_length 0x00000002 - -struct GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoDSBindingTable; -}; - -static inline void -GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoDSBindingTable, 5, 15) | - 0; - -} - -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_GS_length_bias 0x00000002 -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 41, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_GS_length 0x00000002 - -struct GEN7_3DSTATE_BINDING_TABLE_POINTERS_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoGSBindingTable; -}; - -static inline void -GEN7_3DSTATE_BINDING_TABLE_POINTERS_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_BINDING_TABLE_POINTERS_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoGSBindingTable, 5, 15) | - 0; - -} - -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS_length_bias 0x00000002 -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 39, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS_length 0x00000002 - -struct GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoHSBindingTable; -}; - -static inline void -GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoHSBindingTable, 5, 15) | - 0; - -} - -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS_length_bias 0x00000002 -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 42, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS_length 0x00000002 - -struct GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoPSBindingTable; -}; - -static inline void -GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoPSBindingTable, 5, 15) | - 0; - -} - -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS_length_bias 0x00000002 -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 38, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS_length 0x00000002 - -struct GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoVSBindingTable; -}; - -static inline void -GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoVSBindingTable, 5, 15) | - 0; - -} - -#define GEN7_3DSTATE_BLEND_STATE_POINTERS_length_bias 0x00000002 -#define GEN7_3DSTATE_BLEND_STATE_POINTERS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 36, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_BLEND_STATE_POINTERS_length 0x00000002 - -struct GEN7_3DSTATE_BLEND_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BlendStatePointer; -}; - -static inline void -GEN7_3DSTATE_BLEND_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_BLEND_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->BlendStatePointer, 6, 31) | - __gen_mbo(0, 0) | - 0; - -} - -#define GEN7_3DSTATE_CC_STATE_POINTERS_length_bias 0x00000002 -#define GEN7_3DSTATE_CC_STATE_POINTERS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 14, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_CC_STATE_POINTERS_length 0x00000002 - -struct GEN7_3DSTATE_CC_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ColorCalcStatePointer; -}; - -static inline void -GEN7_3DSTATE_CC_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_CC_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->ColorCalcStatePointer, 6, 31) | - __gen_mbo(0, 0) | - 0; - -} - -#define GEN7_3DSTATE_CHROMA_KEY_length_bias 0x00000002 -#define GEN7_3DSTATE_CHROMA_KEY_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 4, \ - .DwordLength = 2 - -#define GEN7_3DSTATE_CHROMA_KEY_length 0x00000004 - -struct GEN7_3DSTATE_CHROMA_KEY { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ChromaKeyTableIndex; - uint32_t ChromaKeyLowValue; - uint32_t ChromaKeyHighValue; -}; - -static inline void -GEN7_3DSTATE_CHROMA_KEY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_CHROMA_KEY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ChromaKeyTableIndex, 30, 31) | - 0; - - dw[2] = - __gen_field(values->ChromaKeyLowValue, 0, 31) | - 0; - - dw[3] = - __gen_field(values->ChromaKeyHighValue, 0, 31) | - 0; - -} - -#define GEN7_3DSTATE_CLEAR_PARAMS_length_bias 0x00000002 -#define GEN7_3DSTATE_CLEAR_PARAMS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 4, \ - .DwordLength = 1 - -#define GEN7_3DSTATE_CLEAR_PARAMS_length 0x00000003 - -struct GEN7_3DSTATE_CLEAR_PARAMS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t DepthClearValue; - bool DepthClearValueValid; -}; - -static inline void -GEN7_3DSTATE_CLEAR_PARAMS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_CLEAR_PARAMS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->DepthClearValue, 0, 31) | - 0; - - dw[2] = - __gen_field(values->DepthClearValueValid, 0, 0) | - 0; - -} - -#define GEN7_3DSTATE_CLIP_length_bias 0x00000002 -#define GEN7_3DSTATE_CLIP_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 18, \ - .DwordLength = 2 - -#define GEN7_3DSTATE_CLIP_length 0x00000004 - -struct GEN7_3DSTATE_CLIP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t FrontWinding; - uint32_t VertexSubPixelPrecisionSelect; - bool EarlyCullEnable; -#define CULLMODE_BOTH 0 -#define CULLMODE_NONE 1 -#define CULLMODE_FRONT 2 -#define CULLMODE_BACK 3 - uint32_t CullMode; - bool ClipperStatisticsEnable; - uint32_t UserClipDistanceCullTestEnableBitmask; - bool ClipEnable; -#define APIMODE_OGL 0 - uint32_t APIMode; - bool ViewportXYClipTestEnable; - bool ViewportZClipTestEnable; - bool GuardbandClipTestEnable; - uint32_t UserClipDistanceClipTestEnableBitmask; -#define CLIPMODE_NORMAL 0 -#define CLIPMODE_REJECT_ALL 3 -#define CLIPMODE_ACCEPT_ALL 4 - uint32_t ClipMode; - bool PerspectiveDivideDisable; - bool NonPerspectiveBarycentricEnable; -#define Vertex0 0 -#define Vertex1 1 -#define Vertex2 2 - uint32_t TriangleStripListProvokingVertexSelect; -#define Vertex0 0 -#define Vertex1 1 - uint32_t LineStripListProvokingVertexSelect; -#define Vertex0 0 -#define Vertex1 1 -#define Vertex2 2 - uint32_t TriangleFanProvokingVertexSelect; - float MinimumPointWidth; - float MaximumPointWidth; - bool ForceZeroRTAIndexEnable; - uint32_t MaximumVPIndex; -}; - -static inline void -GEN7_3DSTATE_CLIP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_CLIP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->FrontWinding, 20, 20) | - __gen_field(values->VertexSubPixelPrecisionSelect, 19, 19) | - __gen_field(values->EarlyCullEnable, 18, 18) | - __gen_field(values->CullMode, 16, 17) | - __gen_field(values->ClipperStatisticsEnable, 10, 10) | - __gen_field(values->UserClipDistanceCullTestEnableBitmask, 0, 7) | - 0; - - dw[2] = - __gen_field(values->ClipEnable, 31, 31) | - __gen_field(values->APIMode, 30, 30) | - __gen_field(values->ViewportXYClipTestEnable, 28, 28) | - __gen_field(values->ViewportZClipTestEnable, 27, 27) | - __gen_field(values->GuardbandClipTestEnable, 26, 26) | - __gen_field(values->UserClipDistanceClipTestEnableBitmask, 16, 23) | - __gen_field(values->ClipMode, 13, 15) | - __gen_field(values->PerspectiveDivideDisable, 9, 9) | - __gen_field(values->NonPerspectiveBarycentricEnable, 8, 8) | - __gen_field(values->TriangleStripListProvokingVertexSelect, 4, 5) | - __gen_field(values->LineStripListProvokingVertexSelect, 2, 3) | - __gen_field(values->TriangleFanProvokingVertexSelect, 0, 1) | - 0; - - dw[3] = - __gen_field(values->MinimumPointWidth * (1 << 3), 17, 27) | - __gen_field(values->MaximumPointWidth * (1 << 3), 6, 16) | - __gen_field(values->ForceZeroRTAIndexEnable, 5, 5) | - __gen_field(values->MaximumVPIndex, 0, 3) | - 0; - -} - -#define GEN7_3DSTATE_CONSTANT_DS_length_bias 0x00000002 -#define GEN7_3DSTATE_CONSTANT_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 26, \ - .DwordLength = 5 - -#define GEN7_3DSTATE_CONSTANT_DS_length 0x00000007 - -#define GEN7_3DSTATE_CONSTANT_BODY_length 0x00000006 - -struct GEN7_3DSTATE_CONSTANT_BODY { - uint32_t ConstantBuffer1ReadLength; - uint32_t ConstantBuffer0ReadLength; - uint32_t ConstantBuffer3ReadLength; - uint32_t ConstantBuffer2ReadLength; - __gen_address_type PointerToConstantBuffer0; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState; - __gen_address_type PointerToConstantBuffer1; - __gen_address_type PointerToConstantBuffer2; - __gen_address_type PointerToConstantBuffer3; -}; - -static inline void -GEN7_3DSTATE_CONSTANT_BODY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_CONSTANT_BODY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->ConstantBuffer1ReadLength, 16, 31) | - __gen_field(values->ConstantBuffer0ReadLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->ConstantBuffer3ReadLength, 16, 31) | - __gen_field(values->ConstantBuffer2ReadLength, 0, 15) | - 0; - - uint32_t dw_ConstantBufferObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState); - uint32_t dw2 = - __gen_field(dw_ConstantBufferObjectControlState, 0, 4) | - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->PointerToConstantBuffer0, dw2); - - uint32_t dw3 = - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->PointerToConstantBuffer1, dw3); - - uint32_t dw4 = - 0; - - dw[4] = - __gen_combine_address(data, &dw[4], values->PointerToConstantBuffer2, dw4); - - uint32_t dw5 = - 0; - - dw[5] = - __gen_combine_address(data, &dw[5], values->PointerToConstantBuffer3, dw5); - -} - -struct GEN7_3DSTATE_CONSTANT_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN7_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN7_3DSTATE_CONSTANT_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_CONSTANT_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN7_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN7_3DSTATE_CONSTANT_GS_length_bias 0x00000002 -#define GEN7_3DSTATE_CONSTANT_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 22, \ - .DwordLength = 5 - -#define GEN7_3DSTATE_CONSTANT_GS_length 0x00000007 - -struct GEN7_3DSTATE_CONSTANT_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN7_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN7_3DSTATE_CONSTANT_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_CONSTANT_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN7_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN7_3DSTATE_CONSTANT_HS_length_bias 0x00000002 -#define GEN7_3DSTATE_CONSTANT_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 25, \ - .DwordLength = 5 - -#define GEN7_3DSTATE_CONSTANT_HS_length 0x00000007 - -struct GEN7_3DSTATE_CONSTANT_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN7_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN7_3DSTATE_CONSTANT_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_CONSTANT_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN7_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN7_3DSTATE_CONSTANT_PS_length_bias 0x00000002 -#define GEN7_3DSTATE_CONSTANT_PS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 23, \ - .DwordLength = 5 - -#define GEN7_3DSTATE_CONSTANT_PS_length 0x00000007 - -struct GEN7_3DSTATE_CONSTANT_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN7_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN7_3DSTATE_CONSTANT_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_CONSTANT_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN7_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN7_3DSTATE_CONSTANT_VS_length_bias 0x00000002 -#define GEN7_3DSTATE_CONSTANT_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 21, \ - .DwordLength = 5 - -#define GEN7_3DSTATE_CONSTANT_VS_length 0x00000007 - -struct GEN7_3DSTATE_CONSTANT_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN7_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN7_3DSTATE_CONSTANT_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_CONSTANT_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN7_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN7_3DSTATE_DEPTH_BUFFER_length_bias 0x00000002 -#define GEN7_3DSTATE_DEPTH_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 5, \ - .DwordLength = 5 - -#define GEN7_3DSTATE_DEPTH_BUFFER_length 0x00000007 - -struct GEN7_3DSTATE_DEPTH_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define SURFTYPE_1D 0 -#define SURFTYPE_2D 1 -#define SURFTYPE_3D 2 -#define SURFTYPE_CUBE 3 -#define SURFTYPE_NULL 7 - uint32_t SurfaceType; - bool DepthWriteEnable; - bool StencilWriteEnable; - bool HierarchicalDepthBufferEnable; -#define D32_FLOAT 1 -#define D24_UNORM_X8_UINT 3 -#define D16_UNORM 5 - uint32_t SurfaceFormat; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; - uint32_t Height; - uint32_t Width; - uint32_t LOD; -#define SURFTYPE_CUBEmustbezero 0 - uint32_t Depth; - uint32_t MinimumArrayElement; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE DepthBufferObjectControlState; - uint32_t DepthCoordinateOffsetY; - uint32_t DepthCoordinateOffsetX; - uint32_t RenderTargetViewExtent; -}; - -static inline void -GEN7_3DSTATE_DEPTH_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_DEPTH_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SurfaceType, 29, 31) | - __gen_field(values->DepthWriteEnable, 28, 28) | - __gen_field(values->StencilWriteEnable, 27, 27) | - __gen_field(values->HierarchicalDepthBufferEnable, 22, 22) | - __gen_field(values->SurfaceFormat, 18, 20) | - __gen_field(values->SurfacePitch, 0, 17) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - - dw[3] = - __gen_field(values->Height, 18, 31) | - __gen_field(values->Width, 4, 17) | - __gen_field(values->LOD, 0, 3) | - 0; - - uint32_t dw_DepthBufferObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DepthBufferObjectControlState, &values->DepthBufferObjectControlState); - dw[4] = - __gen_field(values->Depth, 21, 31) | - __gen_field(values->MinimumArrayElement, 10, 20) | - __gen_field(dw_DepthBufferObjectControlState, 0, 3) | - 0; - - dw[5] = - __gen_field(values->DepthCoordinateOffsetY, 16, 31) | - __gen_field(values->DepthCoordinateOffsetX, 0, 15) | - 0; - - dw[6] = - __gen_field(values->RenderTargetViewExtent, 21, 31) | - 0; - -} - -#define GEN7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_length_bias 0x00000002 -#define GEN7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 37, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_length 0x00000002 - -struct GEN7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoDEPTH_STENCIL_STATE; -}; - -static inline void -GEN7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_DEPTH_STENCIL_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoDEPTH_STENCIL_STATE, 6, 31) | - __gen_mbo(0, 0) | - 0; - -} - -#define GEN7_3DSTATE_DRAWING_RECTANGLE_length_bias 0x00000002 -#define GEN7_3DSTATE_DRAWING_RECTANGLE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 0, \ - .DwordLength = 2 - -#define GEN7_3DSTATE_DRAWING_RECTANGLE_length 0x00000004 - -struct GEN7_3DSTATE_DRAWING_RECTANGLE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ClippedDrawingRectangleYMin; - uint32_t ClippedDrawingRectangleXMin; - uint32_t ClippedDrawingRectangleYMax; - uint32_t ClippedDrawingRectangleXMax; - uint32_t DrawingRectangleOriginY; - uint32_t DrawingRectangleOriginX; -}; - -static inline void -GEN7_3DSTATE_DRAWING_RECTANGLE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_DRAWING_RECTANGLE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ClippedDrawingRectangleYMin, 16, 31) | - __gen_field(values->ClippedDrawingRectangleXMin, 0, 15) | - 0; - - dw[2] = - __gen_field(values->ClippedDrawingRectangleYMax, 16, 31) | - __gen_field(values->ClippedDrawingRectangleXMax, 0, 15) | - 0; - - dw[3] = - __gen_field(values->DrawingRectangleOriginY, 16, 31) | - __gen_field(values->DrawingRectangleOriginX, 0, 15) | - 0; - -} - -#define GEN7_3DSTATE_DS_length_bias 0x00000002 -#define GEN7_3DSTATE_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 29, \ - .DwordLength = 4 - -#define GEN7_3DSTATE_DS_length 0x00000006 - -struct GEN7_3DSTATE_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t KernelStartPointer; -#define Multiple 0 -#define Single 1 - uint32_t SingleDomainPointDispatch; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t DispatchGRFStartRegisterForURBData; - uint32_t PatchURBEntryReadLength; - uint32_t PatchURBEntryReadOffset; - uint32_t MaximumNumberofThreads; - bool StatisticsEnable; - bool ComputeWCoordinateEnable; - bool DSCacheDisable; - bool DSFunctionEnable; -}; - -static inline void -GEN7_3DSTATE_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->KernelStartPointer, 6, 31) | - 0; - - dw[2] = - __gen_field(values->SingleDomainPointDispatch, 31, 31) | - __gen_field(values->VectorMaskEnable, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - dw[3] = - __gen_offset(values->ScratchSpaceBasePointer, 10, 31) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = - __gen_field(values->DispatchGRFStartRegisterForURBData, 20, 24) | - __gen_field(values->PatchURBEntryReadLength, 11, 17) | - __gen_field(values->PatchURBEntryReadOffset, 4, 9) | - 0; - - dw[5] = - __gen_field(values->MaximumNumberofThreads, 25, 31) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->ComputeWCoordinateEnable, 2, 2) | - __gen_field(values->DSCacheDisable, 1, 1) | - __gen_field(values->DSFunctionEnable, 0, 0) | - 0; - -} - -#define GEN7_3DSTATE_GS_length_bias 0x00000002 -#define GEN7_3DSTATE_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 17, \ - .DwordLength = 5 - -#define GEN7_3DSTATE_GS_length 0x00000007 - -struct GEN7_3DSTATE_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t KernelStartPointer; - uint32_t SingleProgramFlowSPF; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnableVME; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define NormalPriority 0 -#define HighPriority 1 - uint32_t ThreadPriority; -#define IEEE754 0 -#define alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool MaskStackExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t OutputVertexSize; - uint32_t OutputTopology; - uint32_t VertexURBEntryReadLength; - bool IncludeVertexHandles; - uint32_t VertexURBEntryReadOffset; - uint32_t DispatchGRFStartRegisterforURBData; - uint32_t MaximumNumberofThreads; -#define GSCTL_CUT 0 -#define GSCTL_SID 1 - uint32_t ControlDataFormat; - uint32_t ControlDataHeaderSize; - uint32_t InstanceControl; - uint32_t DefaultStreamID; -#define SINGLE 0 -#define DUAL_INSTANCE 1 -#define DUAL_OBJECT 2 - uint32_t DispatchMode; - uint32_t GSStatisticsEnable; - uint32_t GSInvocationsIncrementValue; - bool IncludePrimitiveID; - uint32_t Hint; - bool ReorderEnable; - bool DiscardAdjacency; - bool GSEnable; - uint32_t SemaphoreHandle; -}; - -static inline void -GEN7_3DSTATE_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->KernelStartPointer, 6, 31) | - 0; - - dw[2] = - __gen_field(values->SingleProgramFlowSPF, 31, 31) | - __gen_field(values->VectorMaskEnableVME, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->MaskStackExceptionEnable, 11, 11) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - dw[3] = - __gen_offset(values->ScratchSpaceBasePointer, 10, 31) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = - __gen_field(values->OutputVertexSize, 23, 28) | - __gen_field(values->OutputTopology, 17, 22) | - __gen_field(values->VertexURBEntryReadLength, 11, 16) | - __gen_field(values->IncludeVertexHandles, 10, 10) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - __gen_field(values->DispatchGRFStartRegisterforURBData, 0, 3) | - 0; - - dw[5] = - __gen_field(values->MaximumNumberofThreads, 25, 31) | - __gen_field(values->ControlDataFormat, 24, 24) | - __gen_field(values->ControlDataHeaderSize, 20, 23) | - __gen_field(values->InstanceControl, 15, 19) | - __gen_field(values->DefaultStreamID, 13, 14) | - __gen_field(values->DispatchMode, 11, 12) | - __gen_field(values->GSStatisticsEnable, 10, 10) | - __gen_field(values->GSInvocationsIncrementValue, 5, 9) | - __gen_field(values->IncludePrimitiveID, 4, 4) | - __gen_field(values->Hint, 3, 3) | - __gen_field(values->ReorderEnable, 2, 2) | - __gen_field(values->DiscardAdjacency, 1, 1) | - __gen_field(values->GSEnable, 0, 0) | - 0; - - dw[6] = - __gen_offset(values->SemaphoreHandle, 0, 11) | - 0; - -} - -#define GEN7_3DSTATE_HIER_DEPTH_BUFFER_length_bias 0x00000002 -#define GEN7_3DSTATE_HIER_DEPTH_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 7, \ - .DwordLength = 1 - -#define GEN7_3DSTATE_HIER_DEPTH_BUFFER_length 0x00000003 - -struct GEN7_3DSTATE_HIER_DEPTH_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE HierarchicalDepthBufferObjectControlState; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; -}; - -static inline void -GEN7_3DSTATE_HIER_DEPTH_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_HIER_DEPTH_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_HierarchicalDepthBufferObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_HierarchicalDepthBufferObjectControlState, &values->HierarchicalDepthBufferObjectControlState); - dw[1] = - __gen_field(dw_HierarchicalDepthBufferObjectControlState, 25, 28) | - __gen_field(values->SurfacePitch, 0, 16) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - -} - -#define GEN7_3DSTATE_HS_length_bias 0x00000002 -#define GEN7_3DSTATE_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 27, \ - .DwordLength = 5 - -#define GEN7_3DSTATE_HS_length 0x00000007 - -struct GEN7_3DSTATE_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define IEEE754 0 -#define alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t MaximumNumberofThreads; - bool Enable; - bool StatisticsEnable; - uint32_t InstanceCount; - uint32_t KernelStartPointer; - uint32_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t SingleProgramFlow; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; - bool IncludeVertexHandles; - uint32_t DispatchGRFStartRegisterForURBData; - uint32_t VertexURBEntryReadLength; - uint32_t VertexURBEntryReadOffset; - uint32_t SemaphoreHandle; -}; - -static inline void -GEN7_3DSTATE_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - __gen_field(values->MaximumNumberofThreads, 0, 6) | - 0; - - dw[2] = - __gen_field(values->Enable, 31, 31) | - __gen_field(values->StatisticsEnable, 29, 29) | - __gen_field(values->InstanceCount, 0, 3) | - 0; - - dw[3] = - __gen_offset(values->KernelStartPointer, 6, 31) | - 0; - - dw[4] = - __gen_offset(values->ScratchSpaceBasePointer, 10, 31) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[5] = - __gen_field(values->SingleProgramFlow, 27, 27) | - __gen_field(values->VectorMaskEnable, 26, 26) | - __gen_field(values->IncludeVertexHandles, 24, 24) | - __gen_field(values->DispatchGRFStartRegisterForURBData, 19, 23) | - __gen_field(values->VertexURBEntryReadLength, 11, 16) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - 0; - - dw[6] = - __gen_offset(values->SemaphoreHandle, 0, 11) | - 0; - -} - -#define GEN7_3DSTATE_INDEX_BUFFER_length_bias 0x00000002 -#define GEN7_3DSTATE_INDEX_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 10, \ - .DwordLength = 1 - -#define GEN7_3DSTATE_INDEX_BUFFER_length 0x00000003 - -struct GEN7_3DSTATE_INDEX_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; - bool CutIndexEnable; -#define INDEX_BYTE 0 -#define INDEX_WORD 1 -#define INDEX_DWORD 2 - uint32_t IndexFormat; - uint32_t DwordLength; - __gen_address_type BufferStartingAddress; - __gen_address_type BufferEndingAddress; -}; - -static inline void -GEN7_3DSTATE_INDEX_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_INDEX_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_MemoryObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState); - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(dw_MemoryObjectControlState, 12, 15) | - __gen_field(values->CutIndexEnable, 10, 10) | - __gen_field(values->IndexFormat, 8, 9) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->BufferStartingAddress, dw1); - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->BufferEndingAddress, dw2); - -} - -#define GEN7_3DSTATE_LINE_STIPPLE_length_bias 0x00000002 -#define GEN7_3DSTATE_LINE_STIPPLE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 8, \ - .DwordLength = 1 - -#define GEN7_3DSTATE_LINE_STIPPLE_length 0x00000003 - -struct GEN7_3DSTATE_LINE_STIPPLE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool ModifyEnableCurrentRepeatCounterCurrentStippleIndex; - uint32_t CurrentRepeatCounter; - uint32_t CurrentStippleIndex; - uint32_t LineStipplePattern; - float LineStippleInverseRepeatCount; - uint32_t LineStippleRepeatCount; -}; - -static inline void -GEN7_3DSTATE_LINE_STIPPLE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_LINE_STIPPLE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ModifyEnableCurrentRepeatCounterCurrentStippleIndex, 31, 31) | - __gen_field(values->CurrentRepeatCounter, 21, 29) | - __gen_field(values->CurrentStippleIndex, 16, 19) | - __gen_field(values->LineStipplePattern, 0, 15) | - 0; - - dw[2] = - __gen_field(values->LineStippleInverseRepeatCount * (1 << 16), 15, 31) | - __gen_field(values->LineStippleRepeatCount, 0, 8) | - 0; - -} - -#define GEN7_3DSTATE_MONOFILTER_SIZE_length_bias 0x00000002 -#define GEN7_3DSTATE_MONOFILTER_SIZE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 17, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_MONOFILTER_SIZE_length 0x00000002 - -struct GEN7_3DSTATE_MONOFILTER_SIZE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t MonochromeFilterWidth; - uint32_t MonochromeFilterHeight; -}; - -static inline void -GEN7_3DSTATE_MONOFILTER_SIZE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_MONOFILTER_SIZE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->MonochromeFilterWidth, 3, 5) | - __gen_field(values->MonochromeFilterHeight, 0, 2) | - 0; - -} - -#define GEN7_3DSTATE_MULTISAMPLE_length_bias 0x00000002 -#define GEN7_3DSTATE_MULTISAMPLE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 13, \ - .DwordLength = 2 - -#define GEN7_3DSTATE_MULTISAMPLE_length 0x00000004 - -struct GEN7_3DSTATE_MULTISAMPLE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define PIXLOC_CENTER 0 -#define PIXLOC_UL_CORNER 1 - uint32_t PixelLocation; -#define NUMSAMPLES_1 0 -#define NUMSAMPLES_4 2 -#define NUMSAMPLES_8 3 - uint32_t NumberofMultisamples; - float Sample3XOffset; - float Sample3YOffset; - float Sample2XOffset; - float Sample2YOffset; - float Sample1XOffset; - float Sample1YOffset; - float Sample0XOffset; - float Sample0YOffset; - float Sample7XOffset; - float Sample7YOffset; - float Sample6XOffset; - float Sample6YOffset; - float Sample5XOffset; - float Sample5YOffset; - float Sample4XOffset; - float Sample4YOffset; -}; - -static inline void -GEN7_3DSTATE_MULTISAMPLE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_MULTISAMPLE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->PixelLocation, 4, 4) | - __gen_field(values->NumberofMultisamples, 1, 3) | - 0; - - dw[2] = - __gen_field(values->Sample3XOffset * (1 << 4), 28, 31) | - __gen_field(values->Sample3YOffset * (1 << 4), 24, 27) | - __gen_field(values->Sample2XOffset * (1 << 4), 20, 23) | - __gen_field(values->Sample2YOffset * (1 << 4), 16, 19) | - __gen_field(values->Sample1XOffset * (1 << 4), 12, 15) | - __gen_field(values->Sample1YOffset * (1 << 4), 8, 11) | - __gen_field(values->Sample0XOffset * (1 << 4), 4, 7) | - __gen_field(values->Sample0YOffset * (1 << 4), 0, 3) | - 0; - - dw[3] = - __gen_field(values->Sample7XOffset * (1 << 4), 28, 31) | - __gen_field(values->Sample7YOffset * (1 << 4), 24, 27) | - __gen_field(values->Sample6XOffset * (1 << 4), 20, 23) | - __gen_field(values->Sample6YOffset * (1 << 4), 16, 19) | - __gen_field(values->Sample5XOffset * (1 << 4), 12, 15) | - __gen_field(values->Sample5YOffset * (1 << 4), 8, 11) | - __gen_field(values->Sample4XOffset * (1 << 4), 4, 7) | - __gen_field(values->Sample4YOffset * (1 << 4), 0, 3) | - 0; - -} - -#define GEN7_3DSTATE_POLY_STIPPLE_OFFSET_length_bias 0x00000002 -#define GEN7_3DSTATE_POLY_STIPPLE_OFFSET_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 6, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_POLY_STIPPLE_OFFSET_length 0x00000002 - -struct GEN7_3DSTATE_POLY_STIPPLE_OFFSET { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PolygonStippleXOffset; - uint32_t PolygonStippleYOffset; -}; - -static inline void -GEN7_3DSTATE_POLY_STIPPLE_OFFSET_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_POLY_STIPPLE_OFFSET * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->PolygonStippleXOffset, 8, 12) | - __gen_field(values->PolygonStippleYOffset, 0, 4) | - 0; - -} - -#define GEN7_3DSTATE_POLY_STIPPLE_PATTERN_length_bias 0x00000002 -#define GEN7_3DSTATE_POLY_STIPPLE_PATTERN_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 7, \ - .DwordLength = 31 - -#define GEN7_3DSTATE_POLY_STIPPLE_PATTERN_length 0x00000021 - -struct GEN7_3DSTATE_POLY_STIPPLE_PATTERN { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PatternRow[32]; -}; - -static inline void -GEN7_3DSTATE_POLY_STIPPLE_PATTERN_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_POLY_STIPPLE_PATTERN * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - for (uint32_t i = 0, j = 1; i < 32; i += 1, j++) { - dw[j] = - __gen_field(values->PatternRow[i + 0], 0, 31) | - 0; - } - -} - -#define GEN7_3DSTATE_PS_length_bias 0x00000002 -#define GEN7_3DSTATE_PS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 32, \ - .DwordLength = 6 - -#define GEN7_3DSTATE_PS_length 0x00000008 - -struct GEN7_3DSTATE_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t KernelStartPointer0; -#define Multiple 0 -#define Single 1 - uint32_t SingleProgramFlowSPF; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnableVME; - uint32_t SamplerCount; -#define FTZ 0 -#define RET 1 - uint32_t DenormalMode; - uint32_t BindingTableEntryCount; -#define IEEE745 0 -#define Alt 1 - uint32_t FloatingPointMode; -#define RTNE 0 -#define RU 1 -#define RD 2 -#define RTZ 3 - uint32_t RoundingMode; - bool IllegalOpcodeExceptionEnable; - bool MaskStackExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t MaximumNumberofThreads; - bool PushConstantEnable; - bool AttributeEnable; - bool oMaskPresenttoRenderTarget; - bool RenderTargetFastClearEnable; - bool DualSourceBlendEnable; - bool RenderTargetResolveEnable; -#define POSOFFSET_NONE 0 -#define POSOFFSET_CENTROID 2 -#define POSOFFSET_SAMPLE 3 - uint32_t PositionXYOffsetSelect; - bool _32PixelDispatchEnable; - bool _16PixelDispatchEnable; - bool _8PixelDispatchEnable; - uint32_t DispatchGRFStartRegisterforConstantSetupData0; - uint32_t DispatchGRFStartRegisterforConstantSetupData1; - uint32_t DispatchGRFStartRegisterforConstantSetupData2; - uint32_t KernelStartPointer1; - uint32_t KernelStartPointer2; -}; - -static inline void -GEN7_3DSTATE_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->KernelStartPointer0, 6, 31) | - 0; - - dw[2] = - __gen_field(values->SingleProgramFlowSPF, 31, 31) | - __gen_field(values->VectorMaskEnableVME, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->DenormalMode, 26, 26) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->RoundingMode, 14, 15) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->MaskStackExceptionEnable, 11, 11) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - dw[3] = - __gen_offset(values->ScratchSpaceBasePointer, 10, 31) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = - __gen_field(values->MaximumNumberofThreads, 24, 31) | - __gen_field(values->PushConstantEnable, 11, 11) | - __gen_field(values->AttributeEnable, 10, 10) | - __gen_field(values->oMaskPresenttoRenderTarget, 9, 9) | - __gen_field(values->RenderTargetFastClearEnable, 8, 8) | - __gen_field(values->DualSourceBlendEnable, 7, 7) | - __gen_field(values->RenderTargetResolveEnable, 6, 6) | - __gen_field(values->PositionXYOffsetSelect, 3, 4) | - __gen_field(values->_32PixelDispatchEnable, 2, 2) | - __gen_field(values->_16PixelDispatchEnable, 1, 1) | - __gen_field(values->_8PixelDispatchEnable, 0, 0) | - 0; - - dw[5] = - __gen_field(values->DispatchGRFStartRegisterforConstantSetupData0, 16, 22) | - __gen_field(values->DispatchGRFStartRegisterforConstantSetupData1, 8, 14) | - __gen_field(values->DispatchGRFStartRegisterforConstantSetupData2, 0, 6) | - 0; - - dw[6] = - __gen_offset(values->KernelStartPointer1, 6, 31) | - 0; - - dw[7] = - __gen_offset(values->KernelStartPointer2, 6, 31) | - 0; - -} - -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS_length_bias 0x00000002 -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 20, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS_length 0x00000002 - -struct GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define _0KB 0 - uint32_t ConstantBufferOffset; -#define _0KB 0 - uint32_t ConstantBufferSize; -}; - -static inline void -GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 19) | - __gen_field(values->ConstantBufferSize, 0, 4) | - 0; - -} - -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS_length_bias 0x00000002 -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 21, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS_length 0x00000002 - -struct GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define _0KB 0 - uint32_t ConstantBufferOffset; -#define _0KB 0 - uint32_t ConstantBufferSize; -}; - -static inline void -GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 19) | - __gen_field(values->ConstantBufferSize, 0, 4) | - 0; - -} - -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS_length_bias 0x00000002 -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 19, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS_length 0x00000002 - -struct GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define _0KB 0 - uint32_t ConstantBufferOffset; -#define _0KB 0 - uint32_t ConstantBufferSize; -}; - -static inline void -GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 19) | - __gen_field(values->ConstantBufferSize, 0, 4) | - 0; - -} - -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS_length_bias 0x00000002 -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 22, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS_length 0x00000002 - -struct GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define _0KB 0 - uint32_t ConstantBufferOffset; -#define _0KB 0 - uint32_t ConstantBufferSize; -}; - -static inline void -GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 19) | - __gen_field(values->ConstantBufferSize, 0, 4) | - 0; - -} - -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS_length_bias 0x00000002 -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 18, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS_length 0x00000002 - -struct GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define _0KB 0 - uint32_t ConstantBufferOffset; -#define _0KB 0 - uint32_t ConstantBufferSize; -}; - -static inline void -GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 19) | - __gen_field(values->ConstantBufferSize, 0, 4) | - 0; - -} - -#define GEN7_3DSTATE_SAMPLER_PALETTE_LOAD0_length_bias 0x00000002 -#define GEN7_3DSTATE_SAMPLER_PALETTE_LOAD0_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 2 - -#define GEN7_3DSTATE_SAMPLER_PALETTE_LOAD0_length 0x00000000 - -#define GEN7_PALETTE_ENTRY_length 0x00000001 - -struct GEN7_PALETTE_ENTRY { - uint32_t Alpha; - uint32_t Red; - uint32_t Green; - uint32_t Blue; -}; - -static inline void -GEN7_PALETTE_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_PALETTE_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->Alpha, 24, 31) | - __gen_field(values->Red, 16, 23) | - __gen_field(values->Green, 8, 15) | - __gen_field(values->Blue, 0, 7) | - 0; - -} - -struct GEN7_3DSTATE_SAMPLER_PALETTE_LOAD0 { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN7_3DSTATE_SAMPLER_PALETTE_LOAD0_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_SAMPLER_PALETTE_LOAD0 * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN7_3DSTATE_SAMPLER_PALETTE_LOAD1_length_bias 0x00000002 -#define GEN7_3DSTATE_SAMPLER_PALETTE_LOAD1_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 12 - -#define GEN7_3DSTATE_SAMPLER_PALETTE_LOAD1_length 0x00000000 - -struct GEN7_3DSTATE_SAMPLER_PALETTE_LOAD1 { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN7_3DSTATE_SAMPLER_PALETTE_LOAD1_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_SAMPLER_PALETTE_LOAD1 * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS_length_bias 0x00000002 -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 45, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS_length 0x00000002 - -struct GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoDSSamplerState; -}; - -static inline void -GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_SAMPLER_STATE_POINTERS_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoDSSamplerState, 5, 31) | - 0; - -} - -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS_length_bias 0x00000002 -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 46, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS_length 0x00000002 - -struct GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoGSSamplerState; -}; - -static inline void -GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoGSSamplerState, 5, 31) | - 0; - -} - -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS_length_bias 0x00000002 -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 44, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS_length 0x00000002 - -struct GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoHSSamplerState; -}; - -static inline void -GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_SAMPLER_STATE_POINTERS_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoHSSamplerState, 5, 31) | - 0; - -} - -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS_length_bias 0x00000002 -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 47, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS_length 0x00000002 - -struct GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoPSSamplerState; -}; - -static inline void -GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoPSSamplerState, 5, 31) | - 0; - -} - -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS_length_bias 0x00000002 -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 43, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS_length 0x00000002 - -struct GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoVSSamplerState; -}; - -static inline void -GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoVSSamplerState, 5, 31) | - 0; - -} - -#define GEN7_3DSTATE_SAMPLE_MASK_length_bias 0x00000002 -#define GEN7_3DSTATE_SAMPLE_MASK_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 24, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_SAMPLE_MASK_length 0x00000002 - -struct GEN7_3DSTATE_SAMPLE_MASK { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SampleMask; -}; - -static inline void -GEN7_3DSTATE_SAMPLE_MASK_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_SAMPLE_MASK * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SampleMask, 0, 7) | - 0; - -} - -#define GEN7_3DSTATE_SBE_length_bias 0x00000002 -#define GEN7_3DSTATE_SBE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 31, \ - .DwordLength = 12 - -#define GEN7_3DSTATE_SBE_length 0x0000000e - -struct GEN7_3DSTATE_SBE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define SWIZ_0_15 0 -#define SWIZ_16_31 1 - uint32_t AttributeSwizzleControlMode; - uint32_t NumberofSFOutputAttributes; - bool AttributeSwizzleEnable; -#define UPPERLEFT 0 -#define LOWERLEFT 1 - uint32_t PointSpriteTextureCoordinateOrigin; - uint32_t VertexURBEntryReadLength; - uint32_t VertexURBEntryReadOffset; - bool Attribute2n1ComponentOverrideW; - bool Attribute2n1ComponentOverrideZ; - bool Attribute2n1ComponentOverrideY; - bool Attribute2n1ComponentOverrideX; -#define CONST_0000 0 -#define CONST_0001_FLOAT 1 -#define CONST_1111_FLOAT 2 -#define PRIM_ID 3 - uint32_t Attribute2n1ConstantSource; -#define INPUTATTR 0 -#define INPUTATTR_FACING 1 -#define INPUTATTR_W 2 -#define INPUTATTR_FACING_W 3 - uint32_t Attribute2n1SwizzleSelect; - uint32_t Attribute2n1SourceAttribute; - bool Attribute2nComponentOverrideW; - bool Attribute2nComponentOverrideZ; - bool Attribute2nComponentOverrideY; - bool Attribute2nComponentOverrideX; -#define CONST_0000 0 -#define CONST_0001_FLOAT 1 -#define CONST_1111_FLOAT 2 -#define PRIM_ID 3 - uint32_t Attribute2nConstantSource; -#define INPUTATTR 0 -#define INPUTATTR_FACING 1 -#define INPUTATTR_W 2 -#define INPUTATTR_FACING_W 3 - uint32_t Attribute2nSwizzleSelect; - uint32_t Attribute2nSourceAttribute; - uint32_t PointSpriteTextureCoordinateEnable; - uint32_t ConstantInterpolationEnable310; - uint32_t Attribute7WrapShortestEnables; - uint32_t Attribute6WrapShortestEnables; - uint32_t Attribute5WrapShortestEnables; - uint32_t Attribute4WrapShortestEnables; - uint32_t Attribute3WrapShortestEnables; - uint32_t Attribute2WrapShortestEnables; - uint32_t Attribute1WrapShortestEnables; - uint32_t Attribute0WrapShortestEnables; - uint32_t Attribute15WrapShortestEnables; - uint32_t Attribute14WrapShortestEnables; - uint32_t Attribute13WrapShortestEnables; - uint32_t Attribute12WrapShortestEnables; - uint32_t Attribute11WrapShortestEnables; - uint32_t Attribute10WrapShortestEnables; - uint32_t Attribute9WrapShortestEnables; - uint32_t Attribute8WrapShortestEnables; -}; - -static inline void -GEN7_3DSTATE_SBE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_SBE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->AttributeSwizzleControlMode, 28, 28) | - __gen_field(values->NumberofSFOutputAttributes, 22, 27) | - __gen_field(values->AttributeSwizzleEnable, 21, 21) | - __gen_field(values->PointSpriteTextureCoordinateOrigin, 20, 20) | - __gen_field(values->VertexURBEntryReadLength, 11, 15) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - 0; - - dw[2] = - __gen_field(values->Attribute2n1ComponentOverrideW, 31, 31) | - __gen_field(values->Attribute2n1ComponentOverrideZ, 30, 30) | - __gen_field(values->Attribute2n1ComponentOverrideY, 29, 29) | - __gen_field(values->Attribute2n1ComponentOverrideX, 28, 28) | - __gen_field(values->Attribute2n1ConstantSource, 25, 26) | - __gen_field(values->Attribute2n1SwizzleSelect, 22, 23) | - __gen_field(values->Attribute2n1SourceAttribute, 16, 20) | - __gen_field(values->Attribute2nComponentOverrideW, 15, 15) | - __gen_field(values->Attribute2nComponentOverrideZ, 14, 14) | - __gen_field(values->Attribute2nComponentOverrideY, 13, 13) | - __gen_field(values->Attribute2nComponentOverrideX, 12, 12) | - __gen_field(values->Attribute2nConstantSource, 9, 10) | - __gen_field(values->Attribute2nSwizzleSelect, 6, 7) | - __gen_field(values->Attribute2nSourceAttribute, 0, 4) | - 0; - - dw[10] = - __gen_field(values->PointSpriteTextureCoordinateEnable, 0, 31) | - 0; - - dw[11] = - __gen_field(values->ConstantInterpolationEnable310, 0, 31) | - 0; - - dw[12] = - __gen_field(values->Attribute7WrapShortestEnables, 28, 31) | - __gen_field(values->Attribute6WrapShortestEnables, 24, 27) | - __gen_field(values->Attribute5WrapShortestEnables, 20, 23) | - __gen_field(values->Attribute4WrapShortestEnables, 16, 19) | - __gen_field(values->Attribute3WrapShortestEnables, 12, 15) | - __gen_field(values->Attribute2WrapShortestEnables, 8, 11) | - __gen_field(values->Attribute1WrapShortestEnables, 4, 7) | - __gen_field(values->Attribute0WrapShortestEnables, 0, 3) | - 0; - - dw[13] = - __gen_field(values->Attribute15WrapShortestEnables, 28, 31) | - __gen_field(values->Attribute14WrapShortestEnables, 24, 27) | - __gen_field(values->Attribute13WrapShortestEnables, 20, 23) | - __gen_field(values->Attribute12WrapShortestEnables, 16, 19) | - __gen_field(values->Attribute11WrapShortestEnables, 12, 15) | - __gen_field(values->Attribute10WrapShortestEnables, 8, 11) | - __gen_field(values->Attribute9WrapShortestEnables, 4, 7) | - __gen_field(values->Attribute8WrapShortestEnables, 0, 3) | - 0; - -} - -#define GEN7_3DSTATE_SCISSOR_STATE_POINTERS_length_bias 0x00000002 -#define GEN7_3DSTATE_SCISSOR_STATE_POINTERS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 15, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_SCISSOR_STATE_POINTERS_length 0x00000002 - -struct GEN7_3DSTATE_SCISSOR_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ScissorRectPointer; -}; - -static inline void -GEN7_3DSTATE_SCISSOR_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_SCISSOR_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->ScissorRectPointer, 5, 31) | - 0; - -} - -#define GEN7_3DSTATE_SF_length_bias 0x00000002 -#define GEN7_3DSTATE_SF_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 19, \ - .DwordLength = 5 - -#define GEN7_3DSTATE_SF_length 0x00000007 - -struct GEN7_3DSTATE_SF { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define D32_FLOAT_S8X24_UINT 0 -#define D32_FLOAT 1 -#define D24_UNORM_S8_UINT 2 -#define D24_UNORM_X8_UINT 3 -#define D16_UNORM 5 - uint32_t DepthBufferSurfaceFormat; - bool LegacyGlobalDepthBiasEnable; - bool StatisticsEnable; - bool GlobalDepthOffsetEnableSolid; - bool GlobalDepthOffsetEnableWireframe; - bool GlobalDepthOffsetEnablePoint; -#define RASTER_SOLID 0 -#define RASTER_WIREFRAME 1 -#define RASTER_POINT 2 - uint32_t FrontFaceFillMode; -#define RASTER_SOLID 0 -#define RASTER_WIREFRAME 1 -#define RASTER_POINT 2 - uint32_t BackFaceFillMode; - bool ViewTransformEnable; - uint32_t FrontWinding; - bool AntiAliasingEnable; -#define CULLMODE_BOTH 0 -#define CULLMODE_NONE 1 -#define CULLMODE_FRONT 2 -#define CULLMODE_BACK 3 - uint32_t CullMode; - float LineWidth; - uint32_t LineEndCapAntialiasingRegionWidth; - bool ScissorRectangleEnable; - uint32_t MultisampleRasterizationMode; - bool LastPixelEnable; -#define Vertex0 0 -#define Vertex1 1 -#define Vertex2 2 - uint32_t TriangleStripListProvokingVertexSelect; - uint32_t LineStripListProvokingVertexSelect; -#define Vertex0 0 -#define Vertex1 1 -#define Vertex2 2 - uint32_t TriangleFanProvokingVertexSelect; -#define AALINEDISTANCE_TRUE 1 - uint32_t AALineDistanceMode; - uint32_t VertexSubPixelPrecisionSelect; - uint32_t UsePointWidthState; - float PointWidth; - float GlobalDepthOffsetConstant; - float GlobalDepthOffsetScale; - float GlobalDepthOffsetClamp; -}; - -static inline void -GEN7_3DSTATE_SF_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_SF * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->DepthBufferSurfaceFormat, 12, 14) | - __gen_field(values->LegacyGlobalDepthBiasEnable, 11, 11) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->GlobalDepthOffsetEnableSolid, 9, 9) | - __gen_field(values->GlobalDepthOffsetEnableWireframe, 8, 8) | - __gen_field(values->GlobalDepthOffsetEnablePoint, 7, 7) | - __gen_field(values->FrontFaceFillMode, 5, 6) | - __gen_field(values->BackFaceFillMode, 3, 4) | - __gen_field(values->ViewTransformEnable, 1, 1) | - __gen_field(values->FrontWinding, 0, 0) | - 0; - - dw[2] = - __gen_field(values->AntiAliasingEnable, 31, 31) | - __gen_field(values->CullMode, 29, 30) | - __gen_field(values->LineWidth * (1 << 7), 18, 27) | - __gen_field(values->LineEndCapAntialiasingRegionWidth, 16, 17) | - __gen_field(values->ScissorRectangleEnable, 11, 11) | - __gen_field(values->MultisampleRasterizationMode, 8, 9) | - 0; - - dw[3] = - __gen_field(values->LastPixelEnable, 31, 31) | - __gen_field(values->TriangleStripListProvokingVertexSelect, 29, 30) | - __gen_field(values->LineStripListProvokingVertexSelect, 27, 28) | - __gen_field(values->TriangleFanProvokingVertexSelect, 25, 26) | - __gen_field(values->AALineDistanceMode, 14, 14) | - __gen_field(values->VertexSubPixelPrecisionSelect, 12, 12) | - __gen_field(values->UsePointWidthState, 11, 11) | - __gen_field(values->PointWidth * (1 << 3), 0, 10) | - 0; - - dw[4] = - __gen_float(values->GlobalDepthOffsetConstant) | - 0; - - dw[5] = - __gen_float(values->GlobalDepthOffsetScale) | - 0; - - dw[6] = - __gen_float(values->GlobalDepthOffsetClamp) | - 0; - -} - -#define GEN7_3DSTATE_SO_BUFFER_length_bias 0x00000002 -#define GEN7_3DSTATE_SO_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 24, \ - .DwordLength = 2 - -#define GEN7_3DSTATE_SO_BUFFER_length 0x00000004 - -struct GEN7_3DSTATE_SO_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SOBufferIndex; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE SOBufferObjectControlState; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; - __gen_address_type SurfaceEndAddress; -}; - -static inline void -GEN7_3DSTATE_SO_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_SO_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_SOBufferObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SOBufferObjectControlState, &values->SOBufferObjectControlState); - dw[1] = - __gen_field(values->SOBufferIndex, 29, 30) | - __gen_field(dw_SOBufferObjectControlState, 25, 28) | - __gen_field(values->SurfacePitch, 0, 11) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - - uint32_t dw3 = - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->SurfaceEndAddress, dw3); - -} - -#define GEN7_3DSTATE_SO_DECL_LIST_length_bias 0x00000002 -#define GEN7_3DSTATE_SO_DECL_LIST_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 23 - -#define GEN7_3DSTATE_SO_DECL_LIST_length 0x00000000 - -#define GEN7_SO_DECL_ENTRY_length 0x00000002 - -#define GEN7_SO_DECL_length 0x00000001 - -struct GEN7_SO_DECL { - uint32_t OutputBufferSlot; - uint32_t HoleFlag; - uint32_t RegisterIndex; - uint32_t ComponentMask; -}; - -static inline void -GEN7_SO_DECL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_SO_DECL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->OutputBufferSlot, 12, 13) | - __gen_field(values->HoleFlag, 11, 11) | - __gen_field(values->RegisterIndex, 4, 9) | - __gen_field(values->ComponentMask, 0, 3) | - 0; - -} - -struct GEN7_SO_DECL_ENTRY { - struct GEN7_SO_DECL Stream3Decl; - struct GEN7_SO_DECL Stream2Decl; - struct GEN7_SO_DECL Stream1Decl; - struct GEN7_SO_DECL Stream0Decl; -}; - -static inline void -GEN7_SO_DECL_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_SO_DECL_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_Stream3Decl; - GEN7_SO_DECL_pack(data, &dw_Stream3Decl, &values->Stream3Decl); - uint32_t dw_Stream2Decl; - GEN7_SO_DECL_pack(data, &dw_Stream2Decl, &values->Stream2Decl); - uint32_t dw_Stream1Decl; - GEN7_SO_DECL_pack(data, &dw_Stream1Decl, &values->Stream1Decl); - uint32_t dw_Stream0Decl; - GEN7_SO_DECL_pack(data, &dw_Stream0Decl, &values->Stream0Decl); - uint64_t qw0 = - __gen_field(dw_Stream3Decl, 48, 63) | - __gen_field(dw_Stream2Decl, 32, 47) | - __gen_field(dw_Stream1Decl, 16, 31) | - __gen_field(dw_Stream0Decl, 0, 15) | - 0; - - dw[0] = qw0; - dw[1] = qw0 >> 32; - -} - -struct GEN7_3DSTATE_SO_DECL_LIST { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t StreamtoBufferSelects3; - uint32_t StreamtoBufferSelects2; - uint32_t StreamtoBufferSelects1; - uint32_t StreamtoBufferSelects0; - uint32_t NumEntries3; - uint32_t NumEntries2; - uint32_t NumEntries1; - uint32_t NumEntries0; - /* variable length fields follow */ -}; - -static inline void -GEN7_3DSTATE_SO_DECL_LIST_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_SO_DECL_LIST * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->StreamtoBufferSelects3, 12, 15) | - __gen_field(values->StreamtoBufferSelects2, 8, 11) | - __gen_field(values->StreamtoBufferSelects1, 4, 7) | - __gen_field(values->StreamtoBufferSelects0, 0, 3) | - 0; - - dw[2] = - __gen_field(values->NumEntries3, 24, 31) | - __gen_field(values->NumEntries2, 16, 23) | - __gen_field(values->NumEntries1, 8, 15) | - __gen_field(values->NumEntries0, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN7_3DSTATE_STENCIL_BUFFER_length_bias 0x00000002 -#define GEN7_3DSTATE_STENCIL_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 6, \ - .DwordLength = 1 - -#define GEN7_3DSTATE_STENCIL_BUFFER_length 0x00000003 - -struct GEN7_3DSTATE_STENCIL_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE StencilBufferObjectControlState; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; -}; - -static inline void -GEN7_3DSTATE_STENCIL_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_STENCIL_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_StencilBufferObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StencilBufferObjectControlState, &values->StencilBufferObjectControlState); - dw[1] = - __gen_field(dw_StencilBufferObjectControlState, 25, 28) | - __gen_field(values->SurfacePitch, 0, 16) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - -} - -#define GEN7_3DSTATE_STREAMOUT_length_bias 0x00000002 -#define GEN7_3DSTATE_STREAMOUT_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 30, \ - .DwordLength = 1 - -#define GEN7_3DSTATE_STREAMOUT_length 0x00000003 - -struct GEN7_3DSTATE_STREAMOUT { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SOFunctionEnable; - uint32_t RenderingDisable; - uint32_t RenderStreamSelect; -#define LEADING 0 -#define TRAILING 1 - uint32_t ReorderMode; - bool SOStatisticsEnable; - uint32_t SOBufferEnable3; - uint32_t SOBufferEnable2; - uint32_t SOBufferEnable1; - uint32_t SOBufferEnable0; - uint32_t Stream3VertexReadOffset; - uint32_t Stream3VertexReadLength; - uint32_t Stream2VertexReadOffset; - uint32_t Stream2VertexReadLength; - uint32_t Stream1VertexReadOffset; - uint32_t Stream1VertexReadLength; - uint32_t Stream0VertexReadOffset; - uint32_t Stream0VertexReadLength; -}; - -static inline void -GEN7_3DSTATE_STREAMOUT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_STREAMOUT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SOFunctionEnable, 31, 31) | - __gen_field(values->RenderingDisable, 30, 30) | - __gen_field(values->RenderStreamSelect, 27, 28) | - __gen_field(values->ReorderMode, 26, 26) | - __gen_field(values->SOStatisticsEnable, 25, 25) | - __gen_field(values->SOBufferEnable3, 11, 11) | - __gen_field(values->SOBufferEnable2, 10, 10) | - __gen_field(values->SOBufferEnable1, 9, 9) | - __gen_field(values->SOBufferEnable0, 8, 8) | - 0; - - dw[2] = - __gen_field(values->Stream3VertexReadOffset, 29, 29) | - __gen_field(values->Stream3VertexReadLength, 24, 28) | - __gen_field(values->Stream2VertexReadOffset, 21, 21) | - __gen_field(values->Stream2VertexReadLength, 16, 20) | - __gen_field(values->Stream1VertexReadOffset, 13, 13) | - __gen_field(values->Stream1VertexReadLength, 8, 12) | - __gen_field(values->Stream0VertexReadOffset, 5, 5) | - __gen_field(values->Stream0VertexReadLength, 0, 4) | - 0; - -} - -#define GEN7_3DSTATE_TE_length_bias 0x00000002 -#define GEN7_3DSTATE_TE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 28, \ - .DwordLength = 2 - -#define GEN7_3DSTATE_TE_length 0x00000004 - -struct GEN7_3DSTATE_TE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define INTEGER 0 -#define ODD_FRACTIONAL 1 -#define EVEN_FRACTIONAL 2 - uint32_t Partitioning; -#define POINT 0 -#define OUTPUT_LINE 1 -#define OUTPUT_TRI_CW 2 -#define OUTPUT_TRI_CCW 3 - uint32_t OutputTopology; -#define QUAD 0 -#define TRI 1 -#define ISOLINE 2 - uint32_t TEDomain; -#define HW_TESS 0 -#define SW_TESS 1 - uint32_t TEMode; - bool TEEnable; - float MaximumTessellationFactorOdd; - float MaximumTessellationFactorNotOdd; -}; - -static inline void -GEN7_3DSTATE_TE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_TE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->Partitioning, 12, 13) | - __gen_field(values->OutputTopology, 8, 9) | - __gen_field(values->TEDomain, 4, 5) | - __gen_field(values->TEMode, 1, 2) | - __gen_field(values->TEEnable, 0, 0) | - 0; - - dw[2] = - __gen_float(values->MaximumTessellationFactorOdd) | - 0; - - dw[3] = - __gen_float(values->MaximumTessellationFactorNotOdd) | - 0; - -} - -#define GEN7_3DSTATE_URB_DS_length_bias 0x00000002 -#define GEN7_3DSTATE_URB_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 50, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_URB_DS_length 0x00000002 - -struct GEN7_3DSTATE_URB_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t DSURBStartingAddress; - uint32_t DSURBEntryAllocationSize; - uint32_t DSNumberofURBEntries; -}; - -static inline void -GEN7_3DSTATE_URB_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_URB_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->DSURBStartingAddress, 25, 29) | - __gen_field(values->DSURBEntryAllocationSize, 16, 24) | - __gen_field(values->DSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN7_3DSTATE_URB_GS_length_bias 0x00000002 -#define GEN7_3DSTATE_URB_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 51, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_URB_GS_length 0x00000002 - -struct GEN7_3DSTATE_URB_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t GSURBStartingAddress; - uint32_t GSURBEntryAllocationSize; - uint32_t GSNumberofURBEntries; -}; - -static inline void -GEN7_3DSTATE_URB_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_URB_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->GSURBStartingAddress, 25, 29) | - __gen_field(values->GSURBEntryAllocationSize, 16, 24) | - __gen_field(values->GSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN7_3DSTATE_URB_HS_length_bias 0x00000002 -#define GEN7_3DSTATE_URB_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 49, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_URB_HS_length 0x00000002 - -struct GEN7_3DSTATE_URB_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t HSURBStartingAddress; - uint32_t HSURBEntryAllocationSize; - uint32_t HSNumberofURBEntries; -}; - -static inline void -GEN7_3DSTATE_URB_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_URB_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->HSURBStartingAddress, 25, 29) | - __gen_field(values->HSURBEntryAllocationSize, 16, 24) | - __gen_field(values->HSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN7_3DSTATE_VERTEX_BUFFERS_length_bias 0x00000002 -#define GEN7_3DSTATE_VERTEX_BUFFERS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 8 - -#define GEN7_3DSTATE_VERTEX_BUFFERS_length 0x00000000 - -#define GEN7_VERTEX_BUFFER_STATE_length 0x00000004 - -struct GEN7_VERTEX_BUFFER_STATE { - uint32_t VertexBufferIndex; -#define VERTEXDATA 0 -#define INSTANCEDATA 1 - uint32_t BufferAccessType; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE VertexBufferMemoryObjectControlState; - uint32_t AddressModifyEnable; - bool NullVertexBuffer; - uint32_t VertexFetchInvalidate; - uint32_t BufferPitch; - __gen_address_type BufferStartingAddress; - __gen_address_type EndAddress; - uint32_t InstanceDataStepRate; -}; - -static inline void -GEN7_VERTEX_BUFFER_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_VERTEX_BUFFER_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_VertexBufferMemoryObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_VertexBufferMemoryObjectControlState, &values->VertexBufferMemoryObjectControlState); - dw[0] = - __gen_field(values->VertexBufferIndex, 26, 31) | - __gen_field(values->BufferAccessType, 20, 20) | - __gen_field(dw_VertexBufferMemoryObjectControlState, 16, 19) | - __gen_field(values->AddressModifyEnable, 14, 14) | - __gen_field(values->NullVertexBuffer, 13, 13) | - __gen_field(values->VertexFetchInvalidate, 12, 12) | - __gen_field(values->BufferPitch, 0, 11) | - 0; - - uint32_t dw1 = - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->BufferStartingAddress, dw1); - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->EndAddress, dw2); - - dw[3] = - __gen_field(values->InstanceDataStepRate, 0, 31) | - 0; - -} - -struct GEN7_3DSTATE_VERTEX_BUFFERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN7_3DSTATE_VERTEX_BUFFERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_VERTEX_BUFFERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN7_3DSTATE_VERTEX_ELEMENTS_length_bias 0x00000002 -#define GEN7_3DSTATE_VERTEX_ELEMENTS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 9 - -#define GEN7_3DSTATE_VERTEX_ELEMENTS_length 0x00000000 - -#define GEN7_VERTEX_ELEMENT_STATE_length 0x00000002 - -struct GEN7_VERTEX_ELEMENT_STATE { - uint32_t VertexBufferIndex; - bool Valid; - uint32_t SourceElementFormat; - bool EdgeFlagEnable; - uint32_t SourceElementOffset; - uint32_t Component0Control; - uint32_t Component1Control; - uint32_t Component2Control; - uint32_t Component3Control; -}; - -static inline void -GEN7_VERTEX_ELEMENT_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_VERTEX_ELEMENT_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->VertexBufferIndex, 26, 31) | - __gen_field(values->Valid, 25, 25) | - __gen_field(values->SourceElementFormat, 16, 24) | - __gen_field(values->EdgeFlagEnable, 15, 15) | - __gen_field(values->SourceElementOffset, 0, 11) | - 0; - - dw[1] = - __gen_field(values->Component0Control, 28, 30) | - __gen_field(values->Component1Control, 24, 26) | - __gen_field(values->Component2Control, 20, 22) | - __gen_field(values->Component3Control, 16, 18) | - 0; - -} - -struct GEN7_3DSTATE_VERTEX_ELEMENTS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN7_3DSTATE_VERTEX_ELEMENTS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_VERTEX_ELEMENTS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN7_3DSTATE_VF_STATISTICS_length_bias 0x00000001 -#define GEN7_3DSTATE_VF_STATISTICS_header \ - .CommandType = 3, \ - .CommandSubType = 1, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 11 - -#define GEN7_3DSTATE_VF_STATISTICS_length 0x00000001 - -struct GEN7_3DSTATE_VF_STATISTICS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - bool StatisticsEnable; -}; - -static inline void -GEN7_3DSTATE_VF_STATISTICS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_VF_STATISTICS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->StatisticsEnable, 0, 0) | - 0; - -} - -#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC_length_bias 0x00000002 -#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 35, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC_length 0x00000002 - -struct GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t CCViewportPointer; -}; - -static inline void -GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->CCViewportPointer, 5, 31) | - 0; - -} - -#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_length_bias 0x00000002 -#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 33, \ - .DwordLength = 0 - -#define GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_length 0x00000002 - -struct GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SFClipViewportPointer; -}; - -static inline void -GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->SFClipViewportPointer, 6, 31) | - 0; - -} - -#define GEN7_3DSTATE_VS_length_bias 0x00000002 -#define GEN7_3DSTATE_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 16, \ - .DwordLength = 4 - -#define GEN7_3DSTATE_VS_length 0x00000006 - -struct GEN7_3DSTATE_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t KernelStartPointer; -#define Multiple 0 -#define Single 1 - uint32_t SingleVertexDispatch; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnableVME; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t ScratchSpaceBaseOffset; - uint32_t PerThreadScratchSpace; - uint32_t DispatchGRFStartRegisterforURBData; - uint32_t VertexURBEntryReadLength; - uint32_t VertexURBEntryReadOffset; - uint32_t MaximumNumberofThreads; - bool StatisticsEnable; - bool VertexCacheDisable; - bool VSFunctionEnable; -}; - -static inline void -GEN7_3DSTATE_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->KernelStartPointer, 6, 31) | - 0; - - dw[2] = - __gen_field(values->SingleVertexDispatch, 31, 31) | - __gen_field(values->VectorMaskEnableVME, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - dw[3] = - __gen_offset(values->ScratchSpaceBaseOffset, 10, 31) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = - __gen_field(values->DispatchGRFStartRegisterforURBData, 20, 24) | - __gen_field(values->VertexURBEntryReadLength, 11, 16) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - 0; - - dw[5] = - __gen_field(values->MaximumNumberofThreads, 25, 31) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->VertexCacheDisable, 1, 1) | - __gen_field(values->VSFunctionEnable, 0, 0) | - 0; - -} - -#define GEN7_3DSTATE_WM_length_bias 0x00000002 -#define GEN7_3DSTATE_WM_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 20, \ - .DwordLength = 1 - -#define GEN7_3DSTATE_WM_length 0x00000003 - -struct GEN7_3DSTATE_WM { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool StatisticsEnable; - bool DepthBufferClear; - bool ThreadDispatchEnable; - bool DepthBufferResolveEnable; - bool HierarchicalDepthBufferResolveEnable; - bool LegacyDiamondLineRasterization; - bool PixelShaderKillPixel; -#define PSCDEPTH_OFF 0 -#define PSCDEPTH_ON 1 -#define PSCDEPTH_ON_GE 2 -#define PSCDEPTH_ON_LE 3 - uint32_t PixelShaderComputedDepthMode; -#define EDSC_NORMAL 0 -#define EDSC_PSEXEC 1 -#define EDSC_PREPS 2 - uint32_t EarlyDepthStencilControl; - bool PixelShaderUsesSourceDepth; - bool PixelShaderUsesSourceW; -#define INTERP_PIXEL 0 -#define INTERP_CENTROID 2 -#define INTERP_SAMPLE 3 - uint32_t PositionZWInterpolationMode; - uint32_t BarycentricInterpolationMode; - bool PixelShaderUsesInputCoverageMask; - uint32_t LineEndCapAntialiasingRegionWidth; - uint32_t LineAntialiasingRegionWidth; - bool PolygonStippleEnable; - bool LineStippleEnable; -#define RASTRULE_UPPER_LEFT 0 -#define RASTRULE_UPPER_RIGHT 1 - uint32_t PointRasterizationRule; -#define MSRASTMODE_OFF_PIXEL 0 -#define MSRASTMODE_OFF_PATTERN 1 -#define MSRASTMODE_ON_PIXEL 2 -#define MSRASTMODE_ON_PATTERN 3 - uint32_t MultisampleRasterizationMode; -#define MSDISPMODE_PERSAMPLE 0 -#define MSDISPMODE_PERPIXEL 1 - uint32_t MultisampleDispatchMode; -}; - -static inline void -GEN7_3DSTATE_WM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_3DSTATE_WM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->StatisticsEnable, 31, 31) | - __gen_field(values->DepthBufferClear, 30, 30) | - __gen_field(values->ThreadDispatchEnable, 29, 29) | - __gen_field(values->DepthBufferResolveEnable, 28, 28) | - __gen_field(values->HierarchicalDepthBufferResolveEnable, 27, 27) | - __gen_field(values->LegacyDiamondLineRasterization, 26, 26) | - __gen_field(values->PixelShaderKillPixel, 25, 25) | - __gen_field(values->PixelShaderComputedDepthMode, 23, 24) | - __gen_field(values->EarlyDepthStencilControl, 21, 22) | - __gen_field(values->PixelShaderUsesSourceDepth, 20, 20) | - __gen_field(values->PixelShaderUsesSourceW, 19, 19) | - __gen_field(values->PositionZWInterpolationMode, 17, 18) | - __gen_field(values->BarycentricInterpolationMode, 11, 16) | - __gen_field(values->PixelShaderUsesInputCoverageMask, 10, 10) | - __gen_field(values->LineEndCapAntialiasingRegionWidth, 8, 9) | - __gen_field(values->LineAntialiasingRegionWidth, 6, 7) | - __gen_field(values->PolygonStippleEnable, 4, 4) | - __gen_field(values->LineStippleEnable, 3, 3) | - __gen_field(values->PointRasterizationRule, 2, 2) | - __gen_field(values->MultisampleRasterizationMode, 0, 1) | - 0; - - dw[2] = - __gen_field(values->MultisampleDispatchMode, 31, 31) | - 0; - -} - -#define GEN7_GPGPU_OBJECT_length_bias 0x00000002 -#define GEN7_GPGPU_OBJECT_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcode = 4, \ - .DwordLength = 6 - -#define GEN7_GPGPU_OBJECT_length 0x00000008 - -struct GEN7_GPGPU_OBJECT { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - bool PredicateEnable; - uint32_t DwordLength; - uint32_t SharedLocalMemoryFixedOffset; - uint32_t InterfaceDescriptorOffset; - uint32_t SharedLocalMemoryOffset; - uint32_t EndofThreadGroup; -#define HalfSlice1 2 -#define HalfSlice0 1 -#define EitherHalfSlice 0 - uint32_t HalfSliceDestinationSelect; - uint32_t IndirectDataLength; - uint32_t IndirectDataStartAddress; - uint32_t ThreadGroupIDX; - uint32_t ThreadGroupIDY; - uint32_t ThreadGroupIDZ; - uint32_t ExecutionMask; -}; - -static inline void -GEN7_GPGPU_OBJECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_GPGPU_OBJECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->PredicateEnable, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SharedLocalMemoryFixedOffset, 7, 7) | - __gen_field(values->InterfaceDescriptorOffset, 0, 4) | - 0; - - dw[2] = - __gen_field(values->SharedLocalMemoryOffset, 28, 31) | - __gen_field(values->EndofThreadGroup, 24, 24) | - __gen_field(values->HalfSliceDestinationSelect, 17, 18) | - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - dw[3] = - __gen_offset(values->IndirectDataStartAddress, 0, 31) | - 0; - - dw[4] = - __gen_field(values->ThreadGroupIDX, 0, 31) | - 0; - - dw[5] = - __gen_field(values->ThreadGroupIDY, 0, 31) | - 0; - - dw[6] = - __gen_field(values->ThreadGroupIDZ, 0, 31) | - 0; - - dw[7] = - __gen_field(values->ExecutionMask, 0, 31) | - 0; - -} - -#define GEN7_GPGPU_WALKER_length_bias 0x00000002 -#define GEN7_GPGPU_WALKER_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcodeA = 5, \ - .DwordLength = 9 - -#define GEN7_GPGPU_WALKER_length 0x0000000b - -struct GEN7_GPGPU_WALKER { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcodeA; - bool IndirectParameterEnable; - bool PredicateEnable; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; -#define SIMD8 0 -#define SIMD16 1 -#define SIMD32 2 - uint32_t SIMDSize; - uint32_t ThreadDepthCounterMaximum; - uint32_t ThreadHeightCounterMaximum; - uint32_t ThreadWidthCounterMaximum; - uint32_t ThreadGroupIDStartingX; - uint32_t ThreadGroupIDXDimension; - uint32_t ThreadGroupIDStartingY; - uint32_t ThreadGroupIDYDimension; - uint32_t ThreadGroupIDStartingZ; - uint32_t ThreadGroupIDZDimension; - uint32_t RightExecutionMask; - uint32_t BottomExecutionMask; -}; - -static inline void -GEN7_GPGPU_WALKER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_GPGPU_WALKER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcodeA, 16, 23) | - __gen_field(values->IndirectParameterEnable, 10, 10) | - __gen_field(values->PredicateEnable, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 4) | - 0; - - dw[2] = - __gen_field(values->SIMDSize, 30, 31) | - __gen_field(values->ThreadDepthCounterMaximum, 16, 21) | - __gen_field(values->ThreadHeightCounterMaximum, 8, 13) | - __gen_field(values->ThreadWidthCounterMaximum, 0, 5) | - 0; - - dw[3] = - __gen_field(values->ThreadGroupIDStartingX, 0, 31) | - 0; - - dw[4] = - __gen_field(values->ThreadGroupIDXDimension, 0, 31) | - 0; - - dw[5] = - __gen_field(values->ThreadGroupIDStartingY, 0, 31) | - 0; - - dw[6] = - __gen_field(values->ThreadGroupIDYDimension, 0, 31) | - 0; - - dw[7] = - __gen_field(values->ThreadGroupIDStartingZ, 0, 31) | - 0; - - dw[8] = - __gen_field(values->ThreadGroupIDZDimension, 0, 31) | - 0; - - dw[9] = - __gen_field(values->RightExecutionMask, 0, 31) | - 0; - - dw[10] = - __gen_field(values->BottomExecutionMask, 0, 31) | - 0; - -} - -#define GEN7_MEDIA_CURBE_LOAD_length_bias 0x00000002 -#define GEN7_MEDIA_CURBE_LOAD_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 1, \ - .DwordLength = 2 - -#define GEN7_MEDIA_CURBE_LOAD_length 0x00000004 - -struct GEN7_MEDIA_CURBE_LOAD { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t CURBETotalDataLength; - uint32_t CURBEDataStartAddress; -}; - -static inline void -GEN7_MEDIA_CURBE_LOAD_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MEDIA_CURBE_LOAD * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - 0; - - dw[2] = - __gen_field(values->CURBETotalDataLength, 0, 16) | - 0; - - dw[3] = - __gen_field(values->CURBEDataStartAddress, 0, 31) | - 0; - -} - -#define GEN7_MEDIA_INTERFACE_DESCRIPTOR_LOAD_length_bias 0x00000002 -#define GEN7_MEDIA_INTERFACE_DESCRIPTOR_LOAD_header\ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 2, \ - .DwordLength = 2 - -#define GEN7_MEDIA_INTERFACE_DESCRIPTOR_LOAD_length 0x00000004 - -struct GEN7_MEDIA_INTERFACE_DESCRIPTOR_LOAD { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorTotalLength; - uint32_t InterfaceDescriptorDataStartAddress; -}; - -static inline void -GEN7_MEDIA_INTERFACE_DESCRIPTOR_LOAD_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MEDIA_INTERFACE_DESCRIPTOR_LOAD * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - 0; - - dw[2] = - __gen_field(values->InterfaceDescriptorTotalLength, 0, 16) | - 0; - - dw[3] = - __gen_offset(values->InterfaceDescriptorDataStartAddress, 0, 31) | - 0; - -} - -#define GEN7_MEDIA_OBJECT_length_bias 0x00000002 -#define GEN7_MEDIA_OBJECT_header \ - .CommandType = 3, \ - .MediaCommandPipeline = 2, \ - .MediaCommandOpcode = 1, \ - .MediaCommandSubOpcode = 0 - -#define GEN7_MEDIA_OBJECT_length 0x00000000 - -struct GEN7_MEDIA_OBJECT { - uint32_t CommandType; - uint32_t MediaCommandPipeline; - uint32_t MediaCommandOpcode; - uint32_t MediaCommandSubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - bool ChildrenPresent; -#define Nothreadsynchronization 0 -#define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 - uint32_t ThreadSynchronization; -#define Notusingscoreboard 0 -#define Usingscoreboard 1 - uint32_t UseScoreboard; -#define HalfSlice1 2 -#define HalfSlice0 1 -#define Eitherhalfslice 0 - uint32_t HalfSliceDestinationSelect; - uint32_t IndirectDataLength; - __gen_address_type IndirectDataStartAddress; - uint32_t ScoredboardY; - uint32_t ScoreboardX; - uint32_t ScoreboardColor; - bool ScoreboardMask; - /* variable length fields follow */ -}; - -static inline void -GEN7_MEDIA_OBJECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MEDIA_OBJECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MediaCommandPipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->MediaCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 4) | - 0; - - dw[2] = - __gen_field(values->ChildrenPresent, 31, 31) | - __gen_field(values->ThreadSynchronization, 24, 24) | - __gen_field(values->UseScoreboard, 21, 21) | - __gen_field(values->HalfSliceDestinationSelect, 17, 18) | - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - uint32_t dw3 = - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->IndirectDataStartAddress, dw3); - - dw[4] = - __gen_field(values->ScoredboardY, 16, 24) | - __gen_field(values->ScoreboardX, 0, 8) | - 0; - - dw[5] = - __gen_field(values->ScoreboardColor, 16, 19) | - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN7_MEDIA_OBJECT_PRT_length_bias 0x00000002 -#define GEN7_MEDIA_OBJECT_PRT_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcode = 2, \ - .DwordLength = 14 - -#define GEN7_MEDIA_OBJECT_PRT_length 0x00000010 - -struct GEN7_MEDIA_OBJECT_PRT { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - bool ChildrenPresent; - bool PRT_FenceNeeded; -#define Rootthreadqueue 0 -#define VFEstateflush 1 - uint32_t PRT_FenceType; - uint32_t InlineData[12]; -}; - -static inline void -GEN7_MEDIA_OBJECT_PRT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MEDIA_OBJECT_PRT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 4) | - 0; - - dw[2] = - __gen_field(values->ChildrenPresent, 31, 31) | - __gen_field(values->PRT_FenceNeeded, 23, 23) | - __gen_field(values->PRT_FenceType, 22, 22) | - 0; - - dw[3] = - 0; - - for (uint32_t i = 0, j = 4; i < 12; i += 1, j++) { - dw[j] = - __gen_field(values->InlineData[i + 0], 0, 31) | - 0; - } - -} - -#define GEN7_MEDIA_OBJECT_WALKER_length_bias 0x00000002 -#define GEN7_MEDIA_OBJECT_WALKER_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcode = 3 - -#define GEN7_MEDIA_OBJECT_WALKER_length 0x00000000 - -struct GEN7_MEDIA_OBJECT_WALKER { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - bool ChildrenPresent; -#define Nothreadsynchronization 0 -#define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 - uint32_t ThreadSynchronization; -#define Notusingscoreboard 0 -#define Usingscoreboard 1 - uint32_t UseScoreboard; - uint32_t IndirectDataLength; - uint32_t IndirectDataStartAddress; - bool ScoreboardMask; - bool DualMode; - bool Repel; - uint32_t ColorCountMinusOne; - uint32_t MiddleLoopExtraSteps; - uint32_t LocalMidLoopUnitY; - uint32_t MidLoopUnitX; - uint32_t GlobalLoopExecCount; - uint32_t LocalLoopExecCount; - uint32_t BlockResolutionY; - uint32_t BlockResolutionX; - uint32_t LocalStartY; - uint32_t LocalStartX; - uint32_t LocalEndY; - uint32_t LocalEndX; - uint32_t LocalOuterLoopStrideY; - uint32_t LocalOuterLoopStrideX; - uint32_t LocalInnerLoopUnitY; - uint32_t LocalInnerLoopUnitX; - uint32_t GlobalResolutionY; - uint32_t GlobalResolutionX; - uint32_t GlobalStartY; - uint32_t GlobalStartX; - uint32_t GlobalOuterLoopStrideY; - uint32_t GlobalOuterLoopStrideX; - uint32_t GlobalInnerLoopUnitY; - uint32_t GlobalInnerLoopUnitX; - /* variable length fields follow */ -}; - -static inline void -GEN7_MEDIA_OBJECT_WALKER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MEDIA_OBJECT_WALKER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 4) | - 0; - - dw[2] = - __gen_field(values->ChildrenPresent, 31, 31) | - __gen_field(values->ThreadSynchronization, 24, 24) | - __gen_field(values->UseScoreboard, 21, 21) | - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - dw[3] = - __gen_offset(values->IndirectDataStartAddress, 0, 31) | - 0; - - dw[4] = - 0; - - dw[5] = - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - dw[6] = - __gen_field(values->DualMode, 31, 31) | - __gen_field(values->Repel, 30, 30) | - __gen_field(values->ColorCountMinusOne, 24, 27) | - __gen_field(values->MiddleLoopExtraSteps, 16, 20) | - __gen_field(values->LocalMidLoopUnitY, 12, 13) | - __gen_field(values->MidLoopUnitX, 8, 9) | - 0; - - dw[7] = - __gen_field(values->GlobalLoopExecCount, 16, 25) | - __gen_field(values->LocalLoopExecCount, 0, 9) | - 0; - - dw[8] = - __gen_field(values->BlockResolutionY, 16, 24) | - __gen_field(values->BlockResolutionX, 0, 8) | - 0; - - dw[9] = - __gen_field(values->LocalStartY, 16, 24) | - __gen_field(values->LocalStartX, 0, 8) | - 0; - - dw[10] = - __gen_field(values->LocalEndY, 16, 24) | - __gen_field(values->LocalEndX, 0, 8) | - 0; - - dw[11] = - __gen_field(values->LocalOuterLoopStrideY, 16, 25) | - __gen_field(values->LocalOuterLoopStrideX, 0, 9) | - 0; - - dw[12] = - __gen_field(values->LocalInnerLoopUnitY, 16, 25) | - __gen_field(values->LocalInnerLoopUnitX, 0, 9) | - 0; - - dw[13] = - __gen_field(values->GlobalResolutionY, 16, 24) | - __gen_field(values->GlobalResolutionX, 0, 8) | - 0; - - dw[14] = - __gen_field(values->GlobalStartY, 16, 25) | - __gen_field(values->GlobalStartX, 0, 9) | - 0; - - dw[15] = - __gen_field(values->GlobalOuterLoopStrideY, 16, 25) | - __gen_field(values->GlobalOuterLoopStrideX, 0, 9) | - 0; - - dw[16] = - __gen_field(values->GlobalInnerLoopUnitY, 16, 25) | - __gen_field(values->GlobalInnerLoopUnitX, 0, 9) | - 0; - - /* variable length fields follow */ -} - -#define GEN7_MEDIA_STATE_FLUSH_length_bias 0x00000002 -#define GEN7_MEDIA_STATE_FLUSH_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 4, \ - .DwordLength = 0 - -#define GEN7_MEDIA_STATE_FLUSH_length 0x00000002 - -struct GEN7_MEDIA_STATE_FLUSH { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t WatermarkRequired; - uint32_t InterfaceDescriptorOffset; -}; - -static inline void -GEN7_MEDIA_STATE_FLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MEDIA_STATE_FLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->WatermarkRequired, 6, 6) | - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - -} - -#define GEN7_MEDIA_VFE_STATE_length_bias 0x00000002 -#define GEN7_MEDIA_VFE_STATE_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 0, \ - .DwordLength = 6 - -#define GEN7_MEDIA_VFE_STATE_length 0x00000008 - -struct GEN7_MEDIA_VFE_STATE { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t MaximumNumberofThreads; - uint32_t NumberofURBEntries; -#define Maintainingtheexistingtimestampstate 0 -#define Resettingrelativetimerandlatchingtheglobaltimestamp 1 - uint32_t ResetGatewayTimer; -#define MaintainingOpenGatewayForwardMsgCloseGatewayprotocollegacymode 0 -#define BypassingOpenGatewayCloseGatewayprotocol 1 - uint32_t BypassGatewayControl; -#define NoMMIOreadwriteallowed 0 -#define MMIOreadwritetoanyaddress 2 - uint32_t GatewayMMIOAccessControl; - uint32_t GPGPUMode; - uint32_t URBEntryAllocationSize; - uint32_t CURBEAllocationSize; -#define Scoreboarddisabled 0 -#define Scoreboardenabled 1 - uint32_t ScoreboardEnable; -#define StallingScoreboard 0 -#define NonStallingScoreboard 1 - uint32_t ScoreboardType; - uint32_t ScoreboardMask; - uint32_t Scoreboard3DeltaY; - uint32_t Scoreboard3DeltaX; - uint32_t Scoreboard2DeltaY; - uint32_t Scoreboard2DeltaX; - uint32_t Scoreboard1DeltaY; - uint32_t Scoreboard1DeltaX; - uint32_t Scoreboard0DeltaY; - uint32_t Scoreboard0DeltaX; - uint32_t Scoreboard7DeltaY; - uint32_t Scoreboard7DeltaX; - uint32_t Scoreboard6DeltaY; - uint32_t Scoreboard6DeltaX; - uint32_t Scoreboard5DeltaY; - uint32_t Scoreboard5DeltaX; - uint32_t Scoreboard4DeltaY; - uint32_t Scoreboard4DeltaX; -}; - -static inline void -GEN7_MEDIA_VFE_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MEDIA_VFE_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_offset(values->ScratchSpaceBasePointer, 10, 31) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[2] = - __gen_field(values->MaximumNumberofThreads, 16, 31) | - __gen_field(values->NumberofURBEntries, 8, 15) | - __gen_field(values->ResetGatewayTimer, 7, 7) | - __gen_field(values->BypassGatewayControl, 6, 6) | - __gen_field(values->GatewayMMIOAccessControl, 3, 4) | - __gen_field(values->GPGPUMode, 2, 2) | - 0; - - dw[3] = - 0; - - dw[4] = - __gen_field(values->URBEntryAllocationSize, 16, 31) | - __gen_field(values->CURBEAllocationSize, 0, 15) | - 0; - - dw[5] = - __gen_field(values->ScoreboardEnable, 31, 31) | - __gen_field(values->ScoreboardType, 30, 30) | - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - dw[6] = - __gen_field(values->Scoreboard3DeltaY, 28, 31) | - __gen_field(values->Scoreboard3DeltaX, 24, 27) | - __gen_field(values->Scoreboard2DeltaY, 20, 23) | - __gen_field(values->Scoreboard2DeltaX, 16, 19) | - __gen_field(values->Scoreboard1DeltaY, 12, 15) | - __gen_field(values->Scoreboard1DeltaX, 8, 11) | - __gen_field(values->Scoreboard0DeltaY, 4, 7) | - __gen_field(values->Scoreboard0DeltaX, 0, 3) | - 0; - - dw[7] = - __gen_field(values->Scoreboard7DeltaY, 28, 31) | - __gen_field(values->Scoreboard7DeltaX, 24, 27) | - __gen_field(values->Scoreboard6DeltaY, 20, 23) | - __gen_field(values->Scoreboard6DeltaX, 16, 19) | - __gen_field(values->Scoreboard5DeltaY, 12, 15) | - __gen_field(values->Scoreboard5DeltaX, 8, 11) | - __gen_field(values->Scoreboard4DeltaY, 4, 7) | - __gen_field(values->Scoreboard4DeltaX, 0, 3) | - 0; - -} - -#define GEN7_MI_ARB_CHECK_length_bias 0x00000001 -#define GEN7_MI_ARB_CHECK_header \ - .CommandType = 0, \ - .MICommandOpcode = 5 - -#define GEN7_MI_ARB_CHECK_length 0x00000001 - -struct GEN7_MI_ARB_CHECK { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN7_MI_ARB_CHECK_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_ARB_CHECK * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN7_MI_ARB_ON_OFF_length_bias 0x00000001 -#define GEN7_MI_ARB_ON_OFF_header \ - .CommandType = 0, \ - .MICommandOpcode = 8 - -#define GEN7_MI_ARB_ON_OFF_length 0x00000001 - -struct GEN7_MI_ARB_ON_OFF { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool ArbitrationEnable; -}; - -static inline void -GEN7_MI_ARB_ON_OFF_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_ARB_ON_OFF * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->ArbitrationEnable, 0, 0) | - 0; - -} - -#define GEN7_MI_BATCH_BUFFER_END_length_bias 0x00000001 -#define GEN7_MI_BATCH_BUFFER_END_header \ - .CommandType = 0, \ - .MICommandOpcode = 10 - -#define GEN7_MI_BATCH_BUFFER_END_length 0x00000001 - -struct GEN7_MI_BATCH_BUFFER_END { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN7_MI_BATCH_BUFFER_END_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_BATCH_BUFFER_END * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN7_MI_BATCH_BUFFER_START_length_bias 0x00000002 -#define GEN7_MI_BATCH_BUFFER_START_header \ - .CommandType = 0, \ - .MICommandOpcode = 49, \ - .DwordLength = 0 - -#define GEN7_MI_BATCH_BUFFER_START_length 0x00000002 - -struct GEN7_MI_BATCH_BUFFER_START { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool ClearCommandBufferEnable; -#define ASI_GGTT 0 -#define ASI_PPGTT 1 - uint32_t AddressSpaceIndicator; - uint32_t DwordLength; - __gen_address_type BatchBufferStartAddress; -}; - -static inline void -GEN7_MI_BATCH_BUFFER_START_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_BATCH_BUFFER_START * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->ClearCommandBufferEnable, 11, 11) | - __gen_field(values->AddressSpaceIndicator, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->BatchBufferStartAddress, dw1); - -} - -#define GEN7_MI_CLFLUSH_length_bias 0x00000002 -#define GEN7_MI_CLFLUSH_header \ - .CommandType = 0, \ - .MICommandOpcode = 39 - -#define GEN7_MI_CLFLUSH_length 0x00000000 - -struct GEN7_MI_CLFLUSH { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t UseGlobalGTT; - uint32_t DwordLength; - __gen_address_type PageBaseAddress; - uint32_t StartingCachelineOffset; - __gen_address_type PageBaseAddressHigh; - /* variable length fields follow */ -}; - -static inline void -GEN7_MI_CLFLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_CLFLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->DwordLength, 0, 9) | - 0; - - uint32_t dw1 = - __gen_field(values->StartingCachelineOffset, 6, 11) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->PageBaseAddress, dw1); - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->PageBaseAddressHigh, dw2); - - /* variable length fields follow */ -} - -#define GEN7_MI_CONDITIONAL_BATCH_BUFFER_END_length_bias 0x00000002 -#define GEN7_MI_CONDITIONAL_BATCH_BUFFER_END_header\ - .CommandType = 0, \ - .MICommandOpcode = 54, \ - .UseGlobalGTT = 0, \ - .CompareSemaphore = 0, \ - .DwordLength = 0 - -#define GEN7_MI_CONDITIONAL_BATCH_BUFFER_END_length 0x00000002 - -struct GEN7_MI_CONDITIONAL_BATCH_BUFFER_END { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t UseGlobalGTT; - uint32_t CompareSemaphore; - uint32_t DwordLength; - uint32_t CompareDataDword; - __gen_address_type CompareAddress; -}; - -static inline void -GEN7_MI_CONDITIONAL_BATCH_BUFFER_END_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_CONDITIONAL_BATCH_BUFFER_END * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->CompareSemaphore, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->CompareDataDword, 0, 31) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->CompareAddress, dw2); - -} - -#define GEN7_MI_FLUSH_length_bias 0x00000001 -#define GEN7_MI_FLUSH_header \ - .CommandType = 0, \ - .MICommandOpcode = 4 - -#define GEN7_MI_FLUSH_length 0x00000001 - -struct GEN7_MI_FLUSH { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool IndirectStatePointersDisable; - bool GenericMediaStateClear; -#define DontReset 0 -#define Reset 1 - bool GlobalSnapshotCountReset; -#define Flush 0 -#define DontFlush 1 - bool RenderCacheFlushInhibit; -#define DontInvalidate 0 -#define Invalidate 1 - bool StateInstructionCacheInvalidate; -}; - -static inline void -GEN7_MI_FLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_FLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->IndirectStatePointersDisable, 5, 5) | - __gen_field(values->GenericMediaStateClear, 4, 4) | - __gen_field(values->GlobalSnapshotCountReset, 3, 3) | - __gen_field(values->RenderCacheFlushInhibit, 2, 2) | - __gen_field(values->StateInstructionCacheInvalidate, 1, 1) | - 0; - -} - -#define GEN7_MI_LOAD_REGISTER_IMM_length_bias 0x00000002 -#define GEN7_MI_LOAD_REGISTER_IMM_header \ - .CommandType = 0, \ - .MICommandOpcode = 34, \ - .DwordLength = 1 - -#define GEN7_MI_LOAD_REGISTER_IMM_length 0x00000003 - -struct GEN7_MI_LOAD_REGISTER_IMM { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t ByteWriteDisables; - uint32_t DwordLength; - uint32_t RegisterOffset; - uint32_t DataDWord; -}; - -static inline void -GEN7_MI_LOAD_REGISTER_IMM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_LOAD_REGISTER_IMM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->ByteWriteDisables, 8, 11) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->RegisterOffset, 2, 22) | - 0; - - dw[2] = - __gen_field(values->DataDWord, 0, 31) | - 0; - -} - -#define GEN7_MI_LOAD_REGISTER_MEM_length_bias 0x00000002 -#define GEN7_MI_LOAD_REGISTER_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 41, \ - .DwordLength = 1 - -#define GEN7_MI_LOAD_REGISTER_MEM_length 0x00000003 - -struct GEN7_MI_LOAD_REGISTER_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool UseGlobalGTT; - uint32_t AsyncModeEnable; - uint32_t DwordLength; - uint32_t RegisterAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN7_MI_LOAD_REGISTER_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_LOAD_REGISTER_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->AsyncModeEnable, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->RegisterAddress, 2, 22) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - -} - -#define GEN7_MI_NOOP_length_bias 0x00000001 -#define GEN7_MI_NOOP_header \ - .CommandType = 0, \ - .MICommandOpcode = 0 - -#define GEN7_MI_NOOP_length 0x00000001 - -struct GEN7_MI_NOOP { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool IdentificationNumberRegisterWriteEnable; - uint32_t IdentificationNumber; -}; - -static inline void -GEN7_MI_NOOP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_NOOP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->IdentificationNumberRegisterWriteEnable, 22, 22) | - __gen_field(values->IdentificationNumber, 0, 21) | - 0; - -} - -#define GEN7_MI_PREDICATE_length_bias 0x00000001 -#define GEN7_MI_PREDICATE_header \ - .CommandType = 0, \ - .MICommandOpcode = 12 - -#define GEN7_MI_PREDICATE_length 0x00000001 - -struct GEN7_MI_PREDICATE { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define LOAD_KEEP 0 -#define LOAD_LOAD 2 -#define LOAD_LOADINV 3 - uint32_t LoadOperation; -#define COMBINE_SET 0 -#define COMBINE_AND 1 -#define COMBINE_OR 2 -#define COMBINE_XOR 3 - uint32_t CombineOperation; -#define COMPARE_SRCS_EQUAL 2 -#define COMPARE_DELTAS_EQUAL 3 - uint32_t CompareOperation; -}; - -static inline void -GEN7_MI_PREDICATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_PREDICATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->LoadOperation, 6, 7) | - __gen_field(values->CombineOperation, 3, 4) | - __gen_field(values->CompareOperation, 0, 1) | - 0; - -} - -#define GEN7_MI_REPORT_HEAD_length_bias 0x00000001 -#define GEN7_MI_REPORT_HEAD_header \ - .CommandType = 0, \ - .MICommandOpcode = 7 - -#define GEN7_MI_REPORT_HEAD_length 0x00000001 - -struct GEN7_MI_REPORT_HEAD { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN7_MI_REPORT_HEAD_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_REPORT_HEAD * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN7_MI_SEMAPHORE_MBOX_length_bias 0x00000002 -#define GEN7_MI_SEMAPHORE_MBOX_header \ - .CommandType = 0, \ - .MICommandOpcode = 22, \ - .DwordLength = 1 - -#define GEN7_MI_SEMAPHORE_MBOX_length 0x00000003 - -struct GEN7_MI_SEMAPHORE_MBOX { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define RVSYNC 0 -#define RBSYNC 2 -#define UseGeneralRegisterSelect 3 - uint32_t RegisterSelect; - uint32_t DwordLength; - uint32_t SemaphoreDataDword; -}; - -static inline void -GEN7_MI_SEMAPHORE_MBOX_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_SEMAPHORE_MBOX * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->RegisterSelect, 16, 17) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SemaphoreDataDword, 0, 31) | - 0; - - dw[2] = - 0; - -} - -#define GEN7_MI_SET_CONTEXT_length_bias 0x00000002 -#define GEN7_MI_SET_CONTEXT_header \ - .CommandType = 0, \ - .MICommandOpcode = 24, \ - .DwordLength = 0 - -#define GEN7_MI_SET_CONTEXT_length 0x00000002 - -struct GEN7_MI_SET_CONTEXT { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - __gen_address_type LogicalContextAddress; - uint32_t ReservedMustbe1; - bool ExtendedStateSaveEnable; - bool ExtendedStateRestoreEnable; - uint32_t ForceRestore; - uint32_t RestoreInhibit; -}; - -static inline void -GEN7_MI_SET_CONTEXT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_SET_CONTEXT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - __gen_field(values->ReservedMustbe1, 8, 8) | - __gen_field(values->ExtendedStateSaveEnable, 3, 3) | - __gen_field(values->ExtendedStateRestoreEnable, 2, 2) | - __gen_field(values->ForceRestore, 1, 1) | - __gen_field(values->RestoreInhibit, 0, 0) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->LogicalContextAddress, dw1); - -} - -#define GEN7_MI_STORE_DATA_IMM_length_bias 0x00000002 -#define GEN7_MI_STORE_DATA_IMM_header \ - .CommandType = 0, \ - .MICommandOpcode = 32, \ - .DwordLength = 2 - -#define GEN7_MI_STORE_DATA_IMM_length 0x00000004 - -struct GEN7_MI_STORE_DATA_IMM { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool UseGlobalGTT; - uint32_t DwordLength; - uint32_t Address; - uint32_t CoreModeEnable; - uint32_t DataDWord0; - uint32_t DataDWord1; -}; - -static inline void -GEN7_MI_STORE_DATA_IMM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_STORE_DATA_IMM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->DwordLength, 0, 5) | - 0; - - dw[1] = - 0; - - dw[2] = - __gen_field(values->Address, 2, 31) | - __gen_field(values->CoreModeEnable, 0, 0) | - 0; - - dw[3] = - __gen_field(values->DataDWord0, 0, 31) | - 0; - - dw[4] = - __gen_field(values->DataDWord1, 0, 31) | - 0; - -} - -#define GEN7_MI_STORE_DATA_INDEX_length_bias 0x00000002 -#define GEN7_MI_STORE_DATA_INDEX_header \ - .CommandType = 0, \ - .MICommandOpcode = 33, \ - .DwordLength = 1 - -#define GEN7_MI_STORE_DATA_INDEX_length 0x00000003 - -struct GEN7_MI_STORE_DATA_INDEX { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t Offset; - uint32_t DataDWord0; - uint32_t DataDWord1; -}; - -static inline void -GEN7_MI_STORE_DATA_INDEX_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_STORE_DATA_INDEX * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->Offset, 2, 11) | - 0; - - dw[2] = - __gen_field(values->DataDWord0, 0, 31) | - 0; - - dw[3] = - __gen_field(values->DataDWord1, 0, 31) | - 0; - -} - -#define GEN7_MI_SUSPEND_FLUSH_length_bias 0x00000001 -#define GEN7_MI_SUSPEND_FLUSH_header \ - .CommandType = 0, \ - .MICommandOpcode = 11 - -#define GEN7_MI_SUSPEND_FLUSH_length 0x00000001 - -struct GEN7_MI_SUSPEND_FLUSH { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool SuspendFlush; -}; - -static inline void -GEN7_MI_SUSPEND_FLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_SUSPEND_FLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->SuspendFlush, 0, 0) | - 0; - -} - -#define GEN7_MI_TOPOLOGY_FILTER_length_bias 0x00000001 -#define GEN7_MI_TOPOLOGY_FILTER_header \ - .CommandType = 0, \ - .MICommandOpcode = 13 - -#define GEN7_MI_TOPOLOGY_FILTER_length 0x00000001 - -struct GEN7_MI_TOPOLOGY_FILTER { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t TopologyFilterValue; -}; - -static inline void -GEN7_MI_TOPOLOGY_FILTER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_TOPOLOGY_FILTER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->TopologyFilterValue, 0, 5) | - 0; - -} - -#define GEN7_MI_UPDATE_GTT_length_bias 0x00000002 -#define GEN7_MI_UPDATE_GTT_header \ - .CommandType = 0, \ - .MICommandOpcode = 35 - -#define GEN7_MI_UPDATE_GTT_length 0x00000000 - -struct GEN7_MI_UPDATE_GTT { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t UseGlobalGTT; - uint32_t DwordLength; - __gen_address_type EntryAddress; - /* variable length fields follow */ -}; - -static inline void -GEN7_MI_UPDATE_GTT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_UPDATE_GTT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->EntryAddress, dw1); - - /* variable length fields follow */ -} - -#define GEN7_MI_URB_CLEAR_length_bias 0x00000002 -#define GEN7_MI_URB_CLEAR_header \ - .CommandType = 0, \ - .MICommandOpcode = 25, \ - .DwordLength = 0 - -#define GEN7_MI_URB_CLEAR_length 0x00000002 - -struct GEN7_MI_URB_CLEAR { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t URBClearLength; - uint32_t URBAddress; -}; - -static inline void -GEN7_MI_URB_CLEAR_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_URB_CLEAR * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->URBClearLength, 16, 28) | - __gen_offset(values->URBAddress, 0, 13) | - 0; - -} - -#define GEN7_MI_USER_INTERRUPT_length_bias 0x00000001 -#define GEN7_MI_USER_INTERRUPT_header \ - .CommandType = 0, \ - .MICommandOpcode = 2 - -#define GEN7_MI_USER_INTERRUPT_length 0x00000001 - -struct GEN7_MI_USER_INTERRUPT { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN7_MI_USER_INTERRUPT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_USER_INTERRUPT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN7_MI_WAIT_FOR_EVENT_length_bias 0x00000001 -#define GEN7_MI_WAIT_FOR_EVENT_header \ - .CommandType = 0, \ - .MICommandOpcode = 3 - -#define GEN7_MI_WAIT_FOR_EVENT_length 0x00000001 - -struct GEN7_MI_WAIT_FOR_EVENT { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool DisplayPipeCHorizontalBlankWaitEnable; - bool DisplayPipeCVerticalBlankWaitEnable; - bool DisplaySpriteCFlipPendingWaitEnable; -#define Notenabled 0 - uint32_t ConditionCodeWaitSelect; - bool DisplayPlaneCFlipPendingWaitEnable; - bool DisplayPipeCScanLineWaitEnable; - bool DisplayPipeBHorizontalBlankWaitEnable; - bool DisplayPipeBVerticalBlankWaitEnable; - bool DisplaySpriteBFlipPendingWaitEnable; - bool DisplayPlaneBFlipPendingWaitEnable; - bool DisplayPipeBScanLineWaitEnable; - bool DisplayPipeAHorizontalBlankWaitEnable; - bool DisplayPipeAVerticalBlankWaitEnable; - bool DisplaySpriteAFlipPendingWaitEnable; - bool DisplayPlaneAFlipPendingWaitEnable; - bool DisplayPipeAScanLineWaitEnable; -}; - -static inline void -GEN7_MI_WAIT_FOR_EVENT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_MI_WAIT_FOR_EVENT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DisplayPipeCHorizontalBlankWaitEnable, 22, 22) | - __gen_field(values->DisplayPipeCVerticalBlankWaitEnable, 21, 21) | - __gen_field(values->DisplaySpriteCFlipPendingWaitEnable, 20, 20) | - __gen_field(values->ConditionCodeWaitSelect, 16, 19) | - __gen_field(values->DisplayPlaneCFlipPendingWaitEnable, 15, 15) | - __gen_field(values->DisplayPipeCScanLineWaitEnable, 14, 14) | - __gen_field(values->DisplayPipeBHorizontalBlankWaitEnable, 13, 13) | - __gen_field(values->DisplayPipeBVerticalBlankWaitEnable, 11, 11) | - __gen_field(values->DisplaySpriteBFlipPendingWaitEnable, 10, 10) | - __gen_field(values->DisplayPlaneBFlipPendingWaitEnable, 9, 9) | - __gen_field(values->DisplayPipeBScanLineWaitEnable, 8, 8) | - __gen_field(values->DisplayPipeAHorizontalBlankWaitEnable, 5, 5) | - __gen_field(values->DisplayPipeAVerticalBlankWaitEnable, 3, 3) | - __gen_field(values->DisplaySpriteAFlipPendingWaitEnable, 2, 2) | - __gen_field(values->DisplayPlaneAFlipPendingWaitEnable, 1, 1) | - __gen_field(values->DisplayPipeAScanLineWaitEnable, 0, 0) | - 0; - -} - -#define GEN7_PIPE_CONTROL_length_bias 0x00000002 -#define GEN7_PIPE_CONTROL_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 2, \ - ._3DCommandSubOpcode = 0, \ - .DwordLength = 3 - -#define GEN7_PIPE_CONTROL_length 0x00000005 - -struct GEN7_PIPE_CONTROL { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define DAT_PPGTT 0 -#define DAT_GGTT 1 - uint32_t DestinationAddressType; -#define NoLRIOperation 0 -#define MMIOWriteImmediateData 1 - uint32_t LRIPostSyncOperation; - uint32_t StoreDataIndex; - uint32_t CommandStreamerStallEnable; -#define DontReset 0 -#define Reset 1 - uint32_t GlobalSnapshotCountReset; - uint32_t TLBInvalidate; - bool GenericMediaStateClear; -#define NoWrite 0 -#define WriteImmediateData 1 -#define WritePSDepthCount 2 -#define WriteTimestamp 3 - uint32_t PostSyncOperation; - bool DepthStallEnable; -#define DisableFlush 0 -#define EnableFlush 1 - bool RenderTargetCacheFlushEnable; - bool InstructionCacheInvalidateEnable; - bool TextureCacheInvalidationEnable; - bool IndirectStatePointersDisable; - bool NotifyEnable; - bool PipeControlFlushEnable; - bool DCFlushEnable; - bool VFCacheInvalidationEnable; - bool ConstantCacheInvalidationEnable; - bool StateCacheInvalidationEnable; - bool StallAtPixelScoreboard; -#define FlushDisabled 0 -#define FlushEnabled 1 - bool DepthCacheFlushEnable; - __gen_address_type Address; - uint32_t ImmediateData; - uint32_t ImmediateData0; -}; - -static inline void -GEN7_PIPE_CONTROL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_PIPE_CONTROL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->DestinationAddressType, 24, 24) | - __gen_field(values->LRIPostSyncOperation, 23, 23) | - __gen_field(values->StoreDataIndex, 21, 21) | - __gen_field(values->CommandStreamerStallEnable, 20, 20) | - __gen_field(values->GlobalSnapshotCountReset, 19, 19) | - __gen_field(values->TLBInvalidate, 18, 18) | - __gen_field(values->GenericMediaStateClear, 16, 16) | - __gen_field(values->PostSyncOperation, 14, 15) | - __gen_field(values->DepthStallEnable, 13, 13) | - __gen_field(values->RenderTargetCacheFlushEnable, 12, 12) | - __gen_field(values->InstructionCacheInvalidateEnable, 11, 11) | - __gen_field(values->TextureCacheInvalidationEnable, 10, 10) | - __gen_field(values->IndirectStatePointersDisable, 9, 9) | - __gen_field(values->NotifyEnable, 8, 8) | - __gen_field(values->PipeControlFlushEnable, 7, 7) | - __gen_field(values->DCFlushEnable, 5, 5) | - __gen_field(values->VFCacheInvalidationEnable, 4, 4) | - __gen_field(values->ConstantCacheInvalidationEnable, 3, 3) | - __gen_field(values->StateCacheInvalidationEnable, 2, 2) | - __gen_field(values->StallAtPixelScoreboard, 1, 1) | - __gen_field(values->DepthCacheFlushEnable, 0, 0) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->Address, dw2); - - dw[3] = - __gen_field(values->ImmediateData, 0, 31) | - 0; - - dw[4] = - __gen_field(values->ImmediateData, 0, 31) | - 0; - -} - -#define GEN7_SCISSOR_RECT_length 0x00000002 - -struct GEN7_SCISSOR_RECT { - uint32_t ScissorRectangleYMin; - uint32_t ScissorRectangleXMin; - uint32_t ScissorRectangleYMax; - uint32_t ScissorRectangleXMax; -}; - -static inline void -GEN7_SCISSOR_RECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_SCISSOR_RECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->ScissorRectangleYMin, 16, 31) | - __gen_field(values->ScissorRectangleXMin, 0, 15) | - 0; - - dw[1] = - __gen_field(values->ScissorRectangleYMax, 16, 31) | - __gen_field(values->ScissorRectangleXMax, 0, 15) | - 0; - -} - -#define GEN7_SF_CLIP_VIEWPORT_length 0x00000010 - -struct GEN7_SF_CLIP_VIEWPORT { - float ViewportMatrixElementm00; - float ViewportMatrixElementm11; - float ViewportMatrixElementm22; - float ViewportMatrixElementm30; - float ViewportMatrixElementm31; - float ViewportMatrixElementm32; - float XMinClipGuardband; - float XMaxClipGuardband; - float YMinClipGuardband; - float YMaxClipGuardband; -}; - -static inline void -GEN7_SF_CLIP_VIEWPORT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_SF_CLIP_VIEWPORT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_float(values->ViewportMatrixElementm00) | - 0; - - dw[1] = - __gen_float(values->ViewportMatrixElementm11) | - 0; - - dw[2] = - __gen_float(values->ViewportMatrixElementm22) | - 0; - - dw[3] = - __gen_float(values->ViewportMatrixElementm30) | - 0; - - dw[4] = - __gen_float(values->ViewportMatrixElementm31) | - 0; - - dw[5] = - __gen_float(values->ViewportMatrixElementm32) | - 0; - - dw[6] = - 0; - - dw[7] = - 0; - - dw[8] = - __gen_float(values->XMinClipGuardband) | - 0; - - dw[9] = - __gen_float(values->XMaxClipGuardband) | - 0; - - dw[10] = - __gen_float(values->YMinClipGuardband) | - 0; - - dw[11] = - __gen_float(values->YMaxClipGuardband) | - 0; - - for (uint32_t i = 0, j = 12; i < 4; i += 1, j++) { - dw[j] = - 0; - } - -} - -#define GEN7_BLEND_STATE_length 0x00000002 - -struct GEN7_BLEND_STATE { - bool ColorBufferBlendEnable; - bool IndependentAlphaBlendEnable; -#define BLENDFUNCTION_ADD 0 -#define BLENDFUNCTION_SUBTRACT 1 -#define BLENDFUNCTION_REVERSE_SUBTRACT 2 -#define BLENDFUNCTION_MIN 3 -#define BLENDFUNCTION_MAX 4 - uint32_t AlphaBlendFunction; -#define BLENDFACTOR_ONE 1 -#define BLENDFACTOR_SRC_COLOR 2 -#define BLENDFACTOR_SRC_ALPHA 3 -#define BLENDFACTOR_DST_ALPHA 4 -#define BLENDFACTOR_DST_COLOR 5 -#define BLENDFACTOR_SRC_ALPHA_SATURATE 6 -#define BLENDFACTOR_CONST_COLOR 7 -#define BLENDFACTOR_CONST_ALPHA 8 -#define BLENDFACTOR_SRC1_COLOR 9 -#define BLENDFACTOR_SRC1_ALPHA 10 -#define BLENDFACTOR_ZERO 17 -#define BLENDFACTOR_INV_SRC_COLOR 18 -#define BLENDFACTOR_INV_SRC_ALPHA 19 -#define BLENDFACTOR_INV_DST_ALPHA 20 -#define BLENDFACTOR_INV_DST_COLOR 21 -#define BLENDFACTOR_INV_CONST_COLOR 23 -#define BLENDFACTOR_INV_CONST_ALPHA 24 -#define BLENDFACTOR_INV_SRC1_COLOR 25 -#define BLENDFACTOR_INV_SRC1_ALPHA 26 - uint32_t SourceAlphaBlendFactor; - uint32_t DestinationAlphaBlendFactor; -#define BLENDFUNCTION_ADD 0 -#define BLENDFUNCTION_SUBTRACT 1 -#define BLENDFUNCTION_REVERSE_SUBTRACT 2 -#define BLENDFUNCTION_MIN 3 -#define BLENDFUNCTION_MAX 4 - uint32_t ColorBlendFunction; - uint32_t SourceBlendFactor; - uint32_t DestinationBlendFactor; - bool AlphaToCoverageEnable; - bool AlphaToOneEnable; - bool AlphaToCoverageDitherEnable; - bool WriteDisableAlpha; - bool WriteDisableRed; - bool WriteDisableGreen; - bool WriteDisableBlue; - bool LogicOpEnable; -#define LOGICOP_CLEAR 0 -#define LOGICOP_NOR 1 -#define LOGICOP_AND_INVERTED 2 -#define LOGICOP_COPY_INVERTED 3 -#define LOGICOP_AND_REVERSE 4 -#define LOGICOP_INVERT 5 -#define LOGICOP_XOR 6 -#define LOGICOP_NAND 7 -#define LOGICOP_AND 8 -#define LOGICOP_EQUIV 9 -#define LOGICOP_NOOP 10 -#define LOGICOP_OR_INVERTED 11 -#define LOGICOP_COPY 12 -#define LOGICOP_OR_REVERSE 13 -#define LOGICOP_OR 14 -#define LOGICOP_SET 15 - uint32_t LogicOpFunction; - bool AlphaTestEnable; -#define COMPAREFUNCTION_ALWAYS 0 -#define COMPAREFUNCTION_NEVER 1 -#define COMPAREFUNCTION_LESS 2 -#define COMPAREFUNCTION_EQUAL 3 -#define COMPAREFUNCTION_LEQUAL 4 -#define COMPAREFUNCTION_GREATER 5 -#define COMPAREFUNCTION_NOTEQUAL 6 -#define COMPAREFUNCTION_GEQUAL 7 - uint32_t AlphaTestFunction; - bool ColorDitherEnable; - uint32_t XDitherOffset; - uint32_t YDitherOffset; -#define COLORCLAMP_UNORM 0 -#define COLORCLAMP_SNORM 1 -#define COLORCLAMP_RTFORMAT 2 - uint32_t ColorClampRange; - bool PreBlendColorClampEnable; - bool PostBlendColorClampEnable; -}; - -static inline void -GEN7_BLEND_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_BLEND_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->ColorBufferBlendEnable, 31, 31) | - __gen_field(values->IndependentAlphaBlendEnable, 30, 30) | - __gen_field(values->AlphaBlendFunction, 26, 28) | - __gen_field(values->SourceAlphaBlendFactor, 20, 24) | - __gen_field(values->DestinationAlphaBlendFactor, 15, 19) | - __gen_field(values->ColorBlendFunction, 11, 13) | - __gen_field(values->SourceBlendFactor, 5, 9) | - __gen_field(values->DestinationBlendFactor, 0, 4) | - 0; - - dw[1] = - __gen_field(values->AlphaToCoverageEnable, 31, 31) | - __gen_field(values->AlphaToOneEnable, 30, 30) | - __gen_field(values->AlphaToCoverageDitherEnable, 29, 29) | - __gen_field(values->WriteDisableAlpha, 27, 27) | - __gen_field(values->WriteDisableRed, 26, 26) | - __gen_field(values->WriteDisableGreen, 25, 25) | - __gen_field(values->WriteDisableBlue, 24, 24) | - __gen_field(values->LogicOpEnable, 22, 22) | - __gen_field(values->LogicOpFunction, 18, 21) | - __gen_field(values->AlphaTestEnable, 16, 16) | - __gen_field(values->AlphaTestFunction, 13, 15) | - __gen_field(values->ColorDitherEnable, 12, 12) | - __gen_field(values->XDitherOffset, 10, 11) | - __gen_field(values->YDitherOffset, 8, 9) | - __gen_field(values->ColorClampRange, 2, 3) | - __gen_field(values->PreBlendColorClampEnable, 1, 1) | - __gen_field(values->PostBlendColorClampEnable, 0, 0) | - 0; - -} - -#define GEN7_CC_VIEWPORT_length 0x00000002 - -struct GEN7_CC_VIEWPORT { - float MinimumDepth; - float MaximumDepth; -}; - -static inline void -GEN7_CC_VIEWPORT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_CC_VIEWPORT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_float(values->MinimumDepth) | - 0; - - dw[1] = - __gen_float(values->MaximumDepth) | - 0; - -} - -#define GEN7_COLOR_CALC_STATE_length 0x00000006 - -struct GEN7_COLOR_CALC_STATE { - uint32_t StencilReferenceValue; - uint32_t BackFaceStencilReferenceValue; -#define Cancelled 0 -#define NotCancelled 1 - uint32_t RoundDisableFunctionDisable; -#define ALPHATEST_UNORM8 0 -#define ALPHATEST_FLOAT32 1 - uint32_t AlphaTestFormat; - uint32_t AlphaReferenceValueAsUNORM8; - float AlphaReferenceValueAsFLOAT32; - float BlendConstantColorRed; - float BlendConstantColorGreen; - float BlendConstantColorBlue; - float BlendConstantColorAlpha; -}; - -static inline void -GEN7_COLOR_CALC_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_COLOR_CALC_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->StencilReferenceValue, 24, 31) | - __gen_field(values->BackFaceStencilReferenceValue, 16, 23) | - __gen_field(values->RoundDisableFunctionDisable, 15, 15) | - __gen_field(values->AlphaTestFormat, 0, 0) | - 0; - - dw[1] = - __gen_field(values->AlphaReferenceValueAsUNORM8, 0, 31) | - __gen_float(values->AlphaReferenceValueAsFLOAT32) | - 0; - - dw[2] = - __gen_float(values->BlendConstantColorRed) | - 0; - - dw[3] = - __gen_float(values->BlendConstantColorGreen) | - 0; - - dw[4] = - __gen_float(values->BlendConstantColorBlue) | - 0; - - dw[5] = - __gen_float(values->BlendConstantColorAlpha) | - 0; - -} - -#define GEN7_DEPTH_STENCIL_STATE_length 0x00000003 - -struct GEN7_DEPTH_STENCIL_STATE { - bool StencilTestEnable; -#define COMPAREFUNCTION_ALWAYS 0 -#define COMPAREFUNCTION_NEVER 1 -#define COMPAREFUNCTION_LESS 2 -#define COMPAREFUNCTION_EQUAL 3 -#define COMPAREFUNCTION_LEQUAL 4 -#define COMPAREFUNCTION_GREATER 5 -#define COMPAREFUNCTION_NOTEQUAL 6 -#define COMPAREFUNCTION_GEQUAL 7 - uint32_t StencilTestFunction; -#define STENCILOP_KEEP 0 -#define STENCILOP_ZERO 1 -#define STENCILOP_REPLACE 2 -#define STENCILOP_INCRSAT 3 -#define STENCILOP_DECRSAT 4 -#define STENCILOP_INCR 5 -#define STENCILOP_DECR 6 -#define STENCILOP_INVERT 7 - uint32_t StencilFailOp; - uint32_t StencilPassDepthFailOp; - uint32_t StencilPassDepthPassOp; - bool StencilBufferWriteEnable; - bool DoubleSidedStencilEnable; -#define COMPAREFUNCTION_ALWAYS 0 -#define COMPAREFUNCTION_NEVER 1 -#define COMPAREFUNCTION_LESS 2 -#define COMPAREFUNCTION_EQUAL 3 -#define COMPAREFUNCTION_LEQUAL 4 -#define COMPAREFUNCTION_GREATER 5 -#define COMPAREFUNCTION_NOTEQUAL 6 -#define COMPAREFUNCTION_GEQUAL 7 - uint32_t BackFaceStencilTestFunction; -#define STENCILOP_KEEP 0 -#define STENCILOP_ZERO 1 -#define STENCILOP_REPLACE 2 -#define STENCILOP_INCRSAT 3 -#define STENCILOP_DECRSAT 4 -#define STENCILOP_INCR 5 -#define STENCILOP_DECR 6 -#define STENCILOP_INVERT 7 - uint32_t BackfaceStencilFailOp; - uint32_t BackfaceStencilPassDepthFailOp; - uint32_t BackfaceStencilPassDepthPassOp; - uint32_t StencilTestMask; - uint32_t StencilWriteMask; - uint32_t BackfaceStencilTestMask; - uint32_t BackfaceStencilWriteMask; - bool DepthTestEnable; -#define COMPAREFUNCTION_ALWAYS 0 -#define COMPAREFUNCTION_NEVER 1 -#define COMPAREFUNCTION_LESS 2 -#define COMPAREFUNCTION_EQUAL 3 -#define COMPAREFUNCTION_LEQUAL 4 -#define COMPAREFUNCTION_GREATER 5 -#define COMPAREFUNCTION_NOTEQUAL 6 -#define COMPAREFUNCTION_GEQUAL 7 - uint32_t DepthTestFunction; - bool DepthBufferWriteEnable; -}; - -static inline void -GEN7_DEPTH_STENCIL_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_DEPTH_STENCIL_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->StencilTestEnable, 31, 31) | - __gen_field(values->StencilTestFunction, 28, 30) | - __gen_field(values->StencilFailOp, 25, 27) | - __gen_field(values->StencilPassDepthFailOp, 22, 24) | - __gen_field(values->StencilPassDepthPassOp, 19, 21) | - __gen_field(values->StencilBufferWriteEnable, 18, 18) | - __gen_field(values->DoubleSidedStencilEnable, 15, 15) | - __gen_field(values->BackFaceStencilTestFunction, 12, 14) | - __gen_field(values->BackfaceStencilFailOp, 9, 11) | - __gen_field(values->BackfaceStencilPassDepthFailOp, 6, 8) | - __gen_field(values->BackfaceStencilPassDepthPassOp, 3, 5) | - 0; - - dw[1] = - __gen_field(values->StencilTestMask, 24, 31) | - __gen_field(values->StencilWriteMask, 16, 23) | - __gen_field(values->BackfaceStencilTestMask, 8, 15) | - __gen_field(values->BackfaceStencilWriteMask, 0, 7) | - 0; - - dw[2] = - __gen_field(values->DepthTestEnable, 31, 31) | - __gen_field(values->DepthTestFunction, 27, 29) | - __gen_field(values->DepthBufferWriteEnable, 26, 26) | - 0; - -} - -#define GEN7_INTERFACE_DESCRIPTOR_DATA_length 0x00000008 - -struct GEN7_INTERFACE_DESCRIPTOR_DATA { - uint32_t KernelStartPointer; -#define Multiple 0 -#define Single 1 - uint32_t SingleProgramFlow; -#define NormalPriority 0 -#define HighPriority 1 - uint32_t ThreadPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool MaskStackExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t SamplerStatePointer; -#define Nosamplersused 0 -#define Between1and4samplersused 1 -#define Between5and8samplersused 2 -#define Between9and12samplersused 3 -#define Between13and16samplersused 4 - uint32_t SamplerCount; - uint32_t BindingTablePointer; - uint32_t BindingTableEntryCount; - uint32_t ConstantURBEntryReadLength; - uint32_t ConstantURBEntryReadOffset; -#define RTNE 0 -#define RU 1 -#define RD 2 -#define RTZ 3 - uint32_t RoundingMode; - bool BarrierEnable; - uint32_t SharedLocalMemorySize; - uint32_t NumberofThreadsinGPGPUThreadGroup; -}; - -static inline void -GEN7_INTERFACE_DESCRIPTOR_DATA_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_INTERFACE_DESCRIPTOR_DATA * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_offset(values->KernelStartPointer, 6, 31) | - 0; - - dw[1] = - __gen_field(values->SingleProgramFlow, 18, 18) | - __gen_field(values->ThreadPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->MaskStackExceptionEnable, 11, 11) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - dw[2] = - __gen_offset(values->SamplerStatePointer, 5, 31) | - __gen_field(values->SamplerCount, 2, 4) | - 0; - - dw[3] = - __gen_offset(values->BindingTablePointer, 5, 15) | - __gen_field(values->BindingTableEntryCount, 0, 4) | - 0; - - dw[4] = - __gen_field(values->ConstantURBEntryReadLength, 16, 31) | - __gen_field(values->ConstantURBEntryReadOffset, 0, 15) | - 0; - - dw[5] = - __gen_field(values->RoundingMode, 22, 23) | - __gen_field(values->BarrierEnable, 21, 21) | - __gen_field(values->SharedLocalMemorySize, 16, 20) | - __gen_field(values->NumberofThreadsinGPGPUThreadGroup, 0, 7) | - 0; - - dw[6] = - 0; - - dw[7] = - 0; - -} - -#define GEN7_BINDING_TABLE_STATE_length 0x00000001 - -struct GEN7_BINDING_TABLE_STATE { - uint32_t SurfaceStatePointer; -}; - -static inline void -GEN7_BINDING_TABLE_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_BINDING_TABLE_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_offset(values->SurfaceStatePointer, 5, 31) | - 0; - -} - -#define GEN7_RENDER_SURFACE_STATE_length 0x00000008 - -struct GEN7_RENDER_SURFACE_STATE { -#define SURFTYPE_1D 0 -#define SURFTYPE_2D 1 -#define SURFTYPE_3D 2 -#define SURFTYPE_CUBE 3 -#define SURFTYPE_BUFFER 4 -#define SURFTYPE_STRBUF 5 -#define SURFTYPE_NULL 7 - uint32_t SurfaceType; - bool SurfaceArray; - uint32_t SurfaceFormat; -#define VALIGN_2 0 -#define VALIGN_4 1 - uint32_t SurfaceVerticalAlignment; -#define HALIGN_4 0 -#define HALIGN_8 1 - uint32_t SurfaceHorizontalAlignment; - uint32_t TiledSurface; -#define TILEWALK_XMAJOR 0 -#define TILEWALK_YMAJOR 1 - uint32_t TileWalk; - uint32_t VerticalLineStride; - uint32_t VerticalLineStrideOffset; -#define ARYSPC_FULL 0 -#define ARYSPC_LOD0 1 - uint32_t SurfaceArraySpacing; - uint32_t RenderCacheReadWriteMode; -#define NORMAL_MODE 0 -#define PROGRESSIVE_FRAME 2 -#define INTERLACED_FRAME 3 - uint32_t MediaBoundaryPixelMode; - uint32_t CubeFaceEnables; - __gen_address_type SurfaceBaseAddress; - uint32_t Height; - uint32_t Width; - uint32_t Depth; - uint32_t SurfacePitch; -#define RTROTATE_0DEG 0 -#define RTROTATE_90DEG 1 -#define RTROTATE_270DEG 3 - uint32_t RenderTargetRotation; - uint32_t MinimumArrayElement; - uint32_t RenderTargetViewExtent; -#define MSFMT_MSS 0 -#define MSFMT_DEPTH_STENCIL 1 - uint32_t MultisampledSurfaceStorageFormat; -#define MULTISAMPLECOUNT_1 0 -#define MULTISAMPLECOUNT_4 2 -#define MULTISAMPLECOUNT_8 3 - uint32_t NumberofMultisamples; - uint32_t MultisamplePositionPaletteIndex; - uint32_t MinimumArrayElement0; - uint32_t XOffset; - uint32_t YOffset; - struct GEN7_MEMORY_OBJECT_CONTROL_STATE SurfaceObjectControlState; - uint32_t SurfaceMinLOD; - uint32_t MIPCountLOD; - __gen_address_type MCSBaseAddress; - uint32_t MCSSurfacePitch; - __gen_address_type AppendCounterAddress; - bool AppendCounterEnable; - bool MCSEnable; - uint32_t XOffsetforUVPlane; - uint32_t YOffsetforUVPlane; -#define CC_ZERO 0 -#define CC_ONE 1 - uint32_t RedClearColor; -#define CC_ZERO 0 -#define CC_ONE 1 - uint32_t GreenClearColor; -#define CC_ZERO 0 -#define CC_ONE 1 - uint32_t BlueClearColor; -#define CC_ZERO 0 -#define CC_ONE 1 - uint32_t AlphaClearColor; - float ResourceMinLOD; -}; - -static inline void -GEN7_RENDER_SURFACE_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_RENDER_SURFACE_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->SurfaceType, 29, 31) | - __gen_field(values->SurfaceArray, 28, 28) | - __gen_field(values->SurfaceFormat, 18, 26) | - __gen_field(values->SurfaceVerticalAlignment, 16, 17) | - __gen_field(values->SurfaceHorizontalAlignment, 15, 15) | - __gen_field(values->TiledSurface, 14, 14) | - __gen_field(values->TileWalk, 13, 13) | - __gen_field(values->VerticalLineStride, 12, 12) | - __gen_field(values->VerticalLineStrideOffset, 11, 11) | - __gen_field(values->SurfaceArraySpacing, 10, 10) | - __gen_field(values->RenderCacheReadWriteMode, 8, 8) | - __gen_field(values->MediaBoundaryPixelMode, 6, 7) | - __gen_field(values->CubeFaceEnables, 0, 5) | - 0; - - uint32_t dw1 = - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->SurfaceBaseAddress, dw1); - - dw[2] = - __gen_field(values->Height, 16, 29) | - __gen_field(values->Width, 0, 13) | - 0; - - dw[3] = - __gen_field(values->Depth, 21, 31) | - __gen_field(values->SurfacePitch, 0, 17) | - 0; - - dw[4] = - __gen_field(values->RenderTargetRotation, 29, 30) | - __gen_field(values->MinimumArrayElement, 18, 28) | - __gen_field(values->RenderTargetViewExtent, 7, 17) | - __gen_field(values->MultisampledSurfaceStorageFormat, 6, 6) | - __gen_field(values->NumberofMultisamples, 3, 5) | - __gen_field(values->MultisamplePositionPaletteIndex, 0, 2) | - __gen_field(values->MinimumArrayElement, 0, 26) | - 0; - - uint32_t dw_SurfaceObjectControlState; - GEN7_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceObjectControlState, &values->SurfaceObjectControlState); - dw[5] = - __gen_offset(values->XOffset, 25, 31) | - __gen_offset(values->YOffset, 20, 23) | - __gen_field(dw_SurfaceObjectControlState, 16, 19) | - __gen_field(values->SurfaceMinLOD, 4, 7) | - __gen_field(values->MIPCountLOD, 0, 3) | - 0; - - uint32_t dw6 = - __gen_field(values->MCSSurfacePitch, 3, 11) | - __gen_field(values->AppendCounterEnable, 1, 1) | - __gen_field(values->MCSEnable, 0, 0) | - __gen_field(values->XOffsetforUVPlane, 16, 29) | - __gen_field(values->YOffsetforUVPlane, 0, 13) | - 0; - - dw[6] = - __gen_combine_address(data, &dw[6], values->AppendCounterAddress, dw6); - - dw[7] = - __gen_field(values->RedClearColor, 31, 31) | - __gen_field(values->GreenClearColor, 30, 30) | - __gen_field(values->BlueClearColor, 29, 29) | - __gen_field(values->AlphaClearColor, 28, 28) | - __gen_field(values->ResourceMinLOD * (1 << 8), 0, 11) | - 0; - -} - -#define GEN7_SAMPLER_BORDER_COLOR_STATE_length 0x00000004 - -struct GEN7_SAMPLER_BORDER_COLOR_STATE { - float BorderColorRedDX100GL; - uint32_t BorderColorAlpha; - uint32_t BorderColorBlue; - uint32_t BorderColorGreen; - uint32_t BorderColorRedDX9; - float BorderColorGreen0; - float BorderColorBlue0; - float BorderColorAlpha0; -}; - -static inline void -GEN7_SAMPLER_BORDER_COLOR_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_SAMPLER_BORDER_COLOR_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_float(values->BorderColorRedDX100GL) | - __gen_field(values->BorderColorAlpha, 24, 31) | - __gen_field(values->BorderColorBlue, 16, 23) | - __gen_field(values->BorderColorGreen, 8, 15) | - __gen_field(values->BorderColorRedDX9, 0, 7) | - 0; - - dw[1] = - __gen_float(values->BorderColorGreen) | - 0; - - dw[2] = - __gen_float(values->BorderColorBlue) | - 0; - - dw[3] = - __gen_float(values->BorderColorAlpha) | - 0; - -} - -#define GEN7_SAMPLER_STATE_length 0x00000004 - -struct GEN7_SAMPLER_STATE { - bool SamplerDisable; -#define DX10OGL 0 -#define DX9 1 - uint32_t TextureBorderColorMode; -#define OGL 1 - uint32_t LODPreClampEnable; - float BaseMipLevel; -#define MIPFILTER_NONE 0 -#define MIPFILTER_NEAREST 1 -#define MIPFILTER_LINEAR 3 - uint32_t MipModeFilter; -#define MAPFILTER_NEAREST 0 -#define MAPFILTER_LINEAR 1 -#define MAPFILTER_ANISOTROPIC 2 -#define MAPFILTER_MONO 6 - uint32_t MagModeFilter; -#define MAPFILTER_NEAREST 0 -#define MAPFILTER_LINEAR 1 -#define MAPFILTER_ANISOTROPIC 2 -#define MAPFILTER_MONO 6 - uint32_t MinModeFilter; - float TextureLODBias; -#define LEGACY 0 -#define EWAApproximation 1 - uint32_t AnisotropicAlgorithm; - float MinLOD; - float MaxLOD; -#define PREFILTEROPALWAYS 0 -#define PREFILTEROPNEVER 1 -#define PREFILTEROPLESS 2 -#define PREFILTEROPEQUAL 3 -#define PREFILTEROPLEQUAL 4 -#define PREFILTEROPGREATER 5 -#define PREFILTEROPNOTEQUAL 6 -#define PREFILTEROPGEQUAL 7 - uint32_t ShadowFunction; -#define PROGRAMMED 0 -#define OVERRIDE 1 - uint32_t CubeSurfaceControlMode; - uint32_t BorderColorPointer; - bool ChromaKeyEnable; - uint32_t ChromaKeyIndex; -#define KEYFILTER_KILL_ON_ANY_MATCH 0 -#define KEYFILTER_REPLACE_BLACK 1 - uint32_t ChromaKeyMode; -#define RATIO21 0 -#define RATIO41 1 -#define RATIO61 2 -#define RATIO81 3 -#define RATIO101 4 -#define RATIO121 5 -#define RATIO141 6 -#define RATIO161 7 - uint32_t MaximumAnisotropy; - bool RAddressMinFilterRoundingEnable; - bool RAddressMagFilterRoundingEnable; - bool VAddressMinFilterRoundingEnable; - bool VAddressMagFilterRoundingEnable; - bool UAddressMinFilterRoundingEnable; - bool UAddressMagFilterRoundingEnable; -#define FULL 0 -#define MED 2 -#define LOW 3 - uint32_t TrilinearFilterQuality; - bool NonnormalizedCoordinateEnable; - uint32_t TCXAddressControlMode; - uint32_t TCYAddressControlMode; - uint32_t TCZAddressControlMode; -}; - -static inline void -GEN7_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN7_SAMPLER_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->SamplerDisable, 31, 31) | - __gen_field(values->TextureBorderColorMode, 29, 29) | - __gen_field(values->LODPreClampEnable, 28, 28) | - __gen_field(values->BaseMipLevel * (1 << 1), 22, 26) | - __gen_field(values->MipModeFilter, 20, 21) | - __gen_field(values->MagModeFilter, 17, 19) | - __gen_field(values->MinModeFilter, 14, 16) | - __gen_fixed(values->TextureLODBias, 1, 13, true, 8) | - __gen_field(values->AnisotropicAlgorithm, 0, 0) | - 0; - - dw[1] = - __gen_field(values->MinLOD * (1 << 8), 20, 31) | - __gen_field(values->MaxLOD * (1 << 8), 8, 19) | - __gen_field(values->ShadowFunction, 1, 3) | - __gen_field(values->CubeSurfaceControlMode, 0, 0) | - 0; - - dw[2] = - __gen_offset(values->BorderColorPointer, 5, 31) | - 0; - - dw[3] = - __gen_field(values->ChromaKeyEnable, 25, 25) | - __gen_field(values->ChromaKeyIndex, 23, 24) | - __gen_field(values->ChromaKeyMode, 22, 22) | - __gen_field(values->MaximumAnisotropy, 19, 21) | - __gen_field(values->RAddressMinFilterRoundingEnable, 13, 13) | - __gen_field(values->RAddressMagFilterRoundingEnable, 14, 14) | - __gen_field(values->VAddressMinFilterRoundingEnable, 15, 15) | - __gen_field(values->VAddressMagFilterRoundingEnable, 16, 16) | - __gen_field(values->UAddressMinFilterRoundingEnable, 17, 17) | - __gen_field(values->UAddressMagFilterRoundingEnable, 18, 18) | - __gen_field(values->TrilinearFilterQuality, 11, 12) | - __gen_field(values->NonnormalizedCoordinateEnable, 10, 10) | - __gen_field(values->TCXAddressControlMode, 6, 8) | - __gen_field(values->TCYAddressControlMode, 3, 5) | - __gen_field(values->TCZAddressControlMode, 0, 2) | - 0; - -} - -/* Enum 3D_Prim_Topo_Type */ -#define _3DPRIM_POINTLIST 1 -#define _3DPRIM_LINELIST 2 -#define _3DPRIM_LINESTRIP 3 -#define _3DPRIM_TRILIST 4 -#define _3DPRIM_TRISTRIP 5 -#define _3DPRIM_TRIFAN 6 -#define _3DPRIM_QUADLIST 7 -#define _3DPRIM_QUADSTRIP 8 -#define _3DPRIM_LINELIST_ADJ 9 -#define _3DPRIM_LINESTRIP_ADJ 10 -#define _3DPRIM_TRILIST_ADJ 11 -#define _3DPRIM_TRISTRIP_ADJ 12 -#define _3DPRIM_TRISTRIP_REVERSE 13 -#define _3DPRIM_POLYGON 14 -#define _3DPRIM_RECTLIST 15 -#define _3DPRIM_LINELOOP 16 -#define _3DPRIM_POINTLIST_BF 17 -#define _3DPRIM_LINESTRIP_CONT 18 -#define _3DPRIM_LINESTRIP_BF 19 -#define _3DPRIM_LINESTRIP_CONT_BF 20 -#define _3DPRIM_TRIFAN_NOSTIPPLE 22 -#define _3DPRIM_PATCHLIST_1 32 -#define _3DPRIM_PATCHLIST_2 33 -#define _3DPRIM_PATCHLIST_3 34 -#define _3DPRIM_PATCHLIST_4 35 -#define _3DPRIM_PATCHLIST_5 36 -#define _3DPRIM_PATCHLIST_6 37 -#define _3DPRIM_PATCHLIST_7 38 -#define _3DPRIM_PATCHLIST_8 39 -#define _3DPRIM_PATCHLIST_9 40 -#define _3DPRIM_PATCHLIST_10 41 -#define _3DPRIM_PATCHLIST_11 42 -#define _3DPRIM_PATCHLIST_12 43 -#define _3DPRIM_PATCHLIST_13 44 -#define _3DPRIM_PATCHLIST_14 45 -#define _3DPRIM_PATCHLIST_15 46 -#define _3DPRIM_PATCHLIST_16 47 -#define _3DPRIM_PATCHLIST_17 48 -#define _3DPRIM_PATCHLIST_18 49 -#define _3DPRIM_PATCHLIST_19 50 -#define _3DPRIM_PATCHLIST_20 51 -#define _3DPRIM_PATCHLIST_21 52 -#define _3DPRIM_PATCHLIST_22 53 -#define _3DPRIM_PATCHLIST_23 54 -#define _3DPRIM_PATCHLIST_24 55 -#define _3DPRIM_PATCHLIST_25 56 -#define _3DPRIM_PATCHLIST_26 57 -#define _3DPRIM_PATCHLIST_27 58 -#define _3DPRIM_PATCHLIST_28 59 -#define _3DPRIM_PATCHLIST_29 60 -#define _3DPRIM_PATCHLIST_30 61 -#define _3DPRIM_PATCHLIST_31 62 -#define _3DPRIM_PATCHLIST_32 63 - -/* Enum 3D_Vertex_Component_Control */ -#define VFCOMP_NOSTORE 0 -#define VFCOMP_STORE_SRC 1 -#define VFCOMP_STORE_0 2 -#define VFCOMP_STORE_1_FP 3 -#define VFCOMP_STORE_1_INT 4 -#define VFCOMP_STORE_VID 5 -#define VFCOMP_STORE_IID 6 -#define VFCOMP_STORE_PID 7 - -/* Enum 3D_Compare_Function */ -#define COMPAREFUNCTION_ALWAYS 0 -#define COMPAREFUNCTION_NEVER 1 -#define COMPAREFUNCTION_LESS 2 -#define COMPAREFUNCTION_EQUAL 3 -#define COMPAREFUNCTION_LEQUAL 4 -#define COMPAREFUNCTION_GREATER 5 -#define COMPAREFUNCTION_NOTEQUAL 6 -#define COMPAREFUNCTION_GEQUAL 7 - -/* Enum SURFACE_FORMAT */ -#define R32G32B32A32_FLOAT 0 -#define R32G32B32A32_SINT 1 -#define R32G32B32A32_UINT 2 -#define R32G32B32A32_UNORM 3 -#define R32G32B32A32_SNORM 4 -#define R64G64_FLOAT 5 -#define R32G32B32X32_FLOAT 6 -#define R32G32B32A32_SSCALED 7 -#define R32G32B32A32_USCALED 8 -#define R32G32B32A32_SFIXED 32 -#define R64G64_PASSTHRU 33 -#define R32G32B32_FLOAT 64 -#define R32G32B32_SINT 65 -#define R32G32B32_UINT 66 -#define R32G32B32_UNORM 67 -#define R32G32B32_SNORM 68 -#define R32G32B32_SSCALED 69 -#define R32G32B32_USCALED 70 -#define R32G32B32_SFIXED 80 -#define R16G16B16A16_UNORM 128 -#define R16G16B16A16_SNORM 129 -#define R16G16B16A16_SINT 130 -#define R16G16B16A16_UINT 131 -#define R16G16B16A16_FLOAT 132 -#define R32G32_FLOAT 133 -#define R32G32_SINT 134 -#define R32G32_UINT 135 -#define R32_FLOAT_X8X24_TYPELESS 136 -#define X32_TYPELESS_G8X24_UINT 137 -#define L32A32_FLOAT 138 -#define R32G32_UNORM 139 -#define R32G32_SNORM 140 -#define R64_FLOAT 141 -#define R16G16B16X16_UNORM 142 -#define R16G16B16X16_FLOAT 143 -#define A32X32_FLOAT 144 -#define L32X32_FLOAT 145 -#define I32X32_FLOAT 146 -#define R16G16B16A16_SSCALED 147 -#define R16G16B16A16_USCALED 148 -#define R32G32_SSCALED 149 -#define R32G32_USCALED 150 -#define R32G32_SFIXED 160 -#define R64_PASSTHRU 161 -#define B8G8R8A8_UNORM 192 -#define B8G8R8A8_UNORM_SRGB 193 -#define R10G10B10A2_UNORM 194 -#define R10G10B10A2_UNORM_SRGB 195 -#define R10G10B10A2_UINT 196 -#define R10G10B10_SNORM_A2_UNORM 197 -#define R8G8B8A8_UNORM 199 -#define R8G8B8A8_UNORM_SRGB 200 -#define R8G8B8A8_SNORM 201 -#define R8G8B8A8_SINT 202 -#define R8G8B8A8_UINT 203 -#define R16G16_UNORM 204 -#define R16G16_SNORM 205 -#define R16G16_SINT 206 -#define R16G16_UINT 207 -#define R16G16_FLOAT 208 -#define B10G10R10A2_UNORM 209 -#define B10G10R10A2_UNORM_SRGB 210 -#define R11G11B10_FLOAT 211 -#define R32_SINT 214 -#define R32_UINT 215 -#define R32_FLOAT 216 -#define R24_UNORM_X8_TYPELESS 217 -#define X24_TYPELESS_G8_UINT 218 -#define L32_UNORM 221 -#define A32_UNORM 222 -#define L16A16_UNORM 223 -#define I24X8_UNORM 224 -#define L24X8_UNORM 225 -#define A24X8_UNORM 226 -#define I32_FLOAT 227 -#define L32_FLOAT 228 -#define A32_FLOAT 229 -#define X8B8_UNORM_G8R8_SNORM 230 -#define A8X8_UNORM_G8R8_SNORM 231 -#define B8X8_UNORM_G8R8_SNORM 232 -#define B8G8R8X8_UNORM 233 -#define B8G8R8X8_UNORM_SRGB 234 -#define R8G8B8X8_UNORM 235 -#define R8G8B8X8_UNORM_SRGB 236 -#define R9G9B9E5_SHAREDEXP 237 -#define B10G10R10X2_UNORM 238 -#define L16A16_FLOAT 240 -#define R32_UNORM 241 -#define R32_SNORM 242 -#define R10G10B10X2_USCALED 243 -#define R8G8B8A8_SSCALED 244 -#define R8G8B8A8_USCALED 245 -#define R16G16_SSCALED 246 -#define R16G16_USCALED 247 -#define R32_SSCALED 248 -#define R32_USCALED 249 -#define B5G6R5_UNORM 256 -#define B5G6R5_UNORM_SRGB 257 -#define B5G5R5A1_UNORM 258 -#define B5G5R5A1_UNORM_SRGB 259 -#define B4G4R4A4_UNORM 260 -#define B4G4R4A4_UNORM_SRGB 261 -#define R8G8_UNORM 262 -#define R8G8_SNORM 263 -#define R8G8_SINT 264 -#define R8G8_UINT 265 -#define R16_UNORM 266 -#define R16_SNORM 267 -#define R16_SINT 268 -#define R16_UINT 269 -#define R16_FLOAT 270 -#define A8P8_UNORM_PALETTE0 271 -#define A8P8_UNORM_PALETTE1 272 -#define I16_UNORM 273 -#define L16_UNORM 274 -#define A16_UNORM 275 -#define L8A8_UNORM 276 -#define I16_FLOAT 277 -#define L16_FLOAT 278 -#define A16_FLOAT 279 -#define L8A8_UNORM_SRGB 280 -#define R5G5_SNORM_B6_UNORM 281 -#define B5G5R5X1_UNORM 282 -#define B5G5R5X1_UNORM_SRGB 283 -#define R8G8_SSCALED 284 -#define R8G8_USCALED 285 -#define R16_SSCALED 286 -#define R16_USCALED 287 -#define P8A8_UNORM_PALETTE0 290 -#define P8A8_UNORM_PALETTE1 291 -#define A1B5G5R5_UNORM 292 -#define A4B4G4R4_UNORM 293 -#define L8A8_UINT 294 -#define L8A8_SINT 295 -#define R8_UNORM 320 -#define R8_SNORM 321 -#define R8_SINT 322 -#define R8_UINT 323 -#define A8_UNORM 324 -#define I8_UNORM 325 -#define L8_UNORM 326 -#define P4A4_UNORM_PALETTE0 327 -#define A4P4_UNORM_PALETTE0 328 -#define R8_SSCALED 329 -#define R8_USCALED 330 -#define P8_UNORM_PALETTE0 331 -#define L8_UNORM_SRGB 332 -#define P8_UNORM_PALETTE1 333 -#define P4A4_UNORM_PALETTE1 334 -#define A4P4_UNORM_PALETTE1 335 -#define Y8_UNORM 336 -#define L8_UINT 338 -#define L8_SINT 339 -#define I8_UINT 340 -#define I8_SINT 341 -#define DXT1_RGB_SRGB 384 -#define R1_UNORM 385 -#define YCRCB_NORMAL 386 -#define YCRCB_SWAPUVY 387 -#define P2_UNORM_PALETTE0 388 -#define P2_UNORM_PALETTE1 389 -#define BC1_UNORM 390 -#define BC2_UNORM 391 -#define BC3_UNORM 392 -#define BC4_UNORM 393 -#define BC5_UNORM 394 -#define BC1_UNORM_SRGB 395 -#define BC2_UNORM_SRGB 396 -#define BC3_UNORM_SRGB 397 -#define MONO8 398 -#define YCRCB_SWAPUV 399 -#define YCRCB_SWAPY 400 -#define DXT1_RGB 401 -#define FXT1 402 -#define R8G8B8_UNORM 403 -#define R8G8B8_SNORM 404 -#define R8G8B8_SSCALED 405 -#define R8G8B8_USCALED 406 -#define R64G64B64A64_FLOAT 407 -#define R64G64B64_FLOAT 408 -#define BC4_SNORM 409 -#define BC5_SNORM 410 -#define R16G16B16_FLOAT 411 -#define R16G16B16_UNORM 412 -#define R16G16B16_SNORM 413 -#define R16G16B16_SSCALED 414 -#define R16G16B16_USCALED 415 -#define BC6H_SF16 417 -#define BC7_UNORM 418 -#define BC7_UNORM_SRGB 419 -#define BC6H_UF16 420 -#define PLANAR_420_8 421 -#define R8G8B8_UNORM_SRGB 424 -#define ETC1_RGB8 425 -#define ETC2_RGB8 426 -#define EAC_R11 427 -#define EAC_RG11 428 -#define EAC_SIGNED_R11 429 -#define EAC_SIGNED_RG11 430 -#define ETC2_SRGB8 431 -#define R16G16B16_UINT 432 -#define R16G16B16_SINT 433 -#define R32_SFIXED 434 -#define R10G10B10A2_SNORM 435 -#define R10G10B10A2_USCALED 436 -#define R10G10B10A2_SSCALED 437 -#define R10G10B10A2_SINT 438 -#define B10G10R10A2_SNORM 439 -#define B10G10R10A2_USCALED 440 -#define B10G10R10A2_SSCALED 441 -#define B10G10R10A2_UINT 442 -#define B10G10R10A2_SINT 443 -#define R64G64B64A64_PASSTHRU 444 -#define R64G64B64_PASSTHRU 445 -#define ETC2_RGB8_PTA 448 -#define ETC2_SRGB8_PTA 449 -#define ETC2_EAC_RGBA8 450 -#define ETC2_EAC_SRGB8_A8 451 -#define R8G8B8_UINT 456 -#define R8G8B8_SINT 457 -#define RAW 511 - -/* Enum Texture Coordinate Mode */ -#define TCM_WRAP 0 -#define TCM_MIRROR 1 -#define TCM_CLAMP 2 -#define TCM_CUBE 3 -#define TCM_CLAMP_BORDER 4 -#define TCM_MIRROR_ONCE 5 - diff --git a/src/vulkan/gen7_state.c b/src/vulkan/gen7_state.c index ee4b7f3a5c4..ba0e75f0c3e 100644 --- a/src/vulkan/gen7_state.c +++ b/src/vulkan/gen7_state.c @@ -80,10 +80,10 @@ genX(fill_buffer_surface_state)(void *state, enum isl_format format, .Depth = ((num_elements - 1) >> 21) & 0x3f, .SurfacePitch = stride - 1, # if (ANV_IS_HASWELL) - .ShaderChannelSelectR = SCS_RED, - .ShaderChannelSelectG = SCS_GREEN, - .ShaderChannelSelectB = SCS_BLUE, - .ShaderChannelSelectA = SCS_ALPHA, + .ShaderChannelSelectRed = SCS_RED, + .ShaderChannelSelectGreen = SCS_GREEN, + .ShaderChannelSelectBlue = SCS_BLUE, + .ShaderChannelSelectAlpha = SCS_ALPHA, # endif .SurfaceBaseAddress = { NULL, offset }, }; @@ -110,7 +110,7 @@ VkResult genX(CreateSampler)( struct GEN7_SAMPLER_STATE sampler_state = { .SamplerDisable = false, .TextureBorderColorMode = DX10OGL, - .LODPreClampEnable = OGL, + .LODPreClampEnable = CLAMP_ENABLE_OGL, .BaseMipLevel = 0.0, .MipModeFilter = vk_to_gen_mipmap_mode[pCreateInfo->mipmapMode], .MagModeFilter = vk_to_gen_tex_filter(pCreateInfo->magFilter, @@ -228,10 +228,10 @@ genX(fill_image_surface_state)(struct anv_device *device, void *state_map, .MCSEnable = false, # if (ANV_IS_HASWELL) - .ShaderChannelSelectR = vk_to_gen_swizzle[iview->swizzle.r], - .ShaderChannelSelectG = vk_to_gen_swizzle[iview->swizzle.g], - .ShaderChannelSelectB = vk_to_gen_swizzle[iview->swizzle.b], - .ShaderChannelSelectA = vk_to_gen_swizzle[iview->swizzle.a], + .ShaderChannelSelectRed = vk_to_gen_swizzle[iview->swizzle.r], + .ShaderChannelSelectGreen = vk_to_gen_swizzle[iview->swizzle.g], + .ShaderChannelSelectBlue = vk_to_gen_swizzle[iview->swizzle.b], + .ShaderChannelSelectAlpha = vk_to_gen_swizzle[iview->swizzle.a], # else /* XXX: Seriously? */ .RedClearColor = 0, .GreenClearColor = 0, diff --git a/src/vulkan/gen8.xml b/src/vulkan/gen8.xml new file mode 100644 index 00000000000..fff6ae2ed42 --- /dev/null +++ b/src/vulkan/gen8.xml @@ -0,0 +1,3165 @@ +<genxml name="BDW" gen="8"> + <struct name="3DSTATE_CONSTANT_BODY" length="10"> + <field name="Constant Buffer 1 Read Length" start="16" end="31" type="uint"/> + <field name="Constant Buffer 0 Read Length" start="0" end="15" type="uint"/> + <field name="Constant Buffer 3 Read Length" start="48" end="63" type="uint"/> + <field name="Constant Buffer 2 Read Length" start="32" end="47" type="uint"/> + <field name="Pointer To Constant Buffer 0" start="69" end="127" type="address"/> + <field name="Pointer To Constant Buffer 1" start="133" end="191" type="address"/> + <field name="Pointer To Constant Buffer 2" start="197" end="255" type="address"/> + <field name="Pointer To Constant Buffer 3" start="261" end="319" type="address"/> + </struct> + + <struct name="BINDING_TABLE_EDIT_ENTRY" length="1"> + <field name="Binding Table Index" start="16" end="23" type="uint"/> + <field name="Surface State Pointer" start="0" end="15" type="offset"/> + </struct> + + <struct name="GATHER_CONSTANT_ENTRY" length="1"> + <field name="Constant Buffer Offset" start="8" end="15" type="offset"/> + <field name="Channel Mask" start="4" end="7" type="uint"/> + <field name="Binding Table Index Offset" start="0" end="3" type="uint"/> + </struct> + + <struct name="MEMORY_OBJECT_CONTROL_STATE" length="1"> + <field name="Memory Type:LLC/eLLC Cacheability Control" start="5" end="6" type="uint"> + <value name=" UC with Fence (if coherent cycle)" value="0"/> + <value name="UC (Uncacheable)" value="1"/> + <value name="WT" value="2"/> + <value name="WB" value="3"/> + </field> + <field name="Target Cache" start="3" end="4" type="uint"> + <value name="eLLC Only (when eDRAM is present, else gets allocated in LLC)" value="0"/> + <value name="LLC Only" value="1"/> + <value name="LLC/eLLC Allowed" value="2"/> + <value name="L3 + Defer to PAT for LLC/eLLC selection" value="3"/> + </field> + <field name="Age for QUADLRU" start="0" end="1" type="uint"/> + </struct> + + <struct name="VERTEX_BUFFER_STATE" length="4"> + <field name="Vertex Buffer Index" start="26" end="31" type="uint"/> + <field name="Memory Object Control State" start="16" end="22" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Address Modify Enable" start="14" end="14" type="uint"/> + <field name="Null Vertex Buffer" start="13" end="13" type="bool"/> + <field name="Buffer Pitch" start="0" end="11" type="uint"/> + <field name="Buffer Starting Address" start="32" end="95" type="address"/> + <field name="Buffer Size" start="96" end="127" type="uint"/> + </struct> + + <struct name="VERTEX_ELEMENT_STATE" length="2"> + <field name="Vertex Buffer Index" start="26" end="31" type="uint"/> + <field name="Valid" start="25" end="25" type="uint"/> + <field name="Source Element Format" start="16" end="24" type="uint"/> + <field name="Edge Flag Enable" start="15" end="15" type="bool"/> + <field name="Source Element Offset" start="0" end="11" type="uint"/> + <field name="Component 0 Control" start="60" end="62" type="uint"/> + <field name="Component 1 Control" start="56" end="58" type="uint"/> + <field name="Component 2 Control" start="52" end="54" type="uint"/> + <field name="Component 3 Control" start="48" end="50" type="uint"/> + </struct> + + <struct name="SO_DECL" length="1"> + <field name="Output Buffer Slot" start="12" end="13" type="uint"/> + <field name="Hole Flag" start="11" end="11" type="uint"/> + <field name="Register Index" start="4" end="9" type="uint"/> + <field name="Component Mask" start="0" end="3" type="uint" default="0"/> + </struct> + + <struct name="SO_DECL_ENTRY" length="2"> + <field name="Stream 3 Decl" start="48" end="63" type="SO_DECL"/> + <field name="Stream 2 Decl" start="32" end="47" type="SO_DECL"/> + <field name="Stream 1 Decl" start="16" end="31" type="SO_DECL"/> + <field name="Stream 0 Decl" start="0" end="15" type="SO_DECL"/> + </struct> + + <struct name="SF_OUTPUT_ATTRIBUTE_DETAIL" length="1"> + <field name="Component Override W" start="15" end="15" type="bool"/> + <field name="Component Override Z" start="14" end="14" type="bool"/> + <field name="Component Override Y" start="13" end="13" type="bool"/> + <field name="Component Override X" start="12" end="12" type="bool"/> + <field name="Swizzle Control Mode" start="11" end="11" type="uint"/> + <field name="Constant Source" start="9" end="10" type="uint"> + <value name="CONST_0000" value="0"/> + <value name="CONST_0001_FLOAT" value="1"/> + <value name="CONST_1111_FLOAT" value="2"/> + <value name="PRIM_ID" value="3"/> + </field> + <field name="Swizzle Select" start="6" end="7" type="uint"> + <value name="INPUTATTR" value="0"/> + <value name="INPUTATTR_FACING" value="1"/> + <value name="INPUTATTR_W" value="2"/> + <value name="INPUTATTR_FACING_W" value="3"/> + </field> + <field name="Source Attribute" start="0" end="4" type="uint"/> + </struct> + + <struct name="SCISSOR_RECT" length="2"> + <field name="Scissor Rectangle Y Min" start="16" end="31" type="uint"/> + <field name="Scissor Rectangle X Min" start="0" end="15" type="uint"/> + <field name="Scissor Rectangle Y Max" start="48" end="63" type="uint"/> + <field name="Scissor Rectangle X Max" start="32" end="47" type="uint"/> + </struct> + + <struct name="SF_CLIP_VIEWPORT" length="16"> + <field name="Viewport Matrix Element m00" start="0" end="31" type="float"/> + <field name="Viewport Matrix Element m11" start="32" end="63" type="float"/> + <field name="Viewport Matrix Element m22" start="64" end="95" type="float"/> + <field name="Viewport Matrix Element m30" start="96" end="127" type="float"/> + <field name="Viewport Matrix Element m31" start="128" end="159" type="float"/> + <field name="Viewport Matrix Element m32" start="160" end="191" type="float"/> + <field name="X Min Clip Guardband" start="256" end="287" type="float"/> + <field name="X Max Clip Guardband" start="288" end="319" type="float"/> + <field name="Y Min Clip Guardband" start="320" end="351" type="float"/> + <field name="Y Max Clip Guardband" start="352" end="383" type="float"/> + <field name="X Min ViewPort" start="384" end="415" type="float"/> + <field name="X Max ViewPort" start="416" end="447" type="float"/> + <field name="Y Min ViewPort" start="448" end="479" type="float"/> + <field name="Y Max ViewPort" start="480" end="511" type="float"/> + </struct> + + <struct name="BLEND_STATE_ENTRY" length="2"> + <field name="Logic Op Enable" start="63" end="63" type="bool"/> + <field name="Logic Op Function" start="59" end="62" type="uint"/> + <field name="Pre-Blend Source Only Clamp Enable" start="36" end="36" type="bool"/> + <field name="Color Clamp Range" start="34" end="35" type="uint"> + <value name="COLORCLAMP_UNORM" value="0"/> + <value name="COLORCLAMP_SNORM" value="1"/> + <value name="COLORCLAMP_RTFORMAT" value="2"/> + </field> + <field name="Pre-Blend Color Clamp Enable" start="33" end="33" type="bool"/> + <field name="Post-Blend Color Clamp Enable" start="32" end="32" type="bool"/> + <field name="Color Buffer Blend Enable" start="31" end="31" type="bool"/> + <field name="Source Blend Factor" start="26" end="30" type="uint"/> + <field name="Destination Blend Factor" start="21" end="25" type="uint"/> + <field name="Color Blend Function" start="18" end="20" type="uint"/> + <field name="Source Alpha Blend Factor" start="13" end="17" type="uint"/> + <field name="Destination Alpha Blend Factor" start="8" end="12" type="uint"/> + <field name="Alpha Blend Function" start="5" end="7" type="uint"/> + <field name="Write Disable Alpha" start="3" end="3" type="bool"/> + <field name="Write Disable Red" start="2" end="2" type="bool"/> + <field name="Write Disable Green" start="1" end="1" type="bool"/> + <field name="Write Disable Blue" start="0" end="0" type="bool"/> + </struct> + + <struct name="BLEND_STATE" length="17"> + <field name="Alpha To Coverage Enable" start="31" end="31" type="bool"/> + <field name="Independent Alpha Blend Enable" start="30" end="30" type="bool"/> + <field name="Alpha To One Enable" start="29" end="29" type="bool"/> + <field name="Alpha To Coverage Dither Enable" start="28" end="28" type="bool"/> + <field name="Alpha Test Enable" start="27" end="27" type="bool"/> + <field name="Alpha Test Function" start="24" end="26" type="uint"/> + <field name="Color Dither Enable" start="23" end="23" type="bool"/> + <field name="X Dither Offset" start="21" end="22" type="uint"/> + <field name="Y Dither Offset" start="19" end="20" type="uint"/> + <group count="8" start="32" size="64"> + <field name="Entry" start="0" end="63" type="BLEND_STATE_ENTRY"/> + </group> + </struct> + + <struct name="CC_VIEWPORT" length="2"> + <field name="Minimum Depth" start="0" end="31" type="float"/> + <field name="Maximum Depth" start="32" end="63" type="float"/> + </struct> + + <struct name="COLOR_CALC_STATE" length="6"> + <field name="Stencil Reference Value" start="24" end="31" type="uint"/> + <field name="BackFace Stencil Reference Value" start="16" end="23" type="uint"/> + <field name="Round Disable Function Disable" start="15" end="15" type="bool"/> + <field name="Alpha Test Format" start="0" end="0" type="uint"> + <value name="ALPHATEST_UNORM8" value="0"/> + <value name="ALPHATEST_FLOAT32" value="1"/> + </field> + <field name="Alpha Reference Value As UNORM8" start="32" end="63" type="uint"/> + <field name="Alpha Reference Value As FLOAT32" start="32" end="63" type="float"/> + <field name="Blend Constant Color Red" start="64" end="95" type="float"/> + <field name="Blend Constant Color Green" start="96" end="127" type="float"/> + <field name="Blend Constant Color Blue" start="128" end="159" type="float"/> + <field name="Blend Constant Color Alpha" start="160" end="191" type="float"/> + </struct> + + <struct name="BLACK_LEVEL_CORRECTION_STATE_-_DW75..76" length="2"> + <field name="Black Point Offset R" start="0" end="12" type="int" default="0"/> + <field name="Black Point Offset G" start="45" end="57" type="int"/> + <field name="Black Point Offset B" start="32" end="44" type="int"/> + </struct> + + <struct name="INTERFACE_DESCRIPTOR_DATA" length="8"> + <field name="Kernel Start Pointer" start="6" end="31" type="offset"/> + <field name="Kernel Start Pointer High" start="32" end="47" type="offset"/> + <field name="Denorm Mode" start="83" end="83" type="uint"> + <value name="Ftz" value="0"/> + <value name="SetByKernel" value="1"/> + </field> + <field name="Single Program Flow" start="82" end="82" type="uint"/> + <field name="Thread Priority" start="81" end="81" type="uint"> + <value name="Normal Priority" value="0"/> + <value name="High Priority" value="1"/> + </field> + <field name="Floating Point Mode" start="80" end="80" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="77" end="77" type="bool"/> + <field name="Mask Stack Exception Enable" start="75" end="75" type="bool"/> + <field name="Software Exception Enable" start="71" end="71" type="bool"/> + <field name="Sampler State Pointer" start="101" end="127" type="offset"/> + <field name="Sampler Count" start="98" end="100" type="uint"> + <value name="No samplers used" value="0"/> + <value name="Between 1 and 4 samplers used" value="1"/> + <value name="Between 5 and 8 samplers used" value="2"/> + <value name="Between 9 and 12 samplers used" value="3"/> + <value name="Between 13 and 16 samplers used" value="4"/> + </field> + <field name="Binding Table Pointer" start="133" end="143" type="offset"/> + <field name="Binding Table Entry Count" start="128" end="132" type="uint"/> + <field name="Constant/Indirect URB Entry Read Length" start="176" end="191" type="uint"/> + <field name="Constant URB Entry Read Offset" start="160" end="175" type="uint"/> + <field name="Rounding Mode" start="214" end="215" type="uint"> + <value name="RTNE" value="0"/> + <value name="RU" value="1"/> + <value name="RD" value="2"/> + <value name="RTZ" value="3"/> + </field> + <field name="Barrier Enable" start="213" end="213" type="bool"/> + <field name="Shared Local Memory Size" start="208" end="212" type="uint"> + <value name="Encodes 0k" value="0"/> + <value name="Encodes 4k" value="1"/> + <value name="Encodes 8k" value="2"/> + <value name="Encodes 16k" value="4"/> + <value name="Encodes 32k" value="8"/> + <value name="Encodes 64k" value="16"/> + </field> + <field name="Number of Threads in GPGPU Thread Group" start="192" end="201" type="uint"/> + <field name="Cross-Thread Constant Data Read Length" start="224" end="231" type="uint"/> + </struct> + + <struct name="PALETTE_ENTRY" length="1"> + <field name="Alpha" start="24" end="31" type="uint"/> + <field name="Red" start="16" end="23" type="uint"/> + <field name="Green" start="8" end="15" type="uint"/> + <field name="Blue" start="0" end="7" type="uint"/> + </struct> + + <struct name="BINDING_TABLE_STATE" length="1"> + <field name="Surface State Pointer" start="6" end="31" type="offset"/> + </struct> + + <struct name="RENDER_SURFACE_STATE" length="16"> + <field name="Surface Type" start="29" end="31" type="uint"> + <value name="SURFTYPE_1D" value="0"/> + <value name="SURFTYPE_2D" value="1"/> + <value name="SURFTYPE_3D" value="2"/> + <value name="SURFTYPE_CUBE" value="3"/> + <value name="SURFTYPE_BUFFER" value="4"/> + <value name="SURFTYPE_STRBUF" value="5"/> + <value name="SURFTYPE_NULL" value="7"/> + </field> + <field name="Surface Array" start="28" end="28" type="bool"/> + <field name="Surface Format" start="18" end="26" type="uint"/> + <field name="Surface Vertical Alignment" start="16" end="17" type="uint"> + <value name="VALIGN 4" value="1"/> + <value name="VALIGN 8" value="2"/> + <value name="VALIGN 16" value="3"/> + </field> + <field name="Surface Horizontal Alignment" start="14" end="15" type="uint"> + <value name="HALIGN 4" value="1"/> + <value name="HALIGN 8" value="2"/> + <value name="HALIGN 16" value="3"/> + </field> + <field name="Tile Mode" start="12" end="13" type="uint"> + <value name="LINEAR" value="0"/> + <value name="WMAJOR" value="1"/> + <value name="XMAJOR" value="2"/> + <value name="YMAJOR" value="3"/> + </field> + <field name="Vertical Line Stride" start="11" end="11" type="uint"/> + <field name="Vertical Line Stride Offset" start="10" end="10" type="uint"/> + <field name="Sampler L2 Bypass Mode Disable" start="9" end="9" type="bool"/> + <field name="Render Cache Read Write Mode" start="8" end="8" type="uint"> + <value name="Write-Only Cache" value="0"/> + <value name="Read-Write Cache" value="1"/> + </field> + <field name="Media Boundary Pixel Mode" start="6" end="7" type="uint"> + <value name="NORMAL_MODE" value="0"/> + <value name="PROGRESSIVE_FRAME" value="2"/> + <value name="INTERLACED_FRAME" value="3"/> + </field> + <field name="Cube Face Enable - Positive Z" start="0" end="0" type="bool"/> + <field name="Cube Face Enable - Negative Z" start="1" end="1" type="bool"/> + <field name="Cube Face Enable - Positive Y" start="2" end="2" type="bool"/> + <field name="Cube Face Enable - Negative Y" start="3" end="3" type="bool"/> + <field name="Cube Face Enable - Positive X" start="4" end="4" type="bool"/> + <field name="Cube Face Enable - Negative X" start="5" end="5" type="bool"/> + <field name="Memory Object Control State" start="56" end="62" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Base Mip Level" start="51" end="55" type="u4.1"/> + <field name="Surface QPitch" start="32" end="46" type="uint"/> + <field name="Height" start="80" end="93" type="uint"/> + <field name="Width" start="64" end="77" type="uint"/> + <field name="Depth" start="117" end="127" type="uint"/> + <field name="Surface Pitch" start="96" end="113" type="uint"/> + <field name="Render Target And Sample Unorm Rotation" start="157" end="158" type="uint"> + <value name="0DEG" value="0"/> + <value name="90DEG" value="1"/> + <value name="270DEG" value="3"/> + </field> + <field name="Minimum Array Element" start="146" end="156" type="uint"/> + <field name="Render Target View Extent" start="135" end="145" type="uint"/> + <field name="Multisampled Surface Storage Format" start="134" end="134" type="uint"> + <value name="MSS" value="0"/> + <value name="DEPTH_STENCIL" value="1"/> + </field> + <field name="Number of Multisamples" start="131" end="133" type="uint"> + <value name="MULTISAMPLECOUNT_1" value="0"/> + <value name="MULTISAMPLECOUNT_2" value="1"/> + <value name="MULTISAMPLECOUNT_4" value="2"/> + <value name="MULTISAMPLECOUNT_8" value="3"/> + </field> + <field name="Multisample Position Palette Index" start="128" end="130" type="uint"/> + <field name="X Offset" start="185" end="191" type="offset"/> + <field name="Y Offset" start="181" end="183" type="offset"/> + <field name="EWA Disable For Cube" start="180" end="180" type="bool"/> + <field name="Coherency Type" start="174" end="174" type="uint"> + <value name="GPU coherent" value="0"/> + <value name="IA coherent" value="1"/> + </field> + <field name="Surface Min LOD" start="164" end="167" type="uint"/> + <field name="MIP Count / LOD" start="160" end="163" type="uint"/> + <field name="Auxiliary Surface QPitch" start="208" end="222" type="uint"/> + <field name="Auxiliary Surface Pitch" start="195" end="203" type="uint"/> + <field name="Auxiliary Surface Mode" start="192" end="194" type="uint"> + <value name="AUX_NONE" value="0"/> + <value name="AUX_MCS" value="1"/> + <value name="AUX_APPEND" value="2"/> + <value name="AUX_HIZ" value="3"/> + </field> + <field name="Separate UV Plane Enable" start="223" end="223" type="bool"/> + <field name="X Offset for U or UV Plane" start="208" end="221" type="uint"/> + <field name="Y Offset for U or UV Plane" start="192" end="205" type="uint"/> + <field name="Red Clear Color" start="255" end="255" type="uint"/> + <field name="Green Clear Color" start="254" end="254" type="uint"/> + <field name="Blue Clear Color" start="253" end="253" type="uint"/> + <field name="Alpha Clear Color" start="252" end="252" type="uint"/> + <field name="Shader Channel Select Red" start="249" end="251" type="uint"/> + <field name="Shader Channel Select Green" start="246" end="248" type="uint"/> + <field name="Shader Channel Select Blue" start="243" end="245" type="uint"/> + <field name="Shader Channel Select Alpha" start="240" end="242" type="uint"/> + <field name="Resource Min LOD" start="224" end="235" type="u4.8"/> + <field name="Surface Base Address" start="256" end="319" type="address"/> + <field name="X Offset for V Plane" start="368" end="381" type="uint"/> + <field name="Y Offset for V Plane" start="352" end="365" type="uint"/> + <field name="Auxiliary Table Index for Media Compressed Surface" start="341" end="351" type="uint"/> + <field name="Auxiliary Surface Base Address" start="332" end="383" type="address"/> + </struct> + + <struct name="FILTER_COEFFICIENT" length="1"> + <field name="Filter Coefficient" start="0" end="7" type="s1.6"/> + </struct> + + <struct name="SAMPLER_STATE" length="4"> + <field name="Sampler Disable" start="31" end="31" type="bool"/> + <field name="Texture Border Color Mode" start="29" end="29" type="uint"> + <value name="DX10/OGL" value="0"/> + <value name="DX9" value="1"/> + </field> + <field name="LOD PreClamp Mode" start="27" end="28" type="uint" prefix="CLAMP_MODE"> + <value name="NONE" value="0"/> + <value name="OGL" value="2"/> + </field> + <field name="Base Mip Level" start="22" end="26" type="u4.1"/> + <field name="Mip Mode Filter" start="20" end="21" type="uint" prefix="MIPFILTER"> + <value name="NONE" value="0"/> + <value name="NEAREST" value="1"/> + <value name="LINEAR" value="3"/> + </field> + <field name="Mag Mode Filter" start="17" end="19" type="uint" prefix="MAPFILTER"> + <value name="NEAREST" value="0"/> + <value name="LINEAR" value="1"/> + <value name="ANISOTROPIC" value="2"/> + <value name="MONO" value="6"/> + </field> + <field name="Min Mode Filter" start="14" end="16" type="uint" prefix="MAPFILTER"> + <value name="NEAREST" value="0"/> + <value name="LINEAR" value="1"/> + <value name="ANISOTROPIC" value="2"/> + <value name="MONO" value="6"/> + </field> + <field name="Texture LOD Bias" start="1" end="13" type="s4.8"/> + <field name="Anisotropic Algorithm" start="0" end="0" type="uint"> + <value name="LEGACY" value="0"/> + <value name="EWA Approximation" value="1"/> + </field> + <field name="Min LOD" start="52" end="63" type="u4.8"/> + <field name="Max LOD" start="40" end="51" type="u4.8"/> + <field name="ChromaKey Enable" start="39" end="39" type="bool"/> + <field name="ChromaKey Index" start="37" end="38" type="uint"/> + <field name="ChromaKey Mode" start="36" end="36" type="uint"> + <value name="KEYFILTER_KILL_ON_ANY_MATCH" value="0"/> + <value name="KEYFILTER_REPLACE_BLACK" value="1"/> + </field> + <field name="Shadow Function" start="33" end="35" type="uint"> + <value name="PREFILTEROP ALWAYS" value="0"/> + <value name="PREFILTEROP NEVER" value="1"/> + <value name="PREFILTEROP LESS" value="2"/> + <value name="PREFILTEROP EQUAL" value="3"/> + <value name="PREFILTEROP LEQUAL" value="4"/> + <value name="PREFILTEROP GREATER" value="5"/> + <value name="PREFILTEROP NOTEQUAL" value="6"/> + <value name="PREFILTEROP GEQUAL" value="7"/> + </field> + <field name="Cube Surface Control Mode" start="32" end="32" type="uint"> + <value name="PROGRAMMED" value="0"/> + <value name="OVERRIDE" value="1"/> + </field> + <field name="Indirect State Pointer" start="70" end="87" type="uint"/> + <field name="LOD Clamp Magnification Mode" start="64" end="64" type="uint"> + <value name="MIPNONE" value="0"/> + <value name="MIPFILTER" value="1"/> + </field> + <field name="Maximum Anisotropy" start="115" end="117" type="uint"> + <value name="RATIO 2:1" value="0"/> + <value name="RATIO 4:1" value="1"/> + <value name="RATIO 6:1" value="2"/> + <value name="RATIO 8:1" value="3"/> + <value name="RATIO 10:1" value="4"/> + <value name="RATIO 12:1" value="5"/> + <value name="RATIO 14:1" value="6"/> + <value name="RATIO 16:1" value="7"/> + </field> + <field name="R Address Min Filter Rounding Enable" start="109" end="109" type="bool"/> + <field name="R Address Mag Filter Rounding Enable" start="110" end="110" type="bool"/> + <field name="V Address Min Filter Rounding Enable" start="111" end="111" type="bool"/> + <field name="V Address Mag Filter Rounding Enable" start="112" end="112" type="bool"/> + <field name="U Address Min Filter Rounding Enable" start="113" end="113" type="bool"/> + <field name="U Address Mag Filter Rounding Enable" start="114" end="114" type="bool"/> + <field name="Trilinear Filter Quality" start="107" end="108" type="uint"> + <value name="FULL" value="0"/> + <value name="HIGH" value="1"/> + <value name="MED" value="2"/> + <value name="LOW" value="3"/> + </field> + <field name="Non-normalized Coordinate Enable" start="106" end="106" type="bool"/> + <field name="TCX Address Control Mode" start="102" end="104" type="uint"/> + <field name="TCY Address Control Mode" start="99" end="101" type="uint"/> + <field name="TCZ Address Control Mode" start="96" end="98" type="uint"/> + </struct> + + <struct name="SAMPLER_STATE_8X8_AVS_COEFFICIENTS" length="8"> + <field name="Table 0Y Filter Coefficient[n,1]" start="24" end="31" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,1]" start="16" end="23" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,0]" start="8" end="15" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,0]" start="0" end="7" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,3]" start="56" end="63" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,3]" start="48" end="55" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,2]" start="40" end="47" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,2]" start="32" end="39" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,5]" start="88" end="95" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,5]" start="80" end="87" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,4]" start="72" end="79" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,4]" start="64" end="71" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,7]" start="120" end="127" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,7]" start="112" end="119" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,6]" start="104" end="111" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,6]" start="96" end="103" type="s1.6"/> + <field name="Table 1X Filter Coefficient[n,3]" start="152" end="159" type="s1.6"/> + <field name="Table 1X Filter Coefficient[n,2]" start="144" end="151" type="s1.6"/> + <field name="Table 1X Filter Coefficient[n,5]" start="168" end="175" type="s1.6"/> + <field name="Table 1X Filter Coefficient[n,4]" start="160" end="167" type="s1.6"/> + <field name="Table 1Y Filter Coefficient[n,3]" start="216" end="223" type="s1.6"/> + <field name="Table 1Y Filter Coefficient[n,2]" start="208" end="215" type="s1.6"/> + <field name="Table 1Y Filter Coefficient[n,5]" start="232" end="239" type="s1.6"/> + <field name="Table 1Y Filter Coefficient[n,4]" start="224" end="231" type="s1.6"/> + </struct> + + <enum name="3D_Prim_Topo_Type" prefix="3DPRIM"> + <value name="POINTLIST" value="1"/> + <value name="LINELIST" value="2"/> + <value name="LINESTRIP" value="3"/> + <value name="TRILIST" value="4"/> + <value name="TRISTRIP" value="5"/> + <value name="TRIFAN" value="6"/> + <value name="QUADLIST" value="7"/> + <value name="QUADSTRIP" value="8"/> + <value name="LINELIST_ADJ" value="9"/> + <value name="LINESTRIP_ADJ" value="10"/> + <value name="TRILIST_ADJ" value="11"/> + <value name="TRISTRIP_ADJ" value="12"/> + <value name="TRISTRIP_REVERSE" value="13"/> + <value name="POLYGON" value="14"/> + <value name="RECTLIST" value="15"/> + <value name="LINELOOP" value="16"/> + <value name="POINTLIST _BF" value="17"/> + <value name="LINESTRIP_CONT" value="18"/> + <value name="LINESTRIP_BF" value="19"/> + <value name="LINESTRIP_CONT_BF" value="20"/> + <value name="TRIFAN_NOSTIPPLE" value="22"/> + <value name="PATCHLIST_1" value="32"/> + <value name="PATCHLIST_2" value="33"/> + <value name="PATCHLIST_3" value="34"/> + <value name="PATCHLIST_4" value="35"/> + <value name="PATCHLIST_5" value="36"/> + <value name="PATCHLIST_6" value="37"/> + <value name="PATCHLIST_7" value="38"/> + <value name="PATCHLIST_8" value="39"/> + <value name="PATCHLIST_9" value="40"/> + <value name="PATCHLIST_10" value="41"/> + <value name="PATCHLIST_11" value="42"/> + <value name="PATCHLIST_12" value="43"/> + <value name="PATCHLIST_13" value="44"/> + <value name="PATCHLIST_14" value="45"/> + <value name="PATCHLIST_15" value="46"/> + <value name="PATCHLIST_16" value="47"/> + <value name="PATCHLIST_17" value="48"/> + <value name="PATCHLIST_18" value="49"/> + <value name="PATCHLIST_19" value="50"/> + <value name="PATCHLIST_20" value="51"/> + <value name="PATCHLIST_21" value="52"/> + <value name="PATCHLIST_22" value="53"/> + <value name="PATCHLIST_23" value="54"/> + <value name="PATCHLIST_24" value="55"/> + <value name="PATCHLIST_25" value="56"/> + <value name="PATCHLIST_26" value="57"/> + <value name="PATCHLIST_27" value="58"/> + <value name="PATCHLIST_28" value="59"/> + <value name="PATCHLIST_29" value="60"/> + <value name="PATCHLIST_30" value="61"/> + <value name="PATCHLIST_31" value="62"/> + <value name="PATCHLIST_32" value="63"/> + </enum> + + <enum name="3D_Vertex_Component_Control" prefix="VFCOMP"> + <value name="NOSTORE" value="0"/> + <value name="STORE_SRC" value="1"/> + <value name="STORE_0" value="2"/> + <value name="STORE_1_FP" value="3"/> + <value name="STORE_1_INT" value="4"/> + <value name="STORE_PID" value="7"/> + </enum> + + <enum name="WRAP_SHORTEST_ENABLE" prefix="WSE"> + <value name="X" value="1"/> + <value name="Y" value="2"/> + <value name="XY" value="3"/> + <value name="Z" value="4"/> + <value name="XZ" value="5"/> + <value name="YZ" value="6"/> + <value name="XYZ" value="7"/> + <value name="W" value="8"/> + <value name="XW" value="9"/> + <value name="YW" value="10"/> + <value name="XYW" value="11"/> + <value name="ZW" value="12"/> + <value name="XZW" value="13"/> + <value name="YZW" value="14"/> + <value name="XYZW" value="15"/> + </enum> + + <enum name="3D_Stencil_Operation" prefix="STENCILOP"> + <value name="KEEP" value="0"/> + <value name="ZERO" value="1"/> + <value name="REPLACE" value="2"/> + <value name="INCRSAT" value="3"/> + <value name="DECRSAT" value="4"/> + <value name="INCR" value="5"/> + <value name="DECR" value="6"/> + <value name="INVERT" value="7"/> + </enum> + + <enum name="3D_Color_Buffer_Blend_Factor" prefix="BLENDFACTOR"> + <value name="ONE" value="1"/> + <value name="SRC_COLOR" value="2"/> + <value name="SRC_ALPHA" value="3"/> + <value name="DST_ALPHA" value="4"/> + <value name="DST_COLOR" value="5"/> + <value name="SRC_ALPHA_SATURATE" value="6"/> + <value name="CONST_COLOR" value="7"/> + <value name="CONST_ALPHA" value="8"/> + <value name="SRC1_COLOR" value="9"/> + <value name="SRC1_ALPHA" value="10"/> + <value name="ZERO" value="17"/> + <value name="INV_SRC_COLOR" value="18"/> + <value name="INV_SRC_ALPHA" value="19"/> + <value name="INV_DST_ALPHA" value="20"/> + <value name="INV_DST_COLOR" value="21"/> + <value name="INV_CONST_COLOR" value="23"/> + <value name="INV_CONST_ALPHA" value="24"/> + <value name="INV_SRC1_COLOR" value="25"/> + <value name="INV_SRC1_ALPHA" value="26"/> + </enum> + + <enum name="3D_Color_Buffer_Blend_Function" prefix="BLENDFUNCTION"> + <value name="ADD" value="0"/> + <value name="SUBTRACT" value="1"/> + <value name="REVERSE_SUBTRACT" value="2"/> + <value name="MIN" value="3"/> + <value name="MAX" value="4"/> + </enum> + + <enum name="3D_Compare_Function" prefix="COMPAREFUNCTION"> + <value name="ALWAYS" value="0"/> + <value name="NEVER" value="1"/> + <value name="LESS" value="2"/> + <value name="EQUAL" value="3"/> + <value name="LEQUAL" value="4"/> + <value name="GREATER" value="5"/> + <value name="NOTEQUAL" value="6"/> + <value name="GEQUAL" value="7"/> + </enum> + + <enum name="3D_Logic_Op_Function" prefix="LOGICOP"> + <value name="CLEAR" value="0"/> + <value name="NOR" value="1"/> + <value name="AND_INVERTED" value="2"/> + <value name="COPY_INVERTED" value="3"/> + <value name="AND_REVERSE" value="4"/> + <value name="INVERT" value="5"/> + <value name="XOR" value="6"/> + <value name="NAND" value="7"/> + <value name="AND" value="8"/> + <value name="EQUIV" value="9"/> + <value name="NOOP" value="10"/> + <value name="OR_INVERTED" value="11"/> + <value name="COPY" value="12"/> + <value name="OR_REVERSE" value="13"/> + <value name="OR" value="14"/> + <value name="SET" value="15"/> + </enum> + + <enum name="SURFACE_FORMAT" prefix="SF"> + <value name="R32G32B32A32_FLOAT" value="0"/> + <value name="R32G32B32A32_SINT" value="1"/> + <value name="R32G32B32A32_UINT" value="2"/> + <value name="R32G32B32A32_UNORM" value="3"/> + <value name="R32G32B32A32_SNORM" value="4"/> + <value name="R64G64_FLOAT" value="5"/> + <value name="R32G32B32X32_FLOAT" value="6"/> + <value name="R32G32B32A32_SSCALED" value="7"/> + <value name="R32G32B32A32_USCALED" value="8"/> + <value name="R32G32B32A32_SFIXED" value="32"/> + <value name="R64G64_PASSTHRU" value="33"/> + <value name="R32G32B32_FLOAT" value="64"/> + <value name="R32G32B32_SINT" value="65"/> + <value name="R32G32B32_UINT" value="66"/> + <value name="R32G32B32_UNORM" value="67"/> + <value name="R32G32B32_SNORM" value="68"/> + <value name="R32G32B32_SSCALED" value="69"/> + <value name="R32G32B32_USCALED" value="70"/> + <value name="R32G32B32_SFIXED" value="80"/> + <value name="R16G16B16A16_UNORM" value="128"/> + <value name="R16G16B16A16_SNORM" value="129"/> + <value name="R16G16B16A16_SINT" value="130"/> + <value name="R16G16B16A16_UINT" value="131"/> + <value name="R16G16B16A16_FLOAT" value="132"/> + <value name="R32G32_FLOAT" value="133"/> + <value name="R32G32_SINT" value="134"/> + <value name="R32G32_UINT" value="135"/> + <value name="R32_FLOAT_X8X24_TYPELESS" value="136"/> + <value name="X32_TYPELESS_G8X24_UINT" value="137"/> + <value name="L32A32_FLOAT" value="138"/> + <value name="R32G32_UNORM" value="139"/> + <value name="R32G32_SNORM" value="140"/> + <value name="R64_FLOAT" value="141"/> + <value name="R16G16B16X16_UNORM" value="142"/> + <value name="R16G16B16X16_FLOAT" value="143"/> + <value name="A32X32_FLOAT" value="144"/> + <value name="L32X32_FLOAT" value="145"/> + <value name="I32X32_FLOAT" value="146"/> + <value name="R16G16B16A16_SSCALED" value="147"/> + <value name="R16G16B16A16_USCALED" value="148"/> + <value name="R32G32_SSCALED" value="149"/> + <value name="R32G32_USCALED" value="150"/> + <value name="R32G32_SFIXED" value="160"/> + <value name="R64_PASSTHRU" value="161"/> + <value name="B8G8R8A8_UNORM" value="192"/> + <value name="B8G8R8A8_UNORM_SRGB" value="193"/> + <value name="R10G10B10A2_UNORM" value="194"/> + <value name="R10G10B10A2_UNORM_SRGB" value="195"/> + <value name="R10G10B10A2_UINT" value="196"/> + <value name="R10G10B10_SNORM_A2_UNORM" value="197"/> + <value name="R8G8B8A8_UNORM" value="199"/> + <value name="R8G8B8A8_UNORM_SRGB" value="200"/> + <value name="R8G8B8A8_SNORM" value="201"/> + <value name="R8G8B8A8_SINT" value="202"/> + <value name="R8G8B8A8_UINT" value="203"/> + <value name="R16G16_UNORM" value="204"/> + <value name="R16G16_SNORM" value="205"/> + <value name="R16G16_SINT" value="206"/> + <value name="R16G16_UINT" value="207"/> + <value name="R16G16_FLOAT" value="208"/> + <value name="B10G10R10A2_UNORM" value="209"/> + <value name="B10G10R10A2_UNORM_SRGB" value="210"/> + <value name="R11G11B10_FLOAT" value="211"/> + <value name="R32_SINT" value="214"/> + <value name="R32_UINT" value="215"/> + <value name="R32_FLOAT" value="216"/> + <value name="R24_UNORM_X8_TYPELESS" value="217"/> + <value name="X24_TYPELESS_G8_UINT" value="218"/> + <value name="L32_UNORM" value="221"/> + <value name="A32_UNORM" value="222"/> + <value name="L16A16_UNORM" value="223"/> + <value name="I24X8_UNORM" value="224"/> + <value name="L24X8_UNORM" value="225"/> + <value name="A24X8_UNORM" value="226"/> + <value name="I32_FLOAT" value="227"/> + <value name="L32_FLOAT" value="228"/> + <value name="A32_FLOAT" value="229"/> + <value name="X8B8_UNORM_G8R8_SNORM" value="230"/> + <value name="A8X8_UNORM_G8R8_SNORM" value="231"/> + <value name="B8X8_UNORM_G8R8_SNORM" value="232"/> + <value name="B8G8R8X8_UNORM" value="233"/> + <value name="B8G8R8X8_UNORM_SRGB" value="234"/> + <value name="R8G8B8X8_UNORM" value="235"/> + <value name="R8G8B8X8_UNORM_SRGB" value="236"/> + <value name="R9G9B9E5_SHAREDEXP" value="237"/> + <value name="B10G10R10X2_UNORM" value="238"/> + <value name="L16A16_FLOAT" value="240"/> + <value name="R32_UNORM" value="241"/> + <value name="R32_SNORM" value="242"/> + <value name="R10G10B10X2_USCALED" value="243"/> + <value name="R8G8B8A8_SSCALED" value="244"/> + <value name="R8G8B8A8_USCALED" value="245"/> + <value name="R16G16_SSCALED" value="246"/> + <value name="R16G16_USCALED" value="247"/> + <value name="R32_SSCALED" value="248"/> + <value name="R32_USCALED" value="249"/> + <value name="B5G6R5_UNORM" value="256"/> + <value name="B5G6R5_UNORM_SRGB" value="257"/> + <value name="B5G5R5A1_UNORM" value="258"/> + <value name="B5G5R5A1_UNORM_SRGB" value="259"/> + <value name="B4G4R4A4_UNORM" value="260"/> + <value name="B4G4R4A4_UNORM_SRGB" value="261"/> + <value name="R8G8_UNORM" value="262"/> + <value name="R8G8_SNORM" value="263"/> + <value name="R8G8_SINT" value="264"/> + <value name="R8G8_UINT" value="265"/> + <value name="R16_UNORM" value="266"/> + <value name="R16_SNORM" value="267"/> + <value name="R16_SINT" value="268"/> + <value name="R16_UINT" value="269"/> + <value name="R16_FLOAT" value="270"/> + <value name="A8P8_UNORM_PALETTE0" value="271"/> + <value name="A8P8_UNORM_PALETTE1" value="272"/> + <value name="I16_UNORM" value="273"/> + <value name="L16_UNORM" value="274"/> + <value name="A16_UNORM" value="275"/> + <value name="L8A8_UNORM" value="276"/> + <value name="I16_FLOAT" value="277"/> + <value name="L16_FLOAT" value="278"/> + <value name="A16_FLOAT" value="279"/> + <value name="L8A8_UNORM_SRGB" value="280"/> + <value name="R5G5_SNORM_B6_UNORM" value="281"/> + <value name="B5G5R5X1_UNORM" value="282"/> + <value name="B5G5R5X1_UNORM_SRGB" value="283"/> + <value name="R8G8_SSCALED" value="284"/> + <value name="R8G8_USCALED" value="285"/> + <value name="R16_SSCALED" value="286"/> + <value name="R16_USCALED" value="287"/> + <value name="P8A8_UNORM_PALETTE0" value="290"/> + <value name="P8A8_UNORM_PALETTE1" value="291"/> + <value name="A1B5G5R5_UNORM" value="292"/> + <value name="A4B4G4R4_UNORM" value="293"/> + <value name="L8A8_UINT" value="294"/> + <value name="L8A8_SINT" value="295"/> + <value name="R8_UNORM" value="320"/> + <value name="R8_SNORM" value="321"/> + <value name="R8_SINT" value="322"/> + <value name="R8_UINT" value="323"/> + <value name="A8_UNORM" value="324"/> + <value name="I8_UNORM" value="325"/> + <value name="L8_UNORM" value="326"/> + <value name="P4A4_UNORM_PALETTE0" value="327"/> + <value name="A4P4_UNORM_PALETTE0" value="328"/> + <value name="R8_SSCALED" value="329"/> + <value name="R8_USCALED" value="330"/> + <value name="P8_UNORM_PALETTE0" value="331"/> + <value name="L8_UNORM_SRGB" value="332"/> + <value name="P8_UNORM_PALETTE1" value="333"/> + <value name="P4A4_UNORM_PALETTE1" value="334"/> + <value name="A4P4_UNORM_PALETTE1" value="335"/> + <value name="Y8_UNORM" value="336"/> + <value name="L8_UINT" value="338"/> + <value name="L8_SINT" value="339"/> + <value name="I8_UINT" value="340"/> + <value name="I8_SINT" value="341"/> + <value name="DXT1_RGB_SRGB" value="384"/> + <value name="R1_UNORM" value="385"/> + <value name="YCRCB_NORMAL" value="386"/> + <value name="YCRCB_SWAPUVY" value="387"/> + <value name="P2_UNORM_PALETTE0" value="388"/> + <value name="P2_UNORM_PALETTE1" value="389"/> + <value name="BC1_UNORM" value="390"/> + <value name="BC2_UNORM" value="391"/> + <value name="BC3_UNORM" value="392"/> + <value name="BC4_UNORM" value="393"/> + <value name="BC5_UNORM" value="394"/> + <value name="BC1_UNORM_SRGB" value="395"/> + <value name="BC2_UNORM_SRGB" value="396"/> + <value name="BC3_UNORM_SRGB" value="397"/> + <value name="MONO8" value="398"/> + <value name="YCRCB_SWAPUV" value="399"/> + <value name="YCRCB_SWAPY" value="400"/> + <value name="DXT1_RGB" value="401"/> + <value name="FXT1" value="402"/> + <value name="R8G8B8_UNORM" value="403"/> + <value name="R8G8B8_SNORM" value="404"/> + <value name="R8G8B8_SSCALED" value="405"/> + <value name="R8G8B8_USCALED" value="406"/> + <value name="R64G64B64A64_FLOAT" value="407"/> + <value name="R64G64B64_FLOAT" value="408"/> + <value name="BC4_SNORM" value="409"/> + <value name="BC5_SNORM" value="410"/> + <value name="R16G16B16_FLOAT" value="411"/> + <value name="R16G16B16_UNORM" value="412"/> + <value name="R16G16B16_SNORM" value="413"/> + <value name="R16G16B16_SSCALED" value="414"/> + <value name="R16G16B16_USCALED" value="415"/> + <value name="BC6H_SF16" value="417"/> + <value name="BC7_UNORM" value="418"/> + <value name="BC7_UNORM_SRGB" value="419"/> + <value name="BC6H_UF16" value="420"/> + <value name="PLANAR_420_8" value="421"/> + <value name="R8G8B8_UNORM_SRGB" value="424"/> + <value name="ETC1_RGB8" value="425"/> + <value name="ETC2_RGB8" value="426"/> + <value name="EAC_R11" value="427"/> + <value name="EAC_RG11" value="428"/> + <value name="EAC_SIGNED_R11" value="429"/> + <value name="EAC_SIGNED_RG11" value="430"/> + <value name="ETC2_SRGB8" value="431"/> + <value name="R16G16B16_UINT" value="432"/> + <value name="R16G16B16_SINT" value="433"/> + <value name="R32_SFIXED" value="434"/> + <value name="R10G10B10A2_SNORM" value="435"/> + <value name="R10G10B10A2_USCALED" value="436"/> + <value name="R10G10B10A2_SSCALED" value="437"/> + <value name="R10G10B10A2_SINT" value="438"/> + <value name="B10G10R10A2_SNORM" value="439"/> + <value name="B10G10R10A2_USCALED" value="440"/> + <value name="B10G10R10A2_SSCALED" value="441"/> + <value name="B10G10R10A2_UINT" value="442"/> + <value name="B10G10R10A2_SINT" value="443"/> + <value name="R64G64B64A64_PASSTHRU" value="444"/> + <value name="R64G64B64_PASSTHRU" value="445"/> + <value name="ETC2_RGB8_PTA" value="448"/> + <value name="ETC2_SRGB8_PTA" value="449"/> + <value name="ETC2_EAC_RGBA8" value="450"/> + <value name="ETC2_EAC_SRGB8_A8" value="451"/> + <value name="R8G8B8_UINT" value="456"/> + <value name="R8G8B8_SINT" value="457"/> + <value name="RAW" value="511"/> + </enum> + + <enum name="Shader Channel Select" prefix="SCS"> + <value name="ZERO" value="0"/> + <value name="ONE" value="1"/> + <value name="RED" value="4"/> + <value name="GREEN" value="5"/> + <value name="BLUE" value="6"/> + <value name="ALPHA" value="7"/> + </enum> + + <enum name="Clear Color"> + <value name="CC_ZERO" value="0"/> + <value name="CC_ONE" value="1"/> + </enum> + + <enum name="Texture Coordinate Mode" prefix="TCM"> + <value name="WRAP" value="0"/> + <value name="MIRROR" value="1"/> + <value name="CLAMP" value="2"/> + <value name="CUBE" value="3"/> + <value name="CLAMP_BORDER" value="4"/> + <value name="MIRROR_ONCE" value="5"/> + <value name="HALF_BORDER" value="6"/> + </enum> + + <instruction name="3DPRIMITIVE" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="3"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="0"/> + <field name="Indirect Parameter Enable" start="10" end="10" type="bool"/> + <field name="UAV Coherency Required" start="9" end="9" type="bool"/> + <field name="Predicate Enable" start="8" end="8" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="End Offset Enable" start="41" end="41" type="bool"/> + <field name="Vertex Access Type" start="40" end="40" type="uint"> + <value name="SEQUENTIAL" value="0"/> + <value name="RANDOM" value="1"/> + </field> + <field name="Primitive Topology Type" start="32" end="37" type="uint"/> + <field name="Vertex Count Per Instance" start="64" end="95" type="uint"/> + <field name="Start Vertex Location" start="96" end="127" type="uint"/> + <field name="Instance Count" start="128" end="159" type="uint"/> + <field name="Start Instance Location" start="160" end="191" type="uint"/> + <field name="Base Vertex Location" start="192" end="223" type="int"/> + </instruction> + + <instruction name="3DSTATE_AA_LINE_PARAMETERS" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="10"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="AA Point Coverage Bias" start="56" end="63" type="u0.8"/> + <field name="AA Coverage Bias" start="48" end="55" type="u0.8"/> + <field name="AA Point Coverage Slope" start="40" end="47" type="u0.8"/> + <field name="AA Coverage Slope" start="32" end="39" type="u0.8"/> + <field name="AA Point Coverage EndCap Bias" start="88" end="95" type="u0.8"/> + <field name="AA Coverage EndCap Bias" start="80" end="87" type="u0.8"/> + <field name="AA Point Coverage EndCap Slope" start="72" end="79" type="u0.8"/> + <field name="AA Coverage EndCap Slope" start="64" end="71" type="u0.8"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_DS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="70"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_GS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="68"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_HS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="69"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_PS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="71"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_VS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="67"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="40"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to DS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="41"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to GS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="39"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to HS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_PS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="42"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to PS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="38"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to VS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POOL_ALLOC" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="25"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Binding Table Pool Base Address" start="44" end="95" type="address"/> + <field name="Binding Table Pool Enable" start="43" end="43" type="uint"/> + <field name="Surface Object Control State" start="32" end="38" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Binding Table Pool Buffer Size" start="108" end="127" type="uint"> + <value name="No Valid Data" value="0"/> + </field> + </instruction> + + <instruction name="3DSTATE_BLEND_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="36"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Blend State Pointer" start="38" end="63" type="offset"/> + <field name="Blend State Pointer Valid" start="32" end="32" type="bool"/> + </instruction> + + <instruction name="3DSTATE_CC_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="14"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Color Calc State Pointer" start="38" end="63" type="offset"/> + <field name="Color Calc State Pointer Valid" start="32" end="32" type="bool"/> + </instruction> + + <instruction name="3DSTATE_CHROMA_KEY" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="ChromaKey Table Index" start="62" end="63" type="uint"/> + <field name="ChromaKey Low Value" start="64" end="95" type="uint"/> + <field name="ChromaKey High Value" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="3DSTATE_CLEAR_PARAMS" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Depth Clear Value" start="32" end="63" type="float"/> + <field name="Depth Clear Value Valid" start="64" end="64" type="bool"/> + </instruction> + + <instruction name="3DSTATE_CLIP" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="18"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Force User Clip Distance Cull Test Enable Bitmask" start="52" end="52" type="bool"/> + <field name="Vertex Sub Pixel Precision Select" start="51" end="51" type="uint"> + <value name="8 Bit" value="0"/> + <value name="4 Bit" value="1"/> + </field> + <field name="Early Cull Enable" start="50" end="50" type="bool"/> + <field name="Force User Clip Distance Clip Test Enable Bitmask" start="49" end="49" type="bool"/> + <field name="Force Clip Mode" start="48" end="48" type="bool"/> + <field name="Clipper Statistics Enable" start="42" end="42" type="bool"/> + <field name="User Clip Distance Cull Test Enable Bitmask" start="32" end="39" type="uint"/> + <field name="Clip Enable" start="95" end="95" type="bool"/> + <field name="API Mode" start="94" end="94" type="uint"> + <value name="OGL" value="0"/> + </field> + <field name="Viewport XY Clip Test Enable" start="92" end="92" type="bool"/> + <field name="Guardband Clip Test Enable" start="90" end="90" type="bool"/> + <field name="User Clip Distance Clip Test Enable Bitmask" start="80" end="87" type="uint"/> + <field name="Clip Mode" start="77" end="79" type="uint"> + <value name="NORMAL" value="0"/> + <value name="REJECT_ALL" value="3"/> + <value name="ACCEPT_ALL" value="4"/> + </field> + <field name="Perspective Divide Disable" start="73" end="73" type="bool"/> + <field name="Non-Perspective Barycentric Enable" start="72" end="72" type="bool"/> + <field name="Triangle Strip/List Provoking Vertex Select" start="68" end="69" type="uint"/> + <field name="Line Strip/List Provoking Vertex Select" start="66" end="67" type="uint"/> + <field name="Triangle Fan Provoking Vertex Select" start="64" end="65" type="uint"/> + <field name="Minimum Point Width" start="113" end="123" type="u8.3"/> + <field name="Maximum Point Width" start="102" end="112" type="u8.3"/> + <field name="Force Zero RTA Index Enable" start="101" end="101" type="bool"/> + <field name="Maximum VP Index" start="96" end="99" type="uint"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_DS" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="26"/> + <field name="Constant Buffer Object Control State" start="8" end="14" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <field name="Constant Body" start="32" end="351" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_GS" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="22"/> + <field name="Constant Buffer Object Control State" start="8" end="14" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <field name="Constant Body" start="32" end="351" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_HS" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="25"/> + <field name="Constant Buffer Object Control State" start="8" end="14" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <field name="Constant Body" start="32" end="351" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_PS" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="23"/> + <field name="Constant Buffer Object Control State" start="8" end="14" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <field name="Constant Body" start="32" end="351" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_VS" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="21"/> + <field name="Constant Buffer Object Control State" start="8" end="14" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <field name="Constant Body" start="32" end="351" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_DEPTH_BUFFER" bias="2" length="8"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="5"/> + <field name="DWord Length" start="0" end="7" type="uint" default="6"/> + <field name="Surface Type" start="61" end="63" type="uint"> + <value name="SURFTYPE_1D" value="0"/> + <value name="SURFTYPE_2D" value="1"/> + <value name="SURFTYPE_3D" value="2"/> + <value name="SURFTYPE_CUBE" value="3"/> + <value name="SURFTYPE_NULL" value="7"/> + </field> + <field name="Depth Write Enable" start="60" end="60" type="bool"/> + <field name="Stencil Write Enable" start="59" end="59" type="bool"/> + <field name="Hierarchical Depth Buffer Enable" start="54" end="54" type="bool"/> + <field name="Surface Format" start="50" end="52" type="uint"> + <value name="D32_FLOAT" value="1"/> + <value name="D24_UNORM_X8_UINT" value="3"/> + <value name="D16_UNORM" value="5"/> + </field> + <field name="Surface Pitch" start="32" end="49" type="uint"/> + <field name="Surface Base Address" start="64" end="127" type="address"/> + <field name="Height" start="146" end="159" type="uint"/> + <field name="Width" start="132" end="145" type="uint"/> + <field name="LOD" start="128" end="131" type="uint"/> + <field name="Depth" start="181" end="191" type="uint"/> + <field name="Minimum Array Element" start="170" end="180" type="uint"/> + <field name="Depth Buffer Object Control State" start="160" end="166" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Render Target View Extent" start="245" end="255" type="uint"/> + <field name="Surface QPitch" start="224" end="238" type="uint"/> + </instruction> + + <instruction name="3DSTATE_DRAWING_RECTANGLE" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="0"/> + <field name="Core Mode Select" start="14" end="15" type="uint"> + <value name="Legacy" value="0"/> + <value name="Core 0 Enabled" value="1"/> + <value name="Core 1 Enabled" value="2"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Clipped Drawing Rectangle Y Min" start="48" end="63" type="uint"/> + <field name="Clipped Drawing Rectangle X Min" start="32" end="47" type="uint"/> + <field name="Clipped Drawing Rectangle Y Max" start="80" end="95" type="uint"/> + <field name="Clipped Drawing Rectangle X Max" start="64" end="79" type="uint"/> + <field name="Drawing Rectangle Origin Y" start="112" end="127" type="int"/> + <field name="Drawing Rectangle Origin X" start="96" end="111" type="int"/> + </instruction> + + <instruction name="3DSTATE_DS" bias="2" length="9"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="29"/> + <field name="DWord Length" start="0" end="7" type="uint" default="7"/> + <field name="Kernel Start Pointer" start="38" end="95" type="offset"/> + <field name="Single Domain Point Dispatch" start="127" end="127" type="uint"/> + <field name="Vector Mask Enable" start="126" end="126" type="bool"/> + <field name="Sampler Count" start="123" end="125" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="114" end="121" type="uint"/> + <field name="Thread Dispatch Priority" start="113" end="113" type="uint"> + <value name="High" value="1"/> + </field> + <field name="Floating Point Mode" start="112" end="112" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Accesses UAV" start="110" end="110" type="bool"/> + <field name="Illegal Opcode Exception Enable" start="109" end="109" type="bool"/> + <field name="Software Exception Enable" start="103" end="103" type="bool"/> + <field name="Scratch Space Base Pointer" start="138" end="191" type="offset"/> + <field name="Per-Thread Scratch Space" start="128" end="131" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data" start="212" end="216" type="uint"/> + <field name="Patch URB Entry Read Length" start="203" end="209" type="uint"/> + <field name="Patch URB Entry Read Offset" start="196" end="201" type="uint"/> + <field name="Maximum Number of Threads" start="245" end="253" type="uint"/> + <field name="Statistics Enable" start="234" end="234" type="bool"/> + <field name="SIMD8 Dispatch Enable" start="227" end="227" type="bool"/> + <field name="Compute W Coordinate Enable" start="226" end="226" type="bool"/> + <field name="Cache Disable" start="225" end="225" type="bool"/> + <field name="Function Enable" start="224" end="224" type="bool"/> + <field name="Vertex URB Entry Output Read Offset" start="277" end="282" type="uint"/> + <field name="Vertex URB Entry Output Length" start="272" end="276" type="uint"/> + <field name="User Clip Distance Clip Test Enable Bitmask" start="264" end="271" type="uint"/> + <field name="User Clip Distance Cull Test Enable Bitmask" start="256" end="263" type="uint"/> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_DS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="55"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <field name="Constant Buffer Dx9 Generate Stall" start="69" end="69" type="bool"/> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_GS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="53"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <field name="Constant Buffer Dx9 Generate Stall" start="69" end="69" type="bool"/> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_HS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="54"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <field name="Constant Buffer Dx9 Generate Stall" start="69" end="69" type="bool"/> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_PS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="56"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <field name="Constant Buffer Dx9 Generate Stall" start="69" end="69" type="bool"/> + <field name="Constant Buffer Dx9 Enable" start="68" end="68" type="bool"/> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_VS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="52"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <field name="Constant Buffer Dx9 Generate Stall" start="69" end="69" type="bool"/> + <field name="Constant Buffer Dx9 Enable" start="68" end="68" type="bool"/> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_POOL_ALLOC" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="26"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Gather Pool Base Address" start="44" end="95" type="address"/> + <field name="Gather Pool Enable" start="43" end="43" type="bool"/> + <field name="Memory Object Control State" start="32" end="38" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Gather Pool Buffer Size" start="108" end="127" type="uint"/> + </instruction> + + <instruction name="3DSTATE_GS" bias="2" length="10"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="17"/> + <field name="DWord Length" start="0" end="7" type="uint" default="8"/> + <field name="Kernel Start Pointer" start="38" end="95" type="offset"/> + <field name="Single Program Flow" start="127" end="127" type="uint"/> + <field name="Vector Mask Enable" start="126" end="126" type="bool"/> + <field name="Sampler Count" start="123" end="125" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="114" end="121" type="uint"/> + <field name="Thread Dispatch Priority" start="113" end="113" type="uint"> + <value name="High" value="1"/> + </field> + <field name="Floating Point Mode" start="112" end="112" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="109" end="109" type="bool"/> + <field name="Accesses UAV" start="108" end="108" type="bool"/> + <field name="Mask Stack Exception Enable" start="107" end="107" type="bool"/> + <field name="Software Exception Enable" start="103" end="103" type="bool"/> + <field name="Expected Vertex Count" start="96" end="101" type="uint"/> + <field name="Scratch Space Base Pointer" start="138" end="191" type="offset"/> + <field name="Per-Thread Scratch Space" start="128" end="131" type="uint"/> + <field name="Output Vertex Size" start="215" end="220" type="uint"/> + <field name="Output Topology" start="209" end="214" type="uint" prefix="OUTPUT"/> + <field name="Vertex URB Entry Read Length" start="203" end="208" type="uint"/> + <field name="Include Vertex Handles" start="202" end="202" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="196" end="201" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data" start="192" end="195" type="uint"/> + <field name="Maximum Number of Threads" start="248" end="255" type="uint"/> + <field name="Control Data Header Size" start="244" end="247" type="uint"/> + <field name="Instance Control" start="239" end="243" type="uint"/> + <field name="Default Stream Id" start="237" end="238" type="uint"/> + <field name="Dispatch Mode" start="235" end="236" type="uint" prefix="DISPATCH_MODE"> + <value name="Dual Instance" value="1"/> + <value name="Dual Object" value="2"/> + <value name="SIMD8" value="3"/> + </field> + <field name="Statistics Enable" start="234" end="234" type="bool"/> + <field name="Invocations Increment Value" start="229" end="233" type="uint"/> + <field name="Include Primitive ID" start="228" end="228" type="uint"/> + <field name="Hint" start="227" end="227" type="uint"/> + <field name="Reorder Mode" start="226" end="226" type="uint"> + <value name="LEADING" value="0"/> + <value name="TRAILING" value="1"/> + </field> + <field name="Discard Adjacency" start="225" end="225" type="bool"/> + <field name="Enable" start="224" end="224" type="bool"/> + <field name="Control Data Format" start="287" end="287" type="uint"> + <value name="CUT" value="0"/> + <value name="SID" value="1"/> + </field> + <field name="Static Output" start="286" end="286" type="bool"/> + <field name="Static Output Vertex Count" start="272" end="282" type="uint"/> + <field name="Vertex URB Entry Output Read Offset" start="309" end="314" type="uint"/> + <field name="Vertex URB Entry Output Length" start="304" end="308" type="uint"/> + <field name="User Clip Distance Clip Test Enable Bitmask" start="296" end="303" type="uint"/> + <field name="User Clip Distance Cull Test Enable Bitmask" start="288" end="295" type="uint"/> + </instruction> + + <instruction name="3DSTATE_HIER_DEPTH_BUFFER" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="7"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Hierarchical Depth Buffer Object Control State" start="57" end="63" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface Pitch" start="32" end="48" type="uint"/> + <field name="Surface Base Address" start="64" end="127" type="address"/> + <field name="Surface QPitch" start="128" end="142" type="uint"/> + </instruction> + + <instruction name="3DSTATE_HS" bias="2" length="9"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="27"/> + <field name="DWord Length" start="0" end="7" type="uint" default="7"/> + <field name="Sampler Count" start="59" end="61" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="50" end="57" type="uint"/> + <field name="Thread Dispatch Priority" start="49" end="49" type="uint"> + <value name="High" value="1"/> + </field> + <field name="Floating Point Mode" start="48" end="48" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="45" end="45" type="bool"/> + <field name="Software Exception Enable" start="44" end="44" type="bool"/> + <field name="Enable" start="95" end="95" type="bool"/> + <field name="Statistics Enable" start="93" end="93" type="bool"/> + <field name="Maximum Number of Threads" start="72" end="80" type="uint"/> + <field name="Instance Count" start="64" end="67" type="uint"/> + <field name="Kernel Start Pointer" start="102" end="159" type="offset"/> + <field name="Scratch Space Base Pointer" start="170" end="223" type="offset"/> + <field name="Per-Thread Scratch Space" start="160" end="163" type="uint"/> + <field name="Single Program Flow" start="251" end="251" type="bool"/> + <field name="Vector Mask Enable" start="250" end="250" type="bool"/> + <field name="Accesses UAV" start="249" end="249" type="bool"/> + <field name="Include Vertex Handles" start="248" end="248" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data" start="243" end="247" type="uint"/> + <field name="Vertex URB Entry Read Length" start="235" end="240" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="228" end="233" type="uint"/> + </instruction> + + <instruction name="3DSTATE_INDEX_BUFFER" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="10"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Index Format" start="40" end="41" type="uint" prefix="INDEX"> + <value name="BYTE" value="0"/> + <value name="WORD" value="1"/> + <value name="DWORD" value="2"/> + </field> + <field name="Memory Object Control State" start="32" end="38" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Buffer Starting Address" start="64" end="127" type="address"/> + <field name="Buffer Size" start="128" end="159" type="uint"/> + </instruction> + + <instruction name="3DSTATE_LINE_STIPPLE" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="8"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Modify Enable (Current Repeat Counter, Current Stipple Index)" start="63" end="63" type="bool"/> + <field name="Current Repeat Counter" start="53" end="61" type="uint"/> + <field name="Current Stipple Index" start="48" end="51" type="uint"/> + <field name="Line Stipple Pattern" start="32" end="47" type="uint"/> + <field name="Line Stipple Inverse Repeat Count" start="79" end="95" type="u1.16"/> + <field name="Line Stipple Repeat Count" start="64" end="72" type="uint"/> + </instruction> + + <instruction name="3DSTATE_MONOFILTER_SIZE" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="17"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Monochrome Filter Width" start="35" end="37" type="uint"/> + <field name="Monochrome Filter Height" start="32" end="34" type="uint"/> + </instruction> + + <instruction name="3DSTATE_MULTISAMPLE" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="13"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pixel Position Offset Enable" start="37" end="37" type="bool"/> + <field name="Pixel Location" start="36" end="36" type="uint"> + <value name="CENTER" value="0"/> + <value name="UL_CORNER" value="1"/> + </field> + <field name="Number of Multisamples" start="33" end="35" type="uint"/> + </instruction> + + <instruction name="3DSTATE_POLY_STIPPLE_OFFSET" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="6"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Polygon Stipple X Offset" start="40" end="44" type="uint"/> + <field name="Polygon Stipple Y Offset" start="32" end="36" type="uint"/> + </instruction> + + <instruction name="3DSTATE_POLY_STIPPLE_PATTERN" bias="2" length="33"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="7"/> + <field name="DWord Length" start="0" end="7" type="uint" default="31"/> + <group count="32" start="32" size="32"> + <field name="Pattern Row" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="3DSTATE_PS" bias="2" length="12"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="32"/> + <field name="DWord Length" start="0" end="7" type="uint" default="10"/> + <field name="Kernel Start Pointer 0" start="38" end="95" type="offset"/> + <field name="Single Program Flow" start="127" end="127" type="uint"/> + <field name="Vector Mask Enable" start="126" end="126" type="bool"/> + <field name="Sampler Count" start="123" end="125" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Single Precision Denormal Mode" start="122" end="122" type="uint"> + <value name="Flushed to Zero" value="0"/> + <value name="Retained" value="1"/> + </field> + <field name="Binding Table Entry Count" start="114" end="121" type="uint"/> + <field name="Thread Dispatch Priority" start="113" end="113" type="uint"> + <value name="High" value="1"/> + </field> + <field name="Floating Point Mode" start="112" end="112" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Rounding Mode" start="110" end="111" type="uint"> + <value name="RTNE" value="0"/> + <value name="RU" value="1"/> + <value name="RD" value="2"/> + <value name="RTZ" value="3"/> + </field> + <field name="Illegal Opcode Exception Enable" start="109" end="109" type="bool"/> + <field name="Mask Stack Exception Enable" start="107" end="107" type="bool"/> + <field name="Software Exception Enable" start="103" end="103" type="bool"/> + <field name="Scratch Space Base Pointer" start="138" end="191" type="offset"/> + <field name="Per Thread Scratch Space" start="128" end="131" type="uint"/> + <field name="Maximum Number of Threads Per PSD" start="215" end="223" type="uint"/> + <field name="Push Constant Enable" start="203" end="203" type="bool"/> + <field name="Render Target Fast Clear Enable" start="200" end="200" type="bool"/> + <field name="Render Target Resolve Enable" start="198" end="198" type="bool"/> + <field name="Position XY Offset Select" start="195" end="196" type="uint"> + <value name="POSOFFSET_NONE" value="0"/> + <value name="POSOFFSET_CENTROID" value="2"/> + <value name="POSOFFSET_SAMPLE" value="3"/> + </field> + <field name="32 Pixel Dispatch Enable" start="194" end="194" type="bool"/> + <field name="16 Pixel Dispatch Enable" start="193" end="193" type="bool"/> + <field name="8 Pixel Dispatch Enable" start="192" end="192" type="bool"/> + <field name="Dispatch GRF Start Register For Constant/Setup Data 0" start="240" end="246" type="uint"/> + <field name="Dispatch GRF Start Register For Constant/Setup Data 1" start="232" end="238" type="uint"/> + <field name="Dispatch GRF Start Register For Constant/Setup Data 2" start="224" end="230" type="uint"/> + <field name="Kernel Start Pointer 1" start="262" end="319" type="offset"/> + <field name="Kernel Start Pointer 2" start="326" end="383" type="offset"/> + </instruction> + + <instruction name="3DSTATE_PS_BLEND" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="77"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Alpha To Coverage Enable" start="63" end="63" type="bool"/> + <field name="Has Writeable RT" start="62" end="62" type="bool"/> + <field name="Color Buffer Blend Enable" start="61" end="61" type="bool"/> + <field name="Source Alpha Blend Factor" start="56" end="60" type="uint"/> + <field name="Destination Alpha Blend Factor" start="51" end="55" type="uint"/> + <field name="Source Blend Factor" start="46" end="50" type="uint"/> + <field name="Destination Blend Factor" start="41" end="45" type="uint"/> + <field name="Alpha Test Enable" start="40" end="40" type="bool"/> + <field name="Independent Alpha Blend Enable" start="39" end="39" type="bool"/> + </instruction> + + <instruction name="3DSTATE_PS_EXTRA" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="79"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pixel Shader Valid" start="63" end="63" type="bool"/> + <field name="Pixel Shader Does not write to RT" start="62" end="62" type="bool"/> + <field name="oMask Present to Render Target" start="61" end="61" type="bool"/> + <field name="Pixel Shader Kills Pixel" start="60" end="60" type="bool"/> + <field name="Pixel Shader Computed Depth Mode" start="58" end="59" type="uint"> + <value name="PSCDEPTH_OFF" value="0"/> + <value name="PSCDEPTH_ON" value="1"/> + <value name="PSCDEPTH_ON_GE" value="2"/> + <value name="PSCDEPTH_ON_LE" value="3"/> + </field> + <field name="Force Computed Depth" start="57" end="57" type="bool"/> + <field name="Pixel Shader Uses Source Depth" start="56" end="56" type="bool"/> + <field name="Pixel Shader Uses Source W" start="55" end="55" type="bool"/> + <field name="Attribute Enable" start="40" end="40" type="bool"/> + <field name="Pixel Shader Disables Alpha To Coverage" start="39" end="39" type="bool"/> + <field name="Pixel Shader Is Per Sample" start="38" end="38" type="bool"/> + <field name="Pixel Shader Has UAV" start="34" end="34" type="bool"/> + <field name="Pixel Shader Uses Input Coverage Mask" start="33" end="33" type="bool"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="20"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="21"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="19"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_PS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="22"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="18"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_RASTER" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="80"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="API Mode" start="54" end="55" type="uint"> + <value name="DX9/OGL" value="0"/> + <value name="DX10.0" value="1"/> + <value name="DX10.1+" value="2"/> + </field> + <field name="Front Winding" start="53" end="53" type="uint"> + <value name="Clockwise" value="0"/> + <value name="Counter Clockwise" value="1"/> + </field> + <field name="Forced Sample Count" start="50" end="52" type="uint" prefix="FSC"> + <value name="NUMRASTSAMPLES_0" value="0"/> + <value name="NUMRASTSAMPLES_1" value="1"/> + <value name="NUMRASTSAMPLES_2" value="2"/> + <value name="NUMRASTSAMPLES_4" value="3"/> + <value name="NUMRASTSAMPLES_8" value="4"/> + <value name="NUMRASTSAMPLES_16" value="5"/> + </field> + <field name="Cull Mode" start="48" end="49" type="uint" prefix="CULLMODE"> + <value name="BOTH" value="0"/> + <value name="NONE" value="1"/> + <value name="FRONT" value="2"/> + <value name="BACK" value="3"/> + </field> + <field name="Force Multisampling" start="46" end="46" type="uint"/> + <field name="Smooth Point Enable" start="45" end="45" type="bool"/> + <field name="DX Multisample Rasterization Enable" start="44" end="44" type="bool"/> + <field name="DX Multisample Rasterization Mode" start="42" end="43" type="uint"> + <value name="MSRASTMODE_ OFF_PIXEL" value="0"/> + <value name="MSRASTMODE_ OFF_PATTERN" value="1"/> + <value name="MSRASTMODE_ ON_PIXEL" value="2"/> + <value name="MSRASTMODE_ ON_PATTERN" value="3"/> + </field> + <field name="Global Depth Offset Enable Solid" start="41" end="41" type="bool"/> + <field name="Global Depth Offset Enable Wireframe" start="40" end="40" type="bool"/> + <field name="Global Depth Offset Enable Point" start="39" end="39" type="bool"/> + <field name="Front Face Fill Mode" start="37" end="38" type="uint" prefix="FILL_MODE"> + <value name="SOLID" value="0"/> + <value name="WIREFRAME" value="1"/> + <value name="POINT" value="2"/> + </field> + <field name="Back Face Fill Mode" start="35" end="36" type="uint" prefix="FILL_MODE"> + <value name="SOLID" value="0"/> + <value name="WIREFRAME" value="1"/> + <value name="POINT" value="2"/> + </field> + <field name="Antialiasing Enable" start="34" end="34" type="bool"/> + <field name="Scissor Rectangle Enable" start="33" end="33" type="bool"/> + <field name="Viewport Z Clip Test Enable" start="32" end="32" type="bool"/> + <field name="Global Depth Offset Constant" start="64" end="95" type="float"/> + <field name="Global Depth Offset Scale" start="96" end="127" type="float"/> + <field name="Global Depth Offset Clamp" start="128" end="159" type="float"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_PALETTE_LOAD0" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="7" type="uint"/> + <group count="0" start="32" size="32"> + <field name="Entry" start="0" end="31" type="PALETTE_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_SAMPLER_PALETTE_LOAD1" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="12"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <group count="0" start="32" size="32"> + <field name="Palette Alpha[0:N-1]" start="24" end="31" type="uint"/> + <field name="Palette Red[0:N-1]" start="16" end="23" type="uint"/> + <field name="Palette Green[0:N-1]" start="8" end="15" type="uint"/> + <field name="Palette Blue[0:N-1]" start="0" end="7" type="uint"/> + </group> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="45"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to DS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="46"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to GS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="44"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to HS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_PS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="47"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to PS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="43"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to VS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLE_MASK" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="24"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Sample Mask" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_SAMPLE_PATTERN" bias="2" length="9"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="28"/> + <field name="DWord Length" start="0" end="7" type="uint" default="7"/> + <group count="4" start="32" size="32"> + </group> + <field name="8x Sample7 X Offset" start="188" end="191" type="u0.4"/> + <field name="8x Sample7 Y Offset" start="184" end="187" type="u0.4"/> + <field name="8x Sample6 X Offset" start="180" end="183" type="u0.4"/> + <field name="8x Sample6 Y Offset" start="176" end="179" type="u0.4"/> + <field name="8x Sample5 X Offset" start="172" end="175" type="u0.4"/> + <field name="8x Sample5 Y Offset" start="168" end="171" type="u0.4"/> + <field name="8x Sample4 X Offset" start="164" end="167" type="u0.4"/> + <field name="8x Sample4 Y Offset" start="160" end="163" type="u0.4"/> + <field name="8x Sample3 X Offset" start="220" end="223" type="u0.4"/> + <field name="8x Sample3 Y Offset" start="216" end="219" type="u0.4"/> + <field name="8x Sample2 X Offset" start="212" end="215" type="u0.4"/> + <field name="8x Sample2 Y Offset" start="208" end="211" type="u0.4"/> + <field name="8x Sample1 X Offset" start="204" end="207" type="u0.4"/> + <field name="8x Sample1 Y Offset" start="200" end="203" type="u0.4"/> + <field name="8x Sample0 X Offset" start="196" end="199" type="u0.4"/> + <field name="8x Sample0 Y Offset" start="192" end="195" type="u0.4"/> + <field name="4x Sample3 X Offset" start="252" end="255" type="u0.4"/> + <field name="4x Sample3 Y Offset" start="248" end="251" type="u0.4"/> + <field name="4x Sample2 X Offset" start="244" end="247" type="u0.4"/> + <field name="4x Sample2 Y Offset" start="240" end="243" type="u0.4"/> + <field name="4x Sample1 X Offset" start="236" end="239" type="u0.4"/> + <field name="4x Sample1 Y Offset" start="232" end="235" type="u0.4"/> + <field name="4x Sample0 X Offset" start="228" end="231" type="u0.4"/> + <field name="4x Sample0 Y Offset" start="224" end="227" type="u0.4"/> + <field name="1x Sample0 X Offset" start="276" end="279" type="u0.4"/> + <field name="1x Sample0 Y Offset" start="272" end="275" type="u0.4"/> + <field name="2x Sample1 X Offset" start="268" end="271" type="u0.4"/> + <field name="2x Sample1 Y Offset" start="264" end="267" type="u0.4"/> + <field name="2x Sample0 X Offset" start="260" end="263" type="u0.4"/> + <field name="2x Sample0 Y Offset" start="256" end="259" type="u0.4"/> + </instruction> + + <instruction name="3DSTATE_SBE" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="31"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Force Vertex URB Entry Read Length" start="61" end="61" type="bool"/> + <field name="Force Vertex URB Entry Read Offset" start="60" end="60" type="bool"/> + <field name="Number of SF Output Attributes" start="54" end="59" type="uint"/> + <field name="Attribute Swizzle Enable" start="53" end="53" type="bool"/> + <field name="Point Sprite Texture Coordinate Origin" start="52" end="52" type="uint"> + <value name="UPPERLEFT" value="0"/> + <value name="LOWERLEFT" value="1"/> + </field> + <field name="Primitive ID Override Component W" start="51" end="51" type="bool"/> + <field name="Primitive ID Override Component Z" start="50" end="50" type="bool"/> + <field name="Primitive ID Override Component Y" start="49" end="49" type="bool"/> + <field name="Primitive ID Override Component X" start="48" end="48" type="bool"/> + <field name="Vertex URB Entry Read Length" start="43" end="47" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="37" end="42" type="uint"/> + <field name="Primitive ID Override Attribute Select" start="32" end="36" type="uint"/> + <field name="Point Sprite Texture Coordinate Enable" start="64" end="95" type="uint"/> + <field name="Constant Interpolation Enable" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="3DSTATE_SBE_SWIZ" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="81"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <group count="16" start="32" size="16"> + <field name="Attribute" start="0" end="15" type="SF_OUTPUT_ATTRIBUTE_DETAIL"/> + </group> + <group count="16" start="288" size="4"> + <field name="Attribute Wrap Shortest Enables" start="0" end="3" type="uint"/> + </group> + </instruction> + + <instruction name="3DSTATE_SCISSOR_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="15"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Scissor Rect Pointer" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SF" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="19"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Legacy Global Depth Bias Enable" start="43" end="43" type="bool"/> + <field name="Statistics Enable" start="42" end="42" type="bool"/> + <field name="Viewport Transform Enable" start="33" end="33" type="bool"/> + <field name="Line Width" start="82" end="91" type="u3.7"/> + <field name="Line End Cap Antialiasing Region Width" start="80" end="81" type="uint"> + <value name="0.5 pixels" value="0"/> + <value name="1.0 pixels" value="1"/> + <value name="2.0 pixels" value="2"/> + <value name="4.0 pixels" value="3"/> + </field> + <field name="Last Pixel Enable" start="127" end="127" type="bool"/> + <field name="Triangle Strip/List Provoking Vertex Select" start="125" end="126" type="uint"/> + <field name="Line Strip/List Provoking Vertex Select" start="123" end="124" type="uint"/> + <field name="Triangle Fan Provoking Vertex Select" start="121" end="122" type="uint"/> + <field name="AA Line Distance Mode" start="110" end="110" type="uint"> + <value name="AALINEDISTANCE_TRUE" value="1"/> + </field> + <field name="Smooth Point Enable" start="109" end="109" type="bool"/> + <field name="Vertex Sub Pixel Precision Select" start="108" end="108" type="uint"/> + <field name="Point Width Source" start="107" end="107" type="uint"> + <value name="Vertex" value="0"/> + <value name="State" value="1"/> + </field> + <field name="Point Width" start="96" end="106" type="u8.3"/> + </instruction> + + <instruction name="3DSTATE_SO_BUFFER" bias="2" length="8"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="24"/> + <field name="DWord Length" start="0" end="7" type="uint" default="6"/> + <field name="SO Buffer Enable" start="63" end="63" type="bool"/> + <field name="SO Buffer Index" start="61" end="62" type="uint"/> + <field name="SO Buffer Object Control State" start="54" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Stream Offset Write Enable" start="53" end="53" type="bool"/> + <field name="Stream Output Buffer Offset Address Enable" start="52" end="52" type="bool"/> + <field name="Surface Base Address" start="66" end="111" type="address"/> + <field name="Surface Size" start="128" end="157" type="uint"/> + <field name="Stream Output Buffer Offset Address" start="162" end="207" type="address"/> + <field name="Stream Offset" start="224" end="255" type="uint"/> + </instruction> + + <instruction name="3DSTATE_SO_DECL_LIST" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="23"/> + <field name="DWord Length" start="0" end="8" type="uint"/> + <field name="Stream to Buffer Selects [3]" start="44" end="47" type="uint"/> + <field name="Stream to Buffer Selects [2]" start="40" end="43" type="uint"/> + <field name="Stream to Buffer Selects [1]" start="36" end="39" type="uint"/> + <field name="Stream to Buffer Selects [0]" start="32" end="35" type="uint"/> + <field name="Num Entries [3]" start="88" end="95" type="uint"/> + <field name="Num Entries [2]" start="80" end="87" type="uint"/> + <field name="Num Entries [1]" start="72" end="79" type="uint"/> + <field name="Num Entries [0]" start="64" end="71" type="uint"/> + <group count="0" start="96" size="64"> + <field name="Entry" start="0" end="63" type="SO_DECL_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_STENCIL_BUFFER" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="6"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Stencil Buffer Enable" start="63" end="63" type="uint"/> + <field name="Stencil Buffer Object Control State" start="54" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface Pitch" start="32" end="48" type="uint"/> + <field name="Surface Base Address" start="64" end="127" type="address"/> + <field name="Surface QPitch" start="128" end="142" type="uint"/> + </instruction> + + <instruction name="3DSTATE_STREAMOUT" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="30"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="SO Function Enable" start="63" end="63" type="uint"/> + <field name="API Rendering Disable" start="62" end="62" type="uint"/> + <field name="Render Stream Select" start="59" end="60" type="uint"/> + <field name="Reorder Mode" start="58" end="58" type="uint"> + <value name="LEADING" value="0"/> + <value name="TRAILING" value="1"/> + </field> + <field name="SO Statistics Enable" start="57" end="57" type="bool"/> + <field name="Force Rendering" start="55" end="56" type="uint"> + <value name="Resreved" value="1"/> + <value name="Force_Off" value="2"/> + <value name="Force_on" value="3"/> + </field> + <field name="Stream 3 Vertex Read Offset" start="93" end="93" type="uint"/> + <field name="Stream 3 Vertex Read Length" start="88" end="92" type="uint"/> + <field name="Stream 2 Vertex Read Offset" start="85" end="85" type="uint"/> + <field name="Stream 2 Vertex Read Length" start="80" end="84" type="uint"/> + <field name="Stream 1 Vertex Read Offset" start="77" end="77" type="uint"/> + <field name="Stream 1 Vertex Read Length" start="72" end="76" type="uint"/> + <field name="Stream 0 Vertex Read Offset" start="69" end="69" type="uint"/> + <field name="Stream 0 Vertex Read Length" start="64" end="68" type="uint"/> + <field name="Buffer 1 Surface Pitch" start="112" end="123" type="uint"/> + <field name="Buffer 0 Surface Pitch" start="96" end="107" type="uint"/> + <field name="Buffer 3 Surface Pitch" start="144" end="155" type="uint"/> + <field name="Buffer 2 Surface Pitch" start="128" end="139" type="uint"/> + </instruction> + + <instruction name="3DSTATE_TE" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="28"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Partitioning" start="44" end="45" type="uint"> + <value name="INTEGER" value="0"/> + <value name="ODD_FRACTIONAL" value="1"/> + <value name="EVEN_FRACTIONAL" value="2"/> + </field> + <field name="Output Topology" start="40" end="41" type="uint" prefix="OUTPUT"> + <value name="POINT" value="0"/> + <value name="LINE" value="1"/> + <value name="TRI_CW" value="2"/> + <value name="TRI_CCW" value="3"/> + </field> + <field name="TE Domain" start="36" end="37" type="uint"> + <value name="QUAD" value="0"/> + <value name="TRI" value="1"/> + <value name="ISOLINE" value="2"/> + </field> + <field name="TE Mode" start="33" end="34" type="uint"> + <value name="HW_TESS" value="0"/> + <value name="SW_TESS" value="1"/> + </field> + <field name="TE Enable" start="32" end="32" type="bool"/> + <field name="Maximum Tessellation Factor Odd" start="64" end="95" type="float"/> + <field name="Maximum Tessellation Factor Not Odd" start="96" end="127" type="float"/> + </instruction> + + <instruction name="3DSTATE_URB_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="50"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="DS URB Starting Address" start="57" end="63" type="uint"/> + <field name="DS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="DS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_URB_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="51"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="GS URB Starting Address" start="57" end="63" type="uint"/> + <field name="GS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="GS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_URB_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="49"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="HS URB Starting Address" start="57" end="63" type="uint"/> + <field name="HS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="HS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_URB_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="48"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="VS URB Starting Address" start="57" end="63" type="uint"/> + <field name="VS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="VS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VERTEX_BUFFERS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="8"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <group count="0" start="32" size="128"> + <field name="Vertex Buffer State" start="0" end="127" type="VERTEX_BUFFER_STATE"/> + </group> + </instruction> + + <instruction name="3DSTATE_VERTEX_ELEMENTS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="9"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <group count="0" start="32" size="64"> + <field name="Element" start="0" end="63" type="VERTEX_ELEMENT_STATE"/> + </group> + </instruction> + + <instruction name="3DSTATE_VF" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="12"/> + <field name="Indexed Draw Cut Index Enable" start="8" end="8" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Cut Index" start="32" end="63" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VF_INSTANCING" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="73"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Instancing Enable" start="40" end="40" type="bool"/> + <field name="Vertex Element Index" start="32" end="37" type="uint"/> + <field name="Instance Data Step Rate" start="64" end="95" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VF_SGVS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="74"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="InstanceID Enable" start="63" end="63" type="bool"/> + <field name="InstanceID Component Number" start="61" end="62" type="uint"> + <value name="COMP_0" value="0"/> + <value name="COMP_1" value="1"/> + <value name="COMP_2" value="2"/> + <value name="COMP_3" value="3"/> + </field> + <field name="InstanceID Element Offset" start="48" end="53" type="uint"/> + <field name="VertexID Enable" start="47" end="47" type="bool"/> + <field name="VertexID Component Number" start="45" end="46" type="uint"> + <value name="COMP_0" value="0"/> + <value name="COMP_1" value="1"/> + <value name="COMP_2" value="2"/> + <value name="COMP_3" value="3"/> + </field> + <field name="VertexID Element Offset" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VF_STATISTICS" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="1"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="11"/> + <field name="Statistics Enable" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="3DSTATE_VF_TOPOLOGY" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="75"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Primitive Topology Type" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VIEWPORT_STATE_POINTERS_CC" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="35"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="CC Viewport Pointer" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="33"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="SF Clip Viewport Pointer" start="38" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_VS" bias="2" length="9"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="16"/> + <field name="DWord Length" start="0" end="7" type="uint" default="7"/> + <field name="Kernel Start Pointer" start="38" end="95" type="offset"/> + <field name="Single Vertex Dispatch" start="127" end="127" type="bool"/> + <field name="Vector Mask Enable" start="126" end="126" type="bool"/> + <field name="Sampler Count" start="123" end="125" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="114" end="121" type="uint"/> + <field name="Thread Dispatch Priority" start="113" end="113" type="uint"> + <value name="High" value="1"/> + </field> + <field name="Floating Point Mode" start="112" end="112" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="109" end="109" type="bool"/> + <field name="Accesses UAV" start="108" end="108" type="bool"/> + <field name="Software Exception Enable" start="103" end="103" type="bool"/> + <field name="Scratch Space Base Pointer" start="138" end="191" type="offset"/> + <field name="Per-Thread Scratch Space " start="128" end="131" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data" start="212" end="216" type="uint"/> + <field name="Vertex URB Entry Read Length" start="203" end="208" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="196" end="201" type="uint"/> + <field name="Maximum Number of Threads" start="247" end="255" type="uint"/> + <field name="Statistics Enable" start="234" end="234" type="bool"/> + <field name="SIMD8 Dispatch Enable" start="226" end="226" type="bool"/> + <field name="Vertex Cache Disable" start="225" end="225" type="bool"/> + <field name="Function Enable" start="224" end="224" type="bool"/> + <field name="Vertex URB Entry Output Read Offset" start="277" end="282" type="uint"/> + <field name="Vertex URB Entry Output Length" start="272" end="276" type="uint"/> + <field name="User Clip Distance Clip Test Enable Bitmask" start="264" end="271" type="uint"/> + <field name="User Clip Distance Cull Test Enable Bitmask" start="256" end="263" type="uint"/> + </instruction> + + <instruction name="3DSTATE_WM" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="20"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Statistics Enable" start="63" end="63" type="bool"/> + <field name="Legacy Depth Buffer Clear Enable" start="62" end="62" type="bool"/> + <field name="Legacy Depth Buffer Resolve Enable" start="60" end="60" type="bool"/> + <field name="Legacy Hierarchical Depth Buffer Resolve Enable" start="59" end="59" type="bool"/> + <field name="Legacy Diamond Line Rasterization" start="58" end="58" type="bool"/> + <field name="Early Depth/Stencil Control" start="53" end="54" type="uint"> + <value name="NORMAL" value="0"/> + <value name="PSEXEC" value="1"/> + <value name="PREPS" value="2"/> + </field> + <field name="Force Thread Dispatch Enable" start="51" end="52" type="uint"> + <value name="ForceOff" value="1"/> + <value name="ForceON" value="2"/> + </field> + <field name="Position ZW Interpolation Mode" start="49" end="50" type="uint"> + <value name="INTERP_PIXEL" value="0"/> + <value name="INTERP_CENTROID" value="2"/> + <value name="INTERP_SAMPLE" value="3"/> + </field> + <field name="Barycentric Interpolation Mode" start="43" end="48" type="uint"/> + <field name="Line End Cap Antialiasing Region Width" start="40" end="41" type="uint"> + <value name="0.5 pixels" value="0"/> + <value name="1.0 pixels" value="1"/> + <value name="2.0 pixels" value="2"/> + <value name="4.0 pixels" value="3"/> + </field> + <field name="Line Antialiasing Region Width" start="38" end="39" type="uint"> + <value name="0.5 pixels" value="0"/> + <value name="1.0 pixels" value="1"/> + <value name="2.0 pixels" value="2"/> + <value name="4.0 pixels" value="3"/> + </field> + <field name="Polygon Stipple Enable" start="36" end="36" type="bool"/> + <field name="Line Stipple Enable" start="35" end="35" type="bool"/> + <field name="Point Rasterization Rule" start="34" end="34" type="uint"> + <value name="RASTRULE_UPPER_LEFT" value="0"/> + <value name="RASTRULE_UPPER_RIGHT" value="1"/> + </field> + <field name="Force Kill Pixel Enable" start="32" end="33" type="uint"> + <value name="ForceOff" value="1"/> + <value name="ForceON" value="2"/> + </field> + </instruction> + + <instruction name="3DSTATE_WM_CHROMAKEY" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="76"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="ChromaKey Kill Enable" start="63" end="63" type="bool"/> + </instruction> + + <instruction name="3DSTATE_WM_DEPTH_STENCIL" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="78"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Stencil Fail Op" start="61" end="63" type="uint"/> + <field name="Stencil Pass Depth Fail Op" start="58" end="60" type="uint"/> + <field name="Stencil Pass Depth Pass Op" start="55" end="57" type="uint"/> + <field name="Backface Stencil Test Function" start="52" end="54" type="uint"/> + <field name="Backface Stencil Fail Op" start="49" end="51" type="uint"/> + <field name="Backface Stencil Pass Depth Fail Op" start="46" end="48" type="uint"/> + <field name="Backface Stencil Pass Depth Pass Op" start="43" end="45" type="uint"/> + <field name="Stencil Test Function" start="40" end="42" type="uint"/> + <field name="Depth Test Function" start="37" end="39" type="uint"/> + <field name="Double Sided Stencil Enable" start="36" end="36" type="bool"/> + <field name="Stencil Test Enable" start="35" end="35" type="bool"/> + <field name="Stencil Buffer Write Enable" start="34" end="34" type="bool"/> + <field name="Depth Test Enable" start="33" end="33" type="bool"/> + <field name="Depth Buffer Write Enable" start="32" end="32" type="bool"/> + <field name="Stencil Test Mask" start="88" end="95" type="uint"/> + <field name="Stencil Write Mask" start="80" end="87" type="uint"/> + <field name="Backface Stencil Test Mask" start="72" end="79" type="uint"/> + <field name="Backface Stencil Write Mask" start="64" end="71" type="uint"/> + </instruction> + + <instruction name="3DSTATE_WM_HZ_OP" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="82"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Stencil Buffer Clear Enable" start="63" end="63" type="bool"/> + <field name="Depth Buffer Clear Enable" start="62" end="62" type="bool"/> + <field name="Scissor Rectangle Enable" start="61" end="61" type="bool"/> + <field name="Depth Buffer Resolve Enable" start="60" end="60" type="bool"/> + <field name="Hierarchical Depth Buffer Resolve Enable" start="59" end="59" type="bool"/> + <field name="Pixel Position Offset Enable" start="58" end="58" type="bool"/> + <field name="Full Surface Depth and Stencil Clear" start="57" end="57" type="bool"/> + <field name="Stencil Clear Value" start="48" end="55" type="uint"/> + <field name="Number of Multisamples" start="45" end="47" type="uint"/> + <field name="Clear Rectangle Y Min" start="80" end="95" type="uint"/> + <field name="Clear Rectangle X Min" start="64" end="79" type="uint"/> + <field name="Clear Rectangle Y Max" start="112" end="127" type="uint"/> + <field name="Clear Rectangle X Max" start="96" end="111" type="uint"/> + <field name="Sample Mask" start="128" end="143" type="uint"/> + </instruction> + + <instruction name="GPGPU_CSR_BASE_ADDRESS" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="GPGPU CSR Base Address" start="44" end="95" type="address"/> + </instruction> + + <instruction name="GPGPU_WALKER" bias="2" length="15"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="5"/> + <field name="Indirect Parameter Enable" start="10" end="10" type="bool"/> + <field name="Predicate Enable" start="8" end="8" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="13"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="102" end="127" type="offset"/> + <field name="SIMD Size" start="158" end="159" type="uint"> + <value name="SIMD8" value="0"/> + <value name="SIMD16" value="1"/> + <value name="SIMD32" value="2"/> + </field> + <field name="Thread Depth Counter Maximum" start="144" end="149" type="uint"/> + <field name="Thread Height Counter Maximum" start="136" end="141" type="uint"/> + <field name="Thread Width Counter Maximum" start="128" end="133" type="uint"/> + <field name="Thread Group ID Starting X" start="160" end="191" type="uint"/> + <field name="Thread Group ID X Dimension" start="224" end="255" type="uint"/> + <field name="Thread Group ID Starting Y" start="256" end="287" type="uint"/> + <field name="Thread Group ID Y Dimension" start="320" end="351" type="uint"/> + <field name="Thread Group ID Starting/Resume Z" start="352" end="383" type="uint"/> + <field name="Thread Group ID Z Dimension" start="384" end="415" type="uint"/> + <field name="Right Execution Mask" start="416" end="447" type="uint"/> + <field name="Bottom Execution Mask" start="448" end="479" type="uint"/> + </instruction> + + <instruction name="MEDIA_CURBE_LOAD" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="1"/> + <field name="DWord Length" start="0" end="15" type="uint" default="2"/> + <field name="CURBE Total Data Length" start="64" end="80" type="uint"/> + <field name="CURBE Data Start Address" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="MEDIA_INTERFACE_DESCRIPTOR_LOAD" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="15" type="uint" default="2"/> + <field name="Interface Descriptor Total Length" start="64" end="80" type="uint"/> + <field name="Interface Descriptor Data Start Address" start="96" end="127" type="offset"/> + </instruction> + + <instruction name="MEDIA_OBJECT" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Media Command Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="Media Command Sub-Opcode" start="16" end="23" type="uint" default="0"/> + <field name="DWord Length" start="0" end="15" type="uint" default="4"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="Children Present" start="95" end="95" type="bool"/> + <field name="Thread Synchronization" start="88" end="88" type="uint"> + <value name="No thread synchronization" value="0"/> + <value name="Thread dispatch is synchronized by the 'spawn root thread' message" value="1"/> + </field> + <field name="Force Destination" start="86" end="86" type="uint"/> + <field name="Use Scoreboard" start="85" end="85" type="uint"> + <value name="Not using scoreboard" value="0"/> + <value name="Using scoreboard" value="1"/> + </field> + <field name="Slice Destination Select" start="83" end="84" type="uint"> + <value name="Slice 0" value="0"/> + <value name="Slice 1" value="1"/> + <value name="Slice 2" value="2"/> + </field> + <field name="SubSlice Destination Select" start="81" end="82" type="uint"> + <value name="SubSlice 2" value="2"/> + <value name="SubSlice 1" value="1"/> + <value name="SubSlice 0" value="0"/> + </field> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="96" end="127" type="address"/> + <field name="Scoredboard Y" start="144" end="152" type="uint"/> + <field name="Scoreboard X" start="128" end="136" type="uint"/> + <field name="Scoreboard Color" start="176" end="179" type="uint"/> + <field name="Scoreboard Mask" start="160" end="167" type="uint"/> + <group count="0" start="192" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_OBJECT_GRPID" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Media Command Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="Media Command Sub-Opcode" start="16" end="23" type="uint" default="6"/> + <field name="DWord Length" start="0" end="15" type="uint" default="5"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="End of Thread Group" start="87" end="87" type="uint"/> + <field name="Force Destination" start="86" end="86" type="uint"/> + <field name="Use Scoreboard" start="85" end="85" type="uint"> + <value name="Not using scoreboard" value="0"/> + <value name="Using scoreboard" value="1"/> + </field> + <field name="Slice Destination Select" start="83" end="84" type="uint"> + <value name="Slice 0" value="0"/> + <value name="Slice 1" value="1"/> + <value name="Slice 2" value="2"/> + </field> + <field name="SubSlice Destination Select" start="81" end="82" type="uint"> + <value name="SubSlice 2" value="2"/> + <value name="SubSlice 1" value="1"/> + <value name="SubSlice 0" value="0"/> + </field> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="96" end="127" type="address"/> + <field name="Scoreboard Y" start="144" end="152" type="uint"/> + <field name="Scoreboard X" start="128" end="136" type="uint"/> + <field name="Scoreboard Color" start="176" end="179" type="uint"/> + <field name="Scoreboard Mask" start="160" end="167" type="uint"/> + <field name="GroupID" start="192" end="223" type="uint"/> + <group count="0" start="224" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_OBJECT_PRT" bias="2" length="16"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="15" type="uint" default="14"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="Children Present" start="95" end="95" type="bool"/> + <field name="PRT_Fence Needed" start="87" end="87" type="bool"/> + <field name="PRT_FenceType" start="86" end="86" type="uint"> + <value name="Root thread queue" value="0"/> + <value name="VFE state flush" value="1"/> + </field> + <group count="12" start="128" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_OBJECT_WALKER" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="3"/> + <field name="DWord Length" start="0" end="15" type="uint" default="15"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="Children Present" start="95" end="95" type="uint"/> + <field name="Thread Synchronization" start="88" end="88" type="uint"> + <value name="No thread synchronization" value="0"/> + <value name="Thread dispatch is synchronized by the 'spawn root thread' message" value="1"/> + </field> + <field name="Use Scoreboard" start="85" end="85" type="uint"> + <value name="Not using scoreboard" value="0"/> + <value name="Using scoreboard" value="1"/> + </field> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="96" end="127" type="offset"/> + <field name="Group ID Loop Select" start="168" end="191" type="uint"/> + <field name="Scoreboard Mask" start="160" end="167" type="uint"/> + <field name="Color Count Minus One" start="216" end="219" type="uint"/> + <field name="Middle Loop Extra Steps" start="208" end="212" type="uint"/> + <field name="Local Mid-Loop Unit Y" start="204" end="205" type="int"/> + <field name="Mid-Loop Unit X" start="200" end="201" type="int"/> + <field name="Global Loop Exec Count" start="240" end="249" type="uint"/> + <field name="Local Loop Exec Count" start="224" end="233" type="uint"/> + <field name="Block Resolution Y" start="272" end="280" type="uint"/> + <field name="Block Resolution X" start="256" end="264" type="uint"/> + <field name="Local Start Y" start="304" end="312" type="uint"/> + <field name="Local Start X" start="288" end="296" type="uint"/> + <field name="Local Outer Loop Stride Y" start="368" end="377" type="int"/> + <field name="Local Outer Loop Stride X" start="352" end="361" type="int"/> + <field name="Local Inner Loop Unit Y" start="400" end="409" type="int"/> + <field name="Local Inner Loop Unit X" start="384" end="393" type="int"/> + <field name="Global Resolution Y" start="432" end="440" type="uint"/> + <field name="Global Resolution X" start="416" end="424" type="uint"/> + <field name="Global Start Y" start="464" end="473" type="int"/> + <field name="Global Start X" start="448" end="457" type="int"/> + <field name="Global Outer Loop Stride Y" start="496" end="505" type="int"/> + <field name="Global Outer Loop Stride X" start="480" end="489" type="int"/> + <field name="Global Inner Loop Unit Y" start="528" end="537" type="int"/> + <field name="Global Inner Loop Unit X" start="512" end="521" type="int"/> + <group count="0" start="544" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_STATE_FLUSH" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="15" type="uint" default="0"/> + <field name="Flush to GO" start="39" end="39" type="bool"/> + <field name="Watermark Required" start="38" end="38" type="uint"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="MEDIA_VFE_STATE" bias="2" length="9"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="0"/> + <field name="DWord Length" start="0" end="15" type="uint" default="7"/> + <field name="Scratch Space Base Pointer" start="42" end="63" type="offset"/> + <field name="Stack Size" start="36" end="39" type="uint"/> + <field name="Per Thread Scratch Space" start="32" end="35" type="uint"/> + <field name="Scratch Space Base Pointer High" start="64" end="79" type="offset"/> + <field name="Maximum Number of Threads" start="112" end="127" type="uint"/> + <field name="Number of URB Entries" start="104" end="111" type="uint"/> + <field name="Reset Gateway Timer" start="103" end="103" type="uint"> + <value name="Maintaining the existing timestamp state" value="0"/> + <value name="Resetting relative timer and latching the global timestamp" value="1"/> + </field> + <field name="Bypass Gateway Control" start="102" end="102" type="uint"> + <value name="Maintaining OpenGateway/ForwardMsg/CloseGateway protocol (legacy mode)" value="0"/> + <value name="Bypassing OpenGateway/CloseGateway protocol" value="1"/> + </field> + <field name="Slice Disable" start="128" end="129" type="uint"> + <value name="All Subslices Enabled" value="0"/> + <value name="Only Slice 0 Enabled" value="1"/> + <value name="Only Slice 0 Subslice 0 Enabled" value="3"/> + </field> + <field name="URB Entry Allocation Size" start="176" end="191" type="uint"/> + <field name="CURBE Allocation Size" start="160" end="175" type="uint"/> + <field name="Scoreboard Enable" start="223" end="223" type="bool"/> + <field name="Scoreboard Type" start="222" end="222" type="uint"> + <value name="Stalling Scoreboard" value="0"/> + <value name="Non-Stalling Scoreboard" value="1"/> + </field> + <field name="Scoreboard Mask" start="192" end="199" type="uint"/> + <field name="Scoreboard 3 Delta Y" start="252" end="255" type="int"/> + <field name="Scoreboard 3 Delta X" start="248" end="251" type="int"/> + <field name="Scoreboard 2 Delta Y" start="244" end="247" type="int"/> + <field name="Scoreboard 2 Delta X" start="240" end="243" type="int"/> + <field name="Scoreboard 1 Delta Y" start="236" end="239" type="int"/> + <field name="Scoreboard 1 Delta X" start="232" end="235" type="int"/> + <field name="Scoreboard 0 Delta Y" start="228" end="231" type="int"/> + <field name="Scoreboard 0 Delta X" start="224" end="227" type="int"/> + <field name="Scoreboard 7 Delta Y" start="284" end="287" type="int"/> + <field name="Scoreboard 7 Delta X" start="280" end="283" type="int"/> + <field name="Scoreboard 6 Delta Y" start="276" end="279" type="int"/> + <field name="Scoreboard 6 Delta X" start="272" end="275" type="int"/> + <field name="Scoreboard 5 Delta Y" start="268" end="271" type="int"/> + <field name="Scoreboard 5 Delta X" start="264" end="267" type="int"/> + <field name="Scoreboard 4 Delta Y" start="260" end="263" type="int"/> + <field name="Scoreboard 4 Delta X" start="256" end="259" type="int"/> + </instruction> + + <instruction name="MI_ARB_CHECK" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="5"/> + </instruction> + + <instruction name="MI_ATOMIC" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="47"/> + <field name="Memory Type" start="22" end="22" type="uint"> + <value name="Per Process Graphics Address" value="0"/> + <value name="Global Graphics Address" value="1"/> + </field> + <field name="Post-Sync Operation" start="21" end="21" type="bool"/> + <field name="Data Size" start="19" end="20" type="uint"> + <value name="DWORD" value="0"/> + <value name="QWORD" value="1"/> + <value name="OCTWORD" value="2"/> + <value name="RESERVED" value="3"/> + </field> + <field name="Inline Data" start="18" end="18" type="uint"/> + <field name="CS STALL" start="17" end="17" type="uint"/> + <field name="Return Data Control" start="16" end="16" type="uint"/> + <field name="ATOMIC OPCODE" start="8" end="15" type="uint"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Memory Address" start="34" end="79" type="address"/> + <field name="Operand1 Data Dword 0" start="96" end="127" type="uint"/> + <field name="Operand2 Data Dword 0" start="128" end="159" type="uint"/> + <field name="Operand1 Data Dword 1" start="160" end="191" type="uint"/> + <field name="Operand2 Data Dword 1" start="192" end="223" type="uint"/> + <field name="Operand1 Data Dword 2" start="224" end="255" type="uint"/> + <field name="Operand2 Data Dword 2" start="256" end="287" type="uint"/> + <field name="Operand1 Data Dword 3" start="288" end="319" type="uint"/> + <field name="Operand2 Data Dword 3" start="320" end="351" type="uint"/> + </instruction> + + <instruction name="MI_BATCH_BUFFER_END" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="10"/> + </instruction> + + <instruction name="MI_BATCH_BUFFER_START" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="49"/> + <field name="2nd Level Batch Buffer" start="22" end="22" type="uint"> + <value name="1st level batch" value="0"/> + <value name="2nd level batch" value="1"/> + </field> + <field name="Add Offset Enable" start="16" end="16" type="bool"/> + <field name="Predication Enable" start="15" end="15" type="uint"/> + <field name="Resource Streamer Enable" start="10" end="10" type="bool"/> + <field name="Address Space Indicator" start="8" end="8" type="uint" prefix="ASI"> + <value name="GGTT" value="0"/> + <value name="PPGTT" value="1"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Batch Buffer Start Address" start="34" end="79" type="address"/> + </instruction> + + <instruction name="MI_CLFLUSH" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="39"/> + <field name="Use Global GTT" start="22" end="22" type="uint"> + <value name="Per Process Graphics Address" value="0"/> + <value name="Global Graphics Address" value="1"/> + </field> + <field name="DWord Length" start="0" end="9" type="uint" default="1"/> + <field name="Page Base Address" start="44" end="79" type="address"/> + <field name="Starting Cacheline Offset" start="38" end="43" type="uint"/> + <group count="0" start="96" size="32"> + <field name="DW Representing a Half Cache Line" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MI_CONDITIONAL_BATCH_BUFFER_END" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="54"/> + <field name="Use Global GTT" start="22" end="22" type="uint" default="0"/> + <field name="Compare Semaphore" start="21" end="21" type="uint" default="0"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Compare Data Dword" start="32" end="63" type="uint"/> + <field name="Compare Address" start="67" end="111" type="address"/> + </instruction> + + <instruction name="MI_COPY_MEM_MEM" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="46"/> + <field name="Use Global GTT Source" start="22" end="22" type="uint"> + <value name="Per Process Graphics Address" value="0"/> + <value name="Global Graphics Address" value="1"/> + </field> + <field name="Use Global GTT Destination" start="21" end="21" type="uint"> + <value name="Per Process Graphics Address" value="0"/> + <value name="Global Graphics Address" value="1"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Destination Memory Address" start="34" end="95" type="address"/> + <field name="Source Memory Address" start="98" end="159" type="address"/> + </instruction> + + <instruction name="MI_LOAD_REGISTER_IMM" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="34"/> + <field name="Byte Write Disables" start="8" end="11" type="uint"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Register Offset" start="34" end="54" type="offset"/> + <field name="Data DWord" start="64" end="95" type="uint"/> + </instruction> + + <instruction name="MI_LOAD_REGISTER_MEM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="41"/> + <field name="Use Global GTT" start="22" end="22" type="uint"/> + <field name="Async Mode Enable" start="21" end="21" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Register Address" start="34" end="54" type="offset"/> + <field name="Memory Address" start="66" end="127" type="address"/> + </instruction> + + <instruction name="MI_LOAD_REGISTER_REG" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="42"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Source Register Address" start="34" end="54" type="offset"/> + <field name="Destination Register Address" start="66" end="86" type="offset"/> + </instruction> + + <instruction name="MI_LOAD_SCAN_LINES_EXCL" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="19"/> + <field name="Display (Plane) Select" start="19" end="21" type="uint"> + <value name="Display Plane A" value="0"/> + <value name="Display Plane B" value="1"/> + <value name="Display Plane C" value="4"/> + </field> + <field name="DWord Length" start="0" end="5" type="uint" default="0"/> + <field name="Start Scan Line Number" start="48" end="60" type="uint"/> + <field name="End Scan Line Number" start="32" end="44" type="uint"/> + </instruction> + + <instruction name="MI_LOAD_SCAN_LINES_INCL" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="18"/> + <field name="Display (Plane) Select" start="19" end="21" type="uint"> + <value name="Display Plane A" value="0"/> + <value name="Display Plane B" value="1"/> + <value name="Display Plane C" value="4"/> + </field> + <field name="Scan Line Event Done Forward" start="17" end="18" type="bool"/> + <field name="DWord Length" start="0" end="5" type="uint" default="0"/> + <field name="Start Scan Line Number" start="48" end="60" type="uint"/> + <field name="End Scan Line Number" start="32" end="44" type="uint"/> + </instruction> + + <instruction name="MI_LOAD_URB_MEM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="44"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="URB Address" start="34" end="46" type="uint"/> + <field name="Memory Address" start="70" end="127" type="address"/> + </instruction> + + <instruction name="MI_MATH" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="26"/> + <field name="DWord Length" start="0" end="5" type="uint" default="0"/> + <field name="ALU INSTRUCTION 1" start="32" end="63" type="uint"/> + <field name="ALU INSTRUCTION 2" start="64" end="95" type="uint"/> + <group count="0" start="96" size="32"> + <field name="ALU INSTRUCTION n" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MI_NOOP" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="0"/> + <field name="Identification Number Register Write Enable" start="22" end="22" type="bool"/> + <field name="Identification Number" start="0" end="21" type="uint"/> + </instruction> + + <instruction name="MI_PREDICATE" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="12"/> + <field name="Load Operation" start="6" end="7" type="uint" prefix="LOAD"> + <value name="KEEP" value="0"/> + <value name="LOAD" value="2"/> + <value name="LOADINV" value="3"/> + </field> + <field name="Combine Operation" start="3" end="4" type="uint" prefix="COMBINE"> + <value name="SET" value="0"/> + <value name="AND" value="1"/> + <value name="OR" value="2"/> + <value name="XOR" value="3"/> + </field> + <field name="Compare Operation" start="0" end="1" type="uint" prefix="COMPARE"> + <value name="SRCS_EQUAL" value="2"/> + <value name="DELTAS_EQUAL" value="3"/> + </field> + </instruction> + + <instruction name="MI_REPORT_HEAD" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="7"/> + </instruction> + + <instruction name="MI_REPORT_PERF_COUNT" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="40"/> + <field name="DWord Length" start="0" end="5" type="uint" default="2"/> + <field name="Memory Address" start="38" end="95" type="address"/> + <field name="Core Mode Enable" start="36" end="36" type="uint"/> + <field name="Use Global GTT" start="32" end="32" type="uint"/> + <field name="Report ID" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="MI_RS_CONTEXT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="15"/> + <field name="Resource Streamer Save" start="0" end="0" type="uint" prefix="RS"> + <value name="Restore" value="0"/> + <value name="Save" value="1"/> + </field> + </instruction> + + <instruction name="MI_RS_CONTROL" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="6"/> + <field name="Resource Streamer Control" start="0" end="0" type="uint" prefix="RS"> + <value name="Stop" value="0"/> + <value name="Start" value="1"/> + </field> + </instruction> + + <instruction name="MI_RS_STORE_DATA_IMM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="43"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Destination Address" start="34" end="95" type="address"/> + <field name="Core Mode Enable" start="32" end="32" type="uint"/> + <field name="Data DWord 0" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="MI_SEMAPHORE_SIGNAL" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="27"/> + <field name="Post-Sync Operation" start="21" end="21" type="bool"/> + <field name="Target Engine Select" start="15" end="17" type="uint"> + <value name="RCS" value="0"/> + <value name="VCS0" value="1"/> + <value name="BCS" value="2"/> + <value name="VECS" value="3"/> + <value name="VCS1" value="4"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Target Context ID" start="32" end="63" type="uint"/> + </instruction> + + <instruction name="MI_SEMAPHORE_WAIT" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="28"/> + <field name="Memory Type" start="22" end="22" type="uint"> + <value name="Per Process Graphics Address" value="0"/> + <value name="Global Graphics Address" value="1"/> + </field> + <field name="Wait Mode" start="15" end="15" type="uint"> + <value name="Polling Mode" value="1"/> + <value name="Signal Mode" value="0"/> + </field> + <field name="Compare Operation" start="12" end="14" type="uint" prefix="COMPARE"> + <value name="SAD_GREATER_THAN_SDD" value="0"/> + <value name="SAD_GREATER_THAN_OR_EQUAL_SDD" value="1"/> + <value name="SAD_LESS_THAN_SDD" value="2"/> + <value name="SAD_LESS_THAN_OR_EQUAL_SDD" value="3"/> + <value name="SAD_EQUAL_SDD" value="4"/> + <value name="SAD_NOT_EQUAL_SDD" value="5"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Semaphore Data Dword" start="32" end="63" type="uint"/> + <field name="Semaphore Address" start="66" end="95" type="address"/> + <field name="Semaphore Address High" start="96" end="111" type="address"/> + </instruction> + + <instruction name="MI_SET_CONTEXT" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="24"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Logical Context Address" start="44" end="63" type="address"/> + <field name="Reserved, Must be 1" start="40" end="40" type="uint"/> + <field name="Core Mode Enable" start="36" end="36" type="bool"/> + <field name="Resource Streamer State Save Enable" start="35" end="35" type="bool"/> + <field name="Resource Streamer State Restore Enable" start="34" end="34" type="bool"/> + <field name="Force Restore" start="33" end="33" type="uint"/> + <field name="Restore Inhibit" start="32" end="32" type="uint"/> + </instruction> + + <instruction name="MI_SET_PREDICATE" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="1"/> + <field name="PREDICATE ENABLE" start="0" end="3" type="uint"> + <value name="NOOP Never" value="0"/> + <value name="NOOP on Result2 clear" value="1"/> + <value name="NOOP on Result2 set" value="2"/> + <value name="NOOP on Result clear" value="3"/> + <value name="NOOP on Result set" value="4"/> + <value name="Execute when one slice enabled." value="5"/> + <value name="Execute when two slices are enabled." value="6"/> + <value name="Execute when three slices are enabled." value="7"/> + <value name="NOOP Always" value="15"/> + </field> + </instruction> + + <instruction name="MI_STORE_DATA_IMM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="32"/> + <field name="Use Global GTT" start="22" end="22" type="uint"/> + <field name="Store Qword" start="21" end="21" type="uint"/> + <field name="DWord Length" start="0" end="9" type="uint" default="2"/> + <field name="Address" start="34" end="79" type="address"/> + <field name="Core Mode Enable" start="32" end="32" type="uint"/> + <field name="Data DWord 0" start="96" end="127" type="uint"/> + <field name="Data DWord 1" start="128" end="159" type="uint"/> + </instruction> + + <instruction name="MI_STORE_DATA_INDEX" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="33"/> + <field name="Use Per-Process Hardware Status Page" start="21" end="21" type="uint"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Offset" start="34" end="43" type="uint"/> + <field name="Data DWord 0" start="64" end="95" type="uint"/> + <field name="Data DWord 1" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="MI_STORE_REGISTER_MEM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="36"/> + <field name="Use Global GTT" start="22" end="22" type="uint"/> + <field name="Predicate Enable" start="21" end="21" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Register Address" start="34" end="54" type="offset"/> + <field name="Memory Address" start="66" end="127" type="address"/> + </instruction> + + <instruction name="MI_STORE_URB_MEM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="45"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="URB Address" start="34" end="46" type="uint"/> + <field name="Memory Address" start="70" end="127" type="address"/> + </instruction> + + <instruction name="MI_SUSPEND_FLUSH" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="11"/> + <field name="Suspend Flush" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="MI_TOPOLOGY_FILTER" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="13"/> + <field name="Topology Filter Value" start="0" end="5" type="uint"/> + </instruction> + + <instruction name="MI_URB_ATOMIC_ALLOC" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="9"/> + <field name="URB Atomic Storage Offset" start="12" end="19" type="uint"/> + <field name="URB Atomic Storage Size" start="0" end="8" type="uint"/> + </instruction> + + <instruction name="MI_URB_CLEAR" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="25"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="URB Clear Length" start="48" end="61" type="uint"/> + <field name="URB Address" start="32" end="46" type="offset"/> + </instruction> + + <instruction name="MI_USER_INTERRUPT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="2"/> + </instruction> + + <instruction name="MI_WAIT_FOR_EVENT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="3"/> + <field name="Display Pipe C Vertical Blank Wait Enable" start="21" end="21" type="bool"/> + <field name="Display Sprite C Flip Pending Wait Enable" start="20" end="20" type="bool"/> + <field name="Display Plane C Flip Pending Wait Enable" start="15" end="15" type="bool"/> + <field name="Display Pipe C Scan Line Wait Enable" start="14" end="14" type="bool"/> + <field name="Display Pipe B Vertical Blank Wait Enable" start="11" end="11" type="bool"/> + <field name="Display Sprite B Flip Pending Wait Enable" start="10" end="10" type="bool"/> + <field name="Display Plane B Flip Pending Wait Enable" start="9" end="9" type="bool"/> + <field name="Display Pipe B Scan Line Wait Enable" start="8" end="8" type="bool"/> + <field name="Display Pipe A Vertical Blank Wait Enable" start="3" end="3" type="bool"/> + <field name="Display Sprite A Flip Pending Wait Enable" start="2" end="2" type="bool"/> + <field name="Display Plane A Flip Pending Wait Enable" start="1" end="1" type="bool"/> + <field name="Display Pipe A Scan Line Wait Enable" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="PIPELINE_SELECT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="1"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="Pipeline Selection" start="0" end="1" type="uint"> + <value name="3D" value="0"/> + <value name="Media" value="1"/> + <value name="GPGPU" value="2"/> + </field> + </instruction> + + <instruction name="PIPE_CONTROL" bias="2" length="6"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="2"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="0"/> + <field name="DWord Length" start="0" end="7" type="uint" default="4"/> + <field name="Destination Address Type" start="56" end="56" type="uint" prefix="DAT"> + <value name="PPGTT" value="0"/> + <value name="GGTT" value="1"/> + </field> + <field name="LRI Post Sync Operation" start="55" end="55" type="uint"> + <value name="No LRI Operation" value="0"/> + <value name="MMIO Write Immediate Data" value="1"/> + </field> + <field name="Store Data Index" start="53" end="53" type="uint"/> + <field name="Command Streamer Stall Enable" start="52" end="52" type="uint"/> + <field name="Global Snapshot Count Reset" start="51" end="51" type="uint"> + <value name="Don't Reset" value="0"/> + <value name="Reset" value="1"/> + </field> + <field name="TLB Invalidate" start="50" end="50" type="uint"/> + <field name="Generic Media State Clear" start="48" end="48" type="bool"/> + <field name="Post Sync Operation" start="46" end="47" type="uint"> + <value name="No Write" value="0"/> + <value name="Write Immediate Data" value="1"/> + <value name="Write PS Depth Count" value="2"/> + <value name="Write Timestamp" value="3"/> + </field> + <field name="Depth Stall Enable" start="45" end="45" type="bool"/> + <field name="Render Target Cache Flush Enable" start="44" end="44" type="bool"/> + <field name="Instruction Cache Invalidate Enable" start="43" end="43" type="bool"/> + <field name="Texture Cache Invalidation Enable" start="42" end="42" type="bool"/> + <field name="Indirect State Pointers Disable" start="41" end="41" type="bool"/> + <field name="Notify Enable" start="40" end="40" type="bool"/> + <field name="Pipe Control Flush Enable" start="39" end="39" type="bool"/> + <field name="DC Flush Enable" start="37" end="37" type="bool"/> + <field name="VF Cache Invalidation Enable" start="36" end="36" type="bool"/> + <field name="Constant Cache Invalidation Enable" start="35" end="35" type="bool"/> + <field name="State Cache Invalidation Enable" start="34" end="34" type="bool"/> + <field name="Stall At Pixel Scoreboard" start="33" end="33" type="bool"/> + <field name="Depth Cache Flush Enable" start="32" end="32" type="bool"/> + <field name="Address" start="66" end="111" type="address"/> + <field name="Immediate Data" start="128" end="191" type="uint"/> + </instruction> + + <instruction name="STATE_BASE_ADDRESS" bias="2" length="16"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="1"/> + <field name="DWord Length" start="0" end="7" type="uint" default="14"/> + <field name="General State Base Address" start="44" end="95" type="address"/> + <field name="General State Memory Object Control State" start="36" end="42" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="General State Base Address Modify Enable" start="32" end="32" type="bool"/> + <field name="Stateless Data Port Access Memory Object Control State" start="112" end="118" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface State Base Address" start="140" end="191" type="address"/> + <field name="Surface State Memory Object Control State" start="132" end="138" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface State Base Address Modify Enable" start="128" end="128" type="bool"/> + <field name="Dynamic State Base Address" start="204" end="255" type="address"/> + <field name="Dynamic State Memory Object Control State" start="196" end="202" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Dynamic State Base Address Modify Enable" start="192" end="192" type="bool"/> + <field name="Indirect Object Base Address" start="268" end="319" type="address"/> + <field name="Indirect Object Memory Object Control State" start="260" end="266" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Indirect Object Base Address Modify Enable" start="256" end="256" type="bool"/> + <field name="Instruction Base Address" start="332" end="383" type="address"/> + <field name="Instruction Memory Object Control State" start="324" end="330" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Instruction Base Address Modify Enable" start="320" end="320" type="bool"/> + <field name="General State Buffer Size" start="396" end="415" type="uint"/> + <field name="General State Buffer Size Modify Enable" start="384" end="384" type="bool"/> + <field name="Dynamic State Buffer Size" start="428" end="447" type="uint"/> + <field name="Dynamic State Buffer Size Modify Enable" start="416" end="416" type="bool"/> + <field name="Indirect Object Buffer Size" start="460" end="479" type="uint"/> + <field name="Indirect Object Buffer Size Modify Enable" start="448" end="448" type="bool"/> + <field name="Instruction Buffer Size" start="492" end="511" type="uint"/> + <field name="Instruction Buffer size Modify Enable" start="480" end="480" type="bool"/> + </instruction> + + <instruction name="STATE_PREFETCH" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="3"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Prefetch Pointer" start="38" end="63" type="address"/> + <field name="Prefetch Count" start="32" end="34" type="uint"/> + </instruction> + + <instruction name="STATE_SIP" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="System Instruction Pointer" start="36" end="95" type="offset"/> + </instruction> + + <instruction name="SWTESS_BASE_ADDRESS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="3"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="SW Tessellation Base Address" start="44" end="79" type="address"/> + <field name="SW Tessellation Memory Object Control State" start="40" end="43" type="MEMORY_OBJECT_CONTROL_STATE"/> + </instruction> + +</genxml> diff --git a/src/vulkan/gen8_cmd_buffer.c b/src/vulkan/gen8_cmd_buffer.c index b81944c2156..82f7eb1f48f 100644 --- a/src/vulkan/gen8_cmd_buffer.c +++ b/src/vulkan/gen8_cmd_buffer.c @@ -903,9 +903,9 @@ void genX(CmdWriteTimestamp)( emit_query_availability(&cmd_buffer->batch, &pool->bo, query + 16); } -#define alu_opcode(v) __gen_field((v), 20, 31) -#define alu_operand1(v) __gen_field((v), 10, 19) -#define alu_operand2(v) __gen_field((v), 0, 9) +#define alu_opcode(v) __gen_uint((v), 20, 31) +#define alu_operand1(v) __gen_uint((v), 10, 19) +#define alu_operand2(v) __gen_uint((v), 0, 9) #define alu(opcode, operand1, operand2) \ alu_opcode(opcode) | alu_operand1(operand1) | alu_operand2(operand2) @@ -1083,7 +1083,7 @@ void genX(CmdWaitEvents)( anv_batch_emit(&cmd_buffer->batch, GENX(MI_SEMAPHORE_WAIT), .WaitMode = PollingMode, - .CompareOperation = SAD_EQUAL_SDD, + .CompareOperation = COMPARE_SAD_EQUAL_SDD, .SemaphoreDataDword = VK_EVENT_SET, .SemaphoreAddress = { &cmd_buffer->device->dynamic_state_block_pool.bo, diff --git a/src/vulkan/gen8_pack.h b/src/vulkan/gen8_pack.h deleted file mode 100644 index 3c014b96147..00000000000 --- a/src/vulkan/gen8_pack.h +++ /dev/null @@ -1,9209 +0,0 @@ -/* - * Copyright © 2015 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - - -/* Instructions, enums and structures for BDW. - * - * This file has been generated, do not hand edit. - */ - -#pragma once - -#include <stdio.h> -#include <assert.h> - -#ifndef __gen_validate_value -#define __gen_validate_value(x) -#endif - -#ifndef __gen_field_functions -#define __gen_field_functions - -union __gen_value { - float f; - uint32_t dw; -}; - -static inline uint64_t -__gen_mbo(uint32_t start, uint32_t end) -{ - return (~0ull >> (64 - (end - start + 1))) << start; -} - -static inline uint64_t -__gen_field(uint64_t v, uint32_t start, uint32_t end) -{ - __gen_validate_value(v); -#if DEBUG - if (end - start + 1 < 64) - assert(v < 1ull << (end - start + 1)); -#endif - - return v << start; -} - -static inline uint64_t -__gen_fixed(float v, uint32_t start, uint32_t end, - bool is_signed, uint32_t fract_bits) -{ - __gen_validate_value(v); - - const float factor = (1 << fract_bits); - - float max, min; - if (is_signed) { - max = ((1 << (end - start)) - 1) / factor; - min = -(1 << (end - start)) / factor; - } else { - max = ((1 << (end - start + 1)) - 1) / factor; - min = 0.0f; - } - - if (v > max) - v = max; - else if (v < min) - v = min; - - int32_t int_val = roundf(v * factor); - - if (is_signed) - int_val &= (1 << (end - start + 1)) - 1; - - return int_val << start; -} - -static inline uint64_t -__gen_offset(uint64_t v, uint32_t start, uint32_t end) -{ - __gen_validate_value(v); -#if DEBUG - uint64_t mask = (~0ull >> (64 - (end - start + 1))) << start; - - assert((v & ~mask) == 0); -#endif - - return v; -} - -static inline uint32_t -__gen_float(float v) -{ - __gen_validate_value(v); - return ((union __gen_value) { .f = (v) }).dw; -} - -#ifndef __gen_address_type -#error #define __gen_address_type before including this file -#endif - -#ifndef __gen_user_data -#error #define __gen_combine_address before including this file -#endif - -#endif - -#define GEN8_3DSTATE_URB_VS_length_bias 0x00000002 -#define GEN8_3DSTATE_URB_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 48, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_URB_VS_length 0x00000002 - -struct GEN8_3DSTATE_URB_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t VSURBStartingAddress; - uint32_t VSURBEntryAllocationSize; - uint32_t VSNumberofURBEntries; -}; - -static inline void -GEN8_3DSTATE_URB_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_URB_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->VSURBStartingAddress, 25, 31) | - __gen_field(values->VSURBEntryAllocationSize, 16, 24) | - __gen_field(values->VSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN8_3DSTATE_VS_length_bias 0x00000002 -#define GEN8_3DSTATE_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 16, \ - .DwordLength = 7 - -#define GEN8_3DSTATE_VS_length 0x00000009 - -struct GEN8_3DSTATE_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint64_t KernelStartPointer; -#define Multiple 0 -#define Single 1 - uint32_t SingleVertexDispatch; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define Normal 0 -#define High 1 - uint32_t ThreadDispatchPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool AccessesUAV; - bool SoftwareExceptionEnable; - uint64_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t DispatchGRFStartRegisterForURBData; - uint32_t VertexURBEntryReadLength; - uint32_t VertexURBEntryReadOffset; - uint32_t MaximumNumberofThreads; - bool StatisticsEnable; - bool SIMD8DispatchEnable; - bool VertexCacheDisable; - bool FunctionEnable; - uint32_t VertexURBEntryOutputReadOffset; - uint32_t VertexURBEntryOutputLength; - uint32_t UserClipDistanceClipTestEnableBitmask; - uint32_t UserClipDistanceCullTestEnableBitmask; -}; - -static inline void -GEN8_3DSTATE_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint64_t qw1 = - __gen_offset(values->KernelStartPointer, 6, 63) | - 0; - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->SingleVertexDispatch, 31, 31) | - __gen_field(values->VectorMaskEnable, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadDispatchPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->AccessesUAV, 12, 12) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - uint64_t qw4 = - __gen_offset(values->ScratchSpaceBasePointer, 10, 63) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = qw4; - dw[5] = qw4 >> 32; - - dw[6] = - __gen_field(values->DispatchGRFStartRegisterForURBData, 20, 24) | - __gen_field(values->VertexURBEntryReadLength, 11, 16) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - 0; - - dw[7] = - __gen_field(values->MaximumNumberofThreads, 23, 31) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->SIMD8DispatchEnable, 2, 2) | - __gen_field(values->VertexCacheDisable, 1, 1) | - __gen_field(values->FunctionEnable, 0, 0) | - 0; - - dw[8] = - __gen_field(values->VertexURBEntryOutputReadOffset, 21, 26) | - __gen_field(values->VertexURBEntryOutputLength, 16, 20) | - __gen_field(values->UserClipDistanceClipTestEnableBitmask, 8, 15) | - __gen_field(values->UserClipDistanceCullTestEnableBitmask, 0, 7) | - 0; - -} - -#define GEN8_GPGPU_CSR_BASE_ADDRESS_length_bias 0x00000002 -#define GEN8_GPGPU_CSR_BASE_ADDRESS_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 4, \ - .DwordLength = 1 - -#define GEN8_GPGPU_CSR_BASE_ADDRESS_length 0x00000003 - -struct GEN8_GPGPU_CSR_BASE_ADDRESS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type GPGPUCSRBaseAddress; -}; - -static inline void -GEN8_GPGPU_CSR_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_GPGPU_CSR_BASE_ADDRESS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->GPGPUCSRBaseAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - -} - -#define GEN8_MI_ATOMIC_length_bias 0x00000002 -#define GEN8_MI_ATOMIC_header \ - .CommandType = 0, \ - .MICommandOpcode = 47 - -#define GEN8_MI_ATOMIC_length 0x00000003 - -struct GEN8_MI_ATOMIC { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t MemoryType; - uint32_t PostSyncOperation; -#define DWORD 0 -#define QWORD 1 -#define OCTWORD 2 -#define RESERVED 3 - uint32_t DataSize; - uint32_t InlineData; - uint32_t CSSTALL; - uint32_t ReturnDataControl; - uint32_t ATOMICOPCODE; - uint32_t DwordLength; - __gen_address_type MemoryAddress; - uint32_t Operand1DataDword0; - uint32_t Operand2DataDword0; - uint32_t Operand1DataDword1; - uint32_t Operand2DataDword1; - uint32_t Operand1DataDword2; - uint32_t Operand2DataDword2; - uint32_t Operand1DataDword3; - uint32_t Operand2DataDword3; -}; - -static inline void -GEN8_MI_ATOMIC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_ATOMIC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->MemoryType, 22, 22) | - __gen_field(values->PostSyncOperation, 21, 21) | - __gen_field(values->DataSize, 19, 20) | - __gen_field(values->InlineData, 18, 18) | - __gen_field(values->CSSTALL, 17, 17) | - __gen_field(values->ReturnDataControl, 16, 16) | - __gen_field(values->ATOMICOPCODE, 8, 15) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->MemoryAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->Operand1DataDword0, 0, 31) | - 0; - - dw[4] = - __gen_field(values->Operand2DataDword0, 0, 31) | - 0; - - dw[5] = - __gen_field(values->Operand1DataDword1, 0, 31) | - 0; - - dw[6] = - __gen_field(values->Operand2DataDword1, 0, 31) | - 0; - - dw[7] = - __gen_field(values->Operand1DataDword2, 0, 31) | - 0; - - dw[8] = - __gen_field(values->Operand2DataDword2, 0, 31) | - 0; - - dw[9] = - __gen_field(values->Operand1DataDword3, 0, 31) | - 0; - - dw[10] = - __gen_field(values->Operand2DataDword3, 0, 31) | - 0; - -} - -#define GEN8_MI_LOAD_REGISTER_REG_length_bias 0x00000002 -#define GEN8_MI_LOAD_REGISTER_REG_header \ - .CommandType = 0, \ - .MICommandOpcode = 42, \ - .DwordLength = 1 - -#define GEN8_MI_LOAD_REGISTER_REG_length 0x00000003 - -struct GEN8_MI_LOAD_REGISTER_REG { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t SourceRegisterAddress; - uint32_t DestinationRegisterAddress; -}; - -static inline void -GEN8_MI_LOAD_REGISTER_REG_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_LOAD_REGISTER_REG * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->SourceRegisterAddress, 2, 22) | - 0; - - dw[2] = - __gen_offset(values->DestinationRegisterAddress, 2, 22) | - 0; - -} - -#define GEN8_MI_SEMAPHORE_SIGNAL_length_bias 0x00000002 -#define GEN8_MI_SEMAPHORE_SIGNAL_header \ - .CommandType = 0, \ - .MICommandOpcode = 27, \ - .DwordLength = 0 - -#define GEN8_MI_SEMAPHORE_SIGNAL_length 0x00000002 - -struct GEN8_MI_SEMAPHORE_SIGNAL { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t PostSyncOperation; -#define RCS 0 -#define VCS0 1 -#define BCS 2 -#define VECS 3 -#define VCS1 4 - uint32_t TargetEngineSelect; - uint32_t DwordLength; - uint32_t TargetContextID; -}; - -static inline void -GEN8_MI_SEMAPHORE_SIGNAL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_SEMAPHORE_SIGNAL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->PostSyncOperation, 21, 21) | - __gen_field(values->TargetEngineSelect, 15, 17) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->TargetContextID, 0, 31) | - 0; - -} - -#define GEN8_MI_SEMAPHORE_WAIT_length_bias 0x00000002 -#define GEN8_MI_SEMAPHORE_WAIT_header \ - .CommandType = 0, \ - .MICommandOpcode = 28, \ - .DwordLength = 2 - -#define GEN8_MI_SEMAPHORE_WAIT_length 0x00000004 - -struct GEN8_MI_SEMAPHORE_WAIT { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t MemoryType; -#define PollingMode 1 -#define SignalMode 0 - uint32_t WaitMode; -#define SAD_GREATER_THAN_SDD 0 -#define SAD_GREATER_THAN_OR_EQUAL_SDD 1 -#define SAD_LESS_THAN_SDD 2 -#define SAD_LESS_THAN_OR_EQUAL_SDD 3 -#define SAD_EQUAL_SDD 4 -#define SAD_NOT_EQUAL_SDD 5 - uint32_t CompareOperation; - uint32_t DwordLength; - uint32_t SemaphoreDataDword; - __gen_address_type SemaphoreAddress; -}; - -static inline void -GEN8_MI_SEMAPHORE_WAIT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_SEMAPHORE_WAIT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->MemoryType, 22, 22) | - __gen_field(values->WaitMode, 15, 15) | - __gen_field(values->CompareOperation, 12, 14) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SemaphoreDataDword, 0, 31) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->SemaphoreAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - -} - -#define GEN8_MI_STORE_REGISTER_MEM_length_bias 0x00000002 -#define GEN8_MI_STORE_REGISTER_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 36, \ - .DwordLength = 2 - -#define GEN8_MI_STORE_REGISTER_MEM_length 0x00000004 - -struct GEN8_MI_STORE_REGISTER_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool UseGlobalGTT; - uint32_t PredicateEnable; - uint32_t DwordLength; - uint32_t RegisterAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN8_MI_STORE_REGISTER_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_STORE_REGISTER_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->PredicateEnable, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->RegisterAddress, 2, 22) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - -} - -#define GEN8_PIPELINE_SELECT_length_bias 0x00000001 -#define GEN8_PIPELINE_SELECT_header \ - .CommandType = 3, \ - .CommandSubType = 1, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 4 - -#define GEN8_PIPELINE_SELECT_length 0x00000001 - -struct GEN8_PIPELINE_SELECT { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; -#define _3D 0 -#define Media 1 -#define GPGPU 2 - uint32_t PipelineSelection; -}; - -static inline void -GEN8_PIPELINE_SELECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_PIPELINE_SELECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->PipelineSelection, 0, 1) | - 0; - -} - -#define GEN8_STATE_BASE_ADDRESS_length_bias 0x00000002 -#define GEN8_STATE_BASE_ADDRESS_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 1, \ - .DwordLength = 14 - -#define GEN8_STATE_BASE_ADDRESS_length 0x00000010 - -#define GEN8_MEMORY_OBJECT_CONTROL_STATE_length 0x00000001 - -struct GEN8_MEMORY_OBJECT_CONTROL_STATE { -#define UCwithFenceifcoherentcycle 0 -#define UCUncacheable 1 -#define WT 2 -#define WB 3 - uint32_t MemoryTypeLLCeLLCCacheabilityControl; -#define eLLCOnlywheneDRAMispresentelsegetsallocatedinLLC 0 -#define LLCOnly 1 -#define LLCeLLCAllowed 2 -#define L3DefertoPATforLLCeLLCselection 3 - uint32_t TargetCache; - uint32_t AgeforQUADLRU; -}; - -static inline void -GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MEMORY_OBJECT_CONTROL_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->MemoryTypeLLCeLLCCacheabilityControl, 5, 6) | - __gen_field(values->TargetCache, 3, 4) | - __gen_field(values->AgeforQUADLRU, 0, 1) | - 0; - -} - -struct GEN8_STATE_BASE_ADDRESS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type GeneralStateBaseAddress; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE GeneralStateMemoryObjectControlState; - bool GeneralStateBaseAddressModifyEnable; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE StatelessDataPortAccessMemoryObjectControlState; - __gen_address_type SurfaceStateBaseAddress; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE SurfaceStateMemoryObjectControlState; - bool SurfaceStateBaseAddressModifyEnable; - __gen_address_type DynamicStateBaseAddress; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE DynamicStateMemoryObjectControlState; - bool DynamicStateBaseAddressModifyEnable; - __gen_address_type IndirectObjectBaseAddress; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE IndirectObjectMemoryObjectControlState; - bool IndirectObjectBaseAddressModifyEnable; - __gen_address_type InstructionBaseAddress; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE InstructionMemoryObjectControlState; - bool InstructionBaseAddressModifyEnable; - uint32_t GeneralStateBufferSize; - bool GeneralStateBufferSizeModifyEnable; - uint32_t DynamicStateBufferSize; - bool DynamicStateBufferSizeModifyEnable; - uint32_t IndirectObjectBufferSize; - bool IndirectObjectBufferSizeModifyEnable; - uint32_t InstructionBufferSize; - bool InstructionBuffersizeModifyEnable; -}; - -static inline void -GEN8_STATE_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_STATE_BASE_ADDRESS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_GeneralStateMemoryObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_GeneralStateMemoryObjectControlState, &values->GeneralStateMemoryObjectControlState); - uint32_t dw1 = - __gen_field(dw_GeneralStateMemoryObjectControlState, 4, 10) | - __gen_field(values->GeneralStateBaseAddressModifyEnable, 0, 0) | - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->GeneralStateBaseAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - uint32_t dw_StatelessDataPortAccessMemoryObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StatelessDataPortAccessMemoryObjectControlState, &values->StatelessDataPortAccessMemoryObjectControlState); - dw[3] = - __gen_field(dw_StatelessDataPortAccessMemoryObjectControlState, 16, 22) | - 0; - - uint32_t dw_SurfaceStateMemoryObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceStateMemoryObjectControlState, &values->SurfaceStateMemoryObjectControlState); - uint32_t dw4 = - __gen_field(dw_SurfaceStateMemoryObjectControlState, 4, 10) | - __gen_field(values->SurfaceStateBaseAddressModifyEnable, 0, 0) | - 0; - - uint64_t qw4 = - __gen_combine_address(data, &dw[4], values->SurfaceStateBaseAddress, dw4); - - dw[4] = qw4; - dw[5] = qw4 >> 32; - - uint32_t dw_DynamicStateMemoryObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DynamicStateMemoryObjectControlState, &values->DynamicStateMemoryObjectControlState); - uint32_t dw6 = - __gen_field(dw_DynamicStateMemoryObjectControlState, 4, 10) | - __gen_field(values->DynamicStateBaseAddressModifyEnable, 0, 0) | - 0; - - uint64_t qw6 = - __gen_combine_address(data, &dw[6], values->DynamicStateBaseAddress, dw6); - - dw[6] = qw6; - dw[7] = qw6 >> 32; - - uint32_t dw_IndirectObjectMemoryObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_IndirectObjectMemoryObjectControlState, &values->IndirectObjectMemoryObjectControlState); - uint32_t dw8 = - __gen_field(dw_IndirectObjectMemoryObjectControlState, 4, 10) | - __gen_field(values->IndirectObjectBaseAddressModifyEnable, 0, 0) | - 0; - - uint64_t qw8 = - __gen_combine_address(data, &dw[8], values->IndirectObjectBaseAddress, dw8); - - dw[8] = qw8; - dw[9] = qw8 >> 32; - - uint32_t dw_InstructionMemoryObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_InstructionMemoryObjectControlState, &values->InstructionMemoryObjectControlState); - uint32_t dw10 = - __gen_field(dw_InstructionMemoryObjectControlState, 4, 10) | - __gen_field(values->InstructionBaseAddressModifyEnable, 0, 0) | - 0; - - uint64_t qw10 = - __gen_combine_address(data, &dw[10], values->InstructionBaseAddress, dw10); - - dw[10] = qw10; - dw[11] = qw10 >> 32; - - dw[12] = - __gen_field(values->GeneralStateBufferSize, 12, 31) | - __gen_field(values->GeneralStateBufferSizeModifyEnable, 0, 0) | - 0; - - dw[13] = - __gen_field(values->DynamicStateBufferSize, 12, 31) | - __gen_field(values->DynamicStateBufferSizeModifyEnable, 0, 0) | - 0; - - dw[14] = - __gen_field(values->IndirectObjectBufferSize, 12, 31) | - __gen_field(values->IndirectObjectBufferSizeModifyEnable, 0, 0) | - 0; - - dw[15] = - __gen_field(values->InstructionBufferSize, 12, 31) | - __gen_field(values->InstructionBuffersizeModifyEnable, 0, 0) | - 0; - -} - -#define GEN8_STATE_PREFETCH_length_bias 0x00000002 -#define GEN8_STATE_PREFETCH_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 3, \ - .DwordLength = 0 - -#define GEN8_STATE_PREFETCH_length 0x00000002 - -struct GEN8_STATE_PREFETCH { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type PrefetchPointer; - uint32_t PrefetchCount; -}; - -static inline void -GEN8_STATE_PREFETCH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_STATE_PREFETCH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - __gen_field(values->PrefetchCount, 0, 2) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->PrefetchPointer, dw1); - -} - -#define GEN8_STATE_SIP_length_bias 0x00000002 -#define GEN8_STATE_SIP_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 2, \ - .DwordLength = 1 - -#define GEN8_STATE_SIP_length 0x00000003 - -struct GEN8_STATE_SIP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint64_t SystemInstructionPointer; -}; - -static inline void -GEN8_STATE_SIP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_STATE_SIP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint64_t qw1 = - __gen_offset(values->SystemInstructionPointer, 4, 63) | - 0; - - dw[1] = qw1; - dw[2] = qw1 >> 32; - -} - -#define GEN8_SWTESS_BASE_ADDRESS_length_bias 0x00000002 -#define GEN8_SWTESS_BASE_ADDRESS_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 3, \ - .DwordLength = 0 - -#define GEN8_SWTESS_BASE_ADDRESS_length 0x00000002 - -struct GEN8_SWTESS_BASE_ADDRESS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type SWTessellationBaseAddress; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE SWTessellationMemoryObjectControlState; -}; - -static inline void -GEN8_SWTESS_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_SWTESS_BASE_ADDRESS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_SWTessellationMemoryObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SWTessellationMemoryObjectControlState, &values->SWTessellationMemoryObjectControlState); - uint32_t dw1 = - __gen_field(dw_SWTessellationMemoryObjectControlState, 8, 11) | - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->SWTessellationBaseAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - -} - -#define GEN8_3DPRIMITIVE_length_bias 0x00000002 -#define GEN8_3DPRIMITIVE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 3, \ - ._3DCommandSubOpcode = 0, \ - .DwordLength = 5 - -#define GEN8_3DPRIMITIVE_length 0x00000007 - -struct GEN8_3DPRIMITIVE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - bool IndirectParameterEnable; - uint32_t UAVCoherencyRequired; - bool PredicateEnable; - uint32_t DwordLength; - bool EndOffsetEnable; -#define SEQUENTIAL 0 -#define RANDOM 1 - uint32_t VertexAccessType; - uint32_t PrimitiveTopologyType; - uint32_t VertexCountPerInstance; - uint32_t StartVertexLocation; - uint32_t InstanceCount; - uint32_t StartInstanceLocation; - uint32_t BaseVertexLocation; -}; - -static inline void -GEN8_3DPRIMITIVE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DPRIMITIVE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->IndirectParameterEnable, 10, 10) | - __gen_field(values->UAVCoherencyRequired, 9, 9) | - __gen_field(values->PredicateEnable, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->EndOffsetEnable, 9, 9) | - __gen_field(values->VertexAccessType, 8, 8) | - __gen_field(values->PrimitiveTopologyType, 0, 5) | - 0; - - dw[2] = - __gen_field(values->VertexCountPerInstance, 0, 31) | - 0; - - dw[3] = - __gen_field(values->StartVertexLocation, 0, 31) | - 0; - - dw[4] = - __gen_field(values->InstanceCount, 0, 31) | - 0; - - dw[5] = - __gen_field(values->StartInstanceLocation, 0, 31) | - 0; - - dw[6] = - __gen_field(values->BaseVertexLocation, 0, 31) | - 0; - -} - -#define GEN8_3DSTATE_AA_LINE_PARAMETERS_length_bias 0x00000002 -#define GEN8_3DSTATE_AA_LINE_PARAMETERS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 10, \ - .DwordLength = 1 - -#define GEN8_3DSTATE_AA_LINE_PARAMETERS_length 0x00000003 - -struct GEN8_3DSTATE_AA_LINE_PARAMETERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - float AAPointCoverageBias; - float AACoverageBias; - float AAPointCoverageSlope; - float AACoverageSlope; - float AAPointCoverageEndCapBias; - float AACoverageEndCapBias; - float AAPointCoverageEndCapSlope; - float AACoverageEndCapSlope; -}; - -static inline void -GEN8_3DSTATE_AA_LINE_PARAMETERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_AA_LINE_PARAMETERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->AAPointCoverageBias * (1 << 8), 24, 31) | - __gen_field(values->AACoverageBias * (1 << 8), 16, 23) | - __gen_field(values->AAPointCoverageSlope * (1 << 8), 8, 15) | - __gen_field(values->AACoverageSlope * (1 << 8), 0, 7) | - 0; - - dw[2] = - __gen_field(values->AAPointCoverageEndCapBias * (1 << 8), 24, 31) | - __gen_field(values->AACoverageEndCapBias * (1 << 8), 16, 23) | - __gen_field(values->AAPointCoverageEndCapSlope * (1 << 8), 8, 15) | - __gen_field(values->AACoverageEndCapSlope * (1 << 8), 0, 7) | - 0; - -} - -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_DS_length_bias 0x00000002 -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 70 - -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_DS_length 0x00000000 - -#define GEN8_BINDING_TABLE_EDIT_ENTRY_length 0x00000001 - -struct GEN8_BINDING_TABLE_EDIT_ENTRY { - uint32_t BindingTableIndex; - uint32_t SurfaceStatePointer; -}; - -static inline void -GEN8_BINDING_TABLE_EDIT_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_BINDING_TABLE_EDIT_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->BindingTableIndex, 16, 23) | - __gen_offset(values->SurfaceStatePointer, 0, 15) | - 0; - -} - -struct GEN8_3DSTATE_BINDING_TABLE_EDIT_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_BINDING_TABLE_EDIT_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_GS_length_bias 0x00000002 -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 68 - -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_GS_length 0x00000000 - -struct GEN8_3DSTATE_BINDING_TABLE_EDIT_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_BINDING_TABLE_EDIT_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_HS_length_bias 0x00000002 -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 69 - -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_HS_length 0x00000000 - -struct GEN8_3DSTATE_BINDING_TABLE_EDIT_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_BINDING_TABLE_EDIT_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_PS_length_bias 0x00000002 -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 71 - -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_PS_length 0x00000000 - -struct GEN8_3DSTATE_BINDING_TABLE_EDIT_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_BINDING_TABLE_EDIT_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_VS_length_bias 0x00000002 -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 67 - -#define GEN8_3DSTATE_BINDING_TABLE_EDIT_VS_length 0x00000000 - -struct GEN8_3DSTATE_BINDING_TABLE_EDIT_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_BINDING_TABLE_EDIT_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_BINDING_TABLE_EDIT_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS_length_bias 0x00000002 -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 40, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS_length 0x00000002 - -struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoDSBindingTable; -}; - -static inline void -GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoDSBindingTable, 5, 15) | - 0; - -} - -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS_length_bias 0x00000002 -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 41, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS_length 0x00000002 - -struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoGSBindingTable; -}; - -static inline void -GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoGSBindingTable, 5, 15) | - 0; - -} - -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS_length_bias 0x00000002 -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 39, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS_length 0x00000002 - -struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoHSBindingTable; -}; - -static inline void -GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoHSBindingTable, 5, 15) | - 0; - -} - -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS_length_bias 0x00000002 -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 42, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS_length 0x00000002 - -struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoPSBindingTable; -}; - -static inline void -GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoPSBindingTable, 5, 15) | - 0; - -} - -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS_length_bias 0x00000002 -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 38, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS_length 0x00000002 - -struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoVSBindingTable; -}; - -static inline void -GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_BINDING_TABLE_POINTERS_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoVSBindingTable, 5, 15) | - 0; - -} - -#define GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC_length_bias 0x00000002 -#define GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 25, \ - .DwordLength = 2 - -#define GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC_length 0x00000004 - -struct GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type BindingTablePoolBaseAddress; - uint32_t BindingTablePoolEnable; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE SurfaceObjectControlState; -#define NoValidData 0 - uint32_t BindingTablePoolBufferSize; -}; - -static inline void -GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_BINDING_TABLE_POOL_ALLOC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_SurfaceObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceObjectControlState, &values->SurfaceObjectControlState); - uint32_t dw1 = - __gen_field(values->BindingTablePoolEnable, 11, 11) | - __gen_field(dw_SurfaceObjectControlState, 0, 6) | - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->BindingTablePoolBaseAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->BindingTablePoolBufferSize, 12, 31) | - 0; - -} - -#define GEN8_3DSTATE_BLEND_STATE_POINTERS_length_bias 0x00000002 -#define GEN8_3DSTATE_BLEND_STATE_POINTERS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 36, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_BLEND_STATE_POINTERS_length 0x00000002 - -struct GEN8_3DSTATE_BLEND_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BlendStatePointer; - bool BlendStatePointerValid; -}; - -static inline void -GEN8_3DSTATE_BLEND_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_BLEND_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->BlendStatePointer, 6, 31) | - __gen_field(values->BlendStatePointerValid, 0, 0) | - 0; - -} - -#define GEN8_3DSTATE_CC_STATE_POINTERS_length_bias 0x00000002 -#define GEN8_3DSTATE_CC_STATE_POINTERS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 14, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_CC_STATE_POINTERS_length 0x00000002 - -struct GEN8_3DSTATE_CC_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ColorCalcStatePointer; - bool ColorCalcStatePointerValid; -}; - -static inline void -GEN8_3DSTATE_CC_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_CC_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->ColorCalcStatePointer, 6, 31) | - __gen_field(values->ColorCalcStatePointerValid, 0, 0) | - 0; - -} - -#define GEN8_3DSTATE_CHROMA_KEY_length_bias 0x00000002 -#define GEN8_3DSTATE_CHROMA_KEY_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 4, \ - .DwordLength = 2 - -#define GEN8_3DSTATE_CHROMA_KEY_length 0x00000004 - -struct GEN8_3DSTATE_CHROMA_KEY { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ChromaKeyTableIndex; - uint32_t ChromaKeyLowValue; - uint32_t ChromaKeyHighValue; -}; - -static inline void -GEN8_3DSTATE_CHROMA_KEY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_CHROMA_KEY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ChromaKeyTableIndex, 30, 31) | - 0; - - dw[2] = - __gen_field(values->ChromaKeyLowValue, 0, 31) | - 0; - - dw[3] = - __gen_field(values->ChromaKeyHighValue, 0, 31) | - 0; - -} - -#define GEN8_3DSTATE_CLEAR_PARAMS_length_bias 0x00000002 -#define GEN8_3DSTATE_CLEAR_PARAMS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 4, \ - .DwordLength = 1 - -#define GEN8_3DSTATE_CLEAR_PARAMS_length 0x00000003 - -struct GEN8_3DSTATE_CLEAR_PARAMS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - float DepthClearValue; - bool DepthClearValueValid; -}; - -static inline void -GEN8_3DSTATE_CLEAR_PARAMS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_CLEAR_PARAMS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_float(values->DepthClearValue) | - 0; - - dw[2] = - __gen_field(values->DepthClearValueValid, 0, 0) | - 0; - -} - -#define GEN8_3DSTATE_CLIP_length_bias 0x00000002 -#define GEN8_3DSTATE_CLIP_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 18, \ - .DwordLength = 2 - -#define GEN8_3DSTATE_CLIP_length 0x00000004 - -struct GEN8_3DSTATE_CLIP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define Normal 0 -#define Force 1 - bool ForceUserClipDistanceCullTestEnableBitmask; -#define _8Bit 0 -#define _4Bit 1 - uint32_t VertexSubPixelPrecisionSelect; - bool EarlyCullEnable; -#define Normal 0 -#define Force 1 - bool ForceUserClipDistanceClipTestEnableBitmask; -#define Normal 0 -#define Force 1 - bool ForceClipMode; - bool ClipperStatisticsEnable; - uint32_t UserClipDistanceCullTestEnableBitmask; - bool ClipEnable; -#define API_OGL 0 - uint32_t APIMode; - bool ViewportXYClipTestEnable; - bool GuardbandClipTestEnable; - uint32_t UserClipDistanceClipTestEnableBitmask; -#define NORMAL 0 -#define REJECT_ALL 3 -#define ACCEPT_ALL 4 - uint32_t ClipMode; - bool PerspectiveDivideDisable; - bool NonPerspectiveBarycentricEnable; - uint32_t TriangleStripListProvokingVertexSelect; - uint32_t LineStripListProvokingVertexSelect; - uint32_t TriangleFanProvokingVertexSelect; - float MinimumPointWidth; - float MaximumPointWidth; - bool ForceZeroRTAIndexEnable; - uint32_t MaximumVPIndex; -}; - -static inline void -GEN8_3DSTATE_CLIP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_CLIP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ForceUserClipDistanceCullTestEnableBitmask, 20, 20) | - __gen_field(values->VertexSubPixelPrecisionSelect, 19, 19) | - __gen_field(values->EarlyCullEnable, 18, 18) | - __gen_field(values->ForceUserClipDistanceClipTestEnableBitmask, 17, 17) | - __gen_field(values->ForceClipMode, 16, 16) | - __gen_field(values->ClipperStatisticsEnable, 10, 10) | - __gen_field(values->UserClipDistanceCullTestEnableBitmask, 0, 7) | - 0; - - dw[2] = - __gen_field(values->ClipEnable, 31, 31) | - __gen_field(values->APIMode, 30, 30) | - __gen_field(values->ViewportXYClipTestEnable, 28, 28) | - __gen_field(values->GuardbandClipTestEnable, 26, 26) | - __gen_field(values->UserClipDistanceClipTestEnableBitmask, 16, 23) | - __gen_field(values->ClipMode, 13, 15) | - __gen_field(values->PerspectiveDivideDisable, 9, 9) | - __gen_field(values->NonPerspectiveBarycentricEnable, 8, 8) | - __gen_field(values->TriangleStripListProvokingVertexSelect, 4, 5) | - __gen_field(values->LineStripListProvokingVertexSelect, 2, 3) | - __gen_field(values->TriangleFanProvokingVertexSelect, 0, 1) | - 0; - - dw[3] = - __gen_field(values->MinimumPointWidth * (1 << 3), 17, 27) | - __gen_field(values->MaximumPointWidth * (1 << 3), 6, 16) | - __gen_field(values->ForceZeroRTAIndexEnable, 5, 5) | - __gen_field(values->MaximumVPIndex, 0, 3) | - 0; - -} - -#define GEN8_3DSTATE_CONSTANT_DS_length_bias 0x00000002 -#define GEN8_3DSTATE_CONSTANT_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 26, \ - .DwordLength = 9 - -#define GEN8_3DSTATE_CONSTANT_DS_length 0x0000000b - -#define GEN8_3DSTATE_CONSTANT_BODY_length 0x0000000a - -struct GEN8_3DSTATE_CONSTANT_BODY { - uint32_t ConstantBuffer1ReadLength; - uint32_t ConstantBuffer0ReadLength; - uint32_t ConstantBuffer3ReadLength; - uint32_t ConstantBuffer2ReadLength; - __gen_address_type PointerToConstantBuffer0; - __gen_address_type PointerToConstantBuffer1; - __gen_address_type PointerToConstantBuffer2; - __gen_address_type PointerToConstantBuffer3; -}; - -static inline void -GEN8_3DSTATE_CONSTANT_BODY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_CONSTANT_BODY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->ConstantBuffer1ReadLength, 16, 31) | - __gen_field(values->ConstantBuffer0ReadLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->ConstantBuffer3ReadLength, 16, 31) | - __gen_field(values->ConstantBuffer2ReadLength, 0, 15) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->PointerToConstantBuffer0, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - uint32_t dw4 = - 0; - - uint64_t qw4 = - __gen_combine_address(data, &dw[4], values->PointerToConstantBuffer1, dw4); - - dw[4] = qw4; - dw[5] = qw4 >> 32; - - uint32_t dw6 = - 0; - - uint64_t qw6 = - __gen_combine_address(data, &dw[6], values->PointerToConstantBuffer2, dw6); - - dw[6] = qw6; - dw[7] = qw6 >> 32; - - uint32_t dw8 = - 0; - - uint64_t qw8 = - __gen_combine_address(data, &dw[8], values->PointerToConstantBuffer3, dw8); - - dw[8] = qw8; - dw[9] = qw8 >> 32; - -} - -struct GEN8_3DSTATE_CONSTANT_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState; - uint32_t DwordLength; - struct GEN8_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN8_3DSTATE_CONSTANT_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_CONSTANT_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_ConstantBufferObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState); - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(dw_ConstantBufferObjectControlState, 8, 14) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN8_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN8_3DSTATE_CONSTANT_GS_length_bias 0x00000002 -#define GEN8_3DSTATE_CONSTANT_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 22, \ - .DwordLength = 9 - -#define GEN8_3DSTATE_CONSTANT_GS_length 0x0000000b - -struct GEN8_3DSTATE_CONSTANT_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState; - uint32_t DwordLength; - struct GEN8_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN8_3DSTATE_CONSTANT_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_CONSTANT_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_ConstantBufferObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState); - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(dw_ConstantBufferObjectControlState, 8, 14) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN8_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN8_3DSTATE_CONSTANT_HS_length_bias 0x00000002 -#define GEN8_3DSTATE_CONSTANT_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 25, \ - .DwordLength = 9 - -#define GEN8_3DSTATE_CONSTANT_HS_length 0x0000000b - -struct GEN8_3DSTATE_CONSTANT_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState; - uint32_t DwordLength; - struct GEN8_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN8_3DSTATE_CONSTANT_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_CONSTANT_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_ConstantBufferObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState); - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(dw_ConstantBufferObjectControlState, 8, 14) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN8_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN8_3DSTATE_CONSTANT_PS_length_bias 0x00000002 -#define GEN8_3DSTATE_CONSTANT_PS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 23, \ - .DwordLength = 9 - -#define GEN8_3DSTATE_CONSTANT_PS_length 0x0000000b - -struct GEN8_3DSTATE_CONSTANT_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState; - uint32_t DwordLength; - struct GEN8_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN8_3DSTATE_CONSTANT_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_CONSTANT_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_ConstantBufferObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState); - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(dw_ConstantBufferObjectControlState, 8, 14) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN8_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN8_3DSTATE_CONSTANT_VS_length_bias 0x00000002 -#define GEN8_3DSTATE_CONSTANT_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 21, \ - .DwordLength = 9 - -#define GEN8_3DSTATE_CONSTANT_VS_length 0x0000000b - -struct GEN8_3DSTATE_CONSTANT_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState; - uint32_t DwordLength; - struct GEN8_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN8_3DSTATE_CONSTANT_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_CONSTANT_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_ConstantBufferObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState); - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(dw_ConstantBufferObjectControlState, 8, 14) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN8_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN8_3DSTATE_DEPTH_BUFFER_length_bias 0x00000002 -#define GEN8_3DSTATE_DEPTH_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 5, \ - .DwordLength = 6 - -#define GEN8_3DSTATE_DEPTH_BUFFER_length 0x00000008 - -struct GEN8_3DSTATE_DEPTH_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define SURFTYPE_1D 0 -#define SURFTYPE_2D 1 -#define SURFTYPE_3D 2 -#define SURFTYPE_CUBE 3 -#define SURFTYPE_NULL 7 - uint32_t SurfaceType; - bool DepthWriteEnable; - bool StencilWriteEnable; - bool HierarchicalDepthBufferEnable; -#define D32_FLOAT 1 -#define D24_UNORM_X8_UINT 3 -#define D16_UNORM 5 - uint32_t SurfaceFormat; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; - uint32_t Height; - uint32_t Width; - uint32_t LOD; - uint32_t Depth; - uint32_t MinimumArrayElement; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE DepthBufferObjectControlState; - uint32_t RenderTargetViewExtent; - uint32_t SurfaceQPitch; -}; - -static inline void -GEN8_3DSTATE_DEPTH_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_DEPTH_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SurfaceType, 29, 31) | - __gen_field(values->DepthWriteEnable, 28, 28) | - __gen_field(values->StencilWriteEnable, 27, 27) | - __gen_field(values->HierarchicalDepthBufferEnable, 22, 22) | - __gen_field(values->SurfaceFormat, 18, 20) | - __gen_field(values->SurfacePitch, 0, 17) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - dw[4] = - __gen_field(values->Height, 18, 31) | - __gen_field(values->Width, 4, 17) | - __gen_field(values->LOD, 0, 3) | - 0; - - uint32_t dw_DepthBufferObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DepthBufferObjectControlState, &values->DepthBufferObjectControlState); - dw[5] = - __gen_field(values->Depth, 21, 31) | - __gen_field(values->MinimumArrayElement, 10, 20) | - __gen_field(dw_DepthBufferObjectControlState, 0, 6) | - 0; - - dw[6] = - 0; - - dw[7] = - __gen_field(values->RenderTargetViewExtent, 21, 31) | - __gen_field(values->SurfaceQPitch, 0, 14) | - 0; - -} - -#define GEN8_3DSTATE_DRAWING_RECTANGLE_length_bias 0x00000002 -#define GEN8_3DSTATE_DRAWING_RECTANGLE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 0, \ - .DwordLength = 2 - -#define GEN8_3DSTATE_DRAWING_RECTANGLE_length 0x00000004 - -struct GEN8_3DSTATE_DRAWING_RECTANGLE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; -#define Legacy 0 -#define Core0Enabled 1 -#define Core1Enabled 2 - uint32_t CoreModeSelect; - uint32_t DwordLength; - uint32_t ClippedDrawingRectangleYMin; - uint32_t ClippedDrawingRectangleXMin; - uint32_t ClippedDrawingRectangleYMax; - uint32_t ClippedDrawingRectangleXMax; - uint32_t DrawingRectangleOriginY; - uint32_t DrawingRectangleOriginX; -}; - -static inline void -GEN8_3DSTATE_DRAWING_RECTANGLE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_DRAWING_RECTANGLE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->CoreModeSelect, 14, 15) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ClippedDrawingRectangleYMin, 16, 31) | - __gen_field(values->ClippedDrawingRectangleXMin, 0, 15) | - 0; - - dw[2] = - __gen_field(values->ClippedDrawingRectangleYMax, 16, 31) | - __gen_field(values->ClippedDrawingRectangleXMax, 0, 15) | - 0; - - dw[3] = - __gen_field(values->DrawingRectangleOriginY, 16, 31) | - __gen_field(values->DrawingRectangleOriginX, 0, 15) | - 0; - -} - -#define GEN8_3DSTATE_DS_length_bias 0x00000002 -#define GEN8_3DSTATE_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 29, \ - .DwordLength = 7 - -#define GEN8_3DSTATE_DS_length 0x00000009 - -struct GEN8_3DSTATE_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint64_t KernelStartPointer; -#define Multiple 0 -#define Single 1 - uint32_t SingleDomainPointDispatch; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define Normal 0 -#define High 1 - uint32_t ThreadDispatchPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool AccessesUAV; - bool IllegalOpcodeExceptionEnable; - bool SoftwareExceptionEnable; - uint64_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t DispatchGRFStartRegisterForURBData; - uint32_t PatchURBEntryReadLength; - uint32_t PatchURBEntryReadOffset; - uint32_t MaximumNumberofThreads; - bool StatisticsEnable; - bool SIMD8DispatchEnable; - bool ComputeWCoordinateEnable; - bool CacheDisable; - bool FunctionEnable; - uint32_t VertexURBEntryOutputReadOffset; - uint32_t VertexURBEntryOutputLength; - uint32_t UserClipDistanceClipTestEnableBitmask; - uint32_t UserClipDistanceCullTestEnableBitmask; -}; - -static inline void -GEN8_3DSTATE_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint64_t qw1 = - __gen_offset(values->KernelStartPointer, 6, 63) | - 0; - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->SingleDomainPointDispatch, 31, 31) | - __gen_field(values->VectorMaskEnable, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadDispatchPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->AccessesUAV, 14, 14) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - uint64_t qw4 = - __gen_offset(values->ScratchSpaceBasePointer, 10, 63) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = qw4; - dw[5] = qw4 >> 32; - - dw[6] = - __gen_field(values->DispatchGRFStartRegisterForURBData, 20, 24) | - __gen_field(values->PatchURBEntryReadLength, 11, 17) | - __gen_field(values->PatchURBEntryReadOffset, 4, 9) | - 0; - - dw[7] = - __gen_field(values->MaximumNumberofThreads, 21, 29) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->SIMD8DispatchEnable, 3, 3) | - __gen_field(values->ComputeWCoordinateEnable, 2, 2) | - __gen_field(values->CacheDisable, 1, 1) | - __gen_field(values->FunctionEnable, 0, 0) | - 0; - - dw[8] = - __gen_field(values->VertexURBEntryOutputReadOffset, 21, 26) | - __gen_field(values->VertexURBEntryOutputLength, 16, 20) | - __gen_field(values->UserClipDistanceClipTestEnableBitmask, 8, 15) | - __gen_field(values->UserClipDistanceCullTestEnableBitmask, 0, 7) | - 0; - -} - -#define GEN8_3DSTATE_GATHER_CONSTANT_DS_length_bias 0x00000002 -#define GEN8_3DSTATE_GATHER_CONSTANT_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 55 - -#define GEN8_3DSTATE_GATHER_CONSTANT_DS_length 0x00000000 - -#define GEN8_GATHER_CONSTANT_ENTRY_length 0x00000001 - -struct GEN8_GATHER_CONSTANT_ENTRY { - uint32_t ConstantBufferOffset; - uint32_t ChannelMask; - uint32_t BindingTableIndexOffset; -}; - -static inline void -GEN8_GATHER_CONSTANT_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_GATHER_CONSTANT_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_offset(values->ConstantBufferOffset, 8, 15) | - __gen_field(values->ChannelMask, 4, 7) | - __gen_field(values->BindingTableIndexOffset, 0, 3) | - 0; - -} - -struct GEN8_3DSTATE_GATHER_CONSTANT_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; - uint32_t GatherBufferOffset; - bool ConstantBufferDx9GenerateStall; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_GATHER_CONSTANT_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_GATHER_CONSTANT_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - __gen_field(values->ConstantBufferDx9GenerateStall, 5, 5) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_GATHER_CONSTANT_GS_length_bias 0x00000002 -#define GEN8_3DSTATE_GATHER_CONSTANT_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 53 - -#define GEN8_3DSTATE_GATHER_CONSTANT_GS_length 0x00000000 - -struct GEN8_3DSTATE_GATHER_CONSTANT_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; - uint32_t GatherBufferOffset; - bool ConstantBufferDx9GenerateStall; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_GATHER_CONSTANT_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_GATHER_CONSTANT_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - __gen_field(values->ConstantBufferDx9GenerateStall, 5, 5) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_GATHER_CONSTANT_HS_length_bias 0x00000002 -#define GEN8_3DSTATE_GATHER_CONSTANT_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 54 - -#define GEN8_3DSTATE_GATHER_CONSTANT_HS_length 0x00000000 - -struct GEN8_3DSTATE_GATHER_CONSTANT_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; - uint32_t GatherBufferOffset; - bool ConstantBufferDx9GenerateStall; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_GATHER_CONSTANT_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_GATHER_CONSTANT_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - __gen_field(values->ConstantBufferDx9GenerateStall, 5, 5) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_GATHER_CONSTANT_PS_length_bias 0x00000002 -#define GEN8_3DSTATE_GATHER_CONSTANT_PS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 56 - -#define GEN8_3DSTATE_GATHER_CONSTANT_PS_length 0x00000000 - -struct GEN8_3DSTATE_GATHER_CONSTANT_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; - uint32_t GatherBufferOffset; - bool ConstantBufferDx9GenerateStall; - bool ConstantBufferDx9Enable; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_GATHER_CONSTANT_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_GATHER_CONSTANT_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - __gen_field(values->ConstantBufferDx9GenerateStall, 5, 5) | - __gen_field(values->ConstantBufferDx9Enable, 4, 4) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_GATHER_CONSTANT_VS_length_bias 0x00000002 -#define GEN8_3DSTATE_GATHER_CONSTANT_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 52 - -#define GEN8_3DSTATE_GATHER_CONSTANT_VS_length 0x00000000 - -struct GEN8_3DSTATE_GATHER_CONSTANT_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; - uint32_t GatherBufferOffset; - bool ConstantBufferDx9GenerateStall; - bool ConstantBufferDx9Enable; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_GATHER_CONSTANT_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_GATHER_CONSTANT_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - __gen_field(values->ConstantBufferDx9GenerateStall, 5, 5) | - __gen_field(values->ConstantBufferDx9Enable, 4, 4) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_GATHER_POOL_ALLOC_length_bias 0x00000002 -#define GEN8_3DSTATE_GATHER_POOL_ALLOC_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 26, \ - .DwordLength = 2 - -#define GEN8_3DSTATE_GATHER_POOL_ALLOC_length 0x00000004 - -struct GEN8_3DSTATE_GATHER_POOL_ALLOC { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type GatherPoolBaseAddress; - bool GatherPoolEnable; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; - uint32_t GatherPoolBufferSize; -}; - -static inline void -GEN8_3DSTATE_GATHER_POOL_ALLOC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_GATHER_POOL_ALLOC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_MemoryObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState); - uint32_t dw1 = - __gen_field(values->GatherPoolEnable, 11, 11) | - __gen_field(dw_MemoryObjectControlState, 0, 6) | - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->GatherPoolBaseAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->GatherPoolBufferSize, 12, 31) | - 0; - -} - -#define GEN8_3DSTATE_GS_length_bias 0x00000002 -#define GEN8_3DSTATE_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 17, \ - .DwordLength = 8 - -#define GEN8_3DSTATE_GS_length 0x0000000a - -struct GEN8_3DSTATE_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint64_t KernelStartPointer; - uint32_t SingleProgramFlow; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define Normal 0 -#define High 1 - uint32_t ThreadDispatchPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool AccessesUAV; - bool MaskStackExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t ExpectedVertexCount; - uint64_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t OutputVertexSize; - uint32_t OutputTopology; - uint32_t VertexURBEntryReadLength; - bool IncludeVertexHandles; - uint32_t VertexURBEntryReadOffset; - uint32_t DispatchGRFStartRegisterForURBData; - uint32_t MaximumNumberofThreads; - uint32_t ControlDataHeaderSize; - uint32_t InstanceControl; - uint32_t DefaultStreamId; -#define DispatchModeSingle 0 -#define DispatchModeDualInstance 1 -#define DispatchModeDualObject 2 -#define DispatchModeSIMD8 3 - uint32_t DispatchMode; - bool StatisticsEnable; - uint32_t InvocationsIncrementValue; - bool IncludePrimitiveID; - uint32_t Hint; -#define LEADING 0 -#define TRAILING 1 - uint32_t ReorderMode; - bool DiscardAdjacency; - bool Enable; -#define CUT 0 -#define SID 1 - uint32_t ControlDataFormat; - bool StaticOutput; - uint32_t StaticOutputVertexCount; - uint32_t VertexURBEntryOutputReadOffset; - uint32_t VertexURBEntryOutputLength; - uint32_t UserClipDistanceClipTestEnableBitmask; - uint32_t UserClipDistanceCullTestEnableBitmask; -}; - -static inline void -GEN8_3DSTATE_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint64_t qw1 = - __gen_offset(values->KernelStartPointer, 6, 63) | - 0; - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->SingleProgramFlow, 31, 31) | - __gen_field(values->VectorMaskEnable, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadDispatchPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->AccessesUAV, 12, 12) | - __gen_field(values->MaskStackExceptionEnable, 11, 11) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - __gen_field(values->ExpectedVertexCount, 0, 5) | - 0; - - uint64_t qw4 = - __gen_offset(values->ScratchSpaceBasePointer, 10, 63) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = qw4; - dw[5] = qw4 >> 32; - - dw[6] = - __gen_field(values->OutputVertexSize, 23, 28) | - __gen_field(values->OutputTopology, 17, 22) | - __gen_field(values->VertexURBEntryReadLength, 11, 16) | - __gen_field(values->IncludeVertexHandles, 10, 10) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - __gen_field(values->DispatchGRFStartRegisterForURBData, 0, 3) | - 0; - - dw[7] = - __gen_field(values->MaximumNumberofThreads, 24, 31) | - __gen_field(values->ControlDataHeaderSize, 20, 23) | - __gen_field(values->InstanceControl, 15, 19) | - __gen_field(values->DefaultStreamId, 13, 14) | - __gen_field(values->DispatchMode, 11, 12) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->InvocationsIncrementValue, 5, 9) | - __gen_field(values->IncludePrimitiveID, 4, 4) | - __gen_field(values->Hint, 3, 3) | - __gen_field(values->ReorderMode, 2, 2) | - __gen_field(values->DiscardAdjacency, 1, 1) | - __gen_field(values->Enable, 0, 0) | - 0; - - dw[8] = - __gen_field(values->ControlDataFormat, 31, 31) | - __gen_field(values->StaticOutput, 30, 30) | - __gen_field(values->StaticOutputVertexCount, 16, 26) | - 0; - - dw[9] = - __gen_field(values->VertexURBEntryOutputReadOffset, 21, 26) | - __gen_field(values->VertexURBEntryOutputLength, 16, 20) | - __gen_field(values->UserClipDistanceClipTestEnableBitmask, 8, 15) | - __gen_field(values->UserClipDistanceCullTestEnableBitmask, 0, 7) | - 0; - -} - -#define GEN8_3DSTATE_HIER_DEPTH_BUFFER_length_bias 0x00000002 -#define GEN8_3DSTATE_HIER_DEPTH_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 7, \ - .DwordLength = 3 - -#define GEN8_3DSTATE_HIER_DEPTH_BUFFER_length 0x00000005 - -struct GEN8_3DSTATE_HIER_DEPTH_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE HierarchicalDepthBufferObjectControlState; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; - uint32_t SurfaceQPitch; -}; - -static inline void -GEN8_3DSTATE_HIER_DEPTH_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_HIER_DEPTH_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_HierarchicalDepthBufferObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_HierarchicalDepthBufferObjectControlState, &values->HierarchicalDepthBufferObjectControlState); - dw[1] = - __gen_field(dw_HierarchicalDepthBufferObjectControlState, 25, 31) | - __gen_field(values->SurfacePitch, 0, 16) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - dw[4] = - __gen_field(values->SurfaceQPitch, 0, 14) | - 0; - -} - -#define GEN8_3DSTATE_HS_length_bias 0x00000002 -#define GEN8_3DSTATE_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 27, \ - .DwordLength = 7 - -#define GEN8_3DSTATE_HS_length 0x00000009 - -struct GEN8_3DSTATE_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define Normal 0 -#define High 1 - uint32_t ThreadDispatchPriority; -#define IEEE754 0 -#define alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool SoftwareExceptionEnable; - bool Enable; - bool StatisticsEnable; - uint32_t MaximumNumberofThreads; - uint32_t InstanceCount; - uint64_t KernelStartPointer; - uint64_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - bool SingleProgramFlow; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; - bool AccessesUAV; - bool IncludeVertexHandles; - uint32_t DispatchGRFStartRegisterForURBData; - uint32_t VertexURBEntryReadLength; - uint32_t VertexURBEntryReadOffset; -}; - -static inline void -GEN8_3DSTATE_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadDispatchPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->SoftwareExceptionEnable, 12, 12) | - 0; - - dw[2] = - __gen_field(values->Enable, 31, 31) | - __gen_field(values->StatisticsEnable, 29, 29) | - __gen_field(values->MaximumNumberofThreads, 8, 16) | - __gen_field(values->InstanceCount, 0, 3) | - 0; - - uint64_t qw3 = - __gen_offset(values->KernelStartPointer, 6, 63) | - 0; - - dw[3] = qw3; - dw[4] = qw3 >> 32; - - uint64_t qw5 = - __gen_offset(values->ScratchSpaceBasePointer, 10, 63) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[5] = qw5; - dw[6] = qw5 >> 32; - - dw[7] = - __gen_field(values->SingleProgramFlow, 27, 27) | - __gen_field(values->VectorMaskEnable, 26, 26) | - __gen_field(values->AccessesUAV, 25, 25) | - __gen_field(values->IncludeVertexHandles, 24, 24) | - __gen_field(values->DispatchGRFStartRegisterForURBData, 19, 23) | - __gen_field(values->VertexURBEntryReadLength, 11, 16) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - 0; - - dw[8] = - 0; - -} - -#define GEN8_3DSTATE_INDEX_BUFFER_length_bias 0x00000002 -#define GEN8_3DSTATE_INDEX_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 10, \ - .DwordLength = 3 - -#define GEN8_3DSTATE_INDEX_BUFFER_length 0x00000005 - -struct GEN8_3DSTATE_INDEX_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define INDEX_BYTE 0 -#define INDEX_WORD 1 -#define INDEX_DWORD 2 - uint32_t IndexFormat; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; - __gen_address_type BufferStartingAddress; - uint32_t BufferSize; -}; - -static inline void -GEN8_3DSTATE_INDEX_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_INDEX_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_MemoryObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState); - dw[1] = - __gen_field(values->IndexFormat, 8, 9) | - __gen_field(dw_MemoryObjectControlState, 0, 6) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->BufferStartingAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - dw[4] = - __gen_field(values->BufferSize, 0, 31) | - 0; - -} - -#define GEN8_3DSTATE_LINE_STIPPLE_length_bias 0x00000002 -#define GEN8_3DSTATE_LINE_STIPPLE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 8, \ - .DwordLength = 1 - -#define GEN8_3DSTATE_LINE_STIPPLE_length 0x00000003 - -struct GEN8_3DSTATE_LINE_STIPPLE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool ModifyEnableCurrentRepeatCounterCurrentStippleIndex; - uint32_t CurrentRepeatCounter; - uint32_t CurrentStippleIndex; - uint32_t LineStipplePattern; - float LineStippleInverseRepeatCount; - uint32_t LineStippleRepeatCount; -}; - -static inline void -GEN8_3DSTATE_LINE_STIPPLE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_LINE_STIPPLE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ModifyEnableCurrentRepeatCounterCurrentStippleIndex, 31, 31) | - __gen_field(values->CurrentRepeatCounter, 21, 29) | - __gen_field(values->CurrentStippleIndex, 16, 19) | - __gen_field(values->LineStipplePattern, 0, 15) | - 0; - - dw[2] = - __gen_field(values->LineStippleInverseRepeatCount * (1 << 16), 15, 31) | - __gen_field(values->LineStippleRepeatCount, 0, 8) | - 0; - -} - -#define GEN8_3DSTATE_MONOFILTER_SIZE_length_bias 0x00000002 -#define GEN8_3DSTATE_MONOFILTER_SIZE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 17, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_MONOFILTER_SIZE_length 0x00000002 - -struct GEN8_3DSTATE_MONOFILTER_SIZE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t MonochromeFilterWidth; - uint32_t MonochromeFilterHeight; -}; - -static inline void -GEN8_3DSTATE_MONOFILTER_SIZE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_MONOFILTER_SIZE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->MonochromeFilterWidth, 3, 5) | - __gen_field(values->MonochromeFilterHeight, 0, 2) | - 0; - -} - -#define GEN8_3DSTATE_MULTISAMPLE_length_bias 0x00000002 -#define GEN8_3DSTATE_MULTISAMPLE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 13, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_MULTISAMPLE_length 0x00000002 - -struct GEN8_3DSTATE_MULTISAMPLE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PixelPositionOffsetEnable; -#define CENTER 0 -#define UL_CORNER 1 - uint32_t PixelLocation; - uint32_t NumberofMultisamples; -}; - -static inline void -GEN8_3DSTATE_MULTISAMPLE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_MULTISAMPLE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->PixelPositionOffsetEnable, 5, 5) | - __gen_field(values->PixelLocation, 4, 4) | - __gen_field(values->NumberofMultisamples, 1, 3) | - 0; - -} - -#define GEN8_3DSTATE_POLY_STIPPLE_OFFSET_length_bias 0x00000002 -#define GEN8_3DSTATE_POLY_STIPPLE_OFFSET_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 6, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_POLY_STIPPLE_OFFSET_length 0x00000002 - -struct GEN8_3DSTATE_POLY_STIPPLE_OFFSET { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PolygonStippleXOffset; - uint32_t PolygonStippleYOffset; -}; - -static inline void -GEN8_3DSTATE_POLY_STIPPLE_OFFSET_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_POLY_STIPPLE_OFFSET * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->PolygonStippleXOffset, 8, 12) | - __gen_field(values->PolygonStippleYOffset, 0, 4) | - 0; - -} - -#define GEN8_3DSTATE_POLY_STIPPLE_PATTERN_length_bias 0x00000002 -#define GEN8_3DSTATE_POLY_STIPPLE_PATTERN_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 7, \ - .DwordLength = 31 - -#define GEN8_3DSTATE_POLY_STIPPLE_PATTERN_length 0x00000021 - -struct GEN8_3DSTATE_POLY_STIPPLE_PATTERN { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PatternRow[32]; -}; - -static inline void -GEN8_3DSTATE_POLY_STIPPLE_PATTERN_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_POLY_STIPPLE_PATTERN * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - for (uint32_t i = 0, j = 1; i < 32; i += 1, j++) { - dw[j] = - __gen_field(values->PatternRow[i + 0], 0, 31) | - 0; - } - -} - -#define GEN8_3DSTATE_PS_length_bias 0x00000002 -#define GEN8_3DSTATE_PS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 32, \ - .DwordLength = 10 - -#define GEN8_3DSTATE_PS_length 0x0000000c - -struct GEN8_3DSTATE_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint64_t KernelStartPointer0; -#define Multiple 0 -#define Single 1 - uint32_t SingleProgramFlow; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; -#define FlushedtoZero 0 -#define Retained 1 - uint32_t SinglePrecisionDenormalMode; - uint32_t BindingTableEntryCount; -#define Normal 0 -#define High 1 - uint32_t ThreadDispatchPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; -#define RTNE 0 -#define RU 1 -#define RD 2 -#define RTZ 3 - uint32_t RoundingMode; - bool IllegalOpcodeExceptionEnable; - bool MaskStackExceptionEnable; - bool SoftwareExceptionEnable; - uint64_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t MaximumNumberofThreadsPerPSD; - bool PushConstantEnable; - bool RenderTargetFastClearEnable; - bool RenderTargetResolveEnable; -#define POSOFFSET_NONE 0 -#define POSOFFSET_CENTROID 2 -#define POSOFFSET_SAMPLE 3 - uint32_t PositionXYOffsetSelect; - bool _32PixelDispatchEnable; - bool _16PixelDispatchEnable; - bool _8PixelDispatchEnable; - uint32_t DispatchGRFStartRegisterForConstantSetupData0; - uint32_t DispatchGRFStartRegisterForConstantSetupData1; - uint32_t DispatchGRFStartRegisterForConstantSetupData2; - uint64_t KernelStartPointer1; - uint64_t KernelStartPointer2; -}; - -static inline void -GEN8_3DSTATE_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint64_t qw1 = - __gen_offset(values->KernelStartPointer0, 6, 63) | - 0; - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->SingleProgramFlow, 31, 31) | - __gen_field(values->VectorMaskEnable, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->SinglePrecisionDenormalMode, 26, 26) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadDispatchPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->RoundingMode, 14, 15) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->MaskStackExceptionEnable, 11, 11) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - uint64_t qw4 = - __gen_offset(values->ScratchSpaceBasePointer, 10, 63) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = qw4; - dw[5] = qw4 >> 32; - - dw[6] = - __gen_field(values->MaximumNumberofThreadsPerPSD, 23, 31) | - __gen_field(values->PushConstantEnable, 11, 11) | - __gen_field(values->RenderTargetFastClearEnable, 8, 8) | - __gen_field(values->RenderTargetResolveEnable, 6, 6) | - __gen_field(values->PositionXYOffsetSelect, 3, 4) | - __gen_field(values->_32PixelDispatchEnable, 2, 2) | - __gen_field(values->_16PixelDispatchEnable, 1, 1) | - __gen_field(values->_8PixelDispatchEnable, 0, 0) | - 0; - - dw[7] = - __gen_field(values->DispatchGRFStartRegisterForConstantSetupData0, 16, 22) | - __gen_field(values->DispatchGRFStartRegisterForConstantSetupData1, 8, 14) | - __gen_field(values->DispatchGRFStartRegisterForConstantSetupData2, 0, 6) | - 0; - - uint64_t qw8 = - __gen_offset(values->KernelStartPointer1, 6, 63) | - 0; - - dw[8] = qw8; - dw[9] = qw8 >> 32; - - uint64_t qw10 = - __gen_offset(values->KernelStartPointer2, 6, 63) | - 0; - - dw[10] = qw10; - dw[11] = qw10 >> 32; - -} - -#define GEN8_3DSTATE_PS_BLEND_length_bias 0x00000002 -#define GEN8_3DSTATE_PS_BLEND_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 77, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_PS_BLEND_length 0x00000002 - -struct GEN8_3DSTATE_PS_BLEND { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool AlphaToCoverageEnable; - bool HasWriteableRT; - bool ColorBufferBlendEnable; - uint32_t SourceAlphaBlendFactor; - uint32_t DestinationAlphaBlendFactor; - uint32_t SourceBlendFactor; - uint32_t DestinationBlendFactor; - bool AlphaTestEnable; - bool IndependentAlphaBlendEnable; -}; - -static inline void -GEN8_3DSTATE_PS_BLEND_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_PS_BLEND * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->AlphaToCoverageEnable, 31, 31) | - __gen_field(values->HasWriteableRT, 30, 30) | - __gen_field(values->ColorBufferBlendEnable, 29, 29) | - __gen_field(values->SourceAlphaBlendFactor, 24, 28) | - __gen_field(values->DestinationAlphaBlendFactor, 19, 23) | - __gen_field(values->SourceBlendFactor, 14, 18) | - __gen_field(values->DestinationBlendFactor, 9, 13) | - __gen_field(values->AlphaTestEnable, 8, 8) | - __gen_field(values->IndependentAlphaBlendEnable, 7, 7) | - 0; - -} - -#define GEN8_3DSTATE_PS_EXTRA_length_bias 0x00000002 -#define GEN8_3DSTATE_PS_EXTRA_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 79, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_PS_EXTRA_length 0x00000002 - -struct GEN8_3DSTATE_PS_EXTRA { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool PixelShaderValid; - bool PixelShaderDoesnotwritetoRT; - bool oMaskPresenttoRenderTarget; - bool PixelShaderKillsPixel; -#define PSCDEPTH_OFF 0 -#define PSCDEPTH_ON 1 -#define PSCDEPTH_ON_GE 2 -#define PSCDEPTH_ON_LE 3 - uint32_t PixelShaderComputedDepthMode; - bool ForceComputedDepth; - bool PixelShaderUsesSourceDepth; - bool PixelShaderUsesSourceW; - uint32_t Removed; - bool AttributeEnable; - bool PixelShaderDisablesAlphaToCoverage; - bool PixelShaderIsPerSample; - bool PixelShaderHasUAV; - bool PixelShaderUsesInputCoverageMask; -}; - -static inline void -GEN8_3DSTATE_PS_EXTRA_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_PS_EXTRA * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->PixelShaderValid, 31, 31) | - __gen_field(values->PixelShaderDoesnotwritetoRT, 30, 30) | - __gen_field(values->oMaskPresenttoRenderTarget, 29, 29) | - __gen_field(values->PixelShaderKillsPixel, 28, 28) | - __gen_field(values->PixelShaderComputedDepthMode, 26, 27) | - __gen_field(values->ForceComputedDepth, 25, 25) | - __gen_field(values->PixelShaderUsesSourceDepth, 24, 24) | - __gen_field(values->PixelShaderUsesSourceW, 23, 23) | - __gen_field(values->Removed, 17, 17) | - __gen_field(values->AttributeEnable, 8, 8) | - __gen_field(values->PixelShaderDisablesAlphaToCoverage, 7, 7) | - __gen_field(values->PixelShaderIsPerSample, 6, 6) | - __gen_field(values->PixelShaderHasUAV, 2, 2) | - __gen_field(values->PixelShaderUsesInputCoverageMask, 1, 1) | - 0; - -} - -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS_length_bias 0x00000002 -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 20, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS_length 0x00000002 - -struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS_length_bias 0x00000002 -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 21, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS_length 0x00000002 - -struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS_length_bias 0x00000002 -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 19, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS_length 0x00000002 - -struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS_length_bias 0x00000002 -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 22, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS_length 0x00000002 - -struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS_length_bias 0x00000002 -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 18, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS_length 0x00000002 - -struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN8_3DSTATE_RASTER_length_bias 0x00000002 -#define GEN8_3DSTATE_RASTER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 80, \ - .DwordLength = 3 - -#define GEN8_3DSTATE_RASTER_length 0x00000005 - -struct GEN8_3DSTATE_RASTER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define DX9OGL 0 -#define DX100 1 -#define DX101 2 - uint32_t APIMode; -#define Clockwise 0 -#define CounterClockwise 1 - uint32_t FrontWinding; -#define FSC_NUMRASTSAMPLES_0 0 -#define FSC_NUMRASTSAMPLES_1 1 -#define FSC_NUMRASTSAMPLES_2 2 -#define FSC_NUMRASTSAMPLES_4 3 -#define FSC_NUMRASTSAMPLES_8 4 -#define FSC_NUMRASTSAMPLES_16 5 - uint32_t ForcedSampleCount; -#define CULLMODE_BOTH 0 -#define CULLMODE_NONE 1 -#define CULLMODE_FRONT 2 -#define CULLMODE_BACK 3 - uint32_t CullMode; -#define Normal 0 -#define Force 1 - uint32_t ForceMultisampling; - bool SmoothPointEnable; - bool DXMultisampleRasterizationEnable; -#define MSRASTMODE_OFF_PIXEL 0 -#define MSRASTMODE_OFF_PATTERN 1 -#define MSRASTMODE_ON_PIXEL 2 -#define MSRASTMODE_ON_PATTERN 3 - uint32_t DXMultisampleRasterizationMode; - bool GlobalDepthOffsetEnableSolid; - bool GlobalDepthOffsetEnableWireframe; - bool GlobalDepthOffsetEnablePoint; -#define RASTER_SOLID 0 -#define RASTER_WIREFRAME 1 -#define RASTER_POINT 2 - uint32_t FrontFaceFillMode; -#define RASTER_SOLID 0 -#define RASTER_WIREFRAME 1 -#define RASTER_POINT 2 - uint32_t BackFaceFillMode; - bool AntialiasingEnable; - bool ScissorRectangleEnable; - bool ViewportZClipTestEnable; - float GlobalDepthOffsetConstant; - float GlobalDepthOffsetScale; - float GlobalDepthOffsetClamp; -}; - -static inline void -GEN8_3DSTATE_RASTER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_RASTER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->APIMode, 22, 23) | - __gen_field(values->FrontWinding, 21, 21) | - __gen_field(values->ForcedSampleCount, 18, 20) | - __gen_field(values->CullMode, 16, 17) | - __gen_field(values->ForceMultisampling, 14, 14) | - __gen_field(values->SmoothPointEnable, 13, 13) | - __gen_field(values->DXMultisampleRasterizationEnable, 12, 12) | - __gen_field(values->DXMultisampleRasterizationMode, 10, 11) | - __gen_field(values->GlobalDepthOffsetEnableSolid, 9, 9) | - __gen_field(values->GlobalDepthOffsetEnableWireframe, 8, 8) | - __gen_field(values->GlobalDepthOffsetEnablePoint, 7, 7) | - __gen_field(values->FrontFaceFillMode, 5, 6) | - __gen_field(values->BackFaceFillMode, 3, 4) | - __gen_field(values->AntialiasingEnable, 2, 2) | - __gen_field(values->ScissorRectangleEnable, 1, 1) | - __gen_field(values->ViewportZClipTestEnable, 0, 0) | - 0; - - dw[2] = - __gen_float(values->GlobalDepthOffsetConstant) | - 0; - - dw[3] = - __gen_float(values->GlobalDepthOffsetScale) | - 0; - - dw[4] = - __gen_float(values->GlobalDepthOffsetClamp) | - 0; - -} - -#define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0_length_bias 0x00000002 -#define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 2 - -#define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0_length 0x00000000 - -#define GEN8_PALETTE_ENTRY_length 0x00000001 - -struct GEN8_PALETTE_ENTRY { - uint32_t Alpha; - uint32_t Red; - uint32_t Green; - uint32_t Blue; -}; - -static inline void -GEN8_PALETTE_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_PALETTE_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->Alpha, 24, 31) | - __gen_field(values->Red, 16, 23) | - __gen_field(values->Green, 8, 15) | - __gen_field(values->Blue, 0, 7) | - 0; - -} - -struct GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0 { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SAMPLER_PALETTE_LOAD0 * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1_length_bias 0x00000002 -#define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 12 - -#define GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1_length 0x00000000 - -struct GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1 { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SAMPLER_PALETTE_LOAD1 * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS_length_bias 0x00000002 -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 45, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS_length 0x00000002 - -struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoDSSamplerState; -}; - -static inline void -GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoDSSamplerState, 5, 31) | - 0; - -} - -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS_length_bias 0x00000002 -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 46, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS_length 0x00000002 - -struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoGSSamplerState; -}; - -static inline void -GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoGSSamplerState, 5, 31) | - 0; - -} - -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS_length_bias 0x00000002 -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 44, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS_length 0x00000002 - -struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoHSSamplerState; -}; - -static inline void -GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoHSSamplerState, 5, 31) | - 0; - -} - -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS_length_bias 0x00000002 -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 47, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS_length 0x00000002 - -struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoPSSamplerState; -}; - -static inline void -GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoPSSamplerState, 5, 31) | - 0; - -} - -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS_length_bias 0x00000002 -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 43, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS_length 0x00000002 - -struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoVSSamplerState; -}; - -static inline void -GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SAMPLER_STATE_POINTERS_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoVSSamplerState, 5, 31) | - 0; - -} - -#define GEN8_3DSTATE_SAMPLE_MASK_length_bias 0x00000002 -#define GEN8_3DSTATE_SAMPLE_MASK_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 24, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_SAMPLE_MASK_length 0x00000002 - -struct GEN8_3DSTATE_SAMPLE_MASK { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SampleMask; -}; - -static inline void -GEN8_3DSTATE_SAMPLE_MASK_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SAMPLE_MASK * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SampleMask, 0, 15) | - 0; - -} - -#define GEN8_3DSTATE_SAMPLE_PATTERN_length_bias 0x00000002 -#define GEN8_3DSTATE_SAMPLE_PATTERN_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 28, \ - .DwordLength = 7 - -#define GEN8_3DSTATE_SAMPLE_PATTERN_length 0x00000009 - -struct GEN8_3DSTATE_SAMPLE_PATTERN { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - float _8xSample7XOffset; - float _8xSample7YOffset; - float _8xSample6XOffset; - float _8xSample6YOffset; - float _8xSample5XOffset; - float _8xSample5YOffset; - float _8xSample4XOffset; - float _8xSample4YOffset; - float _8xSample3XOffset; - float _8xSample3YOffset; - float _8xSample2XOffset; - float _8xSample2YOffset; - float _8xSample1XOffset; - float _8xSample1YOffset; - float _8xSample0XOffset; - float _8xSample0YOffset; - float _4xSample3XOffset; - float _4xSample3YOffset; - float _4xSample2XOffset; - float _4xSample2YOffset; - float _4xSample1XOffset; - float _4xSample1YOffset; - float _4xSample0XOffset; - float _4xSample0YOffset; - float _1xSample0XOffset; - float _1xSample0YOffset; - float _2xSample1XOffset; - float _2xSample1YOffset; - float _2xSample0XOffset; - float _2xSample0YOffset; -}; - -static inline void -GEN8_3DSTATE_SAMPLE_PATTERN_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SAMPLE_PATTERN * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - for (uint32_t i = 0, j = 1; i < 4; i += 1, j++) { - dw[j] = - 0; - } - - dw[5] = - __gen_field(values->_8xSample7XOffset * (1 << 4), 28, 31) | - __gen_field(values->_8xSample7YOffset * (1 << 4), 24, 27) | - __gen_field(values->_8xSample6XOffset * (1 << 4), 20, 23) | - __gen_field(values->_8xSample6YOffset * (1 << 4), 16, 19) | - __gen_field(values->_8xSample5XOffset * (1 << 4), 12, 15) | - __gen_field(values->_8xSample5YOffset * (1 << 4), 8, 11) | - __gen_field(values->_8xSample4XOffset * (1 << 4), 4, 7) | - __gen_field(values->_8xSample4YOffset * (1 << 4), 0, 3) | - 0; - - dw[6] = - __gen_field(values->_8xSample3XOffset * (1 << 4), 28, 31) | - __gen_field(values->_8xSample3YOffset * (1 << 4), 24, 27) | - __gen_field(values->_8xSample2XOffset * (1 << 4), 20, 23) | - __gen_field(values->_8xSample2YOffset * (1 << 4), 16, 19) | - __gen_field(values->_8xSample1XOffset * (1 << 4), 12, 15) | - __gen_field(values->_8xSample1YOffset * (1 << 4), 8, 11) | - __gen_field(values->_8xSample0XOffset * (1 << 4), 4, 7) | - __gen_field(values->_8xSample0YOffset * (1 << 4), 0, 3) | - 0; - - dw[7] = - __gen_field(values->_4xSample3XOffset * (1 << 4), 28, 31) | - __gen_field(values->_4xSample3YOffset * (1 << 4), 24, 27) | - __gen_field(values->_4xSample2XOffset * (1 << 4), 20, 23) | - __gen_field(values->_4xSample2YOffset * (1 << 4), 16, 19) | - __gen_field(values->_4xSample1XOffset * (1 << 4), 12, 15) | - __gen_field(values->_4xSample1YOffset * (1 << 4), 8, 11) | - __gen_field(values->_4xSample0XOffset * (1 << 4), 4, 7) | - __gen_field(values->_4xSample0YOffset * (1 << 4), 0, 3) | - 0; - - dw[8] = - __gen_field(values->_1xSample0XOffset * (1 << 4), 20, 23) | - __gen_field(values->_1xSample0YOffset * (1 << 4), 16, 19) | - __gen_field(values->_2xSample1XOffset * (1 << 4), 12, 15) | - __gen_field(values->_2xSample1YOffset * (1 << 4), 8, 11) | - __gen_field(values->_2xSample0XOffset * (1 << 4), 4, 7) | - __gen_field(values->_2xSample0YOffset * (1 << 4), 0, 3) | - 0; - -} - -#define GEN8_3DSTATE_SBE_length_bias 0x00000002 -#define GEN8_3DSTATE_SBE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 31, \ - .DwordLength = 2 - -#define GEN8_3DSTATE_SBE_length 0x00000004 - -struct GEN8_3DSTATE_SBE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool ForceVertexURBEntryReadLength; - bool ForceVertexURBEntryReadOffset; - uint32_t NumberofSFOutputAttributes; - bool AttributeSwizzleEnable; -#define UPPERLEFT 0 -#define LOWERLEFT 1 - uint32_t PointSpriteTextureCoordinateOrigin; - bool PrimitiveIDOverrideComponentW; - bool PrimitiveIDOverrideComponentZ; - bool PrimitiveIDOverrideComponentY; - bool PrimitiveIDOverrideComponentX; - uint32_t VertexURBEntryReadLength; - uint32_t VertexURBEntryReadOffset; - uint32_t PrimitiveIDOverrideAttributeSelect; - uint32_t PointSpriteTextureCoordinateEnable; - uint32_t ConstantInterpolationEnable; -}; - -static inline void -GEN8_3DSTATE_SBE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SBE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ForceVertexURBEntryReadLength, 29, 29) | - __gen_field(values->ForceVertexURBEntryReadOffset, 28, 28) | - __gen_field(values->NumberofSFOutputAttributes, 22, 27) | - __gen_field(values->AttributeSwizzleEnable, 21, 21) | - __gen_field(values->PointSpriteTextureCoordinateOrigin, 20, 20) | - __gen_field(values->PrimitiveIDOverrideComponentW, 19, 19) | - __gen_field(values->PrimitiveIDOverrideComponentZ, 18, 18) | - __gen_field(values->PrimitiveIDOverrideComponentY, 17, 17) | - __gen_field(values->PrimitiveIDOverrideComponentX, 16, 16) | - __gen_field(values->VertexURBEntryReadLength, 11, 15) | - __gen_field(values->VertexURBEntryReadOffset, 5, 10) | - __gen_field(values->PrimitiveIDOverrideAttributeSelect, 0, 4) | - 0; - - dw[2] = - __gen_field(values->PointSpriteTextureCoordinateEnable, 0, 31) | - 0; - - dw[3] = - __gen_field(values->ConstantInterpolationEnable, 0, 31) | - 0; - -} - -#define GEN8_3DSTATE_SBE_SWIZ_length_bias 0x00000002 -#define GEN8_3DSTATE_SBE_SWIZ_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 81, \ - .DwordLength = 9 - -#define GEN8_3DSTATE_SBE_SWIZ_length 0x0000000b - -#define GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL_length 0x00000001 - -struct GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL { - bool ComponentOverrideW; - bool ComponentOverrideZ; - bool ComponentOverrideY; - bool ComponentOverrideX; - uint32_t SwizzleControlMode; -#define CONST_0000 0 -#define CONST_0001_FLOAT 1 -#define CONST_1111_FLOAT 2 -#define PRIM_ID 3 - uint32_t ConstantSource; -#define INPUTATTR 0 -#define INPUTATTR_FACING 1 -#define INPUTATTR_W 2 -#define INPUTATTR_FACING_W 3 - uint32_t SwizzleSelect; - uint32_t SourceAttribute; -}; - -static inline void -GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->ComponentOverrideW, 15, 15) | - __gen_field(values->ComponentOverrideZ, 14, 14) | - __gen_field(values->ComponentOverrideY, 13, 13) | - __gen_field(values->ComponentOverrideX, 12, 12) | - __gen_field(values->SwizzleControlMode, 11, 11) | - __gen_field(values->ConstantSource, 9, 10) | - __gen_field(values->SwizzleSelect, 6, 7) | - __gen_field(values->SourceAttribute, 0, 4) | - 0; - -} - -struct GEN8_3DSTATE_SBE_SWIZ { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL Attribute[16]; - uint32_t AttributeWrapShortestEnables[16]; -}; - -static inline void -GEN8_3DSTATE_SBE_SWIZ_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SBE_SWIZ * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - for (uint32_t i = 0, j = 1; i < 16; i += 2, j++) { - uint32_t dw_Attribute0; - GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &dw_Attribute0, &values->Attribute[i + 0]); - uint32_t dw_Attribute1; - GEN8_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &dw_Attribute1, &values->Attribute[i + 1]); - dw[j] = - __gen_field(dw_Attribute0, 0, 15) | - __gen_field(dw_Attribute1, 16, 31) | - 0; - } - - for (uint32_t i = 0, j = 9; i < 16; i += 8, j++) { - dw[j] = - __gen_field(values->AttributeWrapShortestEnables[i + 0], 0, 3) | - __gen_field(values->AttributeWrapShortestEnables[i + 1], 4, 7) | - __gen_field(values->AttributeWrapShortestEnables[i + 2], 8, 11) | - __gen_field(values->AttributeWrapShortestEnables[i + 3], 12, 15) | - __gen_field(values->AttributeWrapShortestEnables[i + 4], 16, 19) | - __gen_field(values->AttributeWrapShortestEnables[i + 5], 20, 23) | - __gen_field(values->AttributeWrapShortestEnables[i + 6], 24, 27) | - __gen_field(values->AttributeWrapShortestEnables[i + 7], 28, 31) | - 0; - } - -} - -#define GEN8_3DSTATE_SCISSOR_STATE_POINTERS_length_bias 0x00000002 -#define GEN8_3DSTATE_SCISSOR_STATE_POINTERS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 15, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_SCISSOR_STATE_POINTERS_length 0x00000002 - -struct GEN8_3DSTATE_SCISSOR_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ScissorRectPointer; -}; - -static inline void -GEN8_3DSTATE_SCISSOR_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SCISSOR_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->ScissorRectPointer, 5, 31) | - 0; - -} - -#define GEN8_3DSTATE_SF_length_bias 0x00000002 -#define GEN8_3DSTATE_SF_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 19, \ - .DwordLength = 2 - -#define GEN8_3DSTATE_SF_length 0x00000004 - -struct GEN8_3DSTATE_SF { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool LegacyGlobalDepthBiasEnable; - bool StatisticsEnable; - bool ViewportTransformEnable; - float LineWidth; -#define _05pixels 0 -#define _10pixels 1 -#define _20pixels 2 -#define _40pixels 3 - uint32_t LineEndCapAntialiasingRegionWidth; - bool LastPixelEnable; - uint32_t TriangleStripListProvokingVertexSelect; - uint32_t LineStripListProvokingVertexSelect; - uint32_t TriangleFanProvokingVertexSelect; -#define AALINEDISTANCE_TRUE 1 - uint32_t AALineDistanceMode; - bool SmoothPointEnable; - uint32_t VertexSubPixelPrecisionSelect; -#define Vertex 0 -#define State 1 - uint32_t PointWidthSource; - float PointWidth; -}; - -static inline void -GEN8_3DSTATE_SF_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SF * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->LegacyGlobalDepthBiasEnable, 11, 11) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->ViewportTransformEnable, 1, 1) | - 0; - - dw[2] = - __gen_field(values->LineWidth * (1 << 7), 18, 27) | - __gen_field(values->LineEndCapAntialiasingRegionWidth, 16, 17) | - 0; - - dw[3] = - __gen_field(values->LastPixelEnable, 31, 31) | - __gen_field(values->TriangleStripListProvokingVertexSelect, 29, 30) | - __gen_field(values->LineStripListProvokingVertexSelect, 27, 28) | - __gen_field(values->TriangleFanProvokingVertexSelect, 25, 26) | - __gen_field(values->AALineDistanceMode, 14, 14) | - __gen_field(values->SmoothPointEnable, 13, 13) | - __gen_field(values->VertexSubPixelPrecisionSelect, 12, 12) | - __gen_field(values->PointWidthSource, 11, 11) | - __gen_field(values->PointWidth * (1 << 3), 0, 10) | - 0; - -} - -#define GEN8_3DSTATE_SO_BUFFER_length_bias 0x00000002 -#define GEN8_3DSTATE_SO_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 24, \ - .DwordLength = 6 - -#define GEN8_3DSTATE_SO_BUFFER_length 0x00000008 - -struct GEN8_3DSTATE_SO_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool SOBufferEnable; - uint32_t SOBufferIndex; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE SOBufferObjectControlState; - bool StreamOffsetWriteEnable; - bool StreamOutputBufferOffsetAddressEnable; - __gen_address_type SurfaceBaseAddress; - uint32_t SurfaceSize; - __gen_address_type StreamOutputBufferOffsetAddress; - uint32_t StreamOffset; -}; - -static inline void -GEN8_3DSTATE_SO_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SO_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_SOBufferObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SOBufferObjectControlState, &values->SOBufferObjectControlState); - dw[1] = - __gen_field(values->SOBufferEnable, 31, 31) | - __gen_field(values->SOBufferIndex, 29, 30) | - __gen_field(dw_SOBufferObjectControlState, 22, 28) | - __gen_field(values->StreamOffsetWriteEnable, 21, 21) | - __gen_field(values->StreamOutputBufferOffsetAddressEnable, 20, 20) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - dw[4] = - __gen_field(values->SurfaceSize, 0, 29) | - 0; - - uint32_t dw5 = - 0; - - uint64_t qw5 = - __gen_combine_address(data, &dw[5], values->StreamOutputBufferOffsetAddress, dw5); - - dw[5] = qw5; - dw[6] = qw5 >> 32; - - dw[7] = - __gen_field(values->StreamOffset, 0, 31) | - 0; - -} - -#define GEN8_3DSTATE_SO_DECL_LIST_length_bias 0x00000002 -#define GEN8_3DSTATE_SO_DECL_LIST_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 23 - -#define GEN8_3DSTATE_SO_DECL_LIST_length 0x00000000 - -#define GEN8_SO_DECL_ENTRY_length 0x00000002 - -#define GEN8_SO_DECL_length 0x00000001 - -struct GEN8_SO_DECL { - uint32_t OutputBufferSlot; - uint32_t HoleFlag; - uint32_t RegisterIndex; - uint32_t ComponentMask; -}; - -static inline void -GEN8_SO_DECL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_SO_DECL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->OutputBufferSlot, 12, 13) | - __gen_field(values->HoleFlag, 11, 11) | - __gen_field(values->RegisterIndex, 4, 9) | - __gen_field(values->ComponentMask, 0, 3) | - 0; - -} - -struct GEN8_SO_DECL_ENTRY { - struct GEN8_SO_DECL Stream3Decl; - struct GEN8_SO_DECL Stream2Decl; - struct GEN8_SO_DECL Stream1Decl; - struct GEN8_SO_DECL Stream0Decl; -}; - -static inline void -GEN8_SO_DECL_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_SO_DECL_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_Stream3Decl; - GEN8_SO_DECL_pack(data, &dw_Stream3Decl, &values->Stream3Decl); - uint32_t dw_Stream2Decl; - GEN8_SO_DECL_pack(data, &dw_Stream2Decl, &values->Stream2Decl); - uint32_t dw_Stream1Decl; - GEN8_SO_DECL_pack(data, &dw_Stream1Decl, &values->Stream1Decl); - uint32_t dw_Stream0Decl; - GEN8_SO_DECL_pack(data, &dw_Stream0Decl, &values->Stream0Decl); - uint64_t qw0 = - __gen_field(dw_Stream3Decl, 48, 63) | - __gen_field(dw_Stream2Decl, 32, 47) | - __gen_field(dw_Stream1Decl, 16, 31) | - __gen_field(dw_Stream0Decl, 0, 15) | - 0; - - dw[0] = qw0; - dw[1] = qw0 >> 32; - -} - -struct GEN8_3DSTATE_SO_DECL_LIST { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t StreamtoBufferSelects3; - uint32_t StreamtoBufferSelects2; - uint32_t StreamtoBufferSelects1; - uint32_t StreamtoBufferSelects0; - uint32_t NumEntries3; - uint32_t NumEntries2; - uint32_t NumEntries1; - uint32_t NumEntries0; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_SO_DECL_LIST_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_SO_DECL_LIST * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->StreamtoBufferSelects3, 12, 15) | - __gen_field(values->StreamtoBufferSelects2, 8, 11) | - __gen_field(values->StreamtoBufferSelects1, 4, 7) | - __gen_field(values->StreamtoBufferSelects0, 0, 3) | - 0; - - dw[2] = - __gen_field(values->NumEntries3, 24, 31) | - __gen_field(values->NumEntries2, 16, 23) | - __gen_field(values->NumEntries1, 8, 15) | - __gen_field(values->NumEntries0, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_STENCIL_BUFFER_length_bias 0x00000002 -#define GEN8_3DSTATE_STENCIL_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 6, \ - .DwordLength = 3 - -#define GEN8_3DSTATE_STENCIL_BUFFER_length 0x00000005 - -struct GEN8_3DSTATE_STENCIL_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t StencilBufferEnable; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE StencilBufferObjectControlState; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; - uint32_t SurfaceQPitch; -}; - -static inline void -GEN8_3DSTATE_STENCIL_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_STENCIL_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_StencilBufferObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StencilBufferObjectControlState, &values->StencilBufferObjectControlState); - dw[1] = - __gen_field(values->StencilBufferEnable, 31, 31) | - __gen_field(dw_StencilBufferObjectControlState, 22, 28) | - __gen_field(values->SurfacePitch, 0, 16) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - dw[4] = - __gen_field(values->SurfaceQPitch, 0, 14) | - 0; - -} - -#define GEN8_3DSTATE_STREAMOUT_length_bias 0x00000002 -#define GEN8_3DSTATE_STREAMOUT_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 30, \ - .DwordLength = 3 - -#define GEN8_3DSTATE_STREAMOUT_length 0x00000005 - -struct GEN8_3DSTATE_STREAMOUT { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SOFunctionEnable; - uint32_t APIRenderingDisable; - uint32_t RenderStreamSelect; -#define LEADING 0 -#define TRAILING 1 - uint32_t ReorderMode; - bool SOStatisticsEnable; -#define Normal 0 -#define Resreved 1 -#define Force_Off 2 -#define Force_on 3 - uint32_t ForceRendering; - uint32_t Stream3VertexReadOffset; - uint32_t Stream3VertexReadLength; - uint32_t Stream2VertexReadOffset; - uint32_t Stream2VertexReadLength; - uint32_t Stream1VertexReadOffset; - uint32_t Stream1VertexReadLength; - uint32_t Stream0VertexReadOffset; - uint32_t Stream0VertexReadLength; - uint32_t Buffer1SurfacePitch; - uint32_t Buffer0SurfacePitch; - uint32_t Buffer3SurfacePitch; - uint32_t Buffer2SurfacePitch; -}; - -static inline void -GEN8_3DSTATE_STREAMOUT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_STREAMOUT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SOFunctionEnable, 31, 31) | - __gen_field(values->APIRenderingDisable, 30, 30) | - __gen_field(values->RenderStreamSelect, 27, 28) | - __gen_field(values->ReorderMode, 26, 26) | - __gen_field(values->SOStatisticsEnable, 25, 25) | - __gen_field(values->ForceRendering, 23, 24) | - 0; - - dw[2] = - __gen_field(values->Stream3VertexReadOffset, 29, 29) | - __gen_field(values->Stream3VertexReadLength, 24, 28) | - __gen_field(values->Stream2VertexReadOffset, 21, 21) | - __gen_field(values->Stream2VertexReadLength, 16, 20) | - __gen_field(values->Stream1VertexReadOffset, 13, 13) | - __gen_field(values->Stream1VertexReadLength, 8, 12) | - __gen_field(values->Stream0VertexReadOffset, 5, 5) | - __gen_field(values->Stream0VertexReadLength, 0, 4) | - 0; - - dw[3] = - __gen_field(values->Buffer1SurfacePitch, 16, 27) | - __gen_field(values->Buffer0SurfacePitch, 0, 11) | - 0; - - dw[4] = - __gen_field(values->Buffer3SurfacePitch, 16, 27) | - __gen_field(values->Buffer2SurfacePitch, 0, 11) | - 0; - -} - -#define GEN8_3DSTATE_TE_length_bias 0x00000002 -#define GEN8_3DSTATE_TE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 28, \ - .DwordLength = 2 - -#define GEN8_3DSTATE_TE_length 0x00000004 - -struct GEN8_3DSTATE_TE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define INTEGER 0 -#define ODD_FRACTIONAL 1 -#define EVEN_FRACTIONAL 2 - uint32_t Partitioning; -#define POINT 0 -#define OUTPUT_LINE 1 -#define OUTPUT_TRI_CW 2 -#define OUTPUT_TRI_CCW 3 - uint32_t OutputTopology; -#define QUAD 0 -#define TRI 1 -#define ISOLINE 2 - uint32_t TEDomain; -#define HW_TESS 0 -#define SW_TESS 1 - uint32_t TEMode; - bool TEEnable; - float MaximumTessellationFactorOdd; - float MaximumTessellationFactorNotOdd; -}; - -static inline void -GEN8_3DSTATE_TE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_TE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->Partitioning, 12, 13) | - __gen_field(values->OutputTopology, 8, 9) | - __gen_field(values->TEDomain, 4, 5) | - __gen_field(values->TEMode, 1, 2) | - __gen_field(values->TEEnable, 0, 0) | - 0; - - dw[2] = - __gen_float(values->MaximumTessellationFactorOdd) | - 0; - - dw[3] = - __gen_float(values->MaximumTessellationFactorNotOdd) | - 0; - -} - -#define GEN8_3DSTATE_URB_DS_length_bias 0x00000002 -#define GEN8_3DSTATE_URB_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 50, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_URB_DS_length 0x00000002 - -struct GEN8_3DSTATE_URB_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t DSURBStartingAddress; - uint32_t DSURBEntryAllocationSize; - uint32_t DSNumberofURBEntries; -}; - -static inline void -GEN8_3DSTATE_URB_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_URB_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->DSURBStartingAddress, 25, 31) | - __gen_field(values->DSURBEntryAllocationSize, 16, 24) | - __gen_field(values->DSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN8_3DSTATE_URB_GS_length_bias 0x00000002 -#define GEN8_3DSTATE_URB_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 51, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_URB_GS_length 0x00000002 - -struct GEN8_3DSTATE_URB_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t GSURBStartingAddress; - uint32_t GSURBEntryAllocationSize; - uint32_t GSNumberofURBEntries; -}; - -static inline void -GEN8_3DSTATE_URB_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_URB_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->GSURBStartingAddress, 25, 31) | - __gen_field(values->GSURBEntryAllocationSize, 16, 24) | - __gen_field(values->GSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN8_3DSTATE_URB_HS_length_bias 0x00000002 -#define GEN8_3DSTATE_URB_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 49, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_URB_HS_length 0x00000002 - -struct GEN8_3DSTATE_URB_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t HSURBStartingAddress; - uint32_t HSURBEntryAllocationSize; - uint32_t HSNumberofURBEntries; -}; - -static inline void -GEN8_3DSTATE_URB_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_URB_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->HSURBStartingAddress, 25, 31) | - __gen_field(values->HSURBEntryAllocationSize, 16, 24) | - __gen_field(values->HSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN8_3DSTATE_VERTEX_BUFFERS_length_bias 0x00000002 -#define GEN8_3DSTATE_VERTEX_BUFFERS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 8 - -#define GEN8_3DSTATE_VERTEX_BUFFERS_length 0x00000000 - -#define GEN8_VERTEX_BUFFER_STATE_length 0x00000004 - -struct GEN8_VERTEX_BUFFER_STATE { - uint32_t VertexBufferIndex; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; - uint32_t AddressModifyEnable; - bool NullVertexBuffer; - uint32_t BufferPitch; - __gen_address_type BufferStartingAddress; - uint32_t BufferSize; -}; - -static inline void -GEN8_VERTEX_BUFFER_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_VERTEX_BUFFER_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_MemoryObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState); - dw[0] = - __gen_field(values->VertexBufferIndex, 26, 31) | - __gen_field(dw_MemoryObjectControlState, 16, 22) | - __gen_field(values->AddressModifyEnable, 14, 14) | - __gen_field(values->NullVertexBuffer, 13, 13) | - __gen_field(values->BufferPitch, 0, 11) | - 0; - - uint32_t dw1 = - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->BufferStartingAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->BufferSize, 0, 31) | - 0; - -} - -struct GEN8_3DSTATE_VERTEX_BUFFERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_VERTEX_BUFFERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_VERTEX_BUFFERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_VERTEX_ELEMENTS_length_bias 0x00000002 -#define GEN8_3DSTATE_VERTEX_ELEMENTS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 9 - -#define GEN8_3DSTATE_VERTEX_ELEMENTS_length 0x00000000 - -#define GEN8_VERTEX_ELEMENT_STATE_length 0x00000002 - -struct GEN8_VERTEX_ELEMENT_STATE { - uint32_t VertexBufferIndex; - bool Valid; - uint32_t SourceElementFormat; - bool EdgeFlagEnable; - uint32_t SourceElementOffset; - uint32_t Component0Control; - uint32_t Component1Control; - uint32_t Component2Control; - uint32_t Component3Control; -}; - -static inline void -GEN8_VERTEX_ELEMENT_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_VERTEX_ELEMENT_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->VertexBufferIndex, 26, 31) | - __gen_field(values->Valid, 25, 25) | - __gen_field(values->SourceElementFormat, 16, 24) | - __gen_field(values->EdgeFlagEnable, 15, 15) | - __gen_field(values->SourceElementOffset, 0, 11) | - 0; - - dw[1] = - __gen_field(values->Component0Control, 28, 30) | - __gen_field(values->Component1Control, 24, 26) | - __gen_field(values->Component2Control, 20, 22) | - __gen_field(values->Component3Control, 16, 18) | - 0; - -} - -struct GEN8_3DSTATE_VERTEX_ELEMENTS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN8_3DSTATE_VERTEX_ELEMENTS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_VERTEX_ELEMENTS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_3DSTATE_VF_length_bias 0x00000002 -#define GEN8_3DSTATE_VF_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 12, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_VF_length 0x00000002 - -struct GEN8_3DSTATE_VF { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - bool IndexedDrawCutIndexEnable; - uint32_t DwordLength; - uint32_t CutIndex; -}; - -static inline void -GEN8_3DSTATE_VF_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_VF * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->IndexedDrawCutIndexEnable, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->CutIndex, 0, 31) | - 0; - -} - -#define GEN8_3DSTATE_VF_INSTANCING_length_bias 0x00000002 -#define GEN8_3DSTATE_VF_INSTANCING_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 73, \ - .DwordLength = 1 - -#define GEN8_3DSTATE_VF_INSTANCING_length 0x00000003 - -struct GEN8_3DSTATE_VF_INSTANCING { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool InstancingEnable; - uint32_t VertexElementIndex; - uint32_t InstanceDataStepRate; -}; - -static inline void -GEN8_3DSTATE_VF_INSTANCING_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_VF_INSTANCING * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->InstancingEnable, 8, 8) | - __gen_field(values->VertexElementIndex, 0, 5) | - 0; - - dw[2] = - __gen_field(values->InstanceDataStepRate, 0, 31) | - 0; - -} - -#define GEN8_3DSTATE_VF_SGVS_length_bias 0x00000002 -#define GEN8_3DSTATE_VF_SGVS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 74, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_VF_SGVS_length 0x00000002 - -struct GEN8_3DSTATE_VF_SGVS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool InstanceIDEnable; -#define COMP_0 0 -#define COMP_1 1 -#define COMP_2 2 -#define COMP_3 3 - uint32_t InstanceIDComponentNumber; - uint32_t InstanceIDElementOffset; - bool VertexIDEnable; -#define COMP_0 0 -#define COMP_1 1 -#define COMP_2 2 -#define COMP_3 3 - uint32_t VertexIDComponentNumber; - uint32_t VertexIDElementOffset; -}; - -static inline void -GEN8_3DSTATE_VF_SGVS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_VF_SGVS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->InstanceIDEnable, 31, 31) | - __gen_field(values->InstanceIDComponentNumber, 29, 30) | - __gen_field(values->InstanceIDElementOffset, 16, 21) | - __gen_field(values->VertexIDEnable, 15, 15) | - __gen_field(values->VertexIDComponentNumber, 13, 14) | - __gen_field(values->VertexIDElementOffset, 0, 5) | - 0; - -} - -#define GEN8_3DSTATE_VF_STATISTICS_length_bias 0x00000001 -#define GEN8_3DSTATE_VF_STATISTICS_header \ - .CommandType = 3, \ - .CommandSubType = 1, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 11 - -#define GEN8_3DSTATE_VF_STATISTICS_length 0x00000001 - -struct GEN8_3DSTATE_VF_STATISTICS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - bool StatisticsEnable; -}; - -static inline void -GEN8_3DSTATE_VF_STATISTICS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_VF_STATISTICS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->StatisticsEnable, 0, 0) | - 0; - -} - -#define GEN8_3DSTATE_VF_TOPOLOGY_length_bias 0x00000002 -#define GEN8_3DSTATE_VF_TOPOLOGY_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 75, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_VF_TOPOLOGY_length 0x00000002 - -struct GEN8_3DSTATE_VF_TOPOLOGY { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PrimitiveTopologyType; -}; - -static inline void -GEN8_3DSTATE_VF_TOPOLOGY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_VF_TOPOLOGY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->PrimitiveTopologyType, 0, 5) | - 0; - -} - -#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC_length_bias 0x00000002 -#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 35, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC_length 0x00000002 - -struct GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t CCViewportPointer; -}; - -static inline void -GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_CC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->CCViewportPointer, 5, 31) | - 0; - -} - -#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_length_bias 0x00000002 -#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 33, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_length 0x00000002 - -struct GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SFClipViewportPointer; -}; - -static inline void -GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->SFClipViewportPointer, 6, 31) | - 0; - -} - -#define GEN8_3DSTATE_WM_length_bias 0x00000002 -#define GEN8_3DSTATE_WM_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 20, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_WM_length 0x00000002 - -struct GEN8_3DSTATE_WM { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool StatisticsEnable; - bool LegacyDepthBufferClearEnable; - bool LegacyDepthBufferResolveEnable; - bool LegacyHierarchicalDepthBufferResolveEnable; - bool LegacyDiamondLineRasterization; -#define NORMAL 0 -#define PSEXEC 1 -#define PREPS 2 - uint32_t EarlyDepthStencilControl; -#define Normal 0 -#define ForceOff 1 -#define ForceON 2 - uint32_t ForceThreadDispatchEnable; -#define INTERP_PIXEL 0 -#define INTERP_CENTROID 2 -#define INTERP_SAMPLE 3 - uint32_t PositionZWInterpolationMode; - uint32_t BarycentricInterpolationMode; -#define _05pixels 0 -#define _10pixels 1 -#define _20pixels 2 -#define _40pixels 3 - uint32_t LineEndCapAntialiasingRegionWidth; -#define _05pixels 0 -#define _10pixels 1 -#define _20pixels 2 -#define _40pixels 3 - uint32_t LineAntialiasingRegionWidth; - bool PolygonStippleEnable; - bool LineStippleEnable; -#define RASTRULE_UPPER_LEFT 0 -#define RASTRULE_UPPER_RIGHT 1 - uint32_t PointRasterizationRule; -#define Normal 0 -#define ForceOff 1 -#define ForceON 2 - uint32_t ForceKillPixelEnable; -}; - -static inline void -GEN8_3DSTATE_WM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_WM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->StatisticsEnable, 31, 31) | - __gen_field(values->LegacyDepthBufferClearEnable, 30, 30) | - __gen_field(values->LegacyDepthBufferResolveEnable, 28, 28) | - __gen_field(values->LegacyHierarchicalDepthBufferResolveEnable, 27, 27) | - __gen_field(values->LegacyDiamondLineRasterization, 26, 26) | - __gen_field(values->EarlyDepthStencilControl, 21, 22) | - __gen_field(values->ForceThreadDispatchEnable, 19, 20) | - __gen_field(values->PositionZWInterpolationMode, 17, 18) | - __gen_field(values->BarycentricInterpolationMode, 11, 16) | - __gen_field(values->LineEndCapAntialiasingRegionWidth, 8, 9) | - __gen_field(values->LineAntialiasingRegionWidth, 6, 7) | - __gen_field(values->PolygonStippleEnable, 4, 4) | - __gen_field(values->LineStippleEnable, 3, 3) | - __gen_field(values->PointRasterizationRule, 2, 2) | - __gen_field(values->ForceKillPixelEnable, 0, 1) | - 0; - -} - -#define GEN8_3DSTATE_WM_CHROMAKEY_length_bias 0x00000002 -#define GEN8_3DSTATE_WM_CHROMAKEY_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 76, \ - .DwordLength = 0 - -#define GEN8_3DSTATE_WM_CHROMAKEY_length 0x00000002 - -struct GEN8_3DSTATE_WM_CHROMAKEY { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool ChromaKeyKillEnable; -}; - -static inline void -GEN8_3DSTATE_WM_CHROMAKEY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_WM_CHROMAKEY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ChromaKeyKillEnable, 31, 31) | - 0; - -} - -#define GEN8_3DSTATE_WM_DEPTH_STENCIL_length_bias 0x00000002 -#define GEN8_3DSTATE_WM_DEPTH_STENCIL_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 78, \ - .DwordLength = 1 - -#define GEN8_3DSTATE_WM_DEPTH_STENCIL_length 0x00000003 - -struct GEN8_3DSTATE_WM_DEPTH_STENCIL { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t StencilFailOp; - uint32_t StencilPassDepthFailOp; - uint32_t StencilPassDepthPassOp; - uint32_t BackfaceStencilTestFunction; - uint32_t BackfaceStencilFailOp; - uint32_t BackfaceStencilPassDepthFailOp; - uint32_t BackfaceStencilPassDepthPassOp; - uint32_t StencilTestFunction; - uint32_t DepthTestFunction; - bool DoubleSidedStencilEnable; - bool StencilTestEnable; - bool StencilBufferWriteEnable; - bool DepthTestEnable; - bool DepthBufferWriteEnable; - uint32_t StencilTestMask; - uint32_t StencilWriteMask; - uint32_t BackfaceStencilTestMask; - uint32_t BackfaceStencilWriteMask; -}; - -static inline void -GEN8_3DSTATE_WM_DEPTH_STENCIL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_WM_DEPTH_STENCIL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->StencilFailOp, 29, 31) | - __gen_field(values->StencilPassDepthFailOp, 26, 28) | - __gen_field(values->StencilPassDepthPassOp, 23, 25) | - __gen_field(values->BackfaceStencilTestFunction, 20, 22) | - __gen_field(values->BackfaceStencilFailOp, 17, 19) | - __gen_field(values->BackfaceStencilPassDepthFailOp, 14, 16) | - __gen_field(values->BackfaceStencilPassDepthPassOp, 11, 13) | - __gen_field(values->StencilTestFunction, 8, 10) | - __gen_field(values->DepthTestFunction, 5, 7) | - __gen_field(values->DoubleSidedStencilEnable, 4, 4) | - __gen_field(values->StencilTestEnable, 3, 3) | - __gen_field(values->StencilBufferWriteEnable, 2, 2) | - __gen_field(values->DepthTestEnable, 1, 1) | - __gen_field(values->DepthBufferWriteEnable, 0, 0) | - 0; - - dw[2] = - __gen_field(values->StencilTestMask, 24, 31) | - __gen_field(values->StencilWriteMask, 16, 23) | - __gen_field(values->BackfaceStencilTestMask, 8, 15) | - __gen_field(values->BackfaceStencilWriteMask, 0, 7) | - 0; - -} - -#define GEN8_3DSTATE_WM_HZ_OP_length_bias 0x00000002 -#define GEN8_3DSTATE_WM_HZ_OP_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 82, \ - .DwordLength = 3 - -#define GEN8_3DSTATE_WM_HZ_OP_length 0x00000005 - -struct GEN8_3DSTATE_WM_HZ_OP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool StencilBufferClearEnable; - bool DepthBufferClearEnable; - bool ScissorRectangleEnable; - bool DepthBufferResolveEnable; - bool HierarchicalDepthBufferResolveEnable; - uint32_t PixelPositionOffsetEnable; - bool FullSurfaceDepthClear; - uint32_t StencilClearValue; - uint32_t NumberofMultisamples; - uint32_t ClearRectangleYMin; - uint32_t ClearRectangleXMin; - uint32_t ClearRectangleYMax; - uint32_t ClearRectangleXMax; - uint32_t SampleMask; -}; - -static inline void -GEN8_3DSTATE_WM_HZ_OP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_3DSTATE_WM_HZ_OP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->StencilBufferClearEnable, 31, 31) | - __gen_field(values->DepthBufferClearEnable, 30, 30) | - __gen_field(values->ScissorRectangleEnable, 29, 29) | - __gen_field(values->DepthBufferResolveEnable, 28, 28) | - __gen_field(values->HierarchicalDepthBufferResolveEnable, 27, 27) | - __gen_field(values->PixelPositionOffsetEnable, 26, 26) | - __gen_field(values->FullSurfaceDepthClear, 25, 25) | - __gen_field(values->StencilClearValue, 16, 23) | - __gen_field(values->NumberofMultisamples, 13, 15) | - 0; - - dw[2] = - __gen_field(values->ClearRectangleYMin, 16, 31) | - __gen_field(values->ClearRectangleXMin, 0, 15) | - 0; - - dw[3] = - __gen_field(values->ClearRectangleYMax, 16, 31) | - __gen_field(values->ClearRectangleXMax, 0, 15) | - 0; - - dw[4] = - __gen_field(values->SampleMask, 0, 15) | - 0; - -} - -#define GEN8_GPGPU_WALKER_length_bias 0x00000002 -#define GEN8_GPGPU_WALKER_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcode = 5, \ - .DwordLength = 13 - -#define GEN8_GPGPU_WALKER_length 0x0000000f - -struct GEN8_GPGPU_WALKER { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - bool IndirectParameterEnable; - bool PredicateEnable; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - uint32_t IndirectDataLength; - uint32_t IndirectDataStartAddress; -#define SIMD8 0 -#define SIMD16 1 -#define SIMD32 2 - uint32_t SIMDSize; - uint32_t ThreadDepthCounterMaximum; - uint32_t ThreadHeightCounterMaximum; - uint32_t ThreadWidthCounterMaximum; - uint32_t ThreadGroupIDStartingX; - uint32_t ThreadGroupIDXDimension; - uint32_t ThreadGroupIDStartingY; - uint32_t ThreadGroupIDYDimension; - uint32_t ThreadGroupIDStartingResumeZ; - uint32_t ThreadGroupIDZDimension; - uint32_t RightExecutionMask; - uint32_t BottomExecutionMask; -}; - -static inline void -GEN8_GPGPU_WALKER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_GPGPU_WALKER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->IndirectParameterEnable, 10, 10) | - __gen_field(values->PredicateEnable, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - dw[3] = - __gen_offset(values->IndirectDataStartAddress, 6, 31) | - 0; - - dw[4] = - __gen_field(values->SIMDSize, 30, 31) | - __gen_field(values->ThreadDepthCounterMaximum, 16, 21) | - __gen_field(values->ThreadHeightCounterMaximum, 8, 13) | - __gen_field(values->ThreadWidthCounterMaximum, 0, 5) | - 0; - - dw[5] = - __gen_field(values->ThreadGroupIDStartingX, 0, 31) | - 0; - - dw[6] = - 0; - - dw[7] = - __gen_field(values->ThreadGroupIDXDimension, 0, 31) | - 0; - - dw[8] = - __gen_field(values->ThreadGroupIDStartingY, 0, 31) | - 0; - - dw[9] = - 0; - - dw[10] = - __gen_field(values->ThreadGroupIDYDimension, 0, 31) | - 0; - - dw[11] = - __gen_field(values->ThreadGroupIDStartingResumeZ, 0, 31) | - 0; - - dw[12] = - __gen_field(values->ThreadGroupIDZDimension, 0, 31) | - 0; - - dw[13] = - __gen_field(values->RightExecutionMask, 0, 31) | - 0; - - dw[14] = - __gen_field(values->BottomExecutionMask, 0, 31) | - 0; - -} - -#define GEN8_MEDIA_CURBE_LOAD_length_bias 0x00000002 -#define GEN8_MEDIA_CURBE_LOAD_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 1, \ - .DwordLength = 2 - -#define GEN8_MEDIA_CURBE_LOAD_length 0x00000004 - -struct GEN8_MEDIA_CURBE_LOAD { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t CURBETotalDataLength; - uint32_t CURBEDataStartAddress; -}; - -static inline void -GEN8_MEDIA_CURBE_LOAD_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MEDIA_CURBE_LOAD * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - 0; - - dw[2] = - __gen_field(values->CURBETotalDataLength, 0, 16) | - 0; - - dw[3] = - __gen_field(values->CURBEDataStartAddress, 0, 31) | - 0; - -} - -#define GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD_length_bias 0x00000002 -#define GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD_header\ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 2, \ - .DwordLength = 2 - -#define GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD_length 0x00000004 - -struct GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorTotalLength; - uint32_t InterfaceDescriptorDataStartAddress; -}; - -static inline void -GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MEDIA_INTERFACE_DESCRIPTOR_LOAD * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - 0; - - dw[2] = - __gen_field(values->InterfaceDescriptorTotalLength, 0, 16) | - 0; - - dw[3] = - __gen_offset(values->InterfaceDescriptorDataStartAddress, 0, 31) | - 0; - -} - -#define GEN8_MEDIA_OBJECT_length_bias 0x00000002 -#define GEN8_MEDIA_OBJECT_header \ - .CommandType = 3, \ - .MediaCommandPipeline = 2, \ - .MediaCommandOpcode = 1, \ - .MediaCommandSubOpcode = 0 - -#define GEN8_MEDIA_OBJECT_length 0x00000000 - -struct GEN8_MEDIA_OBJECT { - uint32_t CommandType; - uint32_t MediaCommandPipeline; - uint32_t MediaCommandOpcode; - uint32_t MediaCommandSubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - bool ChildrenPresent; -#define Nothreadsynchronization 0 -#define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 - uint32_t ThreadSynchronization; - uint32_t ForceDestination; -#define Notusingscoreboard 0 -#define Usingscoreboard 1 - uint32_t UseScoreboard; -#define Slice0 0 -#define Slice1 1 -#define Slice2 2 - uint32_t SliceDestinationSelect; -#define SubSlice2 2 -#define SubSlice1 1 -#define SubSlice0 0 - uint32_t SubSliceDestinationSelect; - uint32_t IndirectDataLength; - __gen_address_type IndirectDataStartAddress; - uint32_t ScoredboardY; - uint32_t ScoreboardX; - uint32_t ScoreboardColor; - bool ScoreboardMask; - /* variable length fields follow */ -}; - -static inline void -GEN8_MEDIA_OBJECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MEDIA_OBJECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MediaCommandPipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->MediaCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->ChildrenPresent, 31, 31) | - __gen_field(values->ThreadSynchronization, 24, 24) | - __gen_field(values->ForceDestination, 22, 22) | - __gen_field(values->UseScoreboard, 21, 21) | - __gen_field(values->SliceDestinationSelect, 19, 20) | - __gen_field(values->SubSliceDestinationSelect, 17, 18) | - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - uint32_t dw3 = - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->IndirectDataStartAddress, dw3); - - dw[4] = - __gen_field(values->ScoredboardY, 16, 24) | - __gen_field(values->ScoreboardX, 0, 8) | - 0; - - dw[5] = - __gen_field(values->ScoreboardColor, 16, 19) | - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_MEDIA_OBJECT_GRPID_length_bias 0x00000002 -#define GEN8_MEDIA_OBJECT_GRPID_header \ - .CommandType = 3, \ - .MediaCommandPipeline = 2, \ - .MediaCommandOpcode = 1, \ - .MediaCommandSubOpcode = 6 - -#define GEN8_MEDIA_OBJECT_GRPID_length 0x00000000 - -struct GEN8_MEDIA_OBJECT_GRPID { - uint32_t CommandType; - uint32_t MediaCommandPipeline; - uint32_t MediaCommandOpcode; - uint32_t MediaCommandSubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - uint32_t EndofThreadGroup; - uint32_t ForceDestination; -#define Notusingscoreboard 0 -#define Usingscoreboard 1 - uint32_t UseScoreboard; -#define Slice0 0 -#define Slice1 1 -#define Slice2 2 - uint32_t SliceDestinationSelect; -#define SubSlice2 2 -#define SubSlice1 1 -#define SubSlice0 0 - uint32_t SubSliceDestinationSelect; - uint32_t IndirectDataLength; - __gen_address_type IndirectDataStartAddress; - uint32_t ScoreboardY; - uint32_t ScoreboardX; - uint32_t ScoreboardColor; - bool ScoreboardMask; - uint32_t GroupID; - /* variable length fields follow */ -}; - -static inline void -GEN8_MEDIA_OBJECT_GRPID_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MEDIA_OBJECT_GRPID * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MediaCommandPipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->MediaCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->EndofThreadGroup, 23, 23) | - __gen_field(values->ForceDestination, 22, 22) | - __gen_field(values->UseScoreboard, 21, 21) | - __gen_field(values->SliceDestinationSelect, 19, 20) | - __gen_field(values->SubSliceDestinationSelect, 17, 18) | - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - uint32_t dw3 = - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->IndirectDataStartAddress, dw3); - - dw[4] = - __gen_field(values->ScoreboardY, 16, 24) | - __gen_field(values->ScoreboardX, 0, 8) | - 0; - - dw[5] = - __gen_field(values->ScoreboardColor, 16, 19) | - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - dw[6] = - __gen_field(values->GroupID, 0, 31) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_MEDIA_OBJECT_PRT_length_bias 0x00000002 -#define GEN8_MEDIA_OBJECT_PRT_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcode = 2, \ - .DwordLength = 14 - -#define GEN8_MEDIA_OBJECT_PRT_length 0x00000010 - -struct GEN8_MEDIA_OBJECT_PRT { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - bool ChildrenPresent; - bool PRT_FenceNeeded; -#define Rootthreadqueue 0 -#define VFEstateflush 1 - uint32_t PRT_FenceType; - uint32_t InlineData[12]; -}; - -static inline void -GEN8_MEDIA_OBJECT_PRT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MEDIA_OBJECT_PRT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->ChildrenPresent, 31, 31) | - __gen_field(values->PRT_FenceNeeded, 23, 23) | - __gen_field(values->PRT_FenceType, 22, 22) | - 0; - - dw[3] = - 0; - - for (uint32_t i = 0, j = 4; i < 12; i += 1, j++) { - dw[j] = - __gen_field(values->InlineData[i + 0], 0, 31) | - 0; - } - -} - -#define GEN8_MEDIA_OBJECT_WALKER_length_bias 0x00000002 -#define GEN8_MEDIA_OBJECT_WALKER_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcode = 3 - -#define GEN8_MEDIA_OBJECT_WALKER_length 0x00000000 - -struct GEN8_MEDIA_OBJECT_WALKER { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - bool ChildrenPresent; -#define Nothreadsynchronization 0 -#define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 - uint32_t ThreadSynchronization; -#define Notusingscoreboard 0 -#define Usingscoreboard 1 - uint32_t UseScoreboard; - uint32_t IndirectDataLength; - uint32_t IndirectDataStartAddress; - uint32_t GroupIDLoopSelect; - bool ScoreboardMask; - uint32_t ColorCountMinusOne; - uint32_t MiddleLoopExtraSteps; - uint32_t LocalMidLoopUnitY; - uint32_t MidLoopUnitX; - uint32_t GlobalLoopExecCount; - uint32_t LocalLoopExecCount; - uint32_t BlockResolutionY; - uint32_t BlockResolutionX; - uint32_t LocalStartY; - uint32_t LocalStartX; - uint32_t LocalOuterLoopStrideY; - uint32_t LocalOuterLoopStrideX; - uint32_t LocalInnerLoopUnitY; - uint32_t LocalInnerLoopUnitX; - uint32_t GlobalResolutionY; - uint32_t GlobalResolutionX; - uint32_t GlobalStartY; - uint32_t GlobalStartX; - uint32_t GlobalOuterLoopStrideY; - uint32_t GlobalOuterLoopStrideX; - uint32_t GlobalInnerLoopUnitY; - uint32_t GlobalInnerLoopUnitX; - /* variable length fields follow */ -}; - -static inline void -GEN8_MEDIA_OBJECT_WALKER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MEDIA_OBJECT_WALKER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->ChildrenPresent, 31, 31) | - __gen_field(values->ThreadSynchronization, 24, 24) | - __gen_field(values->UseScoreboard, 21, 21) | - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - dw[3] = - __gen_offset(values->IndirectDataStartAddress, 0, 31) | - 0; - - dw[4] = - 0; - - dw[5] = - __gen_field(values->GroupIDLoopSelect, 8, 31) | - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - dw[6] = - __gen_field(values->ColorCountMinusOne, 24, 27) | - __gen_field(values->MiddleLoopExtraSteps, 16, 20) | - __gen_field(values->LocalMidLoopUnitY, 12, 13) | - __gen_field(values->MidLoopUnitX, 8, 9) | - 0; - - dw[7] = - __gen_field(values->GlobalLoopExecCount, 16, 25) | - __gen_field(values->LocalLoopExecCount, 0, 9) | - 0; - - dw[8] = - __gen_field(values->BlockResolutionY, 16, 24) | - __gen_field(values->BlockResolutionX, 0, 8) | - 0; - - dw[9] = - __gen_field(values->LocalStartY, 16, 24) | - __gen_field(values->LocalStartX, 0, 8) | - 0; - - dw[10] = - 0; - - dw[11] = - __gen_field(values->LocalOuterLoopStrideY, 16, 25) | - __gen_field(values->LocalOuterLoopStrideX, 0, 9) | - 0; - - dw[12] = - __gen_field(values->LocalInnerLoopUnitY, 16, 25) | - __gen_field(values->LocalInnerLoopUnitX, 0, 9) | - 0; - - dw[13] = - __gen_field(values->GlobalResolutionY, 16, 24) | - __gen_field(values->GlobalResolutionX, 0, 8) | - 0; - - dw[14] = - __gen_field(values->GlobalStartY, 16, 25) | - __gen_field(values->GlobalStartX, 0, 9) | - 0; - - dw[15] = - __gen_field(values->GlobalOuterLoopStrideY, 16, 25) | - __gen_field(values->GlobalOuterLoopStrideX, 0, 9) | - 0; - - dw[16] = - __gen_field(values->GlobalInnerLoopUnitY, 16, 25) | - __gen_field(values->GlobalInnerLoopUnitX, 0, 9) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_MEDIA_STATE_FLUSH_length_bias 0x00000002 -#define GEN8_MEDIA_STATE_FLUSH_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 4, \ - .DwordLength = 0 - -#define GEN8_MEDIA_STATE_FLUSH_length 0x00000002 - -struct GEN8_MEDIA_STATE_FLUSH { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - bool FlushtoGO; - uint32_t WatermarkRequired; - uint32_t InterfaceDescriptorOffset; -}; - -static inline void -GEN8_MEDIA_STATE_FLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MEDIA_STATE_FLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->FlushtoGO, 7, 7) | - __gen_field(values->WatermarkRequired, 6, 6) | - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - -} - -#define GEN8_MEDIA_VFE_STATE_length_bias 0x00000002 -#define GEN8_MEDIA_VFE_STATE_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 0, \ - .DwordLength = 7 - -#define GEN8_MEDIA_VFE_STATE_length 0x00000009 - -struct GEN8_MEDIA_VFE_STATE { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t ScratchSpaceBasePointer; - uint32_t StackSize; - uint32_t PerThreadScratchSpace; - uint32_t ScratchSpaceBasePointerHigh; - uint32_t MaximumNumberofThreads; - uint32_t NumberofURBEntries; -#define Maintainingtheexistingtimestampstate 0 -#define Resettingrelativetimerandlatchingtheglobaltimestamp 1 - uint32_t ResetGatewayTimer; -#define MaintainingOpenGatewayForwardMsgCloseGatewayprotocollegacymode 0 -#define BypassingOpenGatewayCloseGatewayprotocol 1 - uint32_t BypassGatewayControl; - uint32_t SliceDisable; - uint32_t URBEntryAllocationSize; - uint32_t CURBEAllocationSize; -#define Scoreboarddisabled 0 -#define Scoreboardenabled 1 - uint32_t ScoreboardEnable; -#define StallingScoreboard 0 -#define NonStallingScoreboard 1 - uint32_t ScoreboardType; - uint32_t ScoreboardMask; - uint32_t Scoreboard3DeltaY; - uint32_t Scoreboard3DeltaX; - uint32_t Scoreboard2DeltaY; - uint32_t Scoreboard2DeltaX; - uint32_t Scoreboard1DeltaY; - uint32_t Scoreboard1DeltaX; - uint32_t Scoreboard0DeltaY; - uint32_t Scoreboard0DeltaX; - uint32_t Scoreboard7DeltaY; - uint32_t Scoreboard7DeltaX; - uint32_t Scoreboard6DeltaY; - uint32_t Scoreboard6DeltaX; - uint32_t Scoreboard5DeltaY; - uint32_t Scoreboard5DeltaX; - uint32_t Scoreboard4DeltaY; - uint32_t Scoreboard4DeltaX; -}; - -static inline void -GEN8_MEDIA_VFE_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MEDIA_VFE_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_offset(values->ScratchSpaceBasePointer, 10, 31) | - __gen_field(values->StackSize, 4, 7) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[2] = - __gen_offset(values->ScratchSpaceBasePointerHigh, 0, 15) | - 0; - - dw[3] = - __gen_field(values->MaximumNumberofThreads, 16, 31) | - __gen_field(values->NumberofURBEntries, 8, 15) | - __gen_field(values->ResetGatewayTimer, 7, 7) | - __gen_field(values->BypassGatewayControl, 6, 6) | - 0; - - dw[4] = - __gen_field(values->SliceDisable, 0, 1) | - 0; - - dw[5] = - __gen_field(values->URBEntryAllocationSize, 16, 31) | - __gen_field(values->CURBEAllocationSize, 0, 15) | - 0; - - dw[6] = - __gen_field(values->ScoreboardEnable, 31, 31) | - __gen_field(values->ScoreboardType, 30, 30) | - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - dw[7] = - __gen_field(values->Scoreboard3DeltaY, 28, 31) | - __gen_field(values->Scoreboard3DeltaX, 24, 27) | - __gen_field(values->Scoreboard2DeltaY, 20, 23) | - __gen_field(values->Scoreboard2DeltaX, 16, 19) | - __gen_field(values->Scoreboard1DeltaY, 12, 15) | - __gen_field(values->Scoreboard1DeltaX, 8, 11) | - __gen_field(values->Scoreboard0DeltaY, 4, 7) | - __gen_field(values->Scoreboard0DeltaX, 0, 3) | - 0; - - dw[8] = - __gen_field(values->Scoreboard7DeltaY, 28, 31) | - __gen_field(values->Scoreboard7DeltaX, 24, 27) | - __gen_field(values->Scoreboard6DeltaY, 20, 23) | - __gen_field(values->Scoreboard6DeltaX, 16, 19) | - __gen_field(values->Scoreboard5DeltaY, 12, 15) | - __gen_field(values->Scoreboard5DeltaX, 8, 11) | - __gen_field(values->Scoreboard4DeltaY, 4, 7) | - __gen_field(values->Scoreboard4DeltaX, 0, 3) | - 0; - -} - -#define GEN8_MI_ARB_CHECK_length_bias 0x00000001 -#define GEN8_MI_ARB_CHECK_header \ - .CommandType = 0, \ - .MICommandOpcode = 5 - -#define GEN8_MI_ARB_CHECK_length 0x00000001 - -struct GEN8_MI_ARB_CHECK { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN8_MI_ARB_CHECK_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_ARB_CHECK * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN8_MI_BATCH_BUFFER_END_length_bias 0x00000001 -#define GEN8_MI_BATCH_BUFFER_END_header \ - .CommandType = 0, \ - .MICommandOpcode = 10 - -#define GEN8_MI_BATCH_BUFFER_END_length 0x00000001 - -struct GEN8_MI_BATCH_BUFFER_END { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN8_MI_BATCH_BUFFER_END_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_BATCH_BUFFER_END * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN8_MI_BATCH_BUFFER_START_length_bias 0x00000002 -#define GEN8_MI_BATCH_BUFFER_START_header \ - .CommandType = 0, \ - .MICommandOpcode = 49, \ - .DwordLength = 1 - -#define GEN8_MI_BATCH_BUFFER_START_length 0x00000003 - -struct GEN8_MI_BATCH_BUFFER_START { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define _1stlevelbatch 0 -#define _2ndlevelbatch 1 - uint32_t _2ndLevelBatchBuffer; - bool AddOffsetEnable; - uint32_t PredicationEnable; - bool ResourceStreamerEnable; -#define ASI_GGTT 0 -#define ASI_PPGTT 1 - uint32_t AddressSpaceIndicator; - uint32_t DwordLength; - __gen_address_type BatchBufferStartAddress; -}; - -static inline void -GEN8_MI_BATCH_BUFFER_START_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_BATCH_BUFFER_START * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->_2ndLevelBatchBuffer, 22, 22) | - __gen_field(values->AddOffsetEnable, 16, 16) | - __gen_field(values->PredicationEnable, 15, 15) | - __gen_field(values->ResourceStreamerEnable, 10, 10) | - __gen_field(values->AddressSpaceIndicator, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->BatchBufferStartAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - -} - -#define GEN8_MI_CLFLUSH_length_bias 0x00000002 -#define GEN8_MI_CLFLUSH_header \ - .CommandType = 0, \ - .MICommandOpcode = 39 - -#define GEN8_MI_CLFLUSH_length 0x00000000 - -struct GEN8_MI_CLFLUSH { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t UseGlobalGTT; - uint32_t DwordLength; - __gen_address_type PageBaseAddress; - uint32_t StartingCachelineOffset; - /* variable length fields follow */ -}; - -static inline void -GEN8_MI_CLFLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_CLFLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->DwordLength, 0, 9) | - 0; - - uint32_t dw1 = - __gen_field(values->StartingCachelineOffset, 6, 11) | - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->PageBaseAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - /* variable length fields follow */ -} - -#define GEN8_MI_CONDITIONAL_BATCH_BUFFER_END_length_bias 0x00000002 -#define GEN8_MI_CONDITIONAL_BATCH_BUFFER_END_header\ - .CommandType = 0, \ - .MICommandOpcode = 54, \ - .UseGlobalGTT = 0, \ - .CompareSemaphore = 0, \ - .DwordLength = 1 - -#define GEN8_MI_CONDITIONAL_BATCH_BUFFER_END_length 0x00000003 - -struct GEN8_MI_CONDITIONAL_BATCH_BUFFER_END { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t UseGlobalGTT; - uint32_t CompareSemaphore; - uint32_t DwordLength; - uint32_t CompareDataDword; - __gen_address_type CompareAddress; -}; - -static inline void -GEN8_MI_CONDITIONAL_BATCH_BUFFER_END_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_CONDITIONAL_BATCH_BUFFER_END * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->CompareSemaphore, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->CompareDataDword, 0, 31) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->CompareAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - -} - -#define GEN8_MI_COPY_MEM_MEM_length_bias 0x00000002 -#define GEN8_MI_COPY_MEM_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 46, \ - .DwordLength = 3 - -#define GEN8_MI_COPY_MEM_MEM_length 0x00000005 - -struct GEN8_MI_COPY_MEM_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t UseGlobalGTTSource; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t UseGlobalGTTDestination; - uint32_t DwordLength; - __gen_address_type DestinationMemoryAddress; - __gen_address_type SourceMemoryAddress; -}; - -static inline void -GEN8_MI_COPY_MEM_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_COPY_MEM_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTTSource, 22, 22) | - __gen_field(values->UseGlobalGTTDestination, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->DestinationMemoryAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - uint32_t dw3 = - 0; - - uint64_t qw3 = - __gen_combine_address(data, &dw[3], values->SourceMemoryAddress, dw3); - - dw[3] = qw3; - dw[4] = qw3 >> 32; - -} - -#define GEN8_MI_LOAD_REGISTER_IMM_length_bias 0x00000002 -#define GEN8_MI_LOAD_REGISTER_IMM_header \ - .CommandType = 0, \ - .MICommandOpcode = 34, \ - .DwordLength = 1 - -#define GEN8_MI_LOAD_REGISTER_IMM_length 0x00000003 - -struct GEN8_MI_LOAD_REGISTER_IMM { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t ByteWriteDisables; - uint32_t DwordLength; - uint32_t RegisterOffset; - uint32_t DataDWord; -}; - -static inline void -GEN8_MI_LOAD_REGISTER_IMM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_LOAD_REGISTER_IMM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->ByteWriteDisables, 8, 11) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->RegisterOffset, 2, 22) | - 0; - - dw[2] = - __gen_field(values->DataDWord, 0, 31) | - 0; - -} - -#define GEN8_MI_LOAD_REGISTER_MEM_length_bias 0x00000002 -#define GEN8_MI_LOAD_REGISTER_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 41, \ - .DwordLength = 2 - -#define GEN8_MI_LOAD_REGISTER_MEM_length 0x00000004 - -struct GEN8_MI_LOAD_REGISTER_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool UseGlobalGTT; - uint32_t AsyncModeEnable; - uint32_t DwordLength; - uint32_t RegisterAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN8_MI_LOAD_REGISTER_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_LOAD_REGISTER_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->AsyncModeEnable, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->RegisterAddress, 2, 22) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - -} - -#define GEN8_MI_LOAD_SCAN_LINES_EXCL_length_bias 0x00000002 -#define GEN8_MI_LOAD_SCAN_LINES_EXCL_header \ - .CommandType = 0, \ - .MICommandOpcode = 19, \ - .DwordLength = 0 - -#define GEN8_MI_LOAD_SCAN_LINES_EXCL_length 0x00000002 - -struct GEN8_MI_LOAD_SCAN_LINES_EXCL { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define DisplayPlaneA 0 -#define DisplayPlaneB 1 -#define DisplayPlaneC 4 - uint32_t DisplayPlaneSelect; - uint32_t DwordLength; - uint32_t StartScanLineNumber; - uint32_t EndScanLineNumber; -}; - -static inline void -GEN8_MI_LOAD_SCAN_LINES_EXCL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_LOAD_SCAN_LINES_EXCL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DisplayPlaneSelect, 19, 21) | - __gen_field(values->DwordLength, 0, 5) | - 0; - - dw[1] = - __gen_field(values->StartScanLineNumber, 16, 28) | - __gen_field(values->EndScanLineNumber, 0, 12) | - 0; - -} - -#define GEN8_MI_LOAD_SCAN_LINES_INCL_length_bias 0x00000002 -#define GEN8_MI_LOAD_SCAN_LINES_INCL_header \ - .CommandType = 0, \ - .MICommandOpcode = 18, \ - .DwordLength = 0 - -#define GEN8_MI_LOAD_SCAN_LINES_INCL_length 0x00000002 - -struct GEN8_MI_LOAD_SCAN_LINES_INCL { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define DisplayPlaneA 0 -#define DisplayPlaneB 1 -#define DisplayPlaneC 4 - uint32_t DisplayPlaneSelect; -#define NeverForward 0 -#define AlwaysForward 1 -#define ConditionallyForward 2 - bool ScanLineEventDoneForward; - uint32_t DwordLength; - uint32_t StartScanLineNumber; - uint32_t EndScanLineNumber; -}; - -static inline void -GEN8_MI_LOAD_SCAN_LINES_INCL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_LOAD_SCAN_LINES_INCL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DisplayPlaneSelect, 19, 21) | - __gen_field(values->ScanLineEventDoneForward, 17, 18) | - __gen_field(values->DwordLength, 0, 5) | - 0; - - dw[1] = - __gen_field(values->StartScanLineNumber, 16, 28) | - __gen_field(values->EndScanLineNumber, 0, 12) | - 0; - -} - -#define GEN8_MI_LOAD_URB_MEM_length_bias 0x00000002 -#define GEN8_MI_LOAD_URB_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 44, \ - .DwordLength = 2 - -#define GEN8_MI_LOAD_URB_MEM_length 0x00000004 - -struct GEN8_MI_LOAD_URB_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t URBAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN8_MI_LOAD_URB_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_LOAD_URB_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->URBAddress, 2, 14) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - -} - -#define GEN8_MI_MATH_length_bias 0x00000002 -#define GEN8_MI_MATH_header \ - .CommandType = 0, \ - .MICommandOpcode = 26 - -#define GEN8_MI_MATH_length 0x00000000 - -struct GEN8_MI_MATH { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t ALUINSTRUCTION1; - uint32_t ALUINSTRUCTION2; - /* variable length fields follow */ -}; - -static inline void -GEN8_MI_MATH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_MATH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 5) | - 0; - - dw[1] = - __gen_field(values->ALUINSTRUCTION1, 0, 31) | - 0; - - dw[2] = - __gen_field(values->ALUINSTRUCTION2, 0, 31) | - 0; - - /* variable length fields follow */ -} - -#define GEN8_MI_NOOP_length_bias 0x00000001 -#define GEN8_MI_NOOP_header \ - .CommandType = 0, \ - .MICommandOpcode = 0 - -#define GEN8_MI_NOOP_length 0x00000001 - -struct GEN8_MI_NOOP { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool IdentificationNumberRegisterWriteEnable; - uint32_t IdentificationNumber; -}; - -static inline void -GEN8_MI_NOOP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_NOOP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->IdentificationNumberRegisterWriteEnable, 22, 22) | - __gen_field(values->IdentificationNumber, 0, 21) | - 0; - -} - -#define GEN8_MI_PREDICATE_length_bias 0x00000001 -#define GEN8_MI_PREDICATE_header \ - .CommandType = 0, \ - .MICommandOpcode = 12 - -#define GEN8_MI_PREDICATE_length 0x00000001 - -struct GEN8_MI_PREDICATE { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define LOAD_KEEP 0 -#define LOAD_LOAD 2 -#define LOAD_LOADINV 3 - uint32_t LoadOperation; -#define COMBINE_SET 0 -#define COMBINE_AND 1 -#define COMBINE_OR 2 -#define COMBINE_XOR 3 - uint32_t CombineOperation; -#define COMPARE_SRCS_EQUAL 2 -#define COMPARE_DELTAS_EQUAL 3 - uint32_t CompareOperation; -}; - -static inline void -GEN8_MI_PREDICATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_PREDICATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->LoadOperation, 6, 7) | - __gen_field(values->CombineOperation, 3, 4) | - __gen_field(values->CompareOperation, 0, 1) | - 0; - -} - -#define GEN8_MI_REPORT_HEAD_length_bias 0x00000001 -#define GEN8_MI_REPORT_HEAD_header \ - .CommandType = 0, \ - .MICommandOpcode = 7 - -#define GEN8_MI_REPORT_HEAD_length 0x00000001 - -struct GEN8_MI_REPORT_HEAD { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN8_MI_REPORT_HEAD_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_REPORT_HEAD * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN8_MI_RS_CONTEXT_length_bias 0x00000001 -#define GEN8_MI_RS_CONTEXT_header \ - .CommandType = 0, \ - .MICommandOpcode = 15 - -#define GEN8_MI_RS_CONTEXT_length 0x00000001 - -struct GEN8_MI_RS_CONTEXT { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define RS_RESTORE 0 -#define RS_SAVE 1 - uint32_t ResourceStreamerSave; -}; - -static inline void -GEN8_MI_RS_CONTEXT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_RS_CONTEXT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->ResourceStreamerSave, 0, 0) | - 0; - -} - -#define GEN8_MI_RS_CONTROL_length_bias 0x00000001 -#define GEN8_MI_RS_CONTROL_header \ - .CommandType = 0, \ - .MICommandOpcode = 6 - -#define GEN8_MI_RS_CONTROL_length 0x00000001 - -struct GEN8_MI_RS_CONTROL { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define RS_STOP 0 -#define RS_START 1 - uint32_t ResourceStreamerControl; -}; - -static inline void -GEN8_MI_RS_CONTROL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_RS_CONTROL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->ResourceStreamerControl, 0, 0) | - 0; - -} - -#define GEN8_MI_RS_STORE_DATA_IMM_length_bias 0x00000002 -#define GEN8_MI_RS_STORE_DATA_IMM_header \ - .CommandType = 0, \ - .MICommandOpcode = 43, \ - .DwordLength = 2 - -#define GEN8_MI_RS_STORE_DATA_IMM_length 0x00000004 - -struct GEN8_MI_RS_STORE_DATA_IMM { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - __gen_address_type DestinationAddress; - uint32_t CoreModeEnable; - uint32_t DataDWord0; -}; - -static inline void -GEN8_MI_RS_STORE_DATA_IMM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_RS_STORE_DATA_IMM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - __gen_field(values->CoreModeEnable, 0, 0) | - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->DestinationAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->DataDWord0, 0, 31) | - 0; - -} - -#define GEN8_MI_SET_CONTEXT_length_bias 0x00000002 -#define GEN8_MI_SET_CONTEXT_header \ - .CommandType = 0, \ - .MICommandOpcode = 24, \ - .DwordLength = 0 - -#define GEN8_MI_SET_CONTEXT_length 0x00000002 - -struct GEN8_MI_SET_CONTEXT { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - __gen_address_type LogicalContextAddress; - uint32_t ReservedMustbe1; - bool CoreModeEnable; - bool ResourceStreamerStateSaveEnable; - bool ResourceStreamerStateRestoreEnable; - uint32_t ForceRestore; - uint32_t RestoreInhibit; -}; - -static inline void -GEN8_MI_SET_CONTEXT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_SET_CONTEXT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - __gen_field(values->ReservedMustbe1, 8, 8) | - __gen_field(values->CoreModeEnable, 4, 4) | - __gen_field(values->ResourceStreamerStateSaveEnable, 3, 3) | - __gen_field(values->ResourceStreamerStateRestoreEnable, 2, 2) | - __gen_field(values->ForceRestore, 1, 1) | - __gen_field(values->RestoreInhibit, 0, 0) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->LogicalContextAddress, dw1); - -} - -#define GEN8_MI_SET_PREDICATE_length_bias 0x00000001 -#define GEN8_MI_SET_PREDICATE_header \ - .CommandType = 0, \ - .MICommandOpcode = 1 - -#define GEN8_MI_SET_PREDICATE_length 0x00000001 - -struct GEN8_MI_SET_PREDICATE { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define NOOPNever 0 -#define NOOPonResult2clear 1 -#define NOOPonResult2set 2 -#define NOOPonResultclear 3 -#define NOOPonResultset 4 -#define Executewhenonesliceenabled 5 -#define Executewhentwoslicesareenabled 6 -#define Executewhenthreeslicesareenabled 7 -#define NOOPAlways 15 - uint32_t PREDICATEENABLE; -}; - -static inline void -GEN8_MI_SET_PREDICATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_SET_PREDICATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->PREDICATEENABLE, 0, 3) | - 0; - -} - -#define GEN8_MI_STORE_DATA_IMM_length_bias 0x00000002 -#define GEN8_MI_STORE_DATA_IMM_header \ - .CommandType = 0, \ - .MICommandOpcode = 32, \ - .DwordLength = 2 - -#define GEN8_MI_STORE_DATA_IMM_length 0x00000004 - -struct GEN8_MI_STORE_DATA_IMM { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool UseGlobalGTT; - bool StoreQword; - uint32_t DwordLength; - __gen_address_type Address; - uint32_t CoreModeEnable; - uint32_t DataDWord0; - uint32_t DataDWord1; -}; - -static inline void -GEN8_MI_STORE_DATA_IMM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_STORE_DATA_IMM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->StoreQword, 21, 21) | - __gen_field(values->DwordLength, 0, 9) | - 0; - - uint32_t dw1 = - __gen_field(values->CoreModeEnable, 0, 0) | - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->Address, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->DataDWord0, 0, 31) | - 0; - - dw[4] = - __gen_field(values->DataDWord1, 0, 31) | - 0; - -} - -#define GEN8_MI_STORE_DATA_INDEX_length_bias 0x00000002 -#define GEN8_MI_STORE_DATA_INDEX_header \ - .CommandType = 0, \ - .MICommandOpcode = 33, \ - .DwordLength = 1 - -#define GEN8_MI_STORE_DATA_INDEX_length 0x00000003 - -struct GEN8_MI_STORE_DATA_INDEX { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t UsePerProcessHardwareStatusPage; - uint32_t DwordLength; - uint32_t Offset; - uint32_t DataDWord0; - uint32_t DataDWord1; -}; - -static inline void -GEN8_MI_STORE_DATA_INDEX_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_STORE_DATA_INDEX * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UsePerProcessHardwareStatusPage, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->Offset, 2, 11) | - 0; - - dw[2] = - __gen_field(values->DataDWord0, 0, 31) | - 0; - - dw[3] = - __gen_field(values->DataDWord1, 0, 31) | - 0; - -} - -#define GEN8_MI_STORE_URB_MEM_length_bias 0x00000002 -#define GEN8_MI_STORE_URB_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 45, \ - .DwordLength = 2 - -#define GEN8_MI_STORE_URB_MEM_length 0x00000004 - -struct GEN8_MI_STORE_URB_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t URBAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN8_MI_STORE_URB_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_STORE_URB_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->URBAddress, 2, 14) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - -} - -#define GEN8_MI_SUSPEND_FLUSH_length_bias 0x00000001 -#define GEN8_MI_SUSPEND_FLUSH_header \ - .CommandType = 0, \ - .MICommandOpcode = 11 - -#define GEN8_MI_SUSPEND_FLUSH_length 0x00000001 - -struct GEN8_MI_SUSPEND_FLUSH { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool SuspendFlush; -}; - -static inline void -GEN8_MI_SUSPEND_FLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_SUSPEND_FLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->SuspendFlush, 0, 0) | - 0; - -} - -#define GEN8_MI_TOPOLOGY_FILTER_length_bias 0x00000001 -#define GEN8_MI_TOPOLOGY_FILTER_header \ - .CommandType = 0, \ - .MICommandOpcode = 13 - -#define GEN8_MI_TOPOLOGY_FILTER_length 0x00000001 - -struct GEN8_MI_TOPOLOGY_FILTER { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t TopologyFilterValue; -}; - -static inline void -GEN8_MI_TOPOLOGY_FILTER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_TOPOLOGY_FILTER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->TopologyFilterValue, 0, 5) | - 0; - -} - -#define GEN8_MI_UPDATE_GTT_length_bias 0x00000002 -#define GEN8_MI_UPDATE_GTT_header \ - .CommandType = 0, \ - .MICommandOpcode = 35 - -#define GEN8_MI_UPDATE_GTT_length 0x00000000 - -struct GEN8_MI_UPDATE_GTT { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - __gen_address_type EntryAddress; - /* variable length fields follow */ -}; - -static inline void -GEN8_MI_UPDATE_GTT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_UPDATE_GTT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 9) | - 0; - - uint32_t dw1 = - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->EntryAddress, dw1); - - /* variable length fields follow */ -} - -#define GEN8_MI_URB_ATOMIC_ALLOC_length_bias 0x00000001 -#define GEN8_MI_URB_ATOMIC_ALLOC_header \ - .CommandType = 0, \ - .MICommandOpcode = 9 - -#define GEN8_MI_URB_ATOMIC_ALLOC_length 0x00000001 - -struct GEN8_MI_URB_ATOMIC_ALLOC { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t URBAtomicStorageOffset; - uint32_t URBAtomicStorageSize; -}; - -static inline void -GEN8_MI_URB_ATOMIC_ALLOC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_URB_ATOMIC_ALLOC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->URBAtomicStorageOffset, 12, 19) | - __gen_field(values->URBAtomicStorageSize, 0, 8) | - 0; - -} - -#define GEN8_MI_URB_CLEAR_length_bias 0x00000002 -#define GEN8_MI_URB_CLEAR_header \ - .CommandType = 0, \ - .MICommandOpcode = 25, \ - .DwordLength = 0 - -#define GEN8_MI_URB_CLEAR_length 0x00000002 - -struct GEN8_MI_URB_CLEAR { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t URBClearLength; - uint32_t URBAddress; -}; - -static inline void -GEN8_MI_URB_CLEAR_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_URB_CLEAR * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->URBClearLength, 16, 29) | - __gen_offset(values->URBAddress, 0, 14) | - 0; - -} - -#define GEN8_MI_USER_INTERRUPT_length_bias 0x00000001 -#define GEN8_MI_USER_INTERRUPT_header \ - .CommandType = 0, \ - .MICommandOpcode = 2 - -#define GEN8_MI_USER_INTERRUPT_length 0x00000001 - -struct GEN8_MI_USER_INTERRUPT { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN8_MI_USER_INTERRUPT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_USER_INTERRUPT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN8_MI_WAIT_FOR_EVENT_length_bias 0x00000001 -#define GEN8_MI_WAIT_FOR_EVENT_header \ - .CommandType = 0, \ - .MICommandOpcode = 3 - -#define GEN8_MI_WAIT_FOR_EVENT_length 0x00000001 - -struct GEN8_MI_WAIT_FOR_EVENT { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool DisplayPipeCVerticalBlankWaitEnable; - bool DisplaySpriteCFlipPendingWaitEnable; - bool DisplayPlaneCFlipPendingWaitEnable; - bool DisplayPipeCScanLineWaitEnable; - bool DisplayPipeBVerticalBlankWaitEnable; - bool DisplaySpriteBFlipPendingWaitEnable; - bool DisplayPlaneBFlipPendingWaitEnable; - bool DisplayPipeBScanLineWaitEnable; - bool DisplayPipeAVerticalBlankWaitEnable; - bool DisplaySpriteAFlipPendingWaitEnable; - bool DisplayPlaneAFlipPendingWaitEnable; - bool DisplayPipeAScanLineWaitEnable; -}; - -static inline void -GEN8_MI_WAIT_FOR_EVENT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_MI_WAIT_FOR_EVENT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DisplayPipeCVerticalBlankWaitEnable, 21, 21) | - __gen_field(values->DisplaySpriteCFlipPendingWaitEnable, 20, 20) | - __gen_field(values->DisplayPlaneCFlipPendingWaitEnable, 15, 15) | - __gen_field(values->DisplayPipeCScanLineWaitEnable, 14, 14) | - __gen_field(values->DisplayPipeBVerticalBlankWaitEnable, 11, 11) | - __gen_field(values->DisplaySpriteBFlipPendingWaitEnable, 10, 10) | - __gen_field(values->DisplayPlaneBFlipPendingWaitEnable, 9, 9) | - __gen_field(values->DisplayPipeBScanLineWaitEnable, 8, 8) | - __gen_field(values->DisplayPipeAVerticalBlankWaitEnable, 3, 3) | - __gen_field(values->DisplaySpriteAFlipPendingWaitEnable, 2, 2) | - __gen_field(values->DisplayPlaneAFlipPendingWaitEnable, 1, 1) | - __gen_field(values->DisplayPipeAScanLineWaitEnable, 0, 0) | - 0; - -} - -#define GEN8_PIPE_CONTROL_length_bias 0x00000002 -#define GEN8_PIPE_CONTROL_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 2, \ - ._3DCommandSubOpcode = 0, \ - .DwordLength = 4 - -#define GEN8_PIPE_CONTROL_length 0x00000006 - -struct GEN8_PIPE_CONTROL { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define DAT_PPGTT 0 -#define DAT_GGTT 1 - uint32_t DestinationAddressType; -#define NoLRIOperation 0 -#define MMIOWriteImmediateData 1 - uint32_t LRIPostSyncOperation; - uint32_t StoreDataIndex; - uint32_t CommandStreamerStallEnable; -#define DontReset 0 -#define Reset 1 - uint32_t GlobalSnapshotCountReset; - uint32_t TLBInvalidate; - bool GenericMediaStateClear; -#define NoWrite 0 -#define WriteImmediateData 1 -#define WritePSDepthCount 2 -#define WriteTimestamp 3 - uint32_t PostSyncOperation; - bool DepthStallEnable; -#define DisableFlush 0 -#define EnableFlush 1 - bool RenderTargetCacheFlushEnable; - bool InstructionCacheInvalidateEnable; - bool TextureCacheInvalidationEnable; - bool IndirectStatePointersDisable; - bool NotifyEnable; - bool PipeControlFlushEnable; - bool DCFlushEnable; - bool VFCacheInvalidationEnable; - bool ConstantCacheInvalidationEnable; - bool StateCacheInvalidationEnable; - bool StallAtPixelScoreboard; -#define FlushDisabled 0 -#define FlushEnabled 1 - bool DepthCacheFlushEnable; - __gen_address_type Address; - uint64_t ImmediateData; -}; - -static inline void -GEN8_PIPE_CONTROL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_PIPE_CONTROL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->DestinationAddressType, 24, 24) | - __gen_field(values->LRIPostSyncOperation, 23, 23) | - __gen_field(values->StoreDataIndex, 21, 21) | - __gen_field(values->CommandStreamerStallEnable, 20, 20) | - __gen_field(values->GlobalSnapshotCountReset, 19, 19) | - __gen_field(values->TLBInvalidate, 18, 18) | - __gen_field(values->GenericMediaStateClear, 16, 16) | - __gen_field(values->PostSyncOperation, 14, 15) | - __gen_field(values->DepthStallEnable, 13, 13) | - __gen_field(values->RenderTargetCacheFlushEnable, 12, 12) | - __gen_field(values->InstructionCacheInvalidateEnable, 11, 11) | - __gen_field(values->TextureCacheInvalidationEnable, 10, 10) | - __gen_field(values->IndirectStatePointersDisable, 9, 9) | - __gen_field(values->NotifyEnable, 8, 8) | - __gen_field(values->PipeControlFlushEnable, 7, 7) | - __gen_field(values->DCFlushEnable, 5, 5) | - __gen_field(values->VFCacheInvalidationEnable, 4, 4) | - __gen_field(values->ConstantCacheInvalidationEnable, 3, 3) | - __gen_field(values->StateCacheInvalidationEnable, 2, 2) | - __gen_field(values->StallAtPixelScoreboard, 1, 1) | - __gen_field(values->DepthCacheFlushEnable, 0, 0) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->Address, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - uint64_t qw4 = - __gen_field(values->ImmediateData, 0, 63) | - 0; - - dw[4] = qw4; - dw[5] = qw4 >> 32; - -} - -#define GEN8_SCISSOR_RECT_length 0x00000002 - -struct GEN8_SCISSOR_RECT { - uint32_t ScissorRectangleYMin; - uint32_t ScissorRectangleXMin; - uint32_t ScissorRectangleYMax; - uint32_t ScissorRectangleXMax; -}; - -static inline void -GEN8_SCISSOR_RECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_SCISSOR_RECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->ScissorRectangleYMin, 16, 31) | - __gen_field(values->ScissorRectangleXMin, 0, 15) | - 0; - - dw[1] = - __gen_field(values->ScissorRectangleYMax, 16, 31) | - __gen_field(values->ScissorRectangleXMax, 0, 15) | - 0; - -} - -#define GEN8_SF_CLIP_VIEWPORT_length 0x00000010 - -struct GEN8_SF_CLIP_VIEWPORT { - float ViewportMatrixElementm00; - float ViewportMatrixElementm11; - float ViewportMatrixElementm22; - float ViewportMatrixElementm30; - float ViewportMatrixElementm31; - float ViewportMatrixElementm32; - float XMinClipGuardband; - float XMaxClipGuardband; - float YMinClipGuardband; - float YMaxClipGuardband; - float XMinViewPort; - float XMaxViewPort; - float YMinViewPort; - float YMaxViewPort; -}; - -static inline void -GEN8_SF_CLIP_VIEWPORT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_SF_CLIP_VIEWPORT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_float(values->ViewportMatrixElementm00) | - 0; - - dw[1] = - __gen_float(values->ViewportMatrixElementm11) | - 0; - - dw[2] = - __gen_float(values->ViewportMatrixElementm22) | - 0; - - dw[3] = - __gen_float(values->ViewportMatrixElementm30) | - 0; - - dw[4] = - __gen_float(values->ViewportMatrixElementm31) | - 0; - - dw[5] = - __gen_float(values->ViewportMatrixElementm32) | - 0; - - dw[6] = - 0; - - dw[7] = - 0; - - dw[8] = - __gen_float(values->XMinClipGuardband) | - 0; - - dw[9] = - __gen_float(values->XMaxClipGuardband) | - 0; - - dw[10] = - __gen_float(values->YMinClipGuardband) | - 0; - - dw[11] = - __gen_float(values->YMaxClipGuardband) | - 0; - - dw[12] = - __gen_float(values->XMinViewPort) | - 0; - - dw[13] = - __gen_float(values->XMaxViewPort) | - 0; - - dw[14] = - __gen_float(values->YMinViewPort) | - 0; - - dw[15] = - __gen_float(values->YMaxViewPort) | - 0; - -} - -#define GEN8_BLEND_STATE_length 0x00000011 - -#define GEN8_BLEND_STATE_ENTRY_length 0x00000002 - -struct GEN8_BLEND_STATE_ENTRY { - bool LogicOpEnable; - uint32_t LogicOpFunction; - uint32_t PreBlendSourceOnlyClampEnable; -#define COLORCLAMP_UNORM 0 -#define COLORCLAMP_SNORM 1 -#define COLORCLAMP_RTFORMAT 2 - uint32_t ColorClampRange; - bool PreBlendColorClampEnable; - bool PostBlendColorClampEnable; - bool ColorBufferBlendEnable; - uint32_t SourceBlendFactor; - uint32_t DestinationBlendFactor; - uint32_t ColorBlendFunction; - uint32_t SourceAlphaBlendFactor; - uint32_t DestinationAlphaBlendFactor; - uint32_t AlphaBlendFunction; - bool WriteDisableAlpha; - bool WriteDisableRed; - bool WriteDisableGreen; - bool WriteDisableBlue; -}; - -static inline void -GEN8_BLEND_STATE_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_BLEND_STATE_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint64_t qw0 = - __gen_field(values->LogicOpEnable, 63, 63) | - __gen_field(values->LogicOpFunction, 59, 62) | - __gen_field(values->PreBlendSourceOnlyClampEnable, 36, 36) | - __gen_field(values->ColorClampRange, 34, 35) | - __gen_field(values->PreBlendColorClampEnable, 33, 33) | - __gen_field(values->PostBlendColorClampEnable, 32, 32) | - __gen_field(values->ColorBufferBlendEnable, 31, 31) | - __gen_field(values->SourceBlendFactor, 26, 30) | - __gen_field(values->DestinationBlendFactor, 21, 25) | - __gen_field(values->ColorBlendFunction, 18, 20) | - __gen_field(values->SourceAlphaBlendFactor, 13, 17) | - __gen_field(values->DestinationAlphaBlendFactor, 8, 12) | - __gen_field(values->AlphaBlendFunction, 5, 7) | - __gen_field(values->WriteDisableAlpha, 3, 3) | - __gen_field(values->WriteDisableRed, 2, 2) | - __gen_field(values->WriteDisableGreen, 1, 1) | - __gen_field(values->WriteDisableBlue, 0, 0) | - 0; - - dw[0] = qw0; - dw[1] = qw0 >> 32; - -} - -struct GEN8_BLEND_STATE { - bool AlphaToCoverageEnable; - bool IndependentAlphaBlendEnable; - bool AlphaToOneEnable; - bool AlphaToCoverageDitherEnable; - bool AlphaTestEnable; - uint32_t AlphaTestFunction; - bool ColorDitherEnable; - uint32_t XDitherOffset; - uint32_t YDitherOffset; - struct GEN8_BLEND_STATE_ENTRY Entry[8]; -}; - -static inline void -GEN8_BLEND_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_BLEND_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->AlphaToCoverageEnable, 31, 31) | - __gen_field(values->IndependentAlphaBlendEnable, 30, 30) | - __gen_field(values->AlphaToOneEnable, 29, 29) | - __gen_field(values->AlphaToCoverageDitherEnable, 28, 28) | - __gen_field(values->AlphaTestEnable, 27, 27) | - __gen_field(values->AlphaTestFunction, 24, 26) | - __gen_field(values->ColorDitherEnable, 23, 23) | - __gen_field(values->XDitherOffset, 21, 22) | - __gen_field(values->YDitherOffset, 19, 20) | - 0; - - for (uint32_t i = 0, j = 1; i < 8; i++, j += 2) - GEN8_BLEND_STATE_ENTRY_pack(data, &dw[j], &values->Entry[i]); -} - -#define GEN8_CC_VIEWPORT_length 0x00000002 - -struct GEN8_CC_VIEWPORT { - float MinimumDepth; - float MaximumDepth; -}; - -static inline void -GEN8_CC_VIEWPORT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_CC_VIEWPORT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_float(values->MinimumDepth) | - 0; - - dw[1] = - __gen_float(values->MaximumDepth) | - 0; - -} - -#define GEN8_COLOR_CALC_STATE_length 0x00000006 - -struct GEN8_COLOR_CALC_STATE { - uint32_t StencilReferenceValue; - uint32_t BackFaceStencilReferenceValue; -#define Cancelled 0 -#define NotCancelled 1 - uint32_t RoundDisableFunctionDisable; -#define ALPHATEST_UNORM8 0 -#define ALPHATEST_FLOAT32 1 - uint32_t AlphaTestFormat; - uint32_t AlphaReferenceValueAsUNORM8; - float AlphaReferenceValueAsFLOAT32; - float BlendConstantColorRed; - float BlendConstantColorGreen; - float BlendConstantColorBlue; - float BlendConstantColorAlpha; -}; - -static inline void -GEN8_COLOR_CALC_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_COLOR_CALC_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->StencilReferenceValue, 24, 31) | - __gen_field(values->BackFaceStencilReferenceValue, 16, 23) | - __gen_field(values->RoundDisableFunctionDisable, 15, 15) | - __gen_field(values->AlphaTestFormat, 0, 0) | - 0; - - dw[1] = - __gen_field(values->AlphaReferenceValueAsUNORM8, 0, 31) | - __gen_float(values->AlphaReferenceValueAsFLOAT32) | - 0; - - dw[2] = - __gen_float(values->BlendConstantColorRed) | - 0; - - dw[3] = - __gen_float(values->BlendConstantColorGreen) | - 0; - - dw[4] = - __gen_float(values->BlendConstantColorBlue) | - 0; - - dw[5] = - __gen_float(values->BlendConstantColorAlpha) | - 0; - -} - -#define GEN8_BLACK_LEVEL_CORRECTION_STATE__DW7576_length 0x00000002 - -struct GEN8_BLACK_LEVEL_CORRECTION_STATE__DW7576 { - uint32_t BlackPointOffsetR; - uint32_t BlackPointOffsetG; - uint32_t BlackPointOffsetB; -}; - -static inline void -GEN8_BLACK_LEVEL_CORRECTION_STATE__DW7576_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_BLACK_LEVEL_CORRECTION_STATE__DW7576 * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->BlackPointOffsetR, 0, 12) | - 0; - - dw[1] = - __gen_field(values->BlackPointOffsetG, 13, 25) | - __gen_field(values->BlackPointOffsetB, 0, 12) | - 0; - -} - -#define GEN8_INTERFACE_DESCRIPTOR_DATA_length 0x00000008 - -struct GEN8_INTERFACE_DESCRIPTOR_DATA { - uint32_t KernelStartPointer; - uint32_t KernelStartPointerHigh; -#define Ftz 0 -#define SetByKernel 1 - uint32_t DenormMode; -#define Multiple 0 -#define Single 1 - uint32_t SingleProgramFlow; -#define NormalPriority 0 -#define HighPriority 1 - uint32_t ThreadPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool MaskStackExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t SamplerStatePointer; -#define Nosamplersused 0 -#define Between1and4samplersused 1 -#define Between5and8samplersused 2 -#define Between9and12samplersused 3 -#define Between13and16samplersused 4 - uint32_t SamplerCount; - uint32_t BindingTablePointer; - uint32_t BindingTableEntryCount; - uint32_t ConstantIndirectURBEntryReadLength; - uint32_t ConstantURBEntryReadOffset; -#define RTNE 0 -#define RU 1 -#define RD 2 -#define RTZ 3 - uint32_t RoundingMode; - bool BarrierEnable; -#define Encodes0k 0 -#define Encodes4k 1 -#define Encodes8k 2 -#define Encodes16k 4 -#define Encodes32k 8 -#define Encodes64k 16 - uint32_t SharedLocalMemorySize; - uint32_t NumberofThreadsinGPGPUThreadGroup; - uint32_t CrossThreadConstantDataReadLength; -}; - -static inline void -GEN8_INTERFACE_DESCRIPTOR_DATA_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_INTERFACE_DESCRIPTOR_DATA * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_offset(values->KernelStartPointer, 6, 31) | - 0; - - dw[1] = - __gen_offset(values->KernelStartPointerHigh, 0, 15) | - 0; - - dw[2] = - __gen_field(values->DenormMode, 19, 19) | - __gen_field(values->SingleProgramFlow, 18, 18) | - __gen_field(values->ThreadPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->MaskStackExceptionEnable, 11, 11) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - dw[3] = - __gen_offset(values->SamplerStatePointer, 5, 31) | - __gen_field(values->SamplerCount, 2, 4) | - 0; - - dw[4] = - __gen_offset(values->BindingTablePointer, 5, 15) | - __gen_field(values->BindingTableEntryCount, 0, 4) | - 0; - - dw[5] = - __gen_field(values->ConstantIndirectURBEntryReadLength, 16, 31) | - __gen_field(values->ConstantURBEntryReadOffset, 0, 15) | - 0; - - dw[6] = - __gen_field(values->RoundingMode, 22, 23) | - __gen_field(values->BarrierEnable, 21, 21) | - __gen_field(values->SharedLocalMemorySize, 16, 20) | - __gen_field(values->NumberofThreadsinGPGPUThreadGroup, 0, 9) | - 0; - - dw[7] = - __gen_field(values->CrossThreadConstantDataReadLength, 0, 7) | - 0; - -} - -#define GEN8_BINDING_TABLE_STATE_length 0x00000001 - -struct GEN8_BINDING_TABLE_STATE { - uint32_t SurfaceStatePointer; -}; - -static inline void -GEN8_BINDING_TABLE_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_BINDING_TABLE_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_offset(values->SurfaceStatePointer, 6, 31) | - 0; - -} - -#define GEN8_RENDER_SURFACE_STATE_length 0x00000010 - -struct GEN8_RENDER_SURFACE_STATE { -#define SURFTYPE_1D 0 -#define SURFTYPE_2D 1 -#define SURFTYPE_3D 2 -#define SURFTYPE_CUBE 3 -#define SURFTYPE_BUFFER 4 -#define SURFTYPE_STRBUF 5 -#define SURFTYPE_NULL 7 - uint32_t SurfaceType; - bool SurfaceArray; - uint32_t SurfaceFormat; -#define VALIGN4 1 -#define VALIGN8 2 -#define VALIGN16 3 - uint32_t SurfaceVerticalAlignment; -#define HALIGN4 1 -#define HALIGN8 2 -#define HALIGN16 3 - uint32_t SurfaceHorizontalAlignment; -#define LINEAR 0 -#define WMAJOR 1 -#define XMAJOR 2 -#define YMAJOR 3 - uint32_t TileMode; - uint32_t VerticalLineStride; - uint32_t VerticalLineStrideOffset; - bool SamplerL2BypassModeDisable; -#define WriteOnlyCache 0 -#define ReadWriteCache 1 - uint32_t RenderCacheReadWriteMode; -#define NORMAL_MODE 0 -#define PROGRESSIVE_FRAME 2 -#define INTERLACED_FRAME 3 - uint32_t MediaBoundaryPixelMode; - bool CubeFaceEnablePositiveZ; - bool CubeFaceEnableNegativeZ; - bool CubeFaceEnablePositiveY; - bool CubeFaceEnableNegativeY; - bool CubeFaceEnablePositiveX; - bool CubeFaceEnableNegativeX; - struct GEN8_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; - float BaseMipLevel; - uint32_t SurfaceQPitch; - uint32_t Height; - uint32_t Width; - uint32_t Depth; - uint32_t SurfacePitch; -#define _0DEG 0 -#define _90DEG 1 -#define _270DEG 3 - uint32_t RenderTargetAndSampleUnormRotation; - uint32_t MinimumArrayElement; - uint32_t RenderTargetViewExtent; -#define MSS 0 -#define DEPTH_STENCIL 1 - uint32_t MultisampledSurfaceStorageFormat; -#define MULTISAMPLECOUNT_1 0 -#define MULTISAMPLECOUNT_2 1 -#define MULTISAMPLECOUNT_4 2 -#define MULTISAMPLECOUNT_8 3 - uint32_t NumberofMultisamples; - uint32_t MultisamplePositionPaletteIndex; - uint32_t XOffset; - uint32_t YOffset; - bool EWADisableForCube; -#define GPUcoherent 0 -#define IAcoherent 1 - uint32_t CoherencyType; - uint32_t SurfaceMinLOD; - uint32_t MIPCountLOD; - uint32_t AuxiliarySurfaceQPitch; - uint32_t AuxiliarySurfacePitch; -#define AUX_NONE 0 -#define AUX_MCS 1 -#define AUX_APPEND 2 -#define AUX_HIZ 3 - uint32_t AuxiliarySurfaceMode; - bool SeparateUVPlaneEnable; - uint32_t XOffsetforUorUVPlane; - uint32_t YOffsetforUorUVPlane; - uint32_t RedClearColor; - uint32_t GreenClearColor; - uint32_t BlueClearColor; - uint32_t AlphaClearColor; - uint32_t ShaderChannelSelectRed; - uint32_t ShaderChannelSelectGreen; - uint32_t ShaderChannelSelectBlue; - uint32_t ShaderChannelSelectAlpha; - float ResourceMinLOD; - __gen_address_type SurfaceBaseAddress; - uint32_t XOffsetforVPlane; - uint32_t YOffsetforVPlane; - uint32_t AuxiliaryTableIndexforMediaCompressedSurface; - __gen_address_type AuxiliarySurfaceBaseAddress; -}; - -static inline void -GEN8_RENDER_SURFACE_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_RENDER_SURFACE_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->SurfaceType, 29, 31) | - __gen_field(values->SurfaceArray, 28, 28) | - __gen_field(values->SurfaceFormat, 18, 26) | - __gen_field(values->SurfaceVerticalAlignment, 16, 17) | - __gen_field(values->SurfaceHorizontalAlignment, 14, 15) | - __gen_field(values->TileMode, 12, 13) | - __gen_field(values->VerticalLineStride, 11, 11) | - __gen_field(values->VerticalLineStrideOffset, 10, 10) | - __gen_field(values->SamplerL2BypassModeDisable, 9, 9) | - __gen_field(values->RenderCacheReadWriteMode, 8, 8) | - __gen_field(values->MediaBoundaryPixelMode, 6, 7) | - __gen_field(values->CubeFaceEnablePositiveZ, 0, 0) | - __gen_field(values->CubeFaceEnableNegativeZ, 1, 1) | - __gen_field(values->CubeFaceEnablePositiveY, 2, 2) | - __gen_field(values->CubeFaceEnableNegativeY, 3, 3) | - __gen_field(values->CubeFaceEnablePositiveX, 4, 4) | - __gen_field(values->CubeFaceEnableNegativeX, 5, 5) | - 0; - - uint32_t dw_MemoryObjectControlState; - GEN8_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState); - dw[1] = - __gen_field(dw_MemoryObjectControlState, 24, 30) | - __gen_field(values->BaseMipLevel * (1 << 1), 19, 23) | - __gen_field(values->SurfaceQPitch, 0, 14) | - 0; - - dw[2] = - __gen_field(values->Height, 16, 29) | - __gen_field(values->Width, 0, 13) | - 0; - - dw[3] = - __gen_field(values->Depth, 21, 31) | - __gen_field(values->SurfacePitch, 0, 17) | - 0; - - dw[4] = - __gen_field(values->RenderTargetAndSampleUnormRotation, 29, 30) | - __gen_field(values->MinimumArrayElement, 18, 28) | - __gen_field(values->RenderTargetViewExtent, 7, 17) | - __gen_field(values->MultisampledSurfaceStorageFormat, 6, 6) | - __gen_field(values->NumberofMultisamples, 3, 5) | - __gen_field(values->MultisamplePositionPaletteIndex, 0, 2) | - 0; - - dw[5] = - __gen_offset(values->XOffset, 25, 31) | - __gen_offset(values->YOffset, 21, 23) | - __gen_field(values->EWADisableForCube, 20, 20) | - __gen_field(values->CoherencyType, 14, 14) | - __gen_field(values->SurfaceMinLOD, 4, 7) | - __gen_field(values->MIPCountLOD, 0, 3) | - 0; - - dw[6] = - __gen_field(values->AuxiliarySurfaceQPitch, 16, 30) | - __gen_field(values->AuxiliarySurfacePitch, 3, 11) | - __gen_field(values->AuxiliarySurfaceMode, 0, 2) | - __gen_field(values->SeparateUVPlaneEnable, 31, 31) | - __gen_field(values->XOffsetforUorUVPlane, 16, 29) | - __gen_field(values->YOffsetforUorUVPlane, 0, 13) | - 0; - - dw[7] = - __gen_field(values->RedClearColor, 31, 31) | - __gen_field(values->GreenClearColor, 30, 30) | - __gen_field(values->BlueClearColor, 29, 29) | - __gen_field(values->AlphaClearColor, 28, 28) | - __gen_field(values->ShaderChannelSelectRed, 25, 27) | - __gen_field(values->ShaderChannelSelectGreen, 22, 24) | - __gen_field(values->ShaderChannelSelectBlue, 19, 21) | - __gen_field(values->ShaderChannelSelectAlpha, 16, 18) | - __gen_field(values->ResourceMinLOD * (1 << 8), 0, 11) | - 0; - - uint32_t dw8 = - 0; - - uint64_t qw8 = - __gen_combine_address(data, &dw[8], values->SurfaceBaseAddress, dw8); - - dw[8] = qw8; - dw[9] = qw8 >> 32; - - uint32_t dw10 = - __gen_field(values->XOffsetforVPlane, 48, 61) | - __gen_field(values->YOffsetforVPlane, 32, 45) | - __gen_field(values->AuxiliaryTableIndexforMediaCompressedSurface, 21, 31) | - 0; - - uint64_t qw10 = - __gen_combine_address(data, &dw[10], values->AuxiliarySurfaceBaseAddress, dw10); - - dw[10] = qw10; - dw[11] = qw10 >> 32; - - dw[12] = - 0; - - dw[13] = - 0; - - dw[14] = - 0; - - dw[15] = - 0; - -} - -#define GEN8_FILTER_COEFFICIENT_length 0x00000001 - -struct GEN8_FILTER_COEFFICIENT { - uint32_t FilterCoefficient; -}; - -static inline void -GEN8_FILTER_COEFFICIENT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_FILTER_COEFFICIENT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->FilterCoefficient, 0, 7) | - 0; - -} - -#define GEN8_SAMPLER_STATE_length 0x00000004 - -struct GEN8_SAMPLER_STATE { - bool SamplerDisable; -#define DX10OGL 0 -#define DX9 1 - uint32_t TextureBorderColorMode; -#define CLAMP_NONE 0 -#define CLAMP_OGL 2 - uint32_t LODPreClampMode; - float BaseMipLevel; -#define MIPFILTER_NONE 0 -#define MIPFILTER_NEAREST 1 -#define MIPFILTER_LINEAR 3 - uint32_t MipModeFilter; -#define MAPFILTER_NEAREST 0 -#define MAPFILTER_LINEAR 1 -#define MAPFILTER_ANISOTROPIC 2 -#define MAPFILTER_MONO 6 - uint32_t MagModeFilter; -#define MAPFILTER_NEAREST 0 -#define MAPFILTER_LINEAR 1 -#define MAPFILTER_ANISOTROPIC 2 -#define MAPFILTER_MONO 6 - uint32_t MinModeFilter; - float TextureLODBias; -#define LEGACY 0 -#define EWAApproximation 1 - uint32_t AnisotropicAlgorithm; - float MinLOD; - float MaxLOD; - bool ChromaKeyEnable; - uint32_t ChromaKeyIndex; -#define KEYFILTER_KILL_ON_ANY_MATCH 0 -#define KEYFILTER_REPLACE_BLACK 1 - uint32_t ChromaKeyMode; -#define PREFILTEROPALWAYS 0 -#define PREFILTEROPNEVER 1 -#define PREFILTEROPLESS 2 -#define PREFILTEROPEQUAL 3 -#define PREFILTEROPLEQUAL 4 -#define PREFILTEROPGREATER 5 -#define PREFILTEROPNOTEQUAL 6 -#define PREFILTEROPGEQUAL 7 - uint32_t ShadowFunction; -#define PROGRAMMED 0 -#define OVERRIDE 1 - uint32_t CubeSurfaceControlMode; - uint32_t IndirectStatePointer; -#define MIPNONE 0 -#define MIPFILTER 1 - uint32_t LODClampMagnificationMode; -#define RATIO21 0 -#define RATIO41 1 -#define RATIO61 2 -#define RATIO81 3 -#define RATIO101 4 -#define RATIO121 5 -#define RATIO141 6 -#define RATIO161 7 - uint32_t MaximumAnisotropy; - bool RAddressMinFilterRoundingEnable; - bool RAddressMagFilterRoundingEnable; - bool VAddressMinFilterRoundingEnable; - bool VAddressMagFilterRoundingEnable; - bool UAddressMinFilterRoundingEnable; - bool UAddressMagFilterRoundingEnable; -#define FULL 0 -#define HIGH 1 -#define MED 2 -#define LOW 3 - uint32_t TrilinearFilterQuality; - bool NonnormalizedCoordinateEnable; - uint32_t TCXAddressControlMode; - uint32_t TCYAddressControlMode; - uint32_t TCZAddressControlMode; -}; - -static inline void -GEN8_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_SAMPLER_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->SamplerDisable, 31, 31) | - __gen_field(values->TextureBorderColorMode, 29, 29) | - __gen_field(values->LODPreClampMode, 27, 28) | - __gen_field(values->BaseMipLevel * (1 << 1), 22, 26) | - __gen_field(values->MipModeFilter, 20, 21) | - __gen_field(values->MagModeFilter, 17, 19) | - __gen_field(values->MinModeFilter, 14, 16) | - __gen_fixed(values->TextureLODBias, 1, 13, true, 8) | - __gen_field(values->AnisotropicAlgorithm, 0, 0) | - 0; - - dw[1] = - __gen_field(values->MinLOD * (1 << 8), 20, 31) | - __gen_field(values->MaxLOD * (1 << 8), 8, 19) | - __gen_field(values->ChromaKeyEnable, 7, 7) | - __gen_field(values->ChromaKeyIndex, 5, 6) | - __gen_field(values->ChromaKeyMode, 4, 4) | - __gen_field(values->ShadowFunction, 1, 3) | - __gen_field(values->CubeSurfaceControlMode, 0, 0) | - 0; - - dw[2] = - __gen_field(values->IndirectStatePointer, 6, 23) | - __gen_field(values->LODClampMagnificationMode, 0, 0) | - 0; - - dw[3] = - __gen_field(values->MaximumAnisotropy, 19, 21) | - __gen_field(values->RAddressMinFilterRoundingEnable, 13, 13) | - __gen_field(values->RAddressMagFilterRoundingEnable, 14, 14) | - __gen_field(values->VAddressMinFilterRoundingEnable, 15, 15) | - __gen_field(values->VAddressMagFilterRoundingEnable, 16, 16) | - __gen_field(values->UAddressMinFilterRoundingEnable, 17, 17) | - __gen_field(values->UAddressMagFilterRoundingEnable, 18, 18) | - __gen_field(values->TrilinearFilterQuality, 11, 12) | - __gen_field(values->NonnormalizedCoordinateEnable, 10, 10) | - __gen_field(values->TCXAddressControlMode, 6, 8) | - __gen_field(values->TCYAddressControlMode, 3, 5) | - __gen_field(values->TCZAddressControlMode, 0, 2) | - 0; - -} - -#define GEN8_SAMPLER_STATE_8X8_AVS_COEFFICIENTS_length 0x00000008 - -struct GEN8_SAMPLER_STATE_8X8_AVS_COEFFICIENTS { - uint32_t Table0YFilterCoefficientn1; - uint32_t Table0XFilterCoefficientn1; - uint32_t Table0YFilterCoefficientn0; - uint32_t Table0XFilterCoefficientn0; - uint32_t Table0YFilterCoefficientn3; - uint32_t Table0XFilterCoefficientn3; - uint32_t Table0YFilterCoefficientn2; - uint32_t Table0XFilterCoefficientn2; - uint32_t Table0YFilterCoefficientn5; - uint32_t Table0XFilterCoefficientn5; - uint32_t Table0YFilterCoefficientn4; - uint32_t Table0XFilterCoefficientn4; - uint32_t Table0YFilterCoefficientn7; - uint32_t Table0XFilterCoefficientn7; - uint32_t Table0YFilterCoefficientn6; - uint32_t Table0XFilterCoefficientn6; - uint32_t Table1XFilterCoefficientn3; - uint32_t Table1XFilterCoefficientn2; - uint32_t Table1XFilterCoefficientn5; - uint32_t Table1XFilterCoefficientn4; - uint32_t Table1YFilterCoefficientn3; - uint32_t Table1YFilterCoefficientn2; - uint32_t Table1YFilterCoefficientn5; - uint32_t Table1YFilterCoefficientn4; -}; - -static inline void -GEN8_SAMPLER_STATE_8X8_AVS_COEFFICIENTS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN8_SAMPLER_STATE_8X8_AVS_COEFFICIENTS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->Table0YFilterCoefficientn1, 24, 31) | - __gen_field(values->Table0XFilterCoefficientn1, 16, 23) | - __gen_field(values->Table0YFilterCoefficientn0, 8, 15) | - __gen_field(values->Table0XFilterCoefficientn0, 0, 7) | - 0; - - dw[1] = - __gen_field(values->Table0YFilterCoefficientn3, 24, 31) | - __gen_field(values->Table0XFilterCoefficientn3, 16, 23) | - __gen_field(values->Table0YFilterCoefficientn2, 8, 15) | - __gen_field(values->Table0XFilterCoefficientn2, 0, 7) | - 0; - - dw[2] = - __gen_field(values->Table0YFilterCoefficientn5, 24, 31) | - __gen_field(values->Table0XFilterCoefficientn5, 16, 23) | - __gen_field(values->Table0YFilterCoefficientn4, 8, 15) | - __gen_field(values->Table0XFilterCoefficientn4, 0, 7) | - 0; - - dw[3] = - __gen_field(values->Table0YFilterCoefficientn7, 24, 31) | - __gen_field(values->Table0XFilterCoefficientn7, 16, 23) | - __gen_field(values->Table0YFilterCoefficientn6, 8, 15) | - __gen_field(values->Table0XFilterCoefficientn6, 0, 7) | - 0; - - dw[4] = - __gen_field(values->Table1XFilterCoefficientn3, 24, 31) | - __gen_field(values->Table1XFilterCoefficientn2, 16, 23) | - 0; - - dw[5] = - __gen_field(values->Table1XFilterCoefficientn5, 8, 15) | - __gen_field(values->Table1XFilterCoefficientn4, 0, 7) | - 0; - - dw[6] = - __gen_field(values->Table1YFilterCoefficientn3, 24, 31) | - __gen_field(values->Table1YFilterCoefficientn2, 16, 23) | - 0; - - dw[7] = - __gen_field(values->Table1YFilterCoefficientn5, 8, 15) | - __gen_field(values->Table1YFilterCoefficientn4, 0, 7) | - 0; - -} - -/* Enum 3D_Prim_Topo_Type */ -#define _3DPRIM_POINTLIST 1 -#define _3DPRIM_LINELIST 2 -#define _3DPRIM_LINESTRIP 3 -#define _3DPRIM_TRILIST 4 -#define _3DPRIM_TRISTRIP 5 -#define _3DPRIM_TRIFAN 6 -#define _3DPRIM_QUADLIST 7 -#define _3DPRIM_QUADSTRIP 8 -#define _3DPRIM_LINELIST_ADJ 9 -#define _3DPRIM_LINESTRIP_ADJ 10 -#define _3DPRIM_TRILIST_ADJ 11 -#define _3DPRIM_TRISTRIP_ADJ 12 -#define _3DPRIM_TRISTRIP_REVERSE 13 -#define _3DPRIM_POLYGON 14 -#define _3DPRIM_RECTLIST 15 -#define _3DPRIM_LINELOOP 16 -#define _3DPRIM_POINTLIST_BF 17 -#define _3DPRIM_LINESTRIP_CONT 18 -#define _3DPRIM_LINESTRIP_BF 19 -#define _3DPRIM_LINESTRIP_CONT_BF 20 -#define _3DPRIM_TRIFAN_NOSTIPPLE 22 -#define _3DPRIM_PATCHLIST_1 32 -#define _3DPRIM_PATCHLIST_2 33 -#define _3DPRIM_PATCHLIST_3 34 -#define _3DPRIM_PATCHLIST_4 35 -#define _3DPRIM_PATCHLIST_5 36 -#define _3DPRIM_PATCHLIST_6 37 -#define _3DPRIM_PATCHLIST_7 38 -#define _3DPRIM_PATCHLIST_8 39 -#define _3DPRIM_PATCHLIST_9 40 -#define _3DPRIM_PATCHLIST_10 41 -#define _3DPRIM_PATCHLIST_11 42 -#define _3DPRIM_PATCHLIST_12 43 -#define _3DPRIM_PATCHLIST_13 44 -#define _3DPRIM_PATCHLIST_14 45 -#define _3DPRIM_PATCHLIST_15 46 -#define _3DPRIM_PATCHLIST_16 47 -#define _3DPRIM_PATCHLIST_17 48 -#define _3DPRIM_PATCHLIST_18 49 -#define _3DPRIM_PATCHLIST_19 50 -#define _3DPRIM_PATCHLIST_20 51 -#define _3DPRIM_PATCHLIST_21 52 -#define _3DPRIM_PATCHLIST_22 53 -#define _3DPRIM_PATCHLIST_23 54 -#define _3DPRIM_PATCHLIST_24 55 -#define _3DPRIM_PATCHLIST_25 56 -#define _3DPRIM_PATCHLIST_26 57 -#define _3DPRIM_PATCHLIST_27 58 -#define _3DPRIM_PATCHLIST_28 59 -#define _3DPRIM_PATCHLIST_29 60 -#define _3DPRIM_PATCHLIST_30 61 -#define _3DPRIM_PATCHLIST_31 62 -#define _3DPRIM_PATCHLIST_32 63 - -/* Enum 3D_Vertex_Component_Control */ -#define VFCOMP_NOSTORE 0 -#define VFCOMP_STORE_SRC 1 -#define VFCOMP_STORE_0 2 -#define VFCOMP_STORE_1_FP 3 -#define VFCOMP_STORE_1_INT 4 -#define VFCOMP_STORE_PID 7 - -/* Enum WRAP_SHORTEST_ENABLE */ -#define WSE_X 1 -#define WSE_Y 2 -#define WSE_XY 3 -#define WSE_Z 4 -#define WSE_XZ 5 -#define WSE_YZ 6 -#define WSE_XYZ 7 -#define WSE_W 8 -#define WSE_XW 9 -#define WSE_YW 10 -#define WSE_XYW 11 -#define WSE_ZW 12 -#define WSE_XZW 13 -#define WSE_YZW 14 -#define WSE_XYZW 15 - -/* Enum 3D_Stencil_Operation */ -#define STENCILOP_KEEP 0 -#define STENCILOP_ZERO 1 -#define STENCILOP_REPLACE 2 -#define STENCILOP_INCRSAT 3 -#define STENCILOP_DECRSAT 4 -#define STENCILOP_INCR 5 -#define STENCILOP_DECR 6 -#define STENCILOP_INVERT 7 - -/* Enum 3D_Color_Buffer_Blend_Factor */ -#define BLENDFACTOR_ONE 1 -#define BLENDFACTOR_SRC_COLOR 2 -#define BLENDFACTOR_SRC_ALPHA 3 -#define BLENDFACTOR_DST_ALPHA 4 -#define BLENDFACTOR_DST_COLOR 5 -#define BLENDFACTOR_SRC_ALPHA_SATURATE 6 -#define BLENDFACTOR_CONST_COLOR 7 -#define BLENDFACTOR_CONST_ALPHA 8 -#define BLENDFACTOR_SRC1_COLOR 9 -#define BLENDFACTOR_SRC1_ALPHA 10 -#define BLENDFACTOR_ZERO 17 -#define BLENDFACTOR_INV_SRC_COLOR 18 -#define BLENDFACTOR_INV_SRC_ALPHA 19 -#define BLENDFACTOR_INV_DST_ALPHA 20 -#define BLENDFACTOR_INV_DST_COLOR 21 -#define BLENDFACTOR_INV_CONST_COLOR 23 -#define BLENDFACTOR_INV_CONST_ALPHA 24 -#define BLENDFACTOR_INV_SRC1_COLOR 25 -#define BLENDFACTOR_INV_SRC1_ALPHA 26 - -/* Enum 3D_Color_Buffer_Blend_Function */ -#define BLENDFUNCTION_ADD 0 -#define BLENDFUNCTION_SUBTRACT 1 -#define BLENDFUNCTION_REVERSE_SUBTRACT 2 -#define BLENDFUNCTION_MIN 3 -#define BLENDFUNCTION_MAX 4 - -/* Enum 3D_Compare_Function */ -#define COMPAREFUNCTION_ALWAYS 0 -#define COMPAREFUNCTION_NEVER 1 -#define COMPAREFUNCTION_LESS 2 -#define COMPAREFUNCTION_EQUAL 3 -#define COMPAREFUNCTION_LEQUAL 4 -#define COMPAREFUNCTION_GREATER 5 -#define COMPAREFUNCTION_NOTEQUAL 6 -#define COMPAREFUNCTION_GEQUAL 7 - -/* Enum 3D_Logic_Op_Function */ -#define LOGICOP_CLEAR 0 -#define LOGICOP_NOR 1 -#define LOGICOP_AND_INVERTED 2 -#define LOGICOP_COPY_INVERTED 3 -#define LOGICOP_AND_REVERSE 4 -#define LOGICOP_INVERT 5 -#define LOGICOP_XOR 6 -#define LOGICOP_NAND 7 -#define LOGICOP_AND 8 -#define LOGICOP_EQUIV 9 -#define LOGICOP_NOOP 10 -#define LOGICOP_OR_INVERTED 11 -#define LOGICOP_COPY 12 -#define LOGICOP_OR_REVERSE 13 -#define LOGICOP_OR 14 -#define LOGICOP_SET 15 - -/* Enum SURFACE_FORMAT */ -#define R32G32B32A32_FLOAT 0 -#define R32G32B32A32_SINT 1 -#define R32G32B32A32_UINT 2 -#define R32G32B32A32_UNORM 3 -#define R32G32B32A32_SNORM 4 -#define R64G64_FLOAT 5 -#define R32G32B32X32_FLOAT 6 -#define R32G32B32A32_SSCALED 7 -#define R32G32B32A32_USCALED 8 -#define R32G32B32A32_SFIXED 32 -#define R64G64_PASSTHRU 33 -#define R32G32B32_FLOAT 64 -#define R32G32B32_SINT 65 -#define R32G32B32_UINT 66 -#define R32G32B32_UNORM 67 -#define R32G32B32_SNORM 68 -#define R32G32B32_SSCALED 69 -#define R32G32B32_USCALED 70 -#define R32G32B32_SFIXED 80 -#define R16G16B16A16_UNORM 128 -#define R16G16B16A16_SNORM 129 -#define R16G16B16A16_SINT 130 -#define R16G16B16A16_UINT 131 -#define R16G16B16A16_FLOAT 132 -#define R32G32_FLOAT 133 -#define R32G32_SINT 134 -#define R32G32_UINT 135 -#define R32_FLOAT_X8X24_TYPELESS 136 -#define X32_TYPELESS_G8X24_UINT 137 -#define L32A32_FLOAT 138 -#define R32G32_UNORM 139 -#define R32G32_SNORM 140 -#define R64_FLOAT 141 -#define R16G16B16X16_UNORM 142 -#define R16G16B16X16_FLOAT 143 -#define A32X32_FLOAT 144 -#define L32X32_FLOAT 145 -#define I32X32_FLOAT 146 -#define R16G16B16A16_SSCALED 147 -#define R16G16B16A16_USCALED 148 -#define R32G32_SSCALED 149 -#define R32G32_USCALED 150 -#define R32G32_SFIXED 160 -#define R64_PASSTHRU 161 -#define B8G8R8A8_UNORM 192 -#define B8G8R8A8_UNORM_SRGB 193 -#define R10G10B10A2_UNORM 194 -#define R10G10B10A2_UNORM_SRGB 195 -#define R10G10B10A2_UINT 196 -#define R10G10B10_SNORM_A2_UNORM 197 -#define R8G8B8A8_UNORM 199 -#define R8G8B8A8_UNORM_SRGB 200 -#define R8G8B8A8_SNORM 201 -#define R8G8B8A8_SINT 202 -#define R8G8B8A8_UINT 203 -#define R16G16_UNORM 204 -#define R16G16_SNORM 205 -#define R16G16_SINT 206 -#define R16G16_UINT 207 -#define R16G16_FLOAT 208 -#define B10G10R10A2_UNORM 209 -#define B10G10R10A2_UNORM_SRGB 210 -#define R11G11B10_FLOAT 211 -#define R32_SINT 214 -#define R32_UINT 215 -#define R32_FLOAT 216 -#define R24_UNORM_X8_TYPELESS 217 -#define X24_TYPELESS_G8_UINT 218 -#define L32_UNORM 221 -#define A32_UNORM 222 -#define L16A16_UNORM 223 -#define I24X8_UNORM 224 -#define L24X8_UNORM 225 -#define A24X8_UNORM 226 -#define I32_FLOAT 227 -#define L32_FLOAT 228 -#define A32_FLOAT 229 -#define X8B8_UNORM_G8R8_SNORM 230 -#define A8X8_UNORM_G8R8_SNORM 231 -#define B8X8_UNORM_G8R8_SNORM 232 -#define B8G8R8X8_UNORM 233 -#define B8G8R8X8_UNORM_SRGB 234 -#define R8G8B8X8_UNORM 235 -#define R8G8B8X8_UNORM_SRGB 236 -#define R9G9B9E5_SHAREDEXP 237 -#define B10G10R10X2_UNORM 238 -#define L16A16_FLOAT 240 -#define R32_UNORM 241 -#define R32_SNORM 242 -#define R10G10B10X2_USCALED 243 -#define R8G8B8A8_SSCALED 244 -#define R8G8B8A8_USCALED 245 -#define R16G16_SSCALED 246 -#define R16G16_USCALED 247 -#define R32_SSCALED 248 -#define R32_USCALED 249 -#define B5G6R5_UNORM 256 -#define B5G6R5_UNORM_SRGB 257 -#define B5G5R5A1_UNORM 258 -#define B5G5R5A1_UNORM_SRGB 259 -#define B4G4R4A4_UNORM 260 -#define B4G4R4A4_UNORM_SRGB 261 -#define R8G8_UNORM 262 -#define R8G8_SNORM 263 -#define R8G8_SINT 264 -#define R8G8_UINT 265 -#define R16_UNORM 266 -#define R16_SNORM 267 -#define R16_SINT 268 -#define R16_UINT 269 -#define R16_FLOAT 270 -#define A8P8_UNORM_PALETTE0 271 -#define A8P8_UNORM_PALETTE1 272 -#define I16_UNORM 273 -#define L16_UNORM 274 -#define A16_UNORM 275 -#define L8A8_UNORM 276 -#define I16_FLOAT 277 -#define L16_FLOAT 278 -#define A16_FLOAT 279 -#define L8A8_UNORM_SRGB 280 -#define R5G5_SNORM_B6_UNORM 281 -#define B5G5R5X1_UNORM 282 -#define B5G5R5X1_UNORM_SRGB 283 -#define R8G8_SSCALED 284 -#define R8G8_USCALED 285 -#define R16_SSCALED 286 -#define R16_USCALED 287 -#define P8A8_UNORM_PALETTE0 290 -#define P8A8_UNORM_PALETTE1 291 -#define A1B5G5R5_UNORM 292 -#define A4B4G4R4_UNORM 293 -#define L8A8_UINT 294 -#define L8A8_SINT 295 -#define R8_UNORM 320 -#define R8_SNORM 321 -#define R8_SINT 322 -#define R8_UINT 323 -#define A8_UNORM 324 -#define I8_UNORM 325 -#define L8_UNORM 326 -#define P4A4_UNORM_PALETTE0 327 -#define A4P4_UNORM_PALETTE0 328 -#define R8_SSCALED 329 -#define R8_USCALED 330 -#define P8_UNORM_PALETTE0 331 -#define L8_UNORM_SRGB 332 -#define P8_UNORM_PALETTE1 333 -#define P4A4_UNORM_PALETTE1 334 -#define A4P4_UNORM_PALETTE1 335 -#define Y8_UNORM 336 -#define L8_UINT 338 -#define L8_SINT 339 -#define I8_UINT 340 -#define I8_SINT 341 -#define DXT1_RGB_SRGB 384 -#define R1_UNORM 385 -#define YCRCB_NORMAL 386 -#define YCRCB_SWAPUVY 387 -#define P2_UNORM_PALETTE0 388 -#define P2_UNORM_PALETTE1 389 -#define BC1_UNORM 390 -#define BC2_UNORM 391 -#define BC3_UNORM 392 -#define BC4_UNORM 393 -#define BC5_UNORM 394 -#define BC1_UNORM_SRGB 395 -#define BC2_UNORM_SRGB 396 -#define BC3_UNORM_SRGB 397 -#define MONO8 398 -#define YCRCB_SWAPUV 399 -#define YCRCB_SWAPY 400 -#define DXT1_RGB 401 -#define FXT1 402 -#define R8G8B8_UNORM 403 -#define R8G8B8_SNORM 404 -#define R8G8B8_SSCALED 405 -#define R8G8B8_USCALED 406 -#define R64G64B64A64_FLOAT 407 -#define R64G64B64_FLOAT 408 -#define BC4_SNORM 409 -#define BC5_SNORM 410 -#define R16G16B16_FLOAT 411 -#define R16G16B16_UNORM 412 -#define R16G16B16_SNORM 413 -#define R16G16B16_SSCALED 414 -#define R16G16B16_USCALED 415 -#define BC6H_SF16 417 -#define BC7_UNORM 418 -#define BC7_UNORM_SRGB 419 -#define BC6H_UF16 420 -#define PLANAR_420_8 421 -#define R8G8B8_UNORM_SRGB 424 -#define ETC1_RGB8 425 -#define ETC2_RGB8 426 -#define EAC_R11 427 -#define EAC_RG11 428 -#define EAC_SIGNED_R11 429 -#define EAC_SIGNED_RG11 430 -#define ETC2_SRGB8 431 -#define R16G16B16_UINT 432 -#define R16G16B16_SINT 433 -#define R32_SFIXED 434 -#define R10G10B10A2_SNORM 435 -#define R10G10B10A2_USCALED 436 -#define R10G10B10A2_SSCALED 437 -#define R10G10B10A2_SINT 438 -#define B10G10R10A2_SNORM 439 -#define B10G10R10A2_USCALED 440 -#define B10G10R10A2_SSCALED 441 -#define B10G10R10A2_UINT 442 -#define B10G10R10A2_SINT 443 -#define R64G64B64A64_PASSTHRU 444 -#define R64G64B64_PASSTHRU 445 -#define ETC2_RGB8_PTA 448 -#define ETC2_SRGB8_PTA 449 -#define ETC2_EAC_RGBA8 450 -#define ETC2_EAC_SRGB8_A8 451 -#define R8G8B8_UINT 456 -#define R8G8B8_SINT 457 -#define RAW 511 - -/* Enum Shader Channel Select */ -#define SCS_ZERO 0 -#define SCS_ONE 1 -#define SCS_RED 4 -#define SCS_GREEN 5 -#define SCS_BLUE 6 -#define SCS_ALPHA 7 - -/* Enum Clear Color */ -#define CC_ZERO 0 -#define CC_ONE 1 - -/* Enum Texture Coordinate Mode */ -#define TCM_WRAP 0 -#define TCM_MIRROR 1 -#define TCM_CLAMP 2 -#define TCM_CUBE 3 -#define TCM_CLAMP_BORDER 4 -#define TCM_MIRROR_ONCE 5 -#define TCM_HALF_BORDER 6 - diff --git a/src/vulkan/gen8_pipeline.c b/src/vulkan/gen8_pipeline.c index 389f7f797c0..e31966f7d85 100644 --- a/src/vulkan/gen8_pipeline.c +++ b/src/vulkan/gen8_pipeline.c @@ -319,7 +319,7 @@ genX(graphics_pipeline_create)( anv_batch_emit(&pipeline->batch, GENX(3DSTATE_GS), .SingleProgramFlow = false, .KernelStartPointer = pipeline->gs_kernel, - .VectorMaskEnable = Dmask, + .VectorMaskEnable = false, .SamplerCount = 0, .BindingTableEntryCount = 0, .ExpectedVertexCount = pipeline->gs_vertex_count, @@ -375,12 +375,12 @@ genX(graphics_pipeline_create)( else anv_batch_emit(&pipeline->batch, GENX(3DSTATE_VS), .KernelStartPointer = vs_start, - .SingleVertexDispatch = Multiple, - .VectorMaskEnable = Dmask, + .SingleVertexDispatch = false, + .VectorMaskEnable = false, .SamplerCount = 0, .BindingTableEntryCount = vue_prog_data->base.binding_table.size_bytes / 4, - .ThreadDispatchPriority = Normal, + .ThreadDispatchPriority = false, .FloatingPointMode = IEEE754, .IllegalOpcodeExceptionEnable = false, .AccessesUAV = false, diff --git a/src/vulkan/gen8_state.c b/src/vulkan/gen8_state.c index 6b077df125a..45b8080d0bf 100644 --- a/src/vulkan/gen8_state.c +++ b/src/vulkan/gen8_state.c @@ -451,7 +451,7 @@ VkResult genX(CreateSampler)( struct GENX(SAMPLER_STATE) sampler_state = { .SamplerDisable = false, .TextureBorderColorMode = DX10OGL, - .LODPreClampMode = CLAMP_OGL, + .LODPreClampMode = CLAMP_MODE_OGL, #if ANV_GEN == 8 .BaseMipLevel = 0.0, #endif diff --git a/src/vulkan/gen9.xml b/src/vulkan/gen9.xml new file mode 100644 index 00000000000..3f229b0d0fc --- /dev/null +++ b/src/vulkan/gen9.xml @@ -0,0 +1,3469 @@ +<genxml name="SKL" gen="9"> + <struct name="3DSTATE_CONSTANT_BODY" length="10"> + <field name="Constant Buffer 1 Read Length" start="16" end="31" type="uint"/> + <field name="Constant Buffer 0 Read Length" start="0" end="15" type="uint"/> + <field name="Constant Buffer 3 Read Length" start="48" end="63" type="uint"/> + <field name="Constant Buffer 2 Read Length" start="32" end="47" type="uint"/> + <field name="Pointer To Constant Buffer 0" start="69" end="127" type="address"/> + <field name="Pointer To Constant Buffer 1" start="133" end="191" type="address"/> + <field name="Pointer To Constant Buffer 2" start="197" end="255" type="address"/> + <field name="Pointer To Constant Buffer 3" start="261" end="319" type="address"/> + </struct> + + <struct name="BINDING_TABLE_EDIT_ENTRY" length="1"> + <field name="Binding Table Index" start="16" end="23" type="uint"/> + <field name="Surface State Pointer" start="0" end="15" type="offset"/> + </struct> + + <struct name="GATHER_CONSTANT_ENTRY" length="1"> + <field name="Constant Buffer Offset" start="8" end="15" type="offset"/> + <field name="Channel Mask" start="4" end="7" type="uint"/> + <field name="Binding Table Index Offset" start="0" end="3" type="uint"/> + </struct> + + <struct name="MEMORY_OBJECT_CONTROL_STATE" length="1"> + <field name="Index to MOCS Tables" start="1" end="6" type="uint"/> + </struct> + + <struct name="VERTEX_BUFFER_STATE" length="4"> + <field name="Vertex Buffer Index" start="26" end="31" type="uint"/> + <field name="Memory Object Control State" start="16" end="22" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Address Modify Enable" start="14" end="14" type="uint"/> + <field name="Null Vertex Buffer" start="13" end="13" type="bool"/> + <field name="Buffer Pitch" start="0" end="11" type="uint"/> + <field name="Buffer Starting Address" start="32" end="95" type="address"/> + <field name="Buffer Size" start="96" end="127" type="uint"/> + </struct> + + <struct name="VERTEX_ELEMENT_STATE" length="2"> + <field name="Vertex Buffer Index" start="26" end="31" type="uint"/> + <field name="Valid" start="25" end="25" type="uint"/> + <field name="Source Element Format" start="16" end="24" type="uint"/> + <field name="Edge Flag Enable" start="15" end="15" type="bool"/> + <field name="Source Element Offset" start="0" end="11" type="uint"/> + <field name="Component 0 Control" start="60" end="62" type="uint"/> + <field name="Component 1 Control" start="56" end="58" type="uint"/> + <field name="Component 2 Control" start="52" end="54" type="uint"/> + <field name="Component 3 Control" start="48" end="50" type="uint"/> + </struct> + + <struct name="SO_DECL" length="1"> + <field name="Output Buffer Slot" start="12" end="13" type="uint"/> + <field name="Hole Flag" start="11" end="11" type="uint"/> + <field name="Register Index" start="4" end="9" type="uint"/> + <field name="Component Mask" start="0" end="3" type="uint" default="0"/> + </struct> + + <struct name="SO_DECL_ENTRY" length="2"> + <field name="Stream 3 Decl" start="48" end="63" type="SO_DECL"/> + <field name="Stream 2 Decl" start="32" end="47" type="SO_DECL"/> + <field name="Stream 1 Decl" start="16" end="31" type="SO_DECL"/> + <field name="Stream 0 Decl" start="0" end="15" type="SO_DECL"/> + </struct> + + <struct name="SF_OUTPUT_ATTRIBUTE_DETAIL" length="1"> + <field name="Component Override W" start="15" end="15" type="bool"/> + <field name="Component Override Z" start="14" end="14" type="bool"/> + <field name="Component Override Y" start="13" end="13" type="bool"/> + <field name="Component Override X" start="12" end="12" type="bool"/> + <field name="Swizzle Control Mode" start="11" end="11" type="uint"/> + <field name="Constant Source" start="9" end="10" type="uint"> + <value name="CONST_0000" value="0"/> + <value name="CONST_0001_FLOAT" value="1"/> + <value name="CONST_1111_FLOAT" value="2"/> + <value name="PRIM_ID" value="3"/> + </field> + <field name="Swizzle Select" start="6" end="7" type="uint"> + <value name="INPUTATTR" value="0"/> + <value name="INPUTATTR_FACING" value="1"/> + <value name="INPUTATTR_W" value="2"/> + <value name="INPUTATTR_FACING_W" value="3"/> + </field> + <field name="Source Attribute" start="0" end="4" type="uint"/> + </struct> + + <struct name="SCISSOR_RECT" length="2"> + <field name="Scissor Rectangle Y Min" start="16" end="31" type="uint"/> + <field name="Scissor Rectangle X Min" start="0" end="15" type="uint"/> + <field name="Scissor Rectangle Y Max" start="48" end="63" type="uint"/> + <field name="Scissor Rectangle X Max" start="32" end="47" type="uint"/> + </struct> + + <struct name="SF_CLIP_VIEWPORT" length="16"> + <field name="Viewport Matrix Element m00" start="0" end="31" type="float"/> + <field name="Viewport Matrix Element m11" start="32" end="63" type="float"/> + <field name="Viewport Matrix Element m22" start="64" end="95" type="float"/> + <field name="Viewport Matrix Element m30" start="96" end="127" type="float"/> + <field name="Viewport Matrix Element m31" start="128" end="159" type="float"/> + <field name="Viewport Matrix Element m32" start="160" end="191" type="float"/> + <field name="X Min Clip Guardband" start="256" end="287" type="float"/> + <field name="X Max Clip Guardband" start="288" end="319" type="float"/> + <field name="Y Min Clip Guardband" start="320" end="351" type="float"/> + <field name="Y Max Clip Guardband" start="352" end="383" type="float"/> + <field name="X Min ViewPort" start="384" end="415" type="float"/> + <field name="X Max ViewPort" start="416" end="447" type="float"/> + <field name="Y Min ViewPort" start="448" end="479" type="float"/> + <field name="Y Max ViewPort" start="480" end="511" type="float"/> + </struct> + + <struct name="BLEND_STATE_ENTRY" length="2"> + <field name="Logic Op Enable" start="63" end="63" type="bool"/> + <field name="Logic Op Function" start="59" end="62" type="uint"/> + <field name="Pre-Blend Source Only Clamp Enable" start="36" end="36" type="bool"/> + <field name="Color Clamp Range" start="34" end="35" type="uint"> + <value name="COLORCLAMP_UNORM" value="0"/> + <value name="COLORCLAMP_SNORM" value="1"/> + <value name="COLORCLAMP_RTFORMAT" value="2"/> + </field> + <field name="Pre-Blend Color Clamp Enable" start="33" end="33" type="bool"/> + <field name="Post-Blend Color Clamp Enable" start="32" end="32" type="bool"/> + <field name="Color Buffer Blend Enable" start="31" end="31" type="bool"/> + <field name="Source Blend Factor" start="26" end="30" type="uint"/> + <field name="Destination Blend Factor" start="21" end="25" type="uint"/> + <field name="Color Blend Function" start="18" end="20" type="uint"/> + <field name="Source Alpha Blend Factor" start="13" end="17" type="uint"/> + <field name="Destination Alpha Blend Factor" start="8" end="12" type="uint"/> + <field name="Alpha Blend Function" start="5" end="7" type="uint"/> + <field name="Write Disable Alpha" start="3" end="3" type="bool"/> + <field name="Write Disable Red" start="2" end="2" type="bool"/> + <field name="Write Disable Green" start="1" end="1" type="bool"/> + <field name="Write Disable Blue" start="0" end="0" type="bool"/> + </struct> + + <struct name="BLEND_STATE" length="17"> + <field name="Alpha To Coverage Enable" start="31" end="31" type="bool"/> + <field name="Independent Alpha Blend Enable" start="30" end="30" type="bool"/> + <field name="Alpha To One Enable" start="29" end="29" type="bool"/> + <field name="Alpha To Coverage Dither Enable" start="28" end="28" type="bool"/> + <field name="Alpha Test Enable" start="27" end="27" type="bool"/> + <field name="Alpha Test Function" start="24" end="26" type="uint"/> + <field name="Color Dither Enable" start="23" end="23" type="bool"/> + <field name="X Dither Offset" start="21" end="22" type="uint"/> + <field name="Y Dither Offset" start="19" end="20" type="uint"/> + <group count="8" start="32" size="64"> + <field name="Entry" start="0" end="63" type="BLEND_STATE_ENTRY"/> + </group> + </struct> + + <struct name="CC_VIEWPORT" length="2"> + <field name="Minimum Depth" start="0" end="31" type="float"/> + <field name="Maximum Depth" start="32" end="63" type="float"/> + </struct> + + <struct name="COLOR_CALC_STATE" length="6"> + <field name="Round Disable Function Disable" start="15" end="15" type="bool"/> + <field name="Alpha Test Format" start="0" end="0" type="uint"> + <value name="ALPHATEST_UNORM8" value="0"/> + <value name="ALPHATEST_FLOAT32" value="1"/> + </field> + <field name="Alpha Reference Value As UNORM8" start="32" end="63" type="uint"/> + <field name="Alpha Reference Value As FLOAT32" start="32" end="63" type="float"/> + <field name="Blend Constant Color Red" start="64" end="95" type="float"/> + <field name="Blend Constant Color Green" start="96" end="127" type="float"/> + <field name="Blend Constant Color Blue" start="128" end="159" type="float"/> + <field name="Blend Constant Color Alpha" start="160" end="191" type="float"/> + </struct> + + <struct name="EXECUTION_UNIT_EXTENDED_MESSAGE_DESCRIPTOR" length="1"> + <field name="Extended Message Length" start="6" end="9" type="uint"/> + <field name="End Of Thread" start="5" end="5" type="uint"> + <value name="No Termination" value="0"/> + <value name="EOT" value="1"/> + </field> + <field name="Target Function ID" start="0" end="3" type="uint"/> + </struct> + + <struct name="INTERFACE_DESCRIPTOR_DATA" length="8"> + <field name="Kernel Start Pointer" start="6" end="31" type="offset"/> + <field name="Kernel Start Pointer High" start="32" end="47" type="offset"/> + <field name="Denorm Mode" start="83" end="83" type="uint"> + <value name="Ftz" value="0"/> + <value name="SetByKernel" value="1"/> + </field> + <field name="Single Program Flow" start="82" end="82" type="uint"/> + <field name="Thread Priority" start="81" end="81" type="uint"> + <value name="Normal Priority" value="0"/> + <value name="High Priority" value="1"/> + </field> + <field name="Floating Point Mode" start="80" end="80" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="77" end="77" type="bool"/> + <field name="Mask Stack Exception Enable" start="75" end="75" type="bool"/> + <field name="Software Exception Enable" start="71" end="71" type="bool"/> + <field name="Sampler State Pointer" start="101" end="127" type="offset"/> + <field name="Sampler Count" start="98" end="100" type="uint"> + <value name="No samplers used" value="0"/> + <value name="Between 1 and 4 samplers used" value="1"/> + <value name="Between 5 and 8 samplers used" value="2"/> + <value name="Between 9 and 12 samplers used" value="3"/> + <value name="Between 13 and 16 samplers used" value="4"/> + </field> + <field name="Binding Table Pointer" start="133" end="143" type="offset"/> + <field name="Binding Table Entry Count" start="128" end="132" type="uint"/> + <field name="Constant/Indirect URB Entry Read Length" start="176" end="191" type="uint"/> + <field name="Constant URB Entry Read Offset" start="160" end="175" type="uint"/> + <field name="Rounding Mode" start="214" end="215" type="uint"> + <value name="RTNE" value="0"/> + <value name="RU" value="1"/> + <value name="RD" value="2"/> + <value name="RTZ" value="3"/> + </field> + <field name="Barrier Enable" start="213" end="213" type="bool"/> + <field name="Shared Local Memory Size" start="208" end="212" type="uint"> + <value name="Encodes 0K" value="0"/> + <value name="Encodes 1K" value="1"/> + <value name="Encodes 2K" value="2"/> + <value name="Encodes 4K" value="3"/> + <value name="Encodes 8K" value="4"/> + <value name="Encodes 16K" value="5"/> + <value name="Encodes 32K" value="6"/> + <value name="Encodes 64K" value="7"/> + </field> + <field name="Global Barrier Enable" start="207" end="207" type="bool"/> + <field name="Number of Threads in GPGPU Thread Group" start="192" end="201" type="uint"/> + <field name="Cross-Thread Constant Data Read Length" start="224" end="231" type="uint"/> + </struct> + + <struct name="ROUNDINGPRECISIONTABLE_3_BITS" length="1"> + <field name="Rounding Precision" start="0" end="2" type="uint"> + <value name="+1/16" value="0"/> + <value name="+2/16" value="1"/> + <value name="+3/16" value="2"/> + <value name="+4/16" value="3"/> + <value name="+5/16" value="4"/> + <value name="+6/16" value="5"/> + <value name="+7/16" value="6"/> + <value name="+8/16" value="7"/> + </field> + </struct> + + <struct name="PALETTE_ENTRY" length="1"> + <field name="Alpha" start="24" end="31" type="uint"/> + <field name="Red" start="16" end="23" type="uint"/> + <field name="Green" start="8" end="15" type="uint"/> + <field name="Blue" start="0" end="7" type="uint"/> + </struct> + + <struct name="BINDING_TABLE_STATE" length="1"> + <field name="Surface State Pointer" start="6" end="31" type="offset"/> + </struct> + + <struct name="RENDER_SURFACE_STATE" length="16"> + <field name="Surface Type" start="29" end="31" type="uint"> + <value name="SURFTYPE_1D" value="0"/> + <value name="SURFTYPE_2D" value="1"/> + <value name="SURFTYPE_3D" value="2"/> + <value name="SURFTYPE_CUBE" value="3"/> + <value name="SURFTYPE_BUFFER" value="4"/> + <value name="SURFTYPE_STRBUF" value="5"/> + <value name="SURFTYPE_NULL" value="7"/> + </field> + <field name="Surface Array" start="28" end="28" type="bool"/> + <field name="ASTC_Enable" start="27" end="27" type="bool"/> + <field name="Surface Format" start="18" end="26" type="uint"/> + <field name="Surface Vertical Alignment" start="16" end="17" type="uint"> + <value name="VALIGN 4" value="1"/> + <value name="VALIGN 8" value="2"/> + <value name="VALIGN 16" value="3"/> + </field> + <field name="Surface Horizontal Alignment" start="14" end="15" type="uint"> + <value name="HALIGN 4" value="1"/> + <value name="HALIGN 8" value="2"/> + <value name="HALIGN 16" value="3"/> + </field> + <field name="Tile Mode" start="12" end="13" type="uint"> + <value name="LINEAR" value="0"/> + <value name="WMAJOR" value="1"/> + <value name="XMAJOR" value="2"/> + <value name="YMAJOR" value="3"/> + </field> + <field name="Vertical Line Stride" start="11" end="11" type="uint"/> + <field name="Vertical Line Stride Offset" start="10" end="10" type="uint"/> + <field name="Sampler L2 Bypass Mode Disable" start="9" end="9" type="bool"/> + <field name="Render Cache Read Write Mode" start="8" end="8" type="uint"> + <value name="Write-Only Cache" value="0"/> + <value name="Read-Write Cache" value="1"/> + </field> + <field name="Media Boundary Pixel Mode" start="6" end="7" type="uint"> + <value name="NORMAL_MODE" value="0"/> + <value name="PROGRESSIVE_FRAME" value="2"/> + <value name="INTERLACED_FRAME" value="3"/> + </field> + <field name="Cube Face Enable - Positive Z" start="0" end="0" type="bool"/> + <field name="Cube Face Enable - Negative Z" start="1" end="1" type="bool"/> + <field name="Cube Face Enable - Positive Y" start="2" end="2" type="bool"/> + <field name="Cube Face Enable - Negative Y" start="3" end="3" type="bool"/> + <field name="Cube Face Enable - Positive X" start="4" end="4" type="bool"/> + <field name="Cube Face Enable - Negative X" start="5" end="5" type="bool"/> + <field name="Memory Object Control State" start="56" end="62" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Base Mip Level" start="51" end="55" type="u4.1"/> + <field name="Surface QPitch" start="32" end="46" type="uint"/> + <field name="Height" start="80" end="93" type="uint"/> + <field name="Width" start="64" end="77" type="uint"/> + <field name="Depth" start="117" end="127" type="uint"/> + <field name="Surface Pitch" start="96" end="113" type="uint"/> + <field name="Render Target And Sample Unorm Rotation" start="157" end="158" type="uint"> + <value name="0DEG" value="0"/> + <value name="90DEG" value="1"/> + <value name="180DEG" value="2"/> + <value name="270DEG" value="3"/> + </field> + <field name="Minimum Array Element" start="146" end="156" type="uint"/> + <field name="Render Target View Extent" start="135" end="145" type="uint"/> + <field name="Multisampled Surface Storage Format" start="134" end="134" type="uint"> + <value name="MSS" value="0"/> + <value name="DEPTH_STENCIL" value="1"/> + </field> + <field name="Number of Multisamples" start="131" end="133" type="uint"> + <value name="MULTISAMPLECOUNT_1" value="0"/> + <value name="MULTISAMPLECOUNT_2" value="1"/> + <value name="MULTISAMPLECOUNT_4" value="2"/> + <value name="MULTISAMPLECOUNT_8" value="3"/> + <value name="MULTISAMPLECOUNT_16" value="4"/> + </field> + <field name="Multisample Position Palette Index" start="128" end="130" type="uint"/> + <field name="X Offset" start="185" end="191" type="offset"/> + <field name="Y Offset" start="181" end="183" type="offset"/> + <field name="EWA Disable For Cube" start="180" end="180" type="bool"/> + <field name="Tiled Resource Mode" start="178" end="179" type="uint"> + <value name="NONE" value="0"/> + <value name="4KB" value="1"/> + <value name="64KB" value="2"/> + <value name="TILEYF" value="1"/> + <value name="TILEYS" value="2"/> + </field> + <field name="Coherency Type" start="174" end="174" type="uint"> + <value name="GPU coherent" value="0"/> + <value name="IA coherent" value="1"/> + </field> + <field name="Mip Tail Start LOD" start="168" end="171" type="uint"/> + <field name="Surface Min LOD" start="164" end="167" type="uint"/> + <field name="MIP Count / LOD" start="160" end="163" type="uint"/> + <field name="Auxiliary Surface QPitch" start="208" end="222" type="uint"/> + <field name="Auxiliary Surface Pitch" start="195" end="203" type="uint"/> + <field name="Auxiliary Surface Mode" start="192" end="194" type="uint"> + <value name="AUX_NONE" value="0"/> + <value name="AUX_CCS_D" value="1"/> + <value name="AUX_APPEND" value="2"/> + <value name="AUX_HIZ" value="3"/> + <value name="AUX_CCS_E" value="5"/> + </field> + <field name="Separate UV Plane Enable" start="223" end="223" type="bool"/> + <field name="X Offset for U or UV Plane" start="208" end="221" type="uint"/> + <field name="Y Offset for U or UV Plane" start="192" end="205" type="uint"/> + <field name="Memory Compression Mode" start="255" end="255" type="uint"> + <value name="Horizontal" value="0"/> + <value name="Vertical" value="1"/> + </field> + <field name="Memory Compression Enable" start="254" end="254" type="bool"/> + <field name="Shader Channel Select Red" start="249" end="251" type="uint"/> + <field name="Shader Channel Select Green" start="246" end="248" type="uint"/> + <field name="Shader Channel Select Blue" start="243" end="245" type="uint"/> + <field name="Shader Channel Select Alpha" start="240" end="242" type="uint"/> + <field name="Resource Min LOD" start="224" end="235" type="u4.8"/> + <field name="Surface Base Address" start="256" end="319" type="address"/> + <field name="X Offset for V Plane" start="368" end="381" type="uint"/> + <field name="Y Offset for V Plane" start="352" end="365" type="uint"/> + <field name="Auxiliary Table Index for Media Compressed Surface" start="341" end="351" type="uint"/> + <field name="Auxiliary Surface Base Address" start="332" end="383" type="address"/> + <field name="Quilt Height" start="325" end="329" type="uint"/> + <field name="Quilt Width" start="320" end="324" type="uint"/> + <field name="Hierarchical Depth Clear Value" start="384" end="415" type="float"/> + <field name="Red Clear Color" start="384" end="415" type="int"/> + <field name="Green Clear Color" start="416" end="447" type="int"/> + <field name="Blue Clear Color" start="448" end="479" type="int"/> + <field name="Alpha Clear Color" start="480" end="511" type="int"/> + </struct> + + <struct name="FILTER_COEFFICIENT" length="1"> + <field name="Filter Coefficient" start="0" end="7" type="s1.6"/> + </struct> + + <struct name="SAMPLER_STATE" length="4"> + <field name="Sampler Disable" start="31" end="31" type="bool"/> + <field name="Texture Border Color Mode" start="29" end="29" type="uint"> + <value name="DX10/OGL" value="0"/> + <value name="DX9" value="1"/> + </field> + <field name="LOD PreClamp Mode" start="27" end="28" type="uint" prefix="CLAMP_MODE"> + <value name="NONE" value="0"/> + <value name="OGL" value="2"/> + </field> + <field name="Coarse LOD Quality Mode" start="22" end="26" type="uint"/> + <field name="Mip Mode Filter" start="20" end="21" type="uint" prefix="MIPFILTER"> + <value name="NONE" value="0"/> + <value name="NEAREST" value="1"/> + <value name="LINEAR" value="3"/> + </field> + <field name="Mag Mode Filter" start="17" end="19" type="uint" prefix="MAPFILTER"> + <value name="NEAREST" value="0"/> + <value name="LINEAR" value="1"/> + <value name="ANISOTROPIC" value="2"/> + <value name="MONO" value="6"/> + </field> + <field name="Min Mode Filter" start="14" end="16" type="uint" prefix="MAPFILTER"> + <value name="NEAREST" value="0"/> + <value name="LINEAR" value="1"/> + <value name="ANISOTROPIC" value="2"/> + <value name="MONO" value="6"/> + </field> + <field name="Texture LOD Bias" start="1" end="13" type="s4.8"/> + <field name="Anisotropic Algorithm" start="0" end="0" type="uint"> + <value name="LEGACY" value="0"/> + <value name="EWA Approximation" value="1"/> + </field> + <field name="Min LOD" start="52" end="63" type="u4.8"/> + <field name="Max LOD" start="40" end="51" type="u4.8"/> + <field name="ChromaKey Enable" start="39" end="39" type="bool"/> + <field name="ChromaKey Index" start="37" end="38" type="uint"/> + <field name="ChromaKey Mode" start="36" end="36" type="uint"> + <value name="KEYFILTER_KILL_ON_ANY_MATCH" value="0"/> + <value name="KEYFILTER_REPLACE_BLACK" value="1"/> + </field> + <field name="Shadow Function" start="33" end="35" type="uint"> + <value name="PREFILTEROP ALWAYS" value="0"/> + <value name="PREFILTEROP NEVER" value="1"/> + <value name="PREFILTEROP LESS" value="2"/> + <value name="PREFILTEROP EQUAL" value="3"/> + <value name="PREFILTEROP LEQUAL" value="4"/> + <value name="PREFILTEROP GREATER" value="5"/> + <value name="PREFILTEROP NOTEQUAL" value="6"/> + <value name="PREFILTEROP GEQUAL" value="7"/> + </field> + <field name="Cube Surface Control Mode" start="32" end="32" type="uint"> + <value name="PROGRAMMED" value="0"/> + <value name="OVERRIDE" value="1"/> + </field> + <field name="Indirect State Pointer" start="70" end="87" type="uint"/> + <field name="LOD Clamp Magnification Mode" start="64" end="64" type="uint"> + <value name="MIPNONE" value="0"/> + <value name="MIPFILTER" value="1"/> + </field> + <field name="Reduction Type" start="118" end="119" type="uint"> + <value name="STD_FILTER" value="0"/> + <value name="COMPARISON" value="1"/> + <value name="MINIMUM" value="2"/> + <value name="MAXIMUM" value="3"/> + </field> + <field name="Maximum Anisotropy" start="115" end="117" type="uint"> + <value name="RATIO 2:1" value="0"/> + <value name="RATIO 4:1" value="1"/> + <value name="RATIO 6:1" value="2"/> + <value name="RATIO 8:1" value="3"/> + <value name="RATIO 10:1" value="4"/> + <value name="RATIO 12:1" value="5"/> + <value name="RATIO 14:1" value="6"/> + <value name="RATIO 16:1" value="7"/> + </field> + <field name="R Address Min Filter Rounding Enable" start="109" end="109" type="bool"/> + <field name="R Address Mag Filter Rounding Enable" start="110" end="110" type="bool"/> + <field name="V Address Min Filter Rounding Enable" start="111" end="111" type="bool"/> + <field name="V Address Mag Filter Rounding Enable" start="112" end="112" type="bool"/> + <field name="U Address Min Filter Rounding Enable" start="113" end="113" type="bool"/> + <field name="U Address Mag Filter Rounding Enable" start="114" end="114" type="bool"/> + <field name="Trilinear Filter Quality" start="107" end="108" type="uint"> + <value name="FULL" value="0"/> + <value name="HIGH" value="1"/> + <value name="MED" value="2"/> + <value name="LOW" value="3"/> + </field> + <field name="Non-normalized Coordinate Enable" start="106" end="106" type="bool"/> + <field name="Reduction Type Enable" start="105" end="105" type="bool"/> + <field name="TCX Address Control Mode" start="102" end="104" type="uint"/> + <field name="TCY Address Control Mode" start="99" end="101" type="uint"/> + <field name="TCZ Address Control Mode" start="96" end="98" type="uint"/> + </struct> + + <struct name="SAMPLER_STATE_8X8_AVS_COEFFICIENTS" length="8"> + <field name="Table 0Y Filter Coefficient[n,1]" start="24" end="31" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,1]" start="16" end="23" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,0]" start="8" end="15" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,0]" start="0" end="7" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,3]" start="56" end="63" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,3]" start="48" end="55" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,2]" start="40" end="47" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,2]" start="32" end="39" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,5]" start="88" end="95" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,5]" start="80" end="87" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,4]" start="72" end="79" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,4]" start="64" end="71" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,7]" start="120" end="127" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,7]" start="112" end="119" type="s1.6"/> + <field name="Table 0Y Filter Coefficient[n,6]" start="104" end="111" type="s1.6"/> + <field name="Table 0X Filter Coefficient[n,6]" start="96" end="103" type="s1.6"/> + <field name="Table 1X Filter Coefficient[n,3]" start="152" end="159" type="s1.6"/> + <field name="Table 1X Filter Coefficient[n,2]" start="144" end="151" type="s1.6"/> + <field name="Table 1X Filter Coefficient[n,5]" start="168" end="175" type="s1.6"/> + <field name="Table 1X Filter Coefficient[n,4]" start="160" end="167" type="s1.6"/> + <field name="Table 1Y Filter Coefficient[n,3]" start="216" end="223" type="s1.6"/> + <field name="Table 1Y Filter Coefficient[n,2]" start="208" end="215" type="s1.6"/> + <field name="Table 1Y Filter Coefficient[n,5]" start="232" end="239" type="s1.6"/> + <field name="Table 1Y Filter Coefficient[n,4]" start="224" end="231" type="s1.6"/> + </struct> + + <enum name="3D_Prim_Topo_Type" prefix="3DPRIM"> + <value name="POINTLIST" value="1"/> + <value name="LINELIST" value="2"/> + <value name="LINESTRIP" value="3"/> + <value name="TRILIST" value="4"/> + <value name="TRISTRIP" value="5"/> + <value name="TRIFAN" value="6"/> + <value name="QUADLIST" value="7"/> + <value name="QUADSTRIP" value="8"/> + <value name="LINELIST_ADJ" value="9"/> + <value name="LINESTRIP_ADJ" value="10"/> + <value name="TRILIST_ADJ" value="11"/> + <value name="TRISTRIP_ADJ" value="12"/> + <value name="TRISTRIP_REVERSE" value="13"/> + <value name="POLYGON" value="14"/> + <value name="RECTLIST" value="15"/> + <value name="LINELOOP" value="16"/> + <value name="POINTLIST _BF" value="17"/> + <value name="LINESTRIP_CONT" value="18"/> + <value name="LINESTRIP_BF" value="19"/> + <value name="LINESTRIP_CONT_BF" value="20"/> + <value name="TRIFAN_NOSTIPPLE" value="22"/> + <value name="PATCHLIST_1" value="32"/> + <value name="PATCHLIST_2" value="33"/> + <value name="PATCHLIST_3" value="34"/> + <value name="PATCHLIST_4" value="35"/> + <value name="PATCHLIST_5" value="36"/> + <value name="PATCHLIST_6" value="37"/> + <value name="PATCHLIST_7" value="38"/> + <value name="PATCHLIST_8" value="39"/> + <value name="PATCHLIST_9" value="40"/> + <value name="PATCHLIST_10" value="41"/> + <value name="PATCHLIST_11" value="42"/> + <value name="PATCHLIST_12" value="43"/> + <value name="PATCHLIST_13" value="44"/> + <value name="PATCHLIST_14" value="45"/> + <value name="PATCHLIST_15" value="46"/> + <value name="PATCHLIST_16" value="47"/> + <value name="PATCHLIST_17" value="48"/> + <value name="PATCHLIST_18" value="49"/> + <value name="PATCHLIST_19" value="50"/> + <value name="PATCHLIST_20" value="51"/> + <value name="PATCHLIST_21" value="52"/> + <value name="PATCHLIST_22" value="53"/> + <value name="PATCHLIST_23" value="54"/> + <value name="PATCHLIST_24" value="55"/> + <value name="PATCHLIST_25" value="56"/> + <value name="PATCHLIST_26" value="57"/> + <value name="PATCHLIST_27" value="58"/> + <value name="PATCHLIST_28" value="59"/> + <value name="PATCHLIST_29" value="60"/> + <value name="PATCHLIST_30" value="61"/> + <value name="PATCHLIST_31" value="62"/> + <value name="PATCHLIST_32" value="63"/> + </enum> + + <enum name="3D_Vertex_Component_Control" prefix="VFCOMP"> + <value name="NOSTORE" value="0"/> + <value name="STORE_SRC" value="1"/> + <value name="STORE_0" value="2"/> + <value name="STORE_1_FP" value="3"/> + <value name="STORE_1_INT" value="4"/> + <value name="STORE_PID" value="7"/> + </enum> + + <enum name="COMPONENT_ENABLES" prefix="CE"> + <value name="NONE" value="0"/> + <value name="X" value="1"/> + <value name="Y" value="2"/> + <value name="XY" value="3"/> + <value name="Z" value="4"/> + <value name="XZ" value="5"/> + <value name="YZ" value="6"/> + <value name="XYZ" value="7"/> + <value name="W" value="8"/> + <value name="XW" value="9"/> + <value name="YW" value="10"/> + <value name="XYW" value="11"/> + <value name="ZW" value="12"/> + <value name="XZW" value="13"/> + <value name="YZW" value="14"/> + <value name="XYZW" value="15"/> + </enum> + + <enum name="Attribute_Component_Format" prefix="ACF"> + <value name="disabled" value="0"/> + <value name=".xy" value="1"/> + <value name=".xyz" value="2"/> + <value name=".xyzw" value="3"/> + </enum> + + <enum name="WRAP_SHORTEST_ENABLE" prefix="WSE"> + <value name="X" value="1"/> + <value name="Y" value="2"/> + <value name="XY" value="3"/> + <value name="Z" value="4"/> + <value name="XZ" value="5"/> + <value name="YZ" value="6"/> + <value name="XYZ" value="7"/> + <value name="W" value="8"/> + <value name="XW" value="9"/> + <value name="YW" value="10"/> + <value name="XYW" value="11"/> + <value name="ZW" value="12"/> + <value name="XZW" value="13"/> + <value name="YZW" value="14"/> + <value name="XYZW" value="15"/> + </enum> + + <enum name="3D_Stencil_Operation" prefix="STENCILOP"> + <value name="KEEP" value="0"/> + <value name="ZERO" value="1"/> + <value name="REPLACE" value="2"/> + <value name="INCRSAT" value="3"/> + <value name="DECRSAT" value="4"/> + <value name="INCR" value="5"/> + <value name="DECR" value="6"/> + <value name="INVERT" value="7"/> + </enum> + + <enum name="3D_Color_Buffer_Blend_Factor" prefix="BLENDFACTOR"> + <value name="ONE" value="1"/> + <value name="SRC_COLOR" value="2"/> + <value name="SRC_ALPHA" value="3"/> + <value name="DST_ALPHA" value="4"/> + <value name="DST_COLOR" value="5"/> + <value name="SRC_ALPHA_SATURATE" value="6"/> + <value name="CONST_COLOR" value="7"/> + <value name="CONST_ALPHA" value="8"/> + <value name="SRC1_COLOR" value="9"/> + <value name="SRC1_ALPHA" value="10"/> + <value name="ZERO" value="17"/> + <value name="INV_SRC_COLOR" value="18"/> + <value name="INV_SRC_ALPHA" value="19"/> + <value name="INV_DST_ALPHA" value="20"/> + <value name="INV_DST_COLOR" value="21"/> + <value name="INV_CONST_COLOR" value="23"/> + <value name="INV_CONST_ALPHA" value="24"/> + <value name="INV_SRC1_COLOR" value="25"/> + <value name="INV_SRC1_ALPHA" value="26"/> + </enum> + + <enum name="3D_Color_Buffer_Blend_Function" prefix="BLENDFUNCTION"> + <value name="ADD" value="0"/> + <value name="SUBTRACT" value="1"/> + <value name="REVERSE_SUBTRACT" value="2"/> + <value name="MIN" value="3"/> + <value name="MAX" value="4"/> + </enum> + + <enum name="3D_Compare_Function" prefix="COMPAREFUNCTION"> + <value name="ALWAYS" value="0"/> + <value name="NEVER" value="1"/> + <value name="LESS" value="2"/> + <value name="EQUAL" value="3"/> + <value name="LEQUAL" value="4"/> + <value name="GREATER" value="5"/> + <value name="NOTEQUAL" value="6"/> + <value name="GEQUAL" value="7"/> + </enum> + + <enum name="3D_Logic_Op_Function" prefix="LOGICOP"> + <value name="CLEAR" value="0"/> + <value name="NOR" value="1"/> + <value name="AND_INVERTED" value="2"/> + <value name="COPY_INVERTED" value="3"/> + <value name="AND_REVERSE" value="4"/> + <value name="INVERT" value="5"/> + <value name="XOR" value="6"/> + <value name="NAND" value="7"/> + <value name="AND" value="8"/> + <value name="EQUIV" value="9"/> + <value name="NOOP" value="10"/> + <value name="OR_INVERTED" value="11"/> + <value name="COPY" value="12"/> + <value name="OR_REVERSE" value="13"/> + <value name="OR" value="14"/> + <value name="SET" value="15"/> + </enum> + + <enum name="SURFACE_FORMAT" prefix="SF"> + <value name="R32G32B32A32_FLOAT" value="0"/> + <value name="R32G32B32A32_SINT" value="1"/> + <value name="R32G32B32A32_UINT" value="2"/> + <value name="R32G32B32A32_UNORM" value="3"/> + <value name="R32G32B32A32_SNORM" value="4"/> + <value name="R64G64_FLOAT" value="5"/> + <value name="R32G32B32X32_FLOAT" value="6"/> + <value name="R32G32B32A32_SSCALED" value="7"/> + <value name="R32G32B32A32_USCALED" value="8"/> + <value name="R32G32B32A32_SFIXED" value="32"/> + <value name="R64G64_PASSTHRU" value="33"/> + <value name="R32G32B32_FLOAT" value="64"/> + <value name="R32G32B32_SINT" value="65"/> + <value name="R32G32B32_UINT" value="66"/> + <value name="R32G32B32_UNORM" value="67"/> + <value name="R32G32B32_SNORM" value="68"/> + <value name="R32G32B32_SSCALED" value="69"/> + <value name="R32G32B32_USCALED" value="70"/> + <value name="R32G32B32_SFIXED" value="80"/> + <value name="R16G16B16A16_UNORM" value="128"/> + <value name="R16G16B16A16_SNORM" value="129"/> + <value name="R16G16B16A16_SINT" value="130"/> + <value name="R16G16B16A16_UINT" value="131"/> + <value name="R16G16B16A16_FLOAT" value="132"/> + <value name="R32G32_FLOAT" value="133"/> + <value name="R32G32_SINT" value="134"/> + <value name="R32G32_UINT" value="135"/> + <value name="R32_FLOAT_X8X24_TYPELESS" value="136"/> + <value name="X32_TYPELESS_G8X24_UINT" value="137"/> + <value name="L32A32_FLOAT" value="138"/> + <value name="R32G32_UNORM" value="139"/> + <value name="R32G32_SNORM" value="140"/> + <value name="R64_FLOAT" value="141"/> + <value name="R16G16B16X16_UNORM" value="142"/> + <value name="R16G16B16X16_FLOAT" value="143"/> + <value name="A32X32_FLOAT" value="144"/> + <value name="L32X32_FLOAT" value="145"/> + <value name="I32X32_FLOAT" value="146"/> + <value name="R16G16B16A16_SSCALED" value="147"/> + <value name="R16G16B16A16_USCALED" value="148"/> + <value name="R32G32_SSCALED" value="149"/> + <value name="R32G32_USCALED" value="150"/> + <value name="R32G32_SFIXED" value="160"/> + <value name="R64_PASSTHRU" value="161"/> + <value name="B8G8R8A8_UNORM" value="192"/> + <value name="B8G8R8A8_UNORM_SRGB" value="193"/> + <value name="R10G10B10A2_UNORM" value="194"/> + <value name="R10G10B10A2_UNORM_SRGB" value="195"/> + <value name="R10G10B10A2_UINT" value="196"/> + <value name="R10G10B10_SNORM_A2_UNORM" value="197"/> + <value name="R8G8B8A8_UNORM" value="199"/> + <value name="R8G8B8A8_UNORM_SRGB" value="200"/> + <value name="R8G8B8A8_SNORM" value="201"/> + <value name="R8G8B8A8_SINT" value="202"/> + <value name="R8G8B8A8_UINT" value="203"/> + <value name="R16G16_UNORM" value="204"/> + <value name="R16G16_SNORM" value="205"/> + <value name="R16G16_SINT" value="206"/> + <value name="R16G16_UINT" value="207"/> + <value name="R16G16_FLOAT" value="208"/> + <value name="B10G10R10A2_UNORM" value="209"/> + <value name="B10G10R10A2_UNORM_SRGB" value="210"/> + <value name="R11G11B10_FLOAT" value="211"/> + <value name="R32_SINT" value="214"/> + <value name="R32_UINT" value="215"/> + <value name="R32_FLOAT" value="216"/> + <value name="R24_UNORM_X8_TYPELESS" value="217"/> + <value name="X24_TYPELESS_G8_UINT" value="218"/> + <value name="L32_UNORM" value="221"/> + <value name="A32_UNORM" value="222"/> + <value name="L16A16_UNORM" value="223"/> + <value name="I24X8_UNORM" value="224"/> + <value name="L24X8_UNORM" value="225"/> + <value name="A24X8_UNORM" value="226"/> + <value name="I32_FLOAT" value="227"/> + <value name="L32_FLOAT" value="228"/> + <value name="A32_FLOAT" value="229"/> + <value name="X8B8_UNORM_G8R8_SNORM" value="230"/> + <value name="A8X8_UNORM_G8R8_SNORM" value="231"/> + <value name="B8X8_UNORM_G8R8_SNORM" value="232"/> + <value name="B8G8R8X8_UNORM" value="233"/> + <value name="B8G8R8X8_UNORM_SRGB" value="234"/> + <value name="R8G8B8X8_UNORM" value="235"/> + <value name="R8G8B8X8_UNORM_SRGB" value="236"/> + <value name="R9G9B9E5_SHAREDEXP" value="237"/> + <value name="B10G10R10X2_UNORM" value="238"/> + <value name="L16A16_FLOAT" value="240"/> + <value name="R32_UNORM" value="241"/> + <value name="R32_SNORM" value="242"/> + <value name="R10G10B10X2_USCALED" value="243"/> + <value name="R8G8B8A8_SSCALED" value="244"/> + <value name="R8G8B8A8_USCALED" value="245"/> + <value name="R16G16_SSCALED" value="246"/> + <value name="R16G16_USCALED" value="247"/> + <value name="R32_SSCALED" value="248"/> + <value name="R32_USCALED" value="249"/> + <value name="B5G6R5_UNORM" value="256"/> + <value name="B5G6R5_UNORM_SRGB" value="257"/> + <value name="B5G5R5A1_UNORM" value="258"/> + <value name="B5G5R5A1_UNORM_SRGB" value="259"/> + <value name="B4G4R4A4_UNORM" value="260"/> + <value name="B4G4R4A4_UNORM_SRGB" value="261"/> + <value name="R8G8_UNORM" value="262"/> + <value name="R8G8_SNORM" value="263"/> + <value name="R8G8_SINT" value="264"/> + <value name="R8G8_UINT" value="265"/> + <value name="R16_UNORM" value="266"/> + <value name="R16_SNORM" value="267"/> + <value name="R16_SINT" value="268"/> + <value name="R16_UINT" value="269"/> + <value name="R16_FLOAT" value="270"/> + <value name="A8P8_UNORM_PALETTE0" value="271"/> + <value name="A8P8_UNORM_PALETTE1" value="272"/> + <value name="I16_UNORM" value="273"/> + <value name="L16_UNORM" value="274"/> + <value name="A16_UNORM" value="275"/> + <value name="L8A8_UNORM" value="276"/> + <value name="I16_FLOAT" value="277"/> + <value name="L16_FLOAT" value="278"/> + <value name="A16_FLOAT" value="279"/> + <value name="L8A8_UNORM_SRGB" value="280"/> + <value name="R5G5_SNORM_B6_UNORM" value="281"/> + <value name="B5G5R5X1_UNORM" value="282"/> + <value name="B5G5R5X1_UNORM_SRGB" value="283"/> + <value name="R8G8_SSCALED" value="284"/> + <value name="R8G8_USCALED" value="285"/> + <value name="R16_SSCALED" value="286"/> + <value name="R16_USCALED" value="287"/> + <value name="P8A8_UNORM_PALETTE0" value="290"/> + <value name="P8A8_UNORM_PALETTE1" value="291"/> + <value name="A1B5G5R5_UNORM" value="292"/> + <value name="A4B4G4R4_UNORM" value="293"/> + <value name="L8A8_UINT" value="294"/> + <value name="L8A8_SINT" value="295"/> + <value name="R8_UNORM" value="320"/> + <value name="R8_SNORM" value="321"/> + <value name="R8_SINT" value="322"/> + <value name="R8_UINT" value="323"/> + <value name="A8_UNORM" value="324"/> + <value name="I8_UNORM" value="325"/> + <value name="L8_UNORM" value="326"/> + <value name="P4A4_UNORM_PALETTE0" value="327"/> + <value name="A4P4_UNORM_PALETTE0" value="328"/> + <value name="R8_SSCALED" value="329"/> + <value name="R8_USCALED" value="330"/> + <value name="P8_UNORM_PALETTE0" value="331"/> + <value name="L8_UNORM_SRGB" value="332"/> + <value name="P8_UNORM_PALETTE1" value="333"/> + <value name="P4A4_UNORM_PALETTE1" value="334"/> + <value name="A4P4_UNORM_PALETTE1" value="335"/> + <value name="Y8_UNORM" value="336"/> + <value name="L8_UINT" value="338"/> + <value name="L8_SINT" value="339"/> + <value name="I8_UINT" value="340"/> + <value name="I8_SINT" value="341"/> + <value name="DXT1_RGB_SRGB" value="384"/> + <value name="R1_UNORM" value="385"/> + <value name="YCRCB_NORMAL" value="386"/> + <value name="YCRCB_SWAPUVY" value="387"/> + <value name="P2_UNORM_PALETTE0" value="388"/> + <value name="P2_UNORM_PALETTE1" value="389"/> + <value name="BC1_UNORM" value="390"/> + <value name="BC2_UNORM" value="391"/> + <value name="BC3_UNORM" value="392"/> + <value name="BC4_UNORM" value="393"/> + <value name="BC5_UNORM" value="394"/> + <value name="BC1_UNORM_SRGB" value="395"/> + <value name="BC2_UNORM_SRGB" value="396"/> + <value name="BC3_UNORM_SRGB" value="397"/> + <value name="MONO8" value="398"/> + <value name="YCRCB_SWAPUV" value="399"/> + <value name="YCRCB_SWAPY" value="400"/> + <value name="DXT1_RGB" value="401"/> + <value name="FXT1" value="402"/> + <value name="R8G8B8_UNORM" value="403"/> + <value name="R8G8B8_SNORM" value="404"/> + <value name="R8G8B8_SSCALED" value="405"/> + <value name="R8G8B8_USCALED" value="406"/> + <value name="R64G64B64A64_FLOAT" value="407"/> + <value name="R64G64B64_FLOAT" value="408"/> + <value name="BC4_SNORM" value="409"/> + <value name="BC5_SNORM" value="410"/> + <value name="R16G16B16_FLOAT" value="411"/> + <value name="R16G16B16_UNORM" value="412"/> + <value name="R16G16B16_SNORM" value="413"/> + <value name="R16G16B16_SSCALED" value="414"/> + <value name="R16G16B16_USCALED" value="415"/> + <value name="BC6H_SF16" value="417"/> + <value name="BC7_UNORM" value="418"/> + <value name="BC7_UNORM_SRGB" value="419"/> + <value name="BC6H_UF16" value="420"/> + <value name="PLANAR_420_8" value="421"/> + <value name="R8G8B8_UNORM_SRGB" value="424"/> + <value name="ETC1_RGB8" value="425"/> + <value name="ETC2_RGB8" value="426"/> + <value name="EAC_R11" value="427"/> + <value name="EAC_RG11" value="428"/> + <value name="EAC_SIGNED_R11" value="429"/> + <value name="EAC_SIGNED_RG11" value="430"/> + <value name="ETC2_SRGB8" value="431"/> + <value name="R16G16B16_UINT" value="432"/> + <value name="R16G16B16_SINT" value="433"/> + <value name="R32_SFIXED" value="434"/> + <value name="R10G10B10A2_SNORM" value="435"/> + <value name="R10G10B10A2_USCALED" value="436"/> + <value name="R10G10B10A2_SSCALED" value="437"/> + <value name="R10G10B10A2_SINT" value="438"/> + <value name="B10G10R10A2_SNORM" value="439"/> + <value name="B10G10R10A2_USCALED" value="440"/> + <value name="B10G10R10A2_SSCALED" value="441"/> + <value name="B10G10R10A2_UINT" value="442"/> + <value name="B10G10R10A2_SINT" value="443"/> + <value name="R64G64B64A64_PASSTHRU" value="444"/> + <value name="R64G64B64_PASSTHRU" value="445"/> + <value name="ETC2_RGB8_PTA" value="448"/> + <value name="ETC2_SRGB8_PTA" value="449"/> + <value name="ETC2_EAC_RGBA8" value="450"/> + <value name="ETC2_EAC_SRGB8_A8" value="451"/> + <value name="R8G8B8_UINT" value="456"/> + <value name="R8G8B8_SINT" value="457"/> + <value name="RAW" value="511"/> + </enum> + + <enum name="Shader Channel Select" prefix="SCS"> + <value name="ZERO" value="0"/> + <value name="ONE" value="1"/> + <value name="RED" value="4"/> + <value name="GREEN" value="5"/> + <value name="BLUE" value="6"/> + <value name="ALPHA" value="7"/> + </enum> + + <enum name="Texture Coordinate Mode" prefix="TCM"> + <value name="WRAP" value="0"/> + <value name="MIRROR" value="1"/> + <value name="CLAMP" value="2"/> + <value name="CUBE" value="3"/> + <value name="CLAMP_BORDER" value="4"/> + <value name="MIRROR_ONCE" value="5"/> + <value name="HALF_BORDER" value="6"/> + </enum> + + <instruction name="3DPRIMITIVE" bias="2" length="7"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="3"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="0"/> + <field name="Indirect Parameter Enable" start="10" end="10" type="bool"/> + <field name="UAV Coherency Required" start="9" end="9" type="bool"/> + <field name="Predicate Enable" start="8" end="8" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="5"/> + <field name="End Offset Enable" start="41" end="41" type="bool"/> + <field name="Vertex Access Type" start="40" end="40" type="uint"> + <value name="SEQUENTIAL" value="0"/> + <value name="RANDOM" value="1"/> + </field> + <field name="Primitive Topology Type" start="32" end="37" type="uint"/> + <field name="Vertex Count Per Instance" start="64" end="95" type="uint"/> + <field name="Start Vertex Location" start="96" end="127" type="uint"/> + <field name="Instance Count" start="128" end="159" type="uint"/> + <field name="Start Instance Location" start="160" end="191" type="uint"/> + <field name="Base Vertex Location" start="192" end="223" type="int"/> + </instruction> + + <instruction name="3DSTATE_AA_LINE_PARAMETERS" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="10"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="AA Point Coverage Bias" start="56" end="63" type="u0.8"/> + <field name="AA Coverage Bias" start="48" end="55" type="u0.8"/> + <field name="AA Point Coverage Slope" start="40" end="47" type="u0.8"/> + <field name="AA Coverage Slope" start="32" end="39" type="u0.8"/> + <field name="AA Point Coverage EndCap Bias" start="88" end="95" type="u0.8"/> + <field name="AA Coverage EndCap Bias" start="80" end="87" type="u0.8"/> + <field name="AA Point Coverage EndCap Slope" start="72" end="79" type="u0.8"/> + <field name="AA Coverage EndCap Slope" start="64" end="71" type="u0.8"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_DS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="70"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_GS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="68"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_HS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="69"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_PS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="71"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_EDIT_VS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="67"/> + <field name="DWord Length" start="0" end="8" type="uint" default="0"/> + <field name="Binding Table Block Clear" start="48" end="63" type="uint"/> + <field name="Binding Table Edit Target" start="32" end="33" type="uint"> + <value name="All Cores" value="3"/> + <value name="Core 1" value="2"/> + <value name="Core 0" value="1"/> + </field> + <group count="0" start="64" size="32"> + <field name="Entry [n]" start="0" end="31" type="BINDING_TABLE_EDIT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="40"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to DS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="41"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to GS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="39"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to HS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_PS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="42"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to PS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POINTERS_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="38"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to VS Binding Table" start="37" end="47" type="offset"/> + </instruction> + + <instruction name="3DSTATE_BINDING_TABLE_POOL_ALLOC" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="25"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Binding Table Pool Base Address" start="44" end="95" type="address"/> + <field name="Binding Table Pool Enable" start="43" end="43" type="uint"/> + <field name="Surface Object Control State" start="32" end="38" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Binding Table Pool Buffer Size" start="108" end="127" type="uint"> + <value name="No Valid Data" value="0"/> + </field> + </instruction> + + <instruction name="3DSTATE_BLEND_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="36"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Blend State Pointer" start="38" end="63" type="offset"/> + <field name="Blend State Pointer Valid" start="32" end="32" type="bool"/> + </instruction> + + <instruction name="3DSTATE_CC_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="14"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Color Calc State Pointer" start="38" end="63" type="offset"/> + <field name="Color Calc State Pointer Valid" start="32" end="32" type="bool"/> + </instruction> + + <instruction name="3DSTATE_CHROMA_KEY" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="ChromaKey Table Index" start="62" end="63" type="uint"/> + <field name="ChromaKey Low Value" start="64" end="95" type="uint"/> + <field name="ChromaKey High Value" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="3DSTATE_CLEAR_PARAMS" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Depth Clear Value" start="32" end="63" type="float"/> + <field name="Depth Clear Value Valid" start="64" end="64" type="bool"/> + </instruction> + + <instruction name="3DSTATE_CLIP" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="18"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Force User Clip Distance Cull Test Enable Bitmask" start="52" end="52" type="bool"/> + <field name="Vertex Sub Pixel Precision Select" start="51" end="51" type="uint"> + <value name="8 Bit" value="0"/> + <value name="4 Bit" value="1"/> + </field> + <field name="Early Cull Enable" start="50" end="50" type="bool"/> + <field name="Force User Clip Distance Clip Test Enable Bitmask" start="49" end="49" type="bool"/> + <field name="Force Clip Mode" start="48" end="48" type="bool"/> + <field name="Clipper Statistics Enable" start="42" end="42" type="bool"/> + <field name="User Clip Distance Cull Test Enable Bitmask" start="32" end="39" type="uint"/> + <field name="Clip Enable" start="95" end="95" type="bool"/> + <field name="API Mode" start="94" end="94" type="uint"> + <value name="OGL" value="0"/> + </field> + <field name="Viewport XY Clip Test Enable" start="92" end="92" type="bool"/> + <field name="Guardband Clip Test Enable" start="90" end="90" type="bool"/> + <field name="User Clip Distance Clip Test Enable Bitmask" start="80" end="87" type="uint"/> + <field name="Clip Mode" start="77" end="79" type="uint"> + <value name="NORMAL" value="0"/> + <value name="REJECT_ALL" value="3"/> + <value name="ACCEPT_ALL" value="4"/> + </field> + <field name="Perspective Divide Disable" start="73" end="73" type="bool"/> + <field name="Non-Perspective Barycentric Enable" start="72" end="72" type="bool"/> + <field name="Triangle Strip/List Provoking Vertex Select" start="68" end="69" type="uint"/> + <field name="Line Strip/List Provoking Vertex Select" start="66" end="67" type="uint"/> + <field name="Triangle Fan Provoking Vertex Select" start="64" end="65" type="uint"/> + <field name="Minimum Point Width" start="113" end="123" type="u8.3"/> + <field name="Maximum Point Width" start="102" end="112" type="u8.3"/> + <field name="Force Zero RTA Index Enable" start="101" end="101" type="bool"/> + <field name="Maximum VP Index" start="96" end="99" type="uint"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_DS" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="26"/> + <field name="Constant Buffer Object Control State" start="8" end="14" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <field name="Constant Body" start="32" end="351" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_GS" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="22"/> + <field name="Constant Buffer Object Control State" start="8" end="14" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <field name="Constant Body" start="32" end="351" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_HS" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="25"/> + <field name="Constant Buffer Object Control State" start="8" end="14" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <field name="Constant Body" start="32" end="351" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_PS" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="23"/> + <field name="Constant Buffer Object Control State" start="8" end="14" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <field name="Constant Body" start="32" end="351" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_CONSTANT_VS" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="21"/> + <field name="Constant Buffer Object Control State" start="8" end="14" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <field name="Constant Body" start="32" end="351" type="3DSTATE_CONSTANT_BODY"/> + </instruction> + + <instruction name="3DSTATE_DEPTH_BUFFER" bias="2" length="8"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="5"/> + <field name="DWord Length" start="0" end="7" type="uint" default="6"/> + <field name="Surface Type" start="61" end="63" type="uint"> + <value name="SURFTYPE_2D" value="1"/> + <value name="SURFTYPE_CUBE" value="3"/> + <value name="SURFTYPE_NULL" value="7"/> + </field> + <field name="Depth Write Enable" start="60" end="60" type="bool"/> + <field name="Stencil Write Enable" start="59" end="59" type="bool"/> + <field name="Hierarchical Depth Buffer Enable" start="54" end="54" type="bool"/> + <field name="Surface Format" start="50" end="52" type="uint"> + <value name="D32_FLOAT" value="1"/> + <value name="D24_UNORM_X8_UINT" value="3"/> + <value name="D16_UNORM" value="5"/> + </field> + <field name="Surface Pitch" start="32" end="49" type="uint"/> + <field name="Surface Base Address" start="64" end="127" type="address"/> + <field name="Height" start="146" end="159" type="uint"/> + <field name="Width" start="132" end="145" type="uint"/> + <field name="LOD" start="128" end="131" type="uint"/> + <field name="Depth" start="181" end="191" type="uint"/> + <field name="Minimum Array Element" start="170" end="180" type="uint"/> + <field name="Depth Buffer Object Control State" start="160" end="166" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Tiled Resource Mode" start="222" end="223" type="uint"> + <value name="NONE" value="0"/> + <value name="TILEYF" value="1"/> + <value name="TILEYS" value="2"/> + </field> + <field name="Mip Tail Start LOD" start="218" end="221" type="uint"/> + <field name="Render Target View Extent" start="245" end="255" type="uint"/> + <field name="Surface QPitch" start="224" end="238" type="uint"/> + </instruction> + + <instruction name="3DSTATE_DRAWING_RECTANGLE" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="0"/> + <field name="Core Mode Select" start="14" end="15" type="uint"> + <value name="Legacy" value="0"/> + <value name="Core 0 Enabled" value="1"/> + <value name="Core 1 Enabled" value="2"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Clipped Drawing Rectangle Y Min" start="48" end="63" type="uint"/> + <field name="Clipped Drawing Rectangle X Min" start="32" end="47" type="uint"/> + <field name="Clipped Drawing Rectangle Y Max" start="80" end="95" type="uint"/> + <field name="Clipped Drawing Rectangle X Max" start="64" end="79" type="uint"/> + <field name="Drawing Rectangle Origin Y" start="112" end="127" type="int"/> + <field name="Drawing Rectangle Origin X" start="96" end="111" type="int"/> + </instruction> + + <instruction name="3DSTATE_DS" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="29"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <field name="Kernel Start Pointer" start="38" end="95" type="offset"/> + <field name="Vector Mask Enable" start="126" end="126" type="bool"/> + <field name="Sampler Count" start="123" end="125" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="114" end="121" type="uint"/> + <field name="Thread Dispatch Priority" start="113" end="113" type="uint"> + <value name="High" value="1"/> + </field> + <field name="Floating Point Mode" start="112" end="112" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Accesses UAV" start="110" end="110" type="bool"/> + <field name="Illegal Opcode Exception Enable" start="109" end="109" type="bool"/> + <field name="Software Exception Enable" start="103" end="103" type="bool"/> + <field name="Scratch Space Base Pointer" start="138" end="191" type="offset"/> + <field name="Per-Thread Scratch Space" start="128" end="131" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data" start="212" end="216" type="uint"/> + <field name="Patch URB Entry Read Length" start="203" end="209" type="uint"/> + <field name="Patch URB Entry Read Offset" start="196" end="201" type="uint"/> + <field name="Maximum Number of Threads" start="245" end="253" type="uint"/> + <field name="Statistics Enable" start="234" end="234" type="bool"/> + <field name="Dispatch Mode" start="227" end="228" type="uint" prefix="DISPATCH_MODE"> + <value name="SIMD4X2" value="0"/> + <value name="SIMD8_SINGLE_PATCH" value="1"/> + <value name="SIMD8_SINGLE_OR_DUAL_PATCH" value="2"/> + </field> + <field name="Compute W Coordinate Enable" start="226" end="226" type="bool"/> + <field name="Cache Disable" start="225" end="225" type="bool"/> + <field name="Function Enable" start="224" end="224" type="bool"/> + <field name="Vertex URB Entry Output Read Offset" start="277" end="282" type="uint"/> + <field name="Vertex URB Entry Output Length" start="272" end="276" type="uint"/> + <field name="User Clip Distance Clip Test Enable Bitmask" start="264" end="271" type="uint"/> + <field name="User Clip Distance Cull Test Enable Bitmask" start="256" end="263" type="uint"/> + <field name="DUAL_PATCH Kernel Start Pointer" start="294" end="351" type="offset"/> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_DS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="55"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Update Gather Table Only" start="33" end="33" type="uint"> + <value name="Commit Gather" value="0"/> + <value name="Non-Commit Gather" value="1"/> + </field> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <field name="Constant Buffer Dx9 Generate Stall" start="69" end="69" type="bool"/> + <field name="On-Die Table" start="67" end="67" type="uint"> + <value name="Load" value="0"/> + <value name="Read" value="1"/> + </field> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_GS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="53"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Update Gather Table Only" start="33" end="33" type="uint"> + <value name="Commit Gather" value="0"/> + <value name="Non-Commit Gather" value="1"/> + </field> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <field name="Constant Buffer Dx9 Generate Stall" start="69" end="69" type="bool"/> + <field name="On-Die Table" start="67" end="67" type="uint"> + <value name="Load" value="0"/> + <value name="Read" value="1"/> + </field> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_HS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="54"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Update Gather Table Only" start="33" end="33" type="uint"> + <value name="Commit Gather" value="0"/> + <value name="Non-Commit Gather" value="1"/> + </field> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <field name="Constant Buffer Dx9 Generate Stall" start="69" end="69" type="bool"/> + <field name="On-Die Table" start="67" end="67" type="uint"> + <value name="Load" value="0"/> + <value name="Read" value="1"/> + </field> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_PS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="56"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Update Gather Table Only" start="33" end="33" type="uint"> + <value name="Commit Gather" value="0"/> + <value name="Non-Commit Gather" value="1"/> + </field> + <field name="DX9 On-Die Register Read Enable" start="32" end="32" type="bool"/> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <field name="Constant Buffer Dx9 Generate Stall" start="69" end="69" type="bool"/> + <field name="Constant Buffer Dx9 Enable" start="68" end="68" type="bool"/> + <field name="On-Die Table" start="67" end="67" type="uint"> + <value name="Load" value="0"/> + <value name="Read" value="1"/> + </field> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_CONSTANT_VS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="52"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Valid" start="48" end="63" type="uint"/> + <field name="Constant Buffer Binding Table Block" start="44" end="47" type="uint"/> + <field name="Update Gather Table Only" start="33" end="33" type="uint"> + <value name="Commit Gather" value="0"/> + <value name="Non-Commit Gather" value="1"/> + </field> + <field name="DX9 On-Die Register Read Enable" start="32" end="32" type="bool"/> + <field name="Gather Buffer Offset" start="70" end="86" type="offset"/> + <field name="Constant Buffer Dx9 Generate Stall" start="69" end="69" type="bool"/> + <field name="Constant Buffer Dx9 Enable" start="68" end="68" type="bool"/> + <field name="On-Die Table" start="67" end="67" type="uint"> + <value name="Load" value="0"/> + <value name="Read" value="1"/> + </field> + <group count="0" start="96" size="32"> + <field name="Entry_0" start="0" end="15" type="GATHER_CONSTANT_ENTRY"/> + <field name="Entry_1" start="16" end="31" type="GATHER_CONSTANT_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_GATHER_POOL_ALLOC" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="26"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Gather Pool Base Address" start="44" end="95" type="address"/> + <field name="Gather Pool Enable" start="43" end="43" type="bool"/> + <field name="Memory Object Control State" start="32" end="38" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Gather Pool Buffer Size" start="108" end="127" type="uint"/> + </instruction> + + <instruction name="3DSTATE_GS" bias="2" length="10"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="17"/> + <field name="DWord Length" start="0" end="7" type="uint" default="8"/> + <field name="Kernel Start Pointer" start="38" end="95" type="offset"/> + <field name="Single Program Flow" start="127" end="127" type="uint"/> + <field name="Vector Mask Enable" start="126" end="126" type="bool"/> + <field name="Sampler Count" start="123" end="125" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="114" end="121" type="uint"/> + <field name="Thread Dispatch Priority" start="113" end="113" type="uint"> + <value name="High" value="1"/> + </field> + <field name="Floating Point Mode" start="112" end="112" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="109" end="109" type="bool"/> + <field name="Accesses UAV" start="108" end="108" type="bool"/> + <field name="Mask Stack Exception Enable" start="107" end="107" type="bool"/> + <field name="Software Exception Enable" start="103" end="103" type="bool"/> + <field name="Expected Vertex Count" start="96" end="101" type="uint"/> + <field name="Scratch Space Base Pointer" start="138" end="191" type="offset"/> + <field name="Per-Thread Scratch Space" start="128" end="131" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data [5:4]" start="221" end="222" type="uint"/> + <field name="Output Vertex Size" start="215" end="220" type="uint"/> + <field name="Output Topology" start="209" end="214" type="uint" prefix="OUTPUT"/> + <field name="Vertex URB Entry Read Length" start="203" end="208" type="uint"/> + <field name="Include Vertex Handles" start="202" end="202" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="196" end="201" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data" start="192" end="195" type="uint"/> + <field name="Control Data Header Size" start="244" end="247" type="uint"/> + <field name="Instance Control" start="239" end="243" type="uint"/> + <field name="Default Stream Id" start="237" end="238" type="uint"/> + <field name="Dispatch Mode" start="235" end="236" type="uint" prefix="DISPATCH_MODE"> + <value name="Dual Instance" value="1"/> + <value name="Dual Object" value="2"/> + <value name="SIMD8" value="3"/> + </field> + <field name="Statistics Enable" start="234" end="234" type="bool"/> + <field name="Invocations Increment Value" start="229" end="233" type="uint"/> + <field name="Include Primitive ID" start="228" end="228" type="uint"/> + <field name="Hint" start="227" end="227" type="uint"/> + <field name="Reorder Mode" start="226" end="226" type="uint"> + <value name="LEADING" value="0"/> + <value name="TRAILING" value="1"/> + </field> + <field name="Discard Adjacency" start="225" end="225" type="bool"/> + <field name="Enable" start="224" end="224" type="bool"/> + <field name="Control Data Format" start="287" end="287" type="uint"> + <value name="CUT" value="0"/> + <value name="SID" value="1"/> + </field> + <field name="Static Output" start="286" end="286" type="bool"/> + <field name="Static Output Vertex Count" start="272" end="282" type="uint"/> + <field name="Maximum Number of Threads" start="256" end="264" type="uint"/> + <field name="Vertex URB Entry Output Read Offset" start="309" end="314" type="uint"/> + <field name="Vertex URB Entry Output Length" start="304" end="308" type="uint"/> + <field name="User Clip Distance Clip Test Enable Bitmask" start="296" end="303" type="uint"/> + <field name="User Clip Distance Cull Test Enable Bitmask" start="288" end="295" type="uint"/> + </instruction> + + <instruction name="3DSTATE_HIER_DEPTH_BUFFER" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="7"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Hierarchical Depth Buffer Object Control State" start="57" end="63" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface Pitch" start="32" end="48" type="uint"/> + <field name="Surface Base Address" start="64" end="127" type="address"/> + <field name="Surface QPitch" start="128" end="142" type="uint"/> + </instruction> + + <instruction name="3DSTATE_HS" bias="2" length="9"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="27"/> + <field name="DWord Length" start="0" end="7" type="uint" default="7"/> + <field name="Sampler Count" start="59" end="61" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="50" end="57" type="uint"/> + <field name="Thread Dispatch Priority" start="49" end="49" type="uint"> + <value name="High" value="1"/> + </field> + <field name="Floating Point Mode" start="48" end="48" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="45" end="45" type="bool"/> + <field name="Software Exception Enable" start="44" end="44" type="bool"/> + <field name="Enable" start="95" end="95" type="bool"/> + <field name="Statistics Enable" start="93" end="93" type="bool"/> + <field name="Maximum Number of Threads" start="72" end="80" type="uint"/> + <field name="Instance Count" start="64" end="67" type="uint"/> + <field name="Kernel Start Pointer" start="102" end="159" type="offset"/> + <field name="Scratch Space Base Pointer" start="170" end="223" type="offset"/> + <field name="Per-Thread Scratch Space" start="160" end="163" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data [5]" start="252" end="252" type="uint"/> + <field name="Single Program Flow" start="251" end="251" type="bool"/> + <field name="Vector Mask Enable" start="250" end="250" type="bool"/> + <field name="Accesses UAV" start="249" end="249" type="bool"/> + <field name="Include Vertex Handles" start="248" end="248" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data" start="243" end="247" type="uint"/> + <field name="Dispatch Mode" start="241" end="242" type="uint" prefix="DISPATCH_MODE"> + <value name="SINGLE_PATCH" value="0"/> + <value name="DUAL_PATCH" value="1"/> + <value name="8_PATCH" value="2"/> + </field> + <field name="Vertex URB Entry Read Length" start="235" end="240" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="228" end="233" type="uint"/> + <field name="Include Primitive ID" start="224" end="224" type="bool"/> + </instruction> + + <instruction name="3DSTATE_INDEX_BUFFER" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="10"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Index Format" start="40" end="41" type="uint" prefix="INDEX"> + <value name="BYTE" value="0"/> + <value name="WORD" value="1"/> + <value name="DWORD" value="2"/> + </field> + <field name="Memory Object Control State" start="32" end="38" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Buffer Starting Address" start="64" end="127" type="address"/> + <field name="Buffer Size" start="128" end="159" type="uint"/> + </instruction> + + <instruction name="3DSTATE_LINE_STIPPLE" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="8"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Modify Enable (Current Repeat Counter, Current Stipple Index)" start="63" end="63" type="bool"/> + <field name="Current Repeat Counter" start="53" end="61" type="uint"/> + <field name="Current Stipple Index" start="48" end="51" type="uint"/> + <field name="Line Stipple Pattern" start="32" end="47" type="uint"/> + <field name="Line Stipple Inverse Repeat Count" start="79" end="95" type="u1.16"/> + <field name="Line Stipple Repeat Count" start="64" end="72" type="uint"/> + </instruction> + + <instruction name="3DSTATE_MONOFILTER_SIZE" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="17"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Monochrome Filter Width" start="35" end="37" type="uint"/> + <field name="Monochrome Filter Height" start="32" end="34" type="uint"/> + </instruction> + + <instruction name="3DSTATE_MULTISAMPLE" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="13"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pixel Position Offset Enable" start="37" end="37" type="bool"/> + <field name="Pixel Location" start="36" end="36" type="uint"> + <value name="CENTER" value="0"/> + <value name="UL_CORNER" value="1"/> + </field> + <field name="Number of Multisamples" start="33" end="35" type="uint"/> + </instruction> + + <instruction name="3DSTATE_POLY_STIPPLE_OFFSET" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="6"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Polygon Stipple X Offset" start="40" end="44" type="uint"/> + <field name="Polygon Stipple Y Offset" start="32" end="36" type="uint"/> + </instruction> + + <instruction name="3DSTATE_POLY_STIPPLE_PATTERN" bias="2" length="33"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="7"/> + <field name="DWord Length" start="0" end="7" type="uint" default="31"/> + <group count="32" start="32" size="32"> + <field name="Pattern Row" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="3DSTATE_PS" bias="2" length="12"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="32"/> + <field name="DWord Length" start="0" end="7" type="uint" default="10"/> + <field name="Kernel Start Pointer 0" start="38" end="95" type="offset"/> + <field name="Single Program Flow" start="127" end="127" type="uint"/> + <field name="Vector Mask Enable" start="126" end="126" type="bool"/> + <field name="Sampler Count" start="123" end="125" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Single Precision Denormal Mode" start="122" end="122" type="uint"> + <value name="Flushed to Zero" value="0"/> + <value name="Retained" value="1"/> + </field> + <field name="Binding Table Entry Count" start="114" end="121" type="uint"/> + <field name="Thread Dispatch Priority" start="113" end="113" type="uint"> + <value name="High" value="1"/> + </field> + <field name="Floating Point Mode" start="112" end="112" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Rounding Mode" start="110" end="111" type="uint"> + <value name="RTNE" value="0"/> + <value name="RU" value="1"/> + <value name="RD" value="2"/> + <value name="RTZ" value="3"/> + </field> + <field name="Illegal Opcode Exception Enable" start="109" end="109" type="bool"/> + <field name="Mask Stack Exception Enable" start="107" end="107" type="bool"/> + <field name="Software Exception Enable" start="103" end="103" type="bool"/> + <field name="Scratch Space Base Pointer" start="138" end="191" type="offset"/> + <field name="Per Thread Scratch Space" start="128" end="131" type="uint"/> + <field name="Maximum Number of Threads Per PSD" start="215" end="223" type="uint"/> + <field name="Push Constant Enable" start="203" end="203" type="bool"/> + <field name="Render Target Fast Clear Enable" start="200" end="200" type="bool"/> + <field name="Render Target Resolve Type" start="198" end="199" type="uint"> + <value name="RESOLVE_DISABLED" value="0"/> + <value name="RESOLVE_PARTIAL" value="1"/> + <value name="RESOLVE_FULL" value="3"/> + </field> + <field name="Position XY Offset Select" start="195" end="196" type="uint"> + <value name="POSOFFSET_NONE" value="0"/> + <value name="POSOFFSET_CENTROID" value="2"/> + <value name="POSOFFSET_SAMPLE" value="3"/> + </field> + <field name="32 Pixel Dispatch Enable" start="194" end="194" type="bool"/> + <field name="16 Pixel Dispatch Enable" start="193" end="193" type="bool"/> + <field name="8 Pixel Dispatch Enable" start="192" end="192" type="bool"/> + <field name="Dispatch GRF Start Register For Constant/Setup Data 0" start="240" end="246" type="uint"/> + <field name="Dispatch GRF Start Register For Constant/Setup Data 1" start="232" end="238" type="uint"/> + <field name="Dispatch GRF Start Register For Constant/Setup Data 2" start="224" end="230" type="uint"/> + <field name="Kernel Start Pointer 1" start="262" end="319" type="offset"/> + <field name="Kernel Start Pointer 2" start="326" end="383" type="offset"/> + </instruction> + + <instruction name="3DSTATE_PS_BLEND" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="77"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Alpha To Coverage Enable" start="63" end="63" type="bool"/> + <field name="Has Writeable RT" start="62" end="62" type="bool"/> + <field name="Color Buffer Blend Enable" start="61" end="61" type="bool"/> + <field name="Source Alpha Blend Factor" start="56" end="60" type="uint"/> + <field name="Destination Alpha Blend Factor" start="51" end="55" type="uint"/> + <field name="Source Blend Factor" start="46" end="50" type="uint"/> + <field name="Destination Blend Factor" start="41" end="45" type="uint"/> + <field name="Alpha Test Enable" start="40" end="40" type="bool"/> + <field name="Independent Alpha Blend Enable" start="39" end="39" type="bool"/> + </instruction> + + <instruction name="3DSTATE_PS_EXTRA" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="79"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pixel Shader Valid" start="63" end="63" type="bool"/> + <field name="Pixel Shader Does not write to RT" start="62" end="62" type="bool"/> + <field name="oMask Present to Render Target" start="61" end="61" type="bool"/> + <field name="Pixel Shader Kills Pixel" start="60" end="60" type="bool"/> + <field name="Pixel Shader Computed Depth Mode" start="58" end="59" type="uint"> + <value name="PSCDEPTH_OFF" value="0"/> + <value name="PSCDEPTH_ON" value="1"/> + <value name="PSCDEPTH_ON_GE" value="2"/> + <value name="PSCDEPTH_ON_LE" value="3"/> + </field> + <field name="Force Computed Depth" start="57" end="57" type="bool"/> + <field name="Pixel Shader Uses Source Depth" start="56" end="56" type="bool"/> + <field name="Pixel Shader Uses Source W" start="55" end="55" type="bool"/> + <field name="Attribute Enable" start="40" end="40" type="bool"/> + <field name="Pixel Shader Disables Alpha To Coverage" start="39" end="39" type="bool"/> + <field name="Pixel Shader Is Per Sample" start="38" end="38" type="bool"/> + <field name="Pixel Shader Computes Stencil" start="37" end="37" type="bool"/> + <field name="Pixel Shader Pulls Bary" start="35" end="35" type="bool"/> + <field name="Pixel Shader Has UAV" start="34" end="34" type="bool"/> + <field name="Input Coverage Mask State" start="32" end="33" type="uint" prefix="ICMS"> + <value name="NONE" value="0"/> + <value name="NORMAL" value="1"/> + <value name="INNER_CONSERVATIVE" value="2"/> + <value name="DEPTH_COVERAGE" value="3"/> + </field> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="20"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="21"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="19"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_PS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="22"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_PUSH_CONSTANT_ALLOC_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="18"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Constant Buffer Offset" start="48" end="52" type="uint"/> + <field name="Constant Buffer Size" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_RASTER" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="80"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Viewport Z Far Clip Test Enable" start="58" end="58" type="bool"/> + <field name="Conservative Rasterization Enable" start="56" end="56" type="bool"/> + <field name="API Mode" start="54" end="55" type="uint"> + <value name="DX9/OGL" value="0"/> + <value name="DX10.0" value="1"/> + <value name="DX10.1+" value="2"/> + </field> + <field name="Front Winding" start="53" end="53" type="uint"> + <value name="Clockwise" value="0"/> + <value name="Counter Clockwise" value="1"/> + </field> + <field name="Forced Sample Count" start="50" end="52" type="uint" prefix="FSC"> + <value name="NUMRASTSAMPLES_0" value="0"/> + <value name="NUMRASTSAMPLES_1" value="1"/> + <value name="NUMRASTSAMPLES_2" value="2"/> + <value name="NUMRASTSAMPLES_4" value="3"/> + <value name="NUMRASTSAMPLES_8" value="4"/> + <value name="NUMRASTSAMPLES_16" value="5"/> + </field> + <field name="Cull Mode" start="48" end="49" type="uint" prefix="CULLMODE"> + <value name="BOTH" value="0"/> + <value name="NONE" value="1"/> + <value name="FRONT" value="2"/> + <value name="BACK" value="3"/> + </field> + <field name="Force Multisampling" start="46" end="46" type="uint"/> + <field name="Smooth Point Enable" start="45" end="45" type="bool"/> + <field name="DX Multisample Rasterization Enable" start="44" end="44" type="bool"/> + <field name="DX Multisample Rasterization Mode" start="42" end="43" type="uint"> + <value name="MSRASTMODE_ OFF_PIXEL" value="0"/> + <value name="MSRASTMODE_ OFF_PATTERN" value="1"/> + <value name="MSRASTMODE_ ON_PIXEL" value="2"/> + <value name="MSRASTMODE_ ON_PATTERN" value="3"/> + </field> + <field name="Global Depth Offset Enable Solid" start="41" end="41" type="bool"/> + <field name="Global Depth Offset Enable Wireframe" start="40" end="40" type="bool"/> + <field name="Global Depth Offset Enable Point" start="39" end="39" type="bool"/> + <field name="Front Face Fill Mode" start="37" end="38" type="uint" prefix="FILL_MODE"> + <value name="SOLID" value="0"/> + <value name="WIREFRAME" value="1"/> + <value name="POINT" value="2"/> + </field> + <field name="Back Face Fill Mode" start="35" end="36" type="uint" prefix="FILL_MODE"> + <value name="SOLID" value="0"/> + <value name="WIREFRAME" value="1"/> + <value name="POINT" value="2"/> + </field> + <field name="Antialiasing Enable" start="34" end="34" type="bool"/> + <field name="Scissor Rectangle Enable" start="33" end="33" type="bool"/> + <field name="Viewport Z Near Clip Test Enable" start="32" end="32" type="bool"/> + <field name="Global Depth Offset Constant" start="64" end="95" type="float"/> + <field name="Global Depth Offset Scale" start="96" end="127" type="float"/> + <field name="Global Depth Offset Clamp" start="128" end="159" type="float"/> + </instruction> + + <instruction name="3DSTATE_RS_CONSTANT_POINTER" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="84"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Shader Select" start="60" end="62" type="uint"> + <value name="VS" value="0"/> + <value name="PS" value="4"/> + </field> + <field name="Operation Load or Store" start="44" end="44" type="uint" prefix="RS"> + <value name="Store" value="0"/> + <value name="Load" value="1"/> + </field> + <field name="Global Constant Buffer Address" start="70" end="95" type="address"/> + <field name="Global Constant Buffer Address High" start="96" end="127" type="address"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_PALETTE_LOAD0" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="7" type="uint"/> + <group count="0" start="32" size="32"> + <field name="Entry" start="0" end="31" type="PALETTE_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_SAMPLER_PALETTE_LOAD1" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="12"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <group count="0" start="32" size="32"> + <field name="Palette Alpha[0:N-1]" start="24" end="31" type="uint"/> + <field name="Palette Red[0:N-1]" start="16" end="23" type="uint"/> + <field name="Palette Green[0:N-1]" start="8" end="15" type="uint"/> + <field name="Palette Blue[0:N-1]" start="0" end="7" type="uint"/> + </group> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="45"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to DS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="46"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to GS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="44"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to HS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_PS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="47"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to PS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLER_STATE_POINTERS_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="43"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Pointer to VS Sampler State" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SAMPLE_MASK" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="24"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Sample Mask" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_SAMPLE_PATTERN" bias="2" length="9"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="28"/> + <field name="DWord Length" start="0" end="7" type="uint" default="7"/> + <field name="16x Sample3 X Offset" start="60" end="63" type="u0.4"/> + <field name="16x Sample3 Y Offset" start="56" end="59" type="u0.4"/> + <field name="16x Sample2 X Offset" start="52" end="55" type="u0.4"/> + <field name="16x Sample2 Y Offset" start="48" end="51" type="u0.4"/> + <field name="16x Sample1 X Offset" start="44" end="47" type="u0.4"/> + <field name="16x Sample1 Y Offset" start="40" end="43" type="u0.4"/> + <field name="16x Sample0 X Offset" start="36" end="39" type="u0.4"/> + <field name="16x Sample0 Y Offset" start="32" end="35" type="u0.4"/> + <field name="16x Sample7 X Offset" start="92" end="95" type="u0.4"/> + <field name="16x Sample7 Y Offset" start="88" end="91" type="u0.4"/> + <field name="16x Sample6 X Offset" start="84" end="87" type="u0.4"/> + <field name="16x Sample6 Y Offset" start="80" end="83" type="u0.4"/> + <field name="16x Sample5 X Offset" start="76" end="79" type="u0.4"/> + <field name="16x Sample5 Y Offset" start="72" end="75" type="u0.4"/> + <field name="16x Sample4 X Offset" start="68" end="71" type="u0.4"/> + <field name="16x Sample4 Y Offset" start="64" end="67" type="u0.4"/> + <field name="16x Sample11 X Offset" start="124" end="127" type="u0.4"/> + <field name="16x Sample11 Y Offset" start="120" end="123" type="u0.4"/> + <field name="16x Sample10 X Offset" start="116" end="119" type="u0.4"/> + <field name="16x Sample10 Y Offset" start="112" end="115" type="u0.4"/> + <field name="16x Sample9 X Offset" start="108" end="111" type="u0.4"/> + <field name="16x Sample9 Y Offset" start="104" end="107" type="u0.4"/> + <field name="16x Sample8 X Offset" start="100" end="103" type="u0.4"/> + <field name="16x Sample8 Y Offset" start="96" end="99" type="u0.4"/> + <field name="16x Sample15 X Offset" start="156" end="159" type="u0.4"/> + <field name="16x Sample15 Y Offset" start="152" end="155" type="u0.4"/> + <field name="16x Sample14 X Offset" start="148" end="151" type="u0.4"/> + <field name="16x Sample14 Y Offset" start="144" end="147" type="u0.4"/> + <field name="16x Sample13 X Offset" start="140" end="143" type="u0.4"/> + <field name="16x Sample13 Y Offset" start="136" end="139" type="u0.4"/> + <field name="16x Sample12 X Offset" start="132" end="135" type="u0.4"/> + <field name="16x Sample12 Y Offset" start="128" end="131" type="u0.4"/> + <field name="8x Sample7 X Offset" start="188" end="191" type="u0.4"/> + <field name="8x Sample7 Y Offset" start="184" end="187" type="u0.4"/> + <field name="8x Sample6 X Offset" start="180" end="183" type="u0.4"/> + <field name="8x Sample6 Y Offset" start="176" end="179" type="u0.4"/> + <field name="8x Sample5 X Offset" start="172" end="175" type="u0.4"/> + <field name="8x Sample5 Y Offset" start="168" end="171" type="u0.4"/> + <field name="8x Sample4 X Offset" start="164" end="167" type="u0.4"/> + <field name="8x Sample4 Y Offset" start="160" end="163" type="u0.4"/> + <field name="8x Sample3 X Offset" start="220" end="223" type="u0.4"/> + <field name="8x Sample3 Y Offset" start="216" end="219" type="u0.4"/> + <field name="8x Sample2 X Offset" start="212" end="215" type="u0.4"/> + <field name="8x Sample2 Y Offset" start="208" end="211" type="u0.4"/> + <field name="8x Sample1 X Offset" start="204" end="207" type="u0.4"/> + <field name="8x Sample1 Y Offset" start="200" end="203" type="u0.4"/> + <field name="8x Sample0 X Offset" start="196" end="199" type="u0.4"/> + <field name="8x Sample0 Y Offset" start="192" end="195" type="u0.4"/> + <field name="4x Sample3 X Offset" start="252" end="255" type="u0.4"/> + <field name="4x Sample3 Y Offset" start="248" end="251" type="u0.4"/> + <field name="4x Sample2 X Offset" start="244" end="247" type="u0.4"/> + <field name="4x Sample2 Y Offset" start="240" end="243" type="u0.4"/> + <field name="4x Sample1 X Offset" start="236" end="239" type="u0.4"/> + <field name="4x Sample1 Y Offset" start="232" end="235" type="u0.4"/> + <field name="4x Sample0 X Offset" start="228" end="231" type="u0.4"/> + <field name="4x Sample0 Y Offset" start="224" end="227" type="u0.4"/> + <field name="1x Sample0 X Offset" start="276" end="279" type="u0.4"/> + <field name="1x Sample0 Y Offset" start="272" end="275" type="u0.4"/> + <field name="2x Sample1 X Offset" start="268" end="271" type="u0.4"/> + <field name="2x Sample1 Y Offset" start="264" end="267" type="u0.4"/> + <field name="2x Sample0 X Offset" start="260" end="263" type="u0.4"/> + <field name="2x Sample0 Y Offset" start="256" end="259" type="u0.4"/> + </instruction> + + <instruction name="3DSTATE_SBE" bias="2" length="6"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="31"/> + <field name="DWord Length" start="0" end="7" type="uint" default="4"/> + <field name="Force Vertex URB Entry Read Length" start="61" end="61" type="bool"/> + <field name="Force Vertex URB Entry Read Offset" start="60" end="60" type="bool"/> + <field name="Number of SF Output Attributes" start="54" end="59" type="uint"/> + <field name="Attribute Swizzle Enable" start="53" end="53" type="bool"/> + <field name="Point Sprite Texture Coordinate Origin" start="52" end="52" type="uint"> + <value name="UPPERLEFT" value="0"/> + <value name="LOWERLEFT" value="1"/> + </field> + <field name="Primitive ID Override Component W" start="51" end="51" type="bool"/> + <field name="Primitive ID Override Component Z" start="50" end="50" type="bool"/> + <field name="Primitive ID Override Component Y" start="49" end="49" type="bool"/> + <field name="Primitive ID Override Component X" start="48" end="48" type="bool"/> + <field name="Vertex URB Entry Read Length" start="43" end="47" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="37" end="42" type="uint"/> + <field name="Primitive ID Override Attribute Select" start="32" end="36" type="uint"/> + <field name="Point Sprite Texture Coordinate Enable" start="64" end="95" type="uint"/> + <field name="Constant Interpolation Enable" start="96" end="127" type="uint"/> + <field name="Attribute 15 Active Component Format" start="158" end="159" type="uint"/> + <field name="Attribute 14 Active Component Format" start="156" end="157" type="uint"/> + <field name="Attribute 13 Active Component Format" start="154" end="155" type="uint"/> + <field name="Attribute 12 Active Component Format" start="152" end="153" type="uint"/> + <field name="Attribute 11 Active Component Format" start="150" end="151" type="uint"/> + <field name="Attribute 10 Active Component Format" start="148" end="149" type="uint"/> + <field name="Attribute 9 Active Component Format" start="146" end="147" type="uint"/> + <field name="Attribute 8 Active Component Format" start="144" end="145" type="uint"/> + <field name="Attribute 7 Active Component Format" start="142" end="143" type="uint"/> + <field name="Attribute 6 Active Component Format" start="140" end="141" type="uint"/> + <field name="Attribute 5 Active Component Format" start="138" end="139" type="uint"/> + <field name="Attribute 4 Active Component Format" start="136" end="137" type="uint"/> + <field name="Attribute 3 Active Component Format" start="134" end="135" type="uint"/> + <field name="Attribute 2 Active Component Format" start="132" end="133" type="uint"/> + <field name="Attribute 1 Active Component Format" start="130" end="131" type="uint"/> + <field name="Attribute 0 Active Component Format" start="128" end="129" type="uint"/> + <field name="Attribute 31 Active Component Format" start="190" end="191" type="uint"/> + <field name="Attribute 30 Active Component Format" start="188" end="189" type="uint"/> + <field name="Attribute 29 Active Component Format" start="186" end="187" type="uint"/> + <field name="Attribute 28 Active Component Format" start="184" end="185" type="uint"/> + <field name="Attribute 27 Active Component Format" start="182" end="183" type="uint"/> + <field name="Attribute 26 Active Component Format" start="180" end="181" type="uint"/> + <field name="Attribute 25 Active Component Format" start="178" end="179" type="uint"/> + <field name="Attribute 24 Active Component Format" start="176" end="177" type="uint"/> + <field name="Attribute 23 Active Component Format" start="174" end="175" type="uint"/> + <field name="Attribute 22 Active Component Format" start="172" end="173" type="uint"/> + <field name="Attribute 21 Active Component Format" start="170" end="171" type="uint"/> + <field name="Attribute 20 Active Component Format" start="168" end="169" type="uint"/> + <field name="Attribute 19 Active Component Format" start="166" end="167" type="uint"/> + <field name="Attribute 18 Active Component Format" start="164" end="165" type="uint"/> + <field name="Attribute 17 Active Component Format" start="162" end="163" type="uint"/> + <field name="Attribute 16 Active Component Format" start="160" end="161" type="uint"/> + </instruction> + + <instruction name="3DSTATE_SBE_SWIZ" bias="2" length="11"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="81"/> + <field name="DWord Length" start="0" end="7" type="uint" default="9"/> + <group count="16" start="32" size="16"> + <field name="Attribute" start="0" end="15" type="SF_OUTPUT_ATTRIBUTE_DETAIL"/> + </group> + <group count="16" start="288" size="4"> + <field name="Attribute Wrap Shortest Enables" start="0" end="3" type="uint"/> + </group> + </instruction> + + <instruction name="3DSTATE_SCISSOR_STATE_POINTERS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="15"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Scissor Rect Pointer" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_SF" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="19"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Line Width" start="44" end="61" type="u11.7"/> + <field name="Legacy Global Depth Bias Enable" start="43" end="43" type="bool"/> + <field name="Statistics Enable" start="42" end="42" type="bool"/> + <field name="Viewport Transform Enable" start="33" end="33" type="bool"/> + <field name="Line End Cap Antialiasing Region Width" start="80" end="81" type="uint"> + <value name="0.5 pixels" value="0"/> + <value name="1.0 pixels" value="1"/> + <value name="2.0 pixels" value="2"/> + <value name="4.0 pixels" value="3"/> + </field> + <field name="Last Pixel Enable" start="127" end="127" type="bool"/> + <field name="Triangle Strip/List Provoking Vertex Select" start="125" end="126" type="uint"/> + <field name="Line Strip/List Provoking Vertex Select" start="123" end="124" type="uint"/> + <field name="Triangle Fan Provoking Vertex Select" start="121" end="122" type="uint"/> + <field name="AA Line Distance Mode" start="110" end="110" type="uint"> + <value name="AALINEDISTANCE_TRUE" value="1"/> + </field> + <field name="Smooth Point Enable" start="109" end="109" type="bool"/> + <field name="Vertex Sub Pixel Precision Select" start="108" end="108" type="uint"/> + <field name="Point Width Source" start="107" end="107" type="uint"> + <value name="Vertex" value="0"/> + <value name="State" value="1"/> + </field> + <field name="Point Width" start="96" end="106" type="u8.3"/> + </instruction> + + <instruction name="3DSTATE_SO_BUFFER" bias="2" length="8"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="24"/> + <field name="DWord Length" start="0" end="7" type="uint" default="6"/> + <field name="SO Buffer Enable" start="63" end="63" type="bool"/> + <field name="SO Buffer Index" start="61" end="62" type="uint"/> + <field name="SO Buffer Object Control State" start="54" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Stream Offset Write Enable" start="53" end="53" type="bool"/> + <field name="Stream Output Buffer Offset Address Enable" start="52" end="52" type="bool"/> + <field name="Surface Base Address" start="66" end="111" type="address"/> + <field name="Surface Size" start="128" end="157" type="uint"/> + <field name="Stream Output Buffer Offset Address" start="162" end="207" type="address"/> + <field name="Stream Offset" start="224" end="255" type="uint"/> + </instruction> + + <instruction name="3DSTATE_SO_DECL_LIST" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="23"/> + <field name="DWord Length" start="0" end="8" type="uint"/> + <field name="Stream to Buffer Selects [3]" start="44" end="47" type="uint"/> + <field name="Stream to Buffer Selects [2]" start="40" end="43" type="uint"/> + <field name="Stream to Buffer Selects [1]" start="36" end="39" type="uint"/> + <field name="Stream to Buffer Selects [0]" start="32" end="35" type="uint"/> + <field name="Num Entries [3]" start="88" end="95" type="uint"/> + <field name="Num Entries [2]" start="80" end="87" type="uint"/> + <field name="Num Entries [1]" start="72" end="79" type="uint"/> + <field name="Num Entries [0]" start="64" end="71" type="uint"/> + <group count="0" start="96" size="64"> + <field name="Entry" start="0" end="63" type="SO_DECL_ENTRY"/> + </group> + </instruction> + + <instruction name="3DSTATE_STENCIL_BUFFER" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="6"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Stencil Buffer Enable" start="63" end="63" type="uint"/> + <field name="Stencil Buffer Object Control State" start="54" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface Pitch" start="32" end="48" type="uint"/> + <field name="Surface Base Address" start="64" end="127" type="address"/> + <field name="Surface QPitch" start="128" end="142" type="uint"/> + </instruction> + + <instruction name="3DSTATE_STREAMOUT" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="30"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="SO Function Enable" start="63" end="63" type="uint"/> + <field name="API Rendering Disable" start="62" end="62" type="uint"/> + <field name="Render Stream Select" start="59" end="60" type="uint"/> + <field name="Reorder Mode" start="58" end="58" type="uint"> + <value name="LEADING" value="0"/> + <value name="TRAILING" value="1"/> + </field> + <field name="SO Statistics Enable" start="57" end="57" type="bool"/> + <field name="Force Rendering" start="55" end="56" type="uint"> + <value name="Resreved" value="1"/> + <value name="Force_Off" value="2"/> + <value name="Force_on" value="3"/> + </field> + <field name="Stream 3 Vertex Read Offset" start="93" end="93" type="uint"/> + <field name="Stream 3 Vertex Read Length" start="88" end="92" type="uint"/> + <field name="Stream 2 Vertex Read Offset" start="85" end="85" type="uint"/> + <field name="Stream 2 Vertex Read Length" start="80" end="84" type="uint"/> + <field name="Stream 1 Vertex Read Offset" start="77" end="77" type="uint"/> + <field name="Stream 1 Vertex Read Length" start="72" end="76" type="uint"/> + <field name="Stream 0 Vertex Read Offset" start="69" end="69" type="uint"/> + <field name="Stream 0 Vertex Read Length" start="64" end="68" type="uint"/> + <field name="Buffer 1 Surface Pitch" start="112" end="123" type="uint"/> + <field name="Buffer 0 Surface Pitch" start="96" end="107" type="uint"/> + <field name="Buffer 3 Surface Pitch" start="144" end="155" type="uint"/> + <field name="Buffer 2 Surface Pitch" start="128" end="139" type="uint"/> + </instruction> + + <instruction name="3DSTATE_TE" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="28"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Partitioning" start="44" end="45" type="uint"> + <value name="INTEGER" value="0"/> + <value name="ODD_FRACTIONAL" value="1"/> + <value name="EVEN_FRACTIONAL" value="2"/> + </field> + <field name="Output Topology" start="40" end="41" type="uint" prefix="OUTPUT"> + <value name="POINT" value="0"/> + <value name="LINE" value="1"/> + <value name="TRI_CW" value="2"/> + <value name="TRI_CCW" value="3"/> + </field> + <field name="TE Domain" start="36" end="37" type="uint"> + <value name="QUAD" value="0"/> + <value name="TRI" value="1"/> + <value name="ISOLINE" value="2"/> + </field> + <field name="TE Mode" start="33" end="34" type="uint"> + <value name="HW_TESS" value="0"/> + </field> + <field name="TE Enable" start="32" end="32" type="bool"/> + <field name="Maximum Tessellation Factor Odd" start="64" end="95" type="float"/> + <field name="Maximum Tessellation Factor Not Odd" start="96" end="127" type="float"/> + </instruction> + + <instruction name="3DSTATE_URB_CLEAR" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="29"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="URB Clear Length" start="48" end="61" type="uint"/> + <field name="URB Address" start="32" end="46" type="offset"/> + </instruction> + + <instruction name="3DSTATE_URB_DS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="50"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="DS URB Starting Address" start="57" end="63" type="uint"/> + <field name="DS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="DS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_URB_GS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="51"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="GS URB Starting Address" start="57" end="63" type="uint"/> + <field name="GS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="GS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_URB_HS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="49"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="HS URB Starting Address" start="57" end="63" type="uint"/> + <field name="HS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="HS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_URB_VS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="48"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="VS URB Starting Address" start="57" end="63" type="uint"/> + <field name="VS URB Entry Allocation Size" start="48" end="56" type="uint"/> + <field name="VS Number of URB Entries" start="32" end="47" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VERTEX_BUFFERS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="8"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <group count="0" start="32" size="128"> + <field name="Vertex Buffer State" start="0" end="127" type="VERTEX_BUFFER_STATE"/> + </group> + </instruction> + + <instruction name="3DSTATE_VERTEX_ELEMENTS" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="9"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <group count="0" start="32" size="64"> + <field name="Element" start="0" end="63" type="VERTEX_ELEMENT_STATE"/> + </group> + </instruction> + + <instruction name="3DSTATE_VF" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="12"/> + <field name="Sequential Draw Cut Index Enable" start="10" end="10" type="bool"/> + <field name="Component Packing Enable" start="9" end="9" type="bool"/> + <field name="Indexed Draw Cut Index Enable" start="8" end="8" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Cut Index" start="32" end="63" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VF_COMPONENT_PACKING" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="85"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Vertex Element 07 Enables" start="60" end="63" type="uint"/> + <field name="Vertex Element 06 Enables" start="56" end="59" type="uint"/> + <field name="Vertex Element 05 Enables" start="52" end="55" type="uint"/> + <field name="Vertex Element 04 Enables" start="48" end="51" type="uint"/> + <field name="Vertex Element 03 Enables" start="44" end="47" type="uint"/> + <field name="Vertex Element 02 Enables" start="40" end="43" type="uint"/> + <field name="Vertex Element 01 Enables" start="36" end="39" type="uint"/> + <field name="Vertex Element 00 Enables" start="32" end="35" type="uint"/> + <field name="Vertex Element 15 Enables" start="92" end="95" type="uint"/> + <field name="Vertex Element 14 Enables" start="88" end="91" type="uint"/> + <field name="Vertex Element 13 Enables" start="84" end="87" type="uint"/> + <field name="Vertex Element 12 Enables" start="80" end="83" type="uint"/> + <field name="Vertex Element 11 Enables" start="76" end="79" type="uint"/> + <field name="Vertex Element 10 Enables" start="72" end="75" type="uint"/> + <field name="Vertex Element 09 Enables" start="68" end="71" type="uint"/> + <field name="Vertex Element 08 Enables" start="64" end="67" type="uint"/> + <field name="Vertex Element 23 Enables" start="124" end="127" type="uint"/> + <field name="Vertex Element 22 Enables" start="120" end="123" type="uint"/> + <field name="Vertex Element 21 Enables" start="116" end="119" type="uint"/> + <field name="Vertex Element 20 Enables" start="112" end="115" type="uint"/> + <field name="Vertex Element 19 Enables" start="108" end="111" type="uint"/> + <field name="Vertex Element 18 Enables" start="104" end="107" type="uint"/> + <field name="Vertex Element 17 Enables" start="100" end="103" type="uint"/> + <field name="Vertex Element 16 Enables" start="96" end="99" type="uint"/> + <field name="Vertex Element 31 Enables" start="156" end="159" type="uint"/> + <field name="Vertex Element 30 Enables" start="152" end="155" type="uint"/> + <field name="Vertex Element 29 Enables" start="148" end="151" type="uint"/> + <field name="Vertex Element 28 Enables" start="144" end="147" type="uint"/> + <field name="Vertex Element 27 Enables" start="140" end="143" type="uint"/> + <field name="Vertex Element 26 Enables" start="136" end="139" type="uint"/> + <field name="Vertex Element 25 Enables" start="132" end="135" type="uint"/> + <field name="Vertex Element 24 Enables" start="128" end="131" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VF_INSTANCING" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="73"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Instancing Enable" start="40" end="40" type="bool"/> + <field name="Vertex Element Index" start="32" end="37" type="uint"/> + <field name="Instance Data Step Rate" start="64" end="95" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VF_SGVS" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="74"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="InstanceID Enable" start="63" end="63" type="bool"/> + <field name="InstanceID Component Number" start="61" end="62" type="uint"> + <value name="COMP_0" value="0"/> + <value name="COMP_1" value="1"/> + <value name="COMP_2" value="2"/> + <value name="COMP_3" value="3"/> + </field> + <field name="InstanceID Element Offset" start="48" end="53" type="uint"/> + <field name="VertexID Enable" start="47" end="47" type="bool"/> + <field name="VertexID Component Number" start="45" end="46" type="uint"> + <value name="COMP_0" value="0"/> + <value name="COMP_1" value="1"/> + <value name="COMP_2" value="2"/> + <value name="COMP_3" value="3"/> + </field> + <field name="VertexID Element Offset" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VF_STATISTICS" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="1"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="11"/> + <field name="Statistics Enable" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="3DSTATE_VF_TOPOLOGY" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="75"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Primitive Topology Type" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="3DSTATE_VIEWPORT_STATE_POINTERS_CC" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="35"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="CC Viewport Pointer" start="37" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="33"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="SF Clip Viewport Pointer" start="38" end="63" type="offset"/> + </instruction> + + <instruction name="3DSTATE_VS" bias="2" length="9"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="16"/> + <field name="DWord Length" start="0" end="7" type="uint" default="7"/> + <field name="Kernel Start Pointer" start="38" end="95" type="offset"/> + <field name="Single Vertex Dispatch" start="127" end="127" type="bool"/> + <field name="Vector Mask Enable" start="126" end="126" type="bool"/> + <field name="Sampler Count" start="123" end="125" type="uint"> + <value name="No Samplers" value="0"/> + <value name="1-4 Samplers" value="1"/> + <value name="5-8 Samplers" value="2"/> + <value name="9-12 Samplers" value="3"/> + <value name="13-16 Samplers" value="4"/> + </field> + <field name="Binding Table Entry Count" start="114" end="121" type="uint"/> + <field name="Thread Dispatch Priority" start="113" end="113" type="uint"> + <value name="High" value="1"/> + </field> + <field name="Floating Point Mode" start="112" end="112" type="uint"> + <value name="IEEE-754" value="0"/> + <value name="Alternate" value="1"/> + </field> + <field name="Illegal Opcode Exception Enable" start="109" end="109" type="bool"/> + <field name="Accesses UAV" start="108" end="108" type="bool"/> + <field name="Software Exception Enable" start="103" end="103" type="bool"/> + <field name="Scratch Space Base Pointer" start="138" end="191" type="offset"/> + <field name="Per-Thread Scratch Space " start="128" end="131" type="uint"/> + <field name="Dispatch GRF Start Register For URB Data" start="212" end="216" type="uint"/> + <field name="Vertex URB Entry Read Length" start="203" end="208" type="uint"/> + <field name="Vertex URB Entry Read Offset" start="196" end="201" type="uint"/> + <field name="Maximum Number of Threads" start="247" end="255" type="uint"/> + <field name="Statistics Enable" start="234" end="234" type="bool"/> + <field name="SIMD8 Dispatch Enable" start="226" end="226" type="bool"/> + <field name="Vertex Cache Disable" start="225" end="225" type="bool"/> + <field name="Function Enable" start="224" end="224" type="bool"/> + <field name="Vertex URB Entry Output Read Offset" start="277" end="282" type="uint"/> + <field name="Vertex URB Entry Output Length" start="272" end="276" type="uint"/> + <field name="User Clip Distance Clip Test Enable Bitmask" start="264" end="271" type="uint"/> + <field name="User Clip Distance Cull Test Enable Bitmask" start="256" end="263" type="uint"/> + </instruction> + + <instruction name="3DSTATE_WM" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="20"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Statistics Enable" start="63" end="63" type="bool"/> + <field name="Legacy Depth Buffer Clear Enable" start="62" end="62" type="bool"/> + <field name="Legacy Depth Buffer Resolve Enable" start="60" end="60" type="bool"/> + <field name="Legacy Hierarchical Depth Buffer Resolve Enable" start="59" end="59" type="bool"/> + <field name="Legacy Diamond Line Rasterization" start="58" end="58" type="bool"/> + <field name="Early Depth/Stencil Control" start="53" end="54" type="uint"> + <value name="NORMAL" value="0"/> + <value name="PSEXEC" value="1"/> + <value name="PREPS" value="2"/> + </field> + <field name="Force Thread Dispatch Enable" start="51" end="52" type="uint"> + <value name="ForceOff" value="1"/> + <value name="ForceON" value="2"/> + </field> + <field name="Position ZW Interpolation Mode" start="49" end="50" type="uint"> + <value name="INTERP_PIXEL" value="0"/> + <value name="INTERP_CENTROID" value="2"/> + <value name="INTERP_SAMPLE" value="3"/> + </field> + <field name="Barycentric Interpolation Mode" start="43" end="48" type="uint"/> + <field name="Line End Cap Antialiasing Region Width" start="40" end="41" type="uint"> + <value name="0.5 pixels" value="0"/> + <value name="1.0 pixels" value="1"/> + <value name="2.0 pixels" value="2"/> + <value name="4.0 pixels" value="3"/> + </field> + <field name="Line Antialiasing Region Width" start="38" end="39" type="uint"> + <value name="0.5 pixels" value="0"/> + <value name="1.0 pixels" value="1"/> + <value name="2.0 pixels" value="2"/> + <value name="4.0 pixels" value="3"/> + </field> + <field name="Polygon Stipple Enable" start="36" end="36" type="bool"/> + <field name="Line Stipple Enable" start="35" end="35" type="bool"/> + <field name="Point Rasterization Rule" start="34" end="34" type="uint"> + <value name="RASTRULE_UPPER_LEFT" value="0"/> + <value name="RASTRULE_UPPER_RIGHT" value="1"/> + </field> + <field name="Force Kill Pixel Enable" start="32" end="33" type="uint"> + <value name="ForceOff" value="1"/> + <value name="ForceON" value="2"/> + </field> + </instruction> + + <instruction name="3DSTATE_WM_CHROMAKEY" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="76"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="ChromaKey Kill Enable" start="63" end="63" type="bool"/> + </instruction> + + <instruction name="3DSTATE_WM_DEPTH_STENCIL" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="78"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Stencil Fail Op" start="61" end="63" type="uint"/> + <field name="Stencil Pass Depth Fail Op" start="58" end="60" type="uint"/> + <field name="Stencil Pass Depth Pass Op" start="55" end="57" type="uint"/> + <field name="Backface Stencil Test Function" start="52" end="54" type="uint"/> + <field name="Backface Stencil Fail Op" start="49" end="51" type="uint"/> + <field name="Backface Stencil Pass Depth Fail Op" start="46" end="48" type="uint"/> + <field name="Backface Stencil Pass Depth Pass Op" start="43" end="45" type="uint"/> + <field name="Stencil Test Function" start="40" end="42" type="uint"/> + <field name="Depth Test Function" start="37" end="39" type="uint"/> + <field name="Double Sided Stencil Enable" start="36" end="36" type="bool"/> + <field name="Stencil Test Enable" start="35" end="35" type="bool"/> + <field name="Stencil Buffer Write Enable" start="34" end="34" type="bool"/> + <field name="Depth Test Enable" start="33" end="33" type="bool"/> + <field name="Depth Buffer Write Enable" start="32" end="32" type="bool"/> + <field name="Stencil Test Mask" start="88" end="95" type="uint"/> + <field name="Stencil Write Mask" start="80" end="87" type="uint"/> + <field name="Backface Stencil Test Mask" start="72" end="79" type="uint"/> + <field name="Backface Stencil Write Mask" start="64" end="71" type="uint"/> + <field name="Stencil Reference Value" start="104" end="111" type="uint"/> + <field name="Backface Stencil Reference Value" start="96" end="103" type="uint"/> + </instruction> + + <instruction name="3DSTATE_WM_HZ_OP" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="82"/> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Stencil Buffer Clear Enable" start="63" end="63" type="bool"/> + <field name="Depth Buffer Clear Enable" start="62" end="62" type="bool"/> + <field name="Scissor Rectangle Enable" start="61" end="61" type="bool"/> + <field name="Depth Buffer Resolve Enable" start="60" end="60" type="bool"/> + <field name="Hierarchical Depth Buffer Resolve Enable" start="59" end="59" type="bool"/> + <field name="Pixel Position Offset Enable" start="58" end="58" type="bool"/> + <field name="Full Surface Depth and Stencil Clear" start="57" end="57" type="bool"/> + <field name="Stencil Clear Value" start="48" end="55" type="uint"/> + <field name="Number of Multisamples" start="45" end="47" type="uint"/> + <field name="Clear Rectangle Y Min" start="80" end="95" type="uint"/> + <field name="Clear Rectangle X Min" start="64" end="79" type="uint"/> + <field name="Clear Rectangle Y Max" start="112" end="127" type="uint"/> + <field name="Clear Rectangle X Max" start="96" end="111" type="uint"/> + <field name="Sample Mask" start="128" end="143" type="uint"/> + </instruction> + + <instruction name="GPGPU_CSR_BASE_ADDRESS" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="GPGPU CSR Base Address" start="44" end="95" type="address"/> + </instruction> + + <instruction name="GPGPU_WALKER" bias="2" length="15"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="5"/> + <field name="Indirect Parameter Enable" start="10" end="10" type="bool"/> + <field name="Predicate Enable" start="8" end="8" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="13"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="102" end="127" type="offset"/> + <field name="SIMD Size" start="158" end="159" type="uint"> + <value name="SIMD8" value="0"/> + <value name="SIMD16" value="1"/> + <value name="SIMD32" value="2"/> + </field> + <field name="Thread Depth Counter Maximum" start="144" end="149" type="uint"/> + <field name="Thread Height Counter Maximum" start="136" end="141" type="uint"/> + <field name="Thread Width Counter Maximum" start="128" end="133" type="uint"/> + <field name="Thread Group ID Starting X" start="160" end="191" type="uint"/> + <field name="Thread Group ID X Dimension" start="224" end="255" type="uint"/> + <field name="Thread Group ID Starting Y" start="256" end="287" type="uint"/> + <field name="Thread Group ID Y Dimension" start="320" end="351" type="uint"/> + <field name="Thread Group ID Starting/Resume Z" start="352" end="383" type="uint"/> + <field name="Thread Group ID Z Dimension" start="384" end="415" type="uint"/> + <field name="Right Execution Mask" start="416" end="447" type="uint"/> + <field name="Bottom Execution Mask" start="448" end="479" type="uint"/> + </instruction> + + <instruction name="MEDIA_CURBE_LOAD" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="1"/> + <field name="DWord Length" start="0" end="15" type="uint" default="2"/> + <field name="CURBE Total Data Length" start="64" end="80" type="uint"/> + <field name="CURBE Data Start Address" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="MEDIA_INTERFACE_DESCRIPTOR_LOAD" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="15" type="uint" default="2"/> + <field name="Interface Descriptor Total Length" start="64" end="80" type="uint"/> + <field name="Interface Descriptor Data Start Address" start="96" end="127" type="offset"/> + </instruction> + + <instruction name="MEDIA_OBJECT" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Media Command Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="Media Command Sub-Opcode" start="16" end="23" type="uint" default="0"/> + <field name="DWord Length" start="0" end="15" type="uint" default="4"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="Children Present" start="95" end="95" type="bool"/> + <field name="Slice Destination Select MSBs" start="89" end="90" type="uint"/> + <field name="Thread Synchronization" start="88" end="88" type="uint"> + <value name="No thread synchronization" value="0"/> + <value name="Thread dispatch is synchronized by the 'spawn root thread' message" value="1"/> + </field> + <field name="Force Destination" start="86" end="86" type="uint"/> + <field name="Use Scoreboard" start="85" end="85" type="uint"> + <value name="Not using scoreboard" value="0"/> + <value name="Using scoreboard" value="1"/> + </field> + <field name="Slice Destination Select" start="83" end="84" type="uint"> + <value name="Slice 0" value="0"/> + <value name="Slice 1" value="1"/> + <value name="Slice 2" value="2"/> + </field> + <field name="SubSlice Destination Select" start="81" end="82" type="uint"> + <value name="Subslice 3" value="3"/> + <value name="SubSlice 2" value="2"/> + <value name="SubSlice 1" value="1"/> + <value name="SubSlice 0" value="0"/> + </field> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="96" end="127" type="address"/> + <field name="Scoredboard Y" start="144" end="152" type="uint"/> + <field name="Scoreboard X" start="128" end="136" type="uint"/> + <field name="Scoreboard Color" start="176" end="179" type="uint"/> + <field name="Scoreboard Mask" start="160" end="167" type="uint"/> + <group count="0" start="192" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_OBJECT_GRPID" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Media Command Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="Media Command Sub-Opcode" start="16" end="23" type="uint" default="6"/> + <field name="DWord Length" start="0" end="15" type="uint" default="5"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="Slice Destination Select MSB" start="88" end="88" type="uint"/> + <field name="End of Thread Group" start="87" end="87" type="uint"/> + <field name="Force Destination" start="86" end="86" type="uint"/> + <field name="Use Scoreboard" start="85" end="85" type="uint"> + <value name="Not using scoreboard" value="0"/> + <value name="Using scoreboard" value="1"/> + </field> + <field name="Slice Destination Select" start="83" end="84" type="uint"> + <value name="Slice 0" value="0"/> + <value name="Slice 1" value="1"/> + <value name="Slice 2" value="2"/> + </field> + <field name="SubSlice Destination Select" start="81" end="82" type="uint"> + <value name="Subslice3" value="3"/> + <value name="SubSlice 2" value="2"/> + <value name="SubSlice 1" value="1"/> + <value name="SubSlice 0" value="0"/> + </field> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="96" end="127" type="address"/> + <field name="Scoreboard Y" start="144" end="152" type="uint"/> + <field name="Scoreboard X" start="128" end="136" type="uint"/> + <field name="Scoreboard Color" start="176" end="179" type="uint"/> + <field name="Scoreboard Mask" start="160" end="167" type="uint"/> + <field name="GroupID" start="192" end="223" type="uint"/> + <group count="0" start="224" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_OBJECT_PRT" bias="2" length="16"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="15" type="uint" default="14"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="Children Present" start="95" end="95" type="bool"/> + <field name="PRT_Fence Needed" start="87" end="87" type="bool"/> + <field name="PRT_FenceType" start="86" end="86" type="uint"> + <value name="Root thread queue" value="0"/> + <value name="VFE state flush" value="1"/> + </field> + <group count="12" start="128" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_OBJECT_WALKER" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="3"/> + <field name="DWord Length" start="0" end="15" type="uint" default="15"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + <field name="Thread Synchronization" start="88" end="88" type="uint"> + <value name="No thread synchronization" value="0"/> + <value name="Thread dispatch is synchronized by the 'spawn root thread' message" value="1"/> + </field> + <field name="Masked Dispatch" start="86" end="87" type="uint"/> + <field name="Use Scoreboard" start="85" end="85" type="uint"> + <value name="Not using scoreboard" value="0"/> + <value name="Using scoreboard" value="1"/> + </field> + <field name="Indirect Data Length" start="64" end="80" type="uint"/> + <field name="Indirect Data Start Address" start="96" end="127" type="uint"/> + <field name="Group ID Loop Select" start="168" end="191" type="uint"> + <value name="No_Groups" value="0"/> + <value name="Color_Groups" value="1"/> + <value name="InnerLocal_Groups" value="2"/> + <value name="MidLocal_Groups" value="3"/> + <value name="OuterLocal_Groups" value="4"/> + <value name="InnerGlobal_Groups" value="5"/> + </field> + <field name="Scoreboard Mask" start="160" end="167" type="uint"/> + <field name="Color Count Minus One" start="216" end="219" type="uint"/> + <field name="Middle Loop Extra Steps" start="208" end="212" type="uint"/> + <field name="Local Mid-Loop Unit Y" start="204" end="205" type="int"/> + <field name="Mid-Loop Unit X" start="200" end="201" type="int"/> + <field name="Global Loop Exec Count" start="240" end="251" type="uint"/> + <field name="Local Loop Exec Count" start="224" end="235" type="uint"/> + <field name="Block Resolution Y" start="272" end="282" type="uint"/> + <field name="Block Resolution X" start="256" end="266" type="uint"/> + <field name="Local Start Y" start="304" end="314" type="uint"/> + <field name="Local Start X" start="288" end="298" type="uint"/> + <field name="Local Outer Loop Stride Y" start="368" end="379" type="int"/> + <field name="Local Outer Loop Stride X" start="352" end="363" type="int"/> + <field name="Local Inner Loop Unit Y" start="400" end="411" type="int"/> + <field name="Local Inner Loop Unit X" start="384" end="395" type="int"/> + <field name="Global Resolution Y" start="432" end="442" type="uint"/> + <field name="Global Resolution X" start="416" end="426" type="uint"/> + <field name="Global Start Y" start="464" end="475" type="int"/> + <field name="Global Start X" start="448" end="459" type="int"/> + <field name="Global Outer Loop Stride Y" start="496" end="507" type="int"/> + <field name="Global Outer Loop Stride X" start="480" end="491" type="int"/> + <field name="Global Inner Loop Unit Y" start="528" end="539" type="int"/> + <field name="Global Inner Loop Unit X" start="512" end="523" type="int"/> + <group count="0" start="544" size="32"> + <field name="Inline Data" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MEDIA_STATE_FLUSH" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="4"/> + <field name="DWord Length" start="0" end="15" type="uint" default="0"/> + <field name="Flush to GO" start="39" end="39" type="bool"/> + <field name="Watermark Required" start="38" end="38" type="uint"/> + <field name="Interface Descriptor Offset" start="32" end="37" type="uint"/> + </instruction> + + <instruction name="MEDIA_VFE_STATE" bias="2" length="9"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Pipeline" start="27" end="28" type="uint" default="2"/> + <field name="Media Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="SubOpcode" start="16" end="23" type="uint" default="0"/> + <field name="DWord Length" start="0" end="15" type="uint" default="7"/> + <field name="Scratch Space Base Pointer" start="42" end="63" type="offset"/> + <field name="Stack Size" start="36" end="39" type="uint"/> + <field name="Per Thread Scratch Space" start="32" end="35" type="uint"/> + <field name="Scratch Space Base Pointer High" start="64" end="79" type="offset"/> + <field name="Maximum Number of Threads" start="112" end="127" type="uint"/> + <field name="Number of URB Entries" start="104" end="111" type="uint"/> + <field name="Reset Gateway Timer" start="103" end="103" type="uint"> + <value name="Maintaining the existing timestamp state" value="0"/> + <value name="Resetting relative timer and latching the global timestamp" value="1"/> + </field> + <field name="Slice Disable" start="128" end="129" type="uint"> + <value name="All Subslices Enabled" value="0"/> + <value name="Only Slice 0 Enabled" value="1"/> + <value name="Only Slice 0 Subslice 0 Enabled" value="3"/> + </field> + <field name="URB Entry Allocation Size" start="176" end="191" type="uint"/> + <field name="CURBE Allocation Size" start="160" end="175" type="uint"/> + <field name="Scoreboard Enable" start="223" end="223" type="bool"/> + <field name="Scoreboard Type" start="222" end="222" type="uint"> + <value name="Stalling Scoreboard" value="0"/> + <value name="Non-Stalling Scoreboard" value="1"/> + </field> + <field name="Scoreboard Mask" start="192" end="199" type="uint"/> + <field name="Scoreboard 3 Delta Y" start="252" end="255" type="int"/> + <field name="Scoreboard 3 Delta X" start="248" end="251" type="int"/> + <field name="Scoreboard 2 Delta Y" start="244" end="247" type="int"/> + <field name="Scoreboard 2 Delta X" start="240" end="243" type="int"/> + <field name="Scoreboard 1 Delta Y" start="236" end="239" type="int"/> + <field name="Scoreboard 1 Delta X" start="232" end="235" type="int"/> + <field name="Scoreboard 0 Delta Y" start="228" end="231" type="int"/> + <field name="Scoreboard 0 Delta X" start="224" end="227" type="int"/> + <field name="Scoreboard 7 Delta Y" start="284" end="287" type="int"/> + <field name="Scoreboard 7 Delta X" start="280" end="283" type="int"/> + <field name="Scoreboard 6 Delta Y" start="276" end="279" type="int"/> + <field name="Scoreboard 6 Delta X" start="272" end="275" type="int"/> + <field name="Scoreboard 5 Delta Y" start="268" end="271" type="int"/> + <field name="Scoreboard 5 Delta X" start="264" end="267" type="int"/> + <field name="Scoreboard 4 Delta Y" start="260" end="263" type="int"/> + <field name="Scoreboard 4 Delta X" start="256" end="259" type="int"/> + </instruction> + + <instruction name="MI_ARB_CHECK" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="5"/> + </instruction> + + <instruction name="MI_ATOMIC" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="47"/> + <field name="Memory Type" start="22" end="22" type="uint"> + <value name="Per Process Graphics Address" value="0"/> + <value name="Global Graphics Address" value="1"/> + </field> + <field name="Post-Sync Operation" start="21" end="21" type="bool"/> + <field name="Data Size" start="19" end="20" type="uint"> + <value name="DWORD" value="0"/> + <value name="QWORD" value="1"/> + <value name="OCTWORD" value="2"/> + <value name="RESERVED" value="3"/> + </field> + <field name="Inline Data" start="18" end="18" type="uint"/> + <field name="CS STALL" start="17" end="17" type="uint"/> + <field name="Return Data Control" start="16" end="16" type="uint"/> + <field name="ATOMIC OPCODE" start="8" end="15" type="uint"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Memory Address" start="34" end="79" type="address"/> + <field name="Operand1 Data Dword 0" start="96" end="127" type="uint"/> + <field name="Operand2 Data Dword 0" start="128" end="159" type="uint"/> + <field name="Operand1 Data Dword 1" start="160" end="191" type="uint"/> + <field name="Operand2 Data Dword 1" start="192" end="223" type="uint"/> + <field name="Operand1 Data Dword 2" start="224" end="255" type="uint"/> + <field name="Operand2 Data Dword 2" start="256" end="287" type="uint"/> + <field name="Operand1 Data Dword 3" start="288" end="319" type="uint"/> + <field name="Operand2 Data Dword 3" start="320" end="351" type="uint"/> + </instruction> + + <instruction name="MI_BATCH_BUFFER_END" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="10"/> + </instruction> + + <instruction name="MI_BATCH_BUFFER_START" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="49"/> + <field name="Second Level Batch Buffer" start="22" end="22" type="uint"> + <value name="First level batch" value="0"/> + <value name="Second level batch" value="1"/> + </field> + <field name="Add Offset Enable" start="16" end="16" type="bool"/> + <field name="Predication Enable" start="15" end="15" type="uint"/> + <field name="Resource Streamer Enable" start="10" end="10" type="bool"/> + <field name="Address Space Indicator" start="8" end="8" type="uint" prefix="ASI"> + <value name="GGTT" value="0"/> + <value name="PPGTT" value="1"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Batch Buffer Start Address" start="34" end="95" type="address"/> + </instruction> + + <instruction name="MI_CLFLUSH" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="39"/> + <field name="Use Global GTT" start="22" end="22" type="uint"> + <value name="Per Process Graphics Address" value="0"/> + <value name="Global Graphics Address" value="1"/> + </field> + <field name="DWord Length" start="0" end="9" type="uint" default="1"/> + <field name="Page Base Address" start="44" end="79" type="address"/> + <field name="Starting Cacheline Offset" start="38" end="43" type="uint"/> + <group count="0" start="96" size="32"> + <field name="DW Representing a Half Cache Line" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MI_CONDITIONAL_BATCH_BUFFER_END" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="54"/> + <field name="Use Global GTT" start="22" end="22" type="uint" default="0"/> + <field name="Compare Semaphore" start="21" end="21" type="uint" default="0"/> + <field name="Compare Mask Mode" start="19" end="19" type="uint"> + <value name="Compare Mask Mode Disabled" value="0"/> + <value name="Compare Mask Mode Enabled" value="1"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Compare Data Dword" start="32" end="63" type="uint"/> + <field name="Compare Address" start="67" end="127" type="address"/> + </instruction> + + <instruction name="MI_COPY_MEM_MEM" bias="2" length="5"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="46"/> + <field name="Use Global GTT Source" start="22" end="22" type="uint"> + <value name="Per Process Graphics Address" value="0"/> + <value name="Global Graphics Address" value="1"/> + </field> + <field name="Use Global GTT Destination" start="21" end="21" type="uint"> + <value name="Per Process Graphics Address" value="0"/> + <value name="Global Graphics Address" value="1"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="3"/> + <field name="Destination Memory Address" start="34" end="95" type="address"/> + <field name="Source Memory Address" start="98" end="159" type="address"/> + </instruction> + + <instruction name="MI_DISPLAY_FLIP" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="20"/> + <field name="Async Flip Indicator" start="22" end="22" type="bool"/> + <field name="Display Plane Select" start="8" end="12" type="uint"> + <value name="Display Plane 1" value="0"/> + <value name="Display Plane 2" value="1"/> + <value name="Display Plane 3" value="2"/> + <value name="Display Plane 4" value="4"/> + <value name="Display Plane 5" value="5"/> + <value name="Display Plane 6" value="6"/> + <value name="Display Plane 7" value="7"/> + <value name="Display Plane 8" value="8"/> + <value name="Display Plane 9" value="9"/> + <value name="Display Plane 10" value="10"/> + <value name="Display Plane 11" value="11"/> + <value name="Display Plane 12" value="12"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Stereoscopic 3D Mode" start="63" end="63" type="bool"/> + <field name="Display Buffer Pitch" start="38" end="47" type="uint"/> + <field name="Tile Parameter" start="32" end="34" type="bool"/> + <field name="Display Buffer Base Address" start="76" end="95" type="address"/> + <field name="Flip Type" start="64" end="65" type="uint"> + <value name="Sync Flip" value="0"/> + <value name="Async Flip" value="1"/> + <value name="Stereo 3D Flip" value="2"/> + </field> + <field name="Left Eye Display Buffer Base Address" start="108" end="127" type="address"/> + </instruction> + + <instruction name="MI_FORCE_WAKEUP" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="29"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Mask Bits" start="48" end="63" type="uint"/> + <field name="Force Render Awake" start="33" end="33" type="uint"/> + <field name="Force Media Awake" start="32" end="32" type="uint"/> + </instruction> + + <instruction name="MI_LOAD_REGISTER_IMM" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="34"/> + <field name="Byte Write Disables" start="8" end="11" type="uint"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Register Offset" start="34" end="54" type="offset"/> + <field name="Data DWord" start="64" end="95" type="uint"/> + </instruction> + + <instruction name="MI_LOAD_REGISTER_MEM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="41"/> + <field name="Use Global GTT" start="22" end="22" type="uint"/> + <field name="Async Mode Enable" start="21" end="21" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Register Address" start="34" end="54" type="offset"/> + <field name="Memory Address" start="66" end="127" type="address"/> + </instruction> + + <instruction name="MI_LOAD_REGISTER_REG" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="42"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Source Register Address" start="34" end="54" type="offset"/> + <field name="Destination Register Address" start="66" end="86" type="offset"/> + </instruction> + + <instruction name="MI_LOAD_SCAN_LINES_EXCL" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="19"/> + <field name="Display (Plane) Select" start="19" end="21" type="uint"> + <value name="Display Plane A" value="0"/> + <value name="Display Plane B" value="1"/> + <value name="Display Plane C" value="4"/> + </field> + <field name="DWord Length" start="0" end="5" type="uint" default="0"/> + <field name="Start Scan Line Number" start="48" end="60" type="uint"/> + <field name="End Scan Line Number" start="32" end="44" type="uint"/> + </instruction> + + <instruction name="MI_LOAD_SCAN_LINES_INCL" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="18"/> + <field name="Display (Plane) Select" start="19" end="21" type="uint"> + <value name="Display Plane 1 A" value="0"/> + <value name="Display Plane 1 B" value="1"/> + <value name="Display Plane 1 C" value="4"/> + </field> + <field name="Scan Line Event Done Forward" start="17" end="18" type="bool"/> + <field name="DWord Length" start="0" end="5" type="uint" default="0"/> + <field name="Start Scan Line Number" start="48" end="60" type="uint"/> + <field name="End Scan Line Number" start="32" end="44" type="uint"/> + </instruction> + + <instruction name="MI_LOAD_URB_MEM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="44"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="URB Address" start="34" end="46" type="uint"/> + <field name="Memory Address" start="70" end="127" type="address"/> + </instruction> + + <instruction name="MI_MATH" bias="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="26"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="ALU INSTRUCTION 1" start="32" end="63" type="uint"/> + <field name="ALU INSTRUCTION 2" start="64" end="95" type="uint"/> + <group count="0" start="96" size="32"> + <field name="ALU INSTRUCTION n" start="0" end="31" type="uint"/> + </group> + </instruction> + + <instruction name="MI_NOOP" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="0"/> + <field name="Identification Number Register Write Enable" start="22" end="22" type="bool"/> + <field name="Identification Number" start="0" end="21" type="uint"/> + </instruction> + + <instruction name="MI_PREDICATE" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="12"/> + <field name="Load Operation" start="6" end="7" type="uint" prefix="LOAD"> + <value name="KEEP" value="0"/> + <value name="LOAD" value="2"/> + <value name="LOADINV" value="3"/> + </field> + <field name="Combine Operation" start="3" end="4" type="uint" prefix="COMBINE"> + <value name="SET" value="0"/> + <value name="AND" value="1"/> + <value name="OR" value="2"/> + <value name="XOR" value="3"/> + </field> + <field name="Compare Operation" start="0" end="1" type="uint" prefix="COMPARE"> + <value name="SRCS_EQUAL" value="2"/> + <value name="DELTAS_EQUAL" value="3"/> + </field> + </instruction> + + <instruction name="MI_REPORT_HEAD" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="7"/> + </instruction> + + <instruction name="MI_REPORT_PERF_COUNT" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="40"/> + <field name="DWord Length" start="0" end="5" type="uint" default="2"/> + <field name="Memory Address" start="38" end="95" type="address"/> + <field name="Core Mode Enable" start="36" end="36" type="uint"/> + <field name="Use Global GTT" start="32" end="32" type="uint"/> + <field name="Report ID" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="MI_RS_CONTEXT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="15"/> + <field name="Resource Streamer Save" start="0" end="0" type="uint" prefix="RS"> + <value name="Restore" value="0"/> + <value name="Save" value="1"/> + </field> + </instruction> + + <instruction name="MI_RS_CONTROL" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="6"/> + <field name="Resource Streamer Control" start="0" end="0" type="uint" prefix="RS"> + <value name="Stop" value="0"/> + <value name="Start" value="1"/> + </field> + </instruction> + + <instruction name="MI_RS_STORE_DATA_IMM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="43"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Destination Address" start="34" end="95" type="address"/> + <field name="Core Mode Enable" start="32" end="32" type="uint"/> + <field name="Data DWord 0" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="MI_SEMAPHORE_SIGNAL" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="27"/> + <field name="Post-Sync Operation" start="21" end="21" type="bool"/> + <field name="Target Engine Select" start="15" end="17" type="uint"> + <value name="RCS" value="0"/> + <value name="VCS0" value="1"/> + <value name="BCS" value="2"/> + <value name="VECS" value="3"/> + <value name="VCS1" value="4"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Target Context ID" start="32" end="63" type="uint"/> + </instruction> + + <instruction name="MI_SEMAPHORE_WAIT" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="28"/> + <field name="Memory Type" start="22" end="22" type="uint"> + <value name="Per Process Graphics Address" value="0"/> + <value name="Global Graphics Address" value="1"/> + </field> + <field name="Register Poll Mode" start="16" end="16" type="uint" default="1"/> + <field name="Wait Mode" start="15" end="15" type="uint"> + <value name="Polling Mode" value="1"/> + <value name="Signal Mode" value="0"/> + </field> + <field name="Compare Operation" start="12" end="14" type="uint" prefix="COMPARE"> + <value name="SAD_GREATER_THAN_SDD" value="0"/> + <value name="SAD_GREATER_THAN_OR_EQUAL_SDD" value="1"/> + <value name="SAD_LESS_THAN_SDD" value="2"/> + <value name="SAD_LESS_THAN_OR_EQUAL_SDD" value="3"/> + <value name="SAD_EQUAL_SDD" value="4"/> + <value name="SAD_NOT_EQUAL_SDD" value="5"/> + </field> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Semaphore Data Dword" start="32" end="63" type="uint"/> + <field name="Semaphore Address" start="66" end="127" type="address"/> + </instruction> + + <instruction name="MI_SET_CONTEXT" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="24"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Logical Context Address" start="44" end="63" type="address"/> + <field name="Reserved, Must be 1" start="40" end="40" type="uint"/> + <field name="Core Mode Enable" start="36" end="36" type="bool"/> + <field name="Resource Streamer State Save Enable" start="35" end="35" type="bool"/> + <field name="Resource Streamer State Restore Enable" start="34" end="34" type="bool"/> + <field name="Force Restore" start="33" end="33" type="uint"/> + <field name="Restore Inhibit" start="32" end="32" type="uint"/> + </instruction> + + <instruction name="MI_SET_PREDICATE" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="1"/> + <field name="PREDICATE ENABLE" start="0" end="3" type="uint"> + <value name="NOOP Never" value="0"/> + <value name="NOOP on Result2 clear" value="1"/> + <value name="NOOP on Result2 set" value="2"/> + <value name="NOOP on Result clear" value="3"/> + <value name="NOOP on Result set" value="4"/> + <value name="Execute when one slice enabled." value="5"/> + <value name="Execute when two slices are enabled." value="6"/> + <value name="Execute when three slices are enabled." value="7"/> + <value name="NOOP Always" value="15"/> + </field> + </instruction> + + <instruction name="MI_STORE_DATA_IMM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="32"/> + <field name="Use Global GTT" start="22" end="22" type="uint"/> + <field name="Store Qword" start="21" end="21" type="uint"/> + <field name="DWord Length" start="0" end="9" type="uint" default="2"/> + <field name="Address" start="34" end="79" type="address"/> + <field name="Core Mode Enable" start="32" end="32" type="uint"/> + <field name="Data DWord 0" start="96" end="127" type="uint"/> + <field name="Data DWord 1" start="128" end="159" type="uint"/> + </instruction> + + <instruction name="MI_STORE_DATA_INDEX" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="33"/> + <field name="Use Per-Process Hardware Status Page" start="21" end="21" type="uint"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="Offset" start="34" end="43" type="uint"/> + <field name="Data DWord 0" start="64" end="95" type="uint"/> + <field name="Data DWord 1" start="96" end="127" type="uint"/> + </instruction> + + <instruction name="MI_STORE_REGISTER_MEM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="36"/> + <field name="Use Global GTT" start="22" end="22" type="uint"/> + <field name="Predicate Enable" start="21" end="21" type="bool"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="Register Address" start="34" end="54" type="offset"/> + <field name="Memory Address" start="66" end="127" type="address"/> + </instruction> + + <instruction name="MI_STORE_URB_MEM" bias="2" length="4"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="45"/> + <field name="DWord Length" start="0" end="7" type="uint" default="2"/> + <field name="URB Address" start="34" end="46" type="uint"/> + <field name="Memory Address" start="70" end="127" type="address"/> + </instruction> + + <instruction name="MI_SUSPEND_FLUSH" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="11"/> + <field name="Suspend Flush" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="MI_TOPOLOGY_FILTER" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="13"/> + <field name="Topology Filter Value" start="0" end="5" type="uint"/> + </instruction> + + <instruction name="MI_URB_ATOMIC_ALLOC" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="9"/> + <field name="URB Atomic Storage Offset" start="12" end="19" type="uint"/> + <field name="URB Atomic Storage Size" start="0" end="8" type="uint"/> + </instruction> + + <instruction name="MI_USER_INTERRUPT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="2"/> + </instruction> + + <instruction name="MI_WAIT_FOR_EVENT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="0"/> + <field name="MI Command Opcode" start="23" end="28" type="uint" default="3"/> + <field name="Display Plane 1 C Vertical Blank Wait Enable" start="21" end="21" type="bool"/> + <field name="Display Plane 6 Flip Pending Wait Enable" start="20" end="20" type="bool"/> + <field name="Display Plane 12 Flip Pending Wait Enable" start="19" end="19" type="bool"/> + <field name="Display Plane 11 Flip Pending Wait Enable" start="18" end="18" type="bool"/> + <field name="Display Plane 10 Flip Pending Wait Enable" start="17" end="17" type="bool"/> + <field name="Display Plane 9 Flip Pending Wait Enable" start="16" end="16" type="bool"/> + <field name="Display Plane 3 Flip Pending Wait Enable" start="15" end="15" type="bool"/> + <field name="Display Plane 1 C Scan Line Wait Enable" start="14" end="14" type="bool"/> + <field name="Display Plane 1 B Vertical Blank Wait Enable" start="11" end="11" type="bool"/> + <field name="Display Plane 5 Flip Pending Wait Enable" start="10" end="10" type="bool"/> + <field name="Display Plane 2 Flip Pending Wait Enable" start="9" end="9" type="bool"/> + <field name="Display Plane 1 B Scan Line Wait Enable" start="8" end="8" type="bool"/> + <field name="Display Plane 8 Flip Pending Wait Enable" start="7" end="7" type="bool"/> + <field name="Display Plane 7 Flip Pending Wait Enable" start="6" end="6" type="bool"/> + <field name="Display Plane 1 A Vertical Blank Wait Enable" start="3" end="3" type="bool"/> + <field name="Display Plane 4 Flip Pending Wait Enable" start="2" end="2" type="bool"/> + <field name="Display Plane 1 Flip Pending Wait Enable" start="1" end="1" type="bool"/> + <field name="Display Plnae 1 A Scan Line Wait Enable" start="0" end="0" type="bool"/> + </instruction> + + <instruction name="PIPELINE_SELECT" bias="1" length="1"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="1"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="4"/> + <field name="Mask Bits" start="8" end="15" type="uint"/> + <field name="Force Media Awake" start="5" end="5" type="bool"/> + <field name="Media Sampler DOP Clock Gate Enable" start="4" end="4" type="bool"/> + <field name="Pipeline Selection" start="0" end="1" type="uint"> + <value name="3D" value="0"/> + <value name="Media" value="1"/> + <value name="GPGPU" value="2"/> + </field> + </instruction> + + <instruction name="PIPE_CONTROL" bias="2" length="6"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="3"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="2"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="0"/> + <field name="DWord Length" start="0" end="7" type="uint" default="4"/> + <field name="Flush LLC" start="58" end="58" type="bool"/> + <field name="Destination Address Type" start="56" end="56" type="uint" prefix="DAT"> + <value name="PPGTT" value="0"/> + <value name="GGTT" value="1"/> + </field> + <field name="LRI Post Sync Operation" start="55" end="55" type="uint"> + <value name="No LRI Operation" value="0"/> + <value name="MMIO Write Immediate Data" value="1"/> + </field> + <field name="Store Data Index" start="53" end="53" type="uint"/> + <field name="Command Streamer Stall Enable" start="52" end="52" type="uint"/> + <field name="Global Snapshot Count Reset" start="51" end="51" type="uint"> + <value name="Don't Reset" value="0"/> + <value name="Reset" value="1"/> + </field> + <field name="TLB Invalidate" start="50" end="50" type="uint"/> + <field name="Generic Media State Clear" start="48" end="48" type="bool"/> + <field name="Post Sync Operation" start="46" end="47" type="uint"> + <value name="No Write" value="0"/> + <value name="Write Immediate Data" value="1"/> + <value name="Write PS Depth Count" value="2"/> + <value name="Write Timestamp" value="3"/> + </field> + <field name="Depth Stall Enable" start="45" end="45" type="bool"/> + <field name="Render Target Cache Flush Enable" start="44" end="44" type="bool"/> + <field name="Instruction Cache Invalidate Enable" start="43" end="43" type="bool"/> + <field name="Texture Cache Invalidation Enable" start="42" end="42" type="bool"/> + <field name="Indirect State Pointers Disable" start="41" end="41" type="bool"/> + <field name="Notify Enable" start="40" end="40" type="bool"/> + <field name="Pipe Control Flush Enable" start="39" end="39" type="bool"/> + <field name="DC Flush Enable" start="37" end="37" type="bool"/> + <field name="VF Cache Invalidation Enable" start="36" end="36" type="bool"/> + <field name="Constant Cache Invalidation Enable" start="35" end="35" type="bool"/> + <field name="State Cache Invalidation Enable" start="34" end="34" type="bool"/> + <field name="Stall At Pixel Scoreboard" start="33" end="33" type="bool"/> + <field name="Depth Cache Flush Enable" start="32" end="32" type="bool"/> + <field name="Address" start="66" end="111" type="address"/> + <field name="Immediate Data" start="128" end="191" type="uint"/> + </instruction> + + <instruction name="STATE_BASE_ADDRESS" bias="2" length="19"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="1"/> + <field name="DWord Length" start="0" end="7" type="uint" default="17"/> + <field name="General State Base Address" start="44" end="95" type="address"/> + <field name="General State Memory Object Control State" start="36" end="42" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="General State Base Address Modify Enable" start="32" end="32" type="bool"/> + <field name="Stateless Data Port Access Memory Object Control State" start="112" end="118" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface State Base Address" start="140" end="191" type="address"/> + <field name="Surface State Memory Object Control State" start="132" end="138" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface State Base Address Modify Enable" start="128" end="128" type="bool"/> + <field name="Dynamic State Base Address" start="204" end="255" type="address"/> + <field name="Dynamic State Memory Object Control State" start="196" end="202" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Dynamic State Base Address Modify Enable" start="192" end="192" type="bool"/> + <field name="Indirect Object Base Address" start="268" end="319" type="address"/> + <field name="Indirect Object Memory Object Control State" start="260" end="266" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Indirect Object Base Address Modify Enable" start="256" end="256" type="bool"/> + <field name="Instruction Base Address" start="332" end="383" type="address"/> + <field name="Instruction Memory Object Control State" start="324" end="330" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Instruction Base Address Modify Enable" start="320" end="320" type="bool"/> + <field name="General State Buffer Size" start="396" end="415" type="uint"/> + <field name="General State Buffer Size Modify Enable" start="384" end="384" type="bool"/> + <field name="Dynamic State Buffer Size" start="428" end="447" type="uint"/> + <field name="Dynamic State Buffer Size Modify Enable" start="416" end="416" type="bool"/> + <field name="Indirect Object Buffer Size" start="460" end="479" type="uint"/> + <field name="Indirect Object Buffer Size Modify Enable" start="448" end="448" type="bool"/> + <field name="Instruction Buffer Size" start="492" end="511" type="uint"/> + <field name="Instruction Buffer size Modify Enable" start="480" end="480" type="bool"/> + <field name="Bindless Surface State Base Address" start="524" end="575" type="address"/> + <field name="Bindless Surface State Memory Object Control State" start="516" end="522" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Bindless Surface State Base Address Modify Enable" start="512" end="512" type="bool"/> + <field name="Bindless Surface State Size" start="588" end="607" type="uint"/> + </instruction> + + <instruction name="STATE_PREFETCH" bias="2" length="2"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="3"/> + <field name="DWord Length" start="0" end="7" type="uint" default="0"/> + <field name="Prefetch Pointer" start="38" end="63" type="address"/> + <field name="Prefetch Count" start="32" end="34" type="uint"/> + </instruction> + + <instruction name="STATE_SIP" bias="2" length="3"> + <field name="Command Type" start="29" end="31" type="uint" default="3"/> + <field name="Command SubType" start="27" end="28" type="uint" default="0"/> + <field name="3D Command Opcode" start="24" end="26" type="uint" default="1"/> + <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="2"/> + <field name="DWord Length" start="0" end="7" type="uint" default="1"/> + <field name="System Instruction Pointer" start="36" end="95" type="offset"/> + </instruction> + +</genxml> diff --git a/src/vulkan/gen9_pack.h b/src/vulkan/gen9_pack.h deleted file mode 100644 index df295f4900a..00000000000 --- a/src/vulkan/gen9_pack.h +++ /dev/null @@ -1,9797 +0,0 @@ -/* - * Copyright © 2015 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - - -/* Instructions, enums and structures for SKL. - * - * This file has been generated, do not hand edit. - */ - -#pragma once - -#include <stdio.h> -#include <assert.h> - -#ifndef __gen_validate_value -#define __gen_validate_value(x) -#endif - -#ifndef __gen_field_functions -#define __gen_field_functions - -union __gen_value { - float f; - uint32_t dw; -}; - -static inline uint64_t -__gen_mbo(uint32_t start, uint32_t end) -{ - return (~0ull >> (64 - (end - start + 1))) << start; -} - -static inline uint64_t -__gen_field(uint64_t v, uint32_t start, uint32_t end) -{ - __gen_validate_value(v); -#if DEBUG - if (end - start + 1 < 64) - assert(v < 1ull << (end - start + 1)); -#endif - - return v << start; -} - -static inline uint64_t -__gen_fixed(float v, uint32_t start, uint32_t end, - bool is_signed, uint32_t fract_bits) -{ - __gen_validate_value(v); - - const float factor = (1 << fract_bits); - - float max, min; - if (is_signed) { - max = ((1 << (end - start)) - 1) / factor; - min = -(1 << (end - start)) / factor; - } else { - max = ((1 << (end - start + 1)) - 1) / factor; - min = 0.0f; - } - - if (v > max) - v = max; - else if (v < min) - v = min; - - int32_t int_val = roundf(v * factor); - - if (is_signed) - int_val &= (1 << (end - start + 1)) - 1; - - return int_val << start; -} - -static inline uint64_t -__gen_offset(uint64_t v, uint32_t start, uint32_t end) -{ - __gen_validate_value(v); -#if DEBUG - uint64_t mask = (~0ull >> (64 - (end - start + 1))) << start; - - assert((v & ~mask) == 0); -#endif - - return v; -} - -static inline uint32_t -__gen_float(float v) -{ - __gen_validate_value(v); - return ((union __gen_value) { .f = (v) }).dw; -} - -#ifndef __gen_address_type -#error #define __gen_address_type before including this file -#endif - -#ifndef __gen_user_data -#error #define __gen_combine_address before including this file -#endif - -#endif - -#define GEN9_3DSTATE_URB_VS_length_bias 0x00000002 -#define GEN9_3DSTATE_URB_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 48, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_URB_VS_length 0x00000002 - -struct GEN9_3DSTATE_URB_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t VSURBStartingAddress; - uint32_t VSURBEntryAllocationSize; - uint32_t VSNumberofURBEntries; -}; - -static inline void -GEN9_3DSTATE_URB_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_URB_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->VSURBStartingAddress, 25, 31) | - __gen_field(values->VSURBEntryAllocationSize, 16, 24) | - __gen_field(values->VSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN9_3DSTATE_VS_length_bias 0x00000002 -#define GEN9_3DSTATE_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 16, \ - .DwordLength = 7 - -#define GEN9_3DSTATE_VS_length 0x00000009 - -#define __gen_prefix(name) GEN9_ ## name - -struct __gen_prefix(3DSTATE_VS) { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint64_t KernelStartPointer; -#define Multiple 0 -#define Single 1 - uint32_t SingleVertexDispatch; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define Normal 0 -#define High 1 - uint32_t ThreadDispatchPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool AccessesUAV; - bool SoftwareExceptionEnable; - uint64_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t DispatchGRFStartRegisterForURBData; - uint32_t VertexURBEntryReadLength; - uint32_t VertexURBEntryReadOffset; - uint32_t MaximumNumberofThreads; - bool StatisticsEnable; - bool SIMD8DispatchEnable; - bool VertexCacheDisable; - bool FunctionEnable; - uint32_t VertexURBEntryOutputReadOffset; - uint32_t VertexURBEntryOutputLength; - uint32_t UserClipDistanceClipTestEnableBitmask; - uint32_t UserClipDistanceCullTestEnableBitmask; -}; - -static inline void -GEN9_3DSTATE_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint64_t qw1 = - __gen_offset(values->KernelStartPointer, 6, 63) | - 0; - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->SingleVertexDispatch, 31, 31) | - __gen_field(values->VectorMaskEnable, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadDispatchPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->AccessesUAV, 12, 12) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - uint64_t qw4 = - __gen_offset(values->ScratchSpaceBasePointer, 10, 63) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = qw4; - dw[5] = qw4 >> 32; - - dw[6] = - __gen_field(values->DispatchGRFStartRegisterForURBData, 20, 24) | - __gen_field(values->VertexURBEntryReadLength, 11, 16) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - 0; - - dw[7] = - __gen_field(values->MaximumNumberofThreads, 23, 31) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->SIMD8DispatchEnable, 2, 2) | - __gen_field(values->VertexCacheDisable, 1, 1) | - __gen_field(values->FunctionEnable, 0, 0) | - 0; - - dw[8] = - __gen_field(values->VertexURBEntryOutputReadOffset, 21, 26) | - __gen_field(values->VertexURBEntryOutputLength, 16, 20) | - __gen_field(values->UserClipDistanceClipTestEnableBitmask, 8, 15) | - __gen_field(values->UserClipDistanceCullTestEnableBitmask, 0, 7) | - 0; - -} - -#define GEN9_GPGPU_CSR_BASE_ADDRESS_length_bias 0x00000002 -#define GEN9_GPGPU_CSR_BASE_ADDRESS_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 4, \ - .DwordLength = 1 - -#define GEN9_GPGPU_CSR_BASE_ADDRESS_length 0x00000003 - -struct GEN9_GPGPU_CSR_BASE_ADDRESS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type GPGPUCSRBaseAddress; -}; - -static inline void -GEN9_GPGPU_CSR_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_GPGPU_CSR_BASE_ADDRESS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->GPGPUCSRBaseAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - -} - -#define GEN9_MI_ATOMIC_length_bias 0x00000002 -#define GEN9_MI_ATOMIC_header \ - .CommandType = 0, \ - .MICommandOpcode = 47 - -#define GEN9_MI_ATOMIC_length 0x00000003 - -struct __gen_prefix(MI_ATOMIC) { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t MemoryType; - uint32_t PostSyncOperation; -#define DWORD 0 -#define QWORD 1 -#define OCTWORD 2 -#define RESERVED 3 - uint32_t DataSize; - uint32_t InlineData; - uint32_t CSSTALL; - uint32_t ReturnDataControl; - uint32_t ATOMICOPCODE; - uint32_t DwordLength; - __gen_address_type MemoryAddress; - uint32_t Operand1DataDword0; - uint32_t Operand2DataDword0; - uint32_t Operand1DataDword1; - uint32_t Operand2DataDword1; - uint32_t Operand1DataDword2; - uint32_t Operand2DataDword2; - uint32_t Operand1DataDword3; - uint32_t Operand2DataDword3; -}; - -static inline void -GEN9_MI_ATOMIC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_ATOMIC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->MemoryType, 22, 22) | - __gen_field(values->PostSyncOperation, 21, 21) | - __gen_field(values->DataSize, 19, 20) | - __gen_field(values->InlineData, 18, 18) | - __gen_field(values->CSSTALL, 17, 17) | - __gen_field(values->ReturnDataControl, 16, 16) | - __gen_field(values->ATOMICOPCODE, 8, 15) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->MemoryAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->Operand1DataDword0, 0, 31) | - 0; - - dw[4] = - __gen_field(values->Operand2DataDword0, 0, 31) | - 0; - - dw[5] = - __gen_field(values->Operand1DataDword1, 0, 31) | - 0; - - dw[6] = - __gen_field(values->Operand2DataDword1, 0, 31) | - 0; - - dw[7] = - __gen_field(values->Operand1DataDword2, 0, 31) | - 0; - - dw[8] = - __gen_field(values->Operand2DataDword2, 0, 31) | - 0; - - dw[9] = - __gen_field(values->Operand1DataDword3, 0, 31) | - 0; - - dw[10] = - __gen_field(values->Operand2DataDword3, 0, 31) | - 0; - -} - -#define GEN9_MI_BATCH_BUFFER_START_length_bias 0x00000002 -#define GEN9_MI_BATCH_BUFFER_START_header \ - .CommandType = 0, \ - .MICommandOpcode = 49, \ - .DwordLength = 1 - -#define GEN9_MI_BATCH_BUFFER_START_length 0x00000003 - -struct GEN9_MI_BATCH_BUFFER_START { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define Firstlevelbatch 0 -#define Secondlevelbatch 1 - uint32_t SecondLevelBatchBuffer; - bool AddOffsetEnable; - uint32_t PredicationEnable; - bool ResourceStreamerEnable; -#define ASI_GGTT 0 -#define ASI_PPGTT 1 - uint32_t AddressSpaceIndicator; - uint32_t DwordLength; - __gen_address_type BatchBufferStartAddress; -}; - -static inline void -GEN9_MI_BATCH_BUFFER_START_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_BATCH_BUFFER_START * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->SecondLevelBatchBuffer, 22, 22) | - __gen_field(values->AddOffsetEnable, 16, 16) | - __gen_field(values->PredicationEnable, 15, 15) | - __gen_field(values->ResourceStreamerEnable, 10, 10) | - __gen_field(values->AddressSpaceIndicator, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->BatchBufferStartAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - -} - -#define GEN9_MI_CONDITIONAL_BATCH_BUFFER_END_length_bias 0x00000002 -#define GEN9_MI_CONDITIONAL_BATCH_BUFFER_END_header\ - .CommandType = 0, \ - .MICommandOpcode = 54, \ - .UseGlobalGTT = 0, \ - .CompareSemaphore = 0, \ - .DwordLength = 2 - -#define GEN9_MI_CONDITIONAL_BATCH_BUFFER_END_length 0x00000004 - -struct GEN9_MI_CONDITIONAL_BATCH_BUFFER_END { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t UseGlobalGTT; - uint32_t CompareSemaphore; -#define CompareMaskModeDisabled 0 -#define CompareMaskModeEnabled 1 - uint32_t CompareMaskMode; - uint32_t DwordLength; - uint32_t CompareDataDword; - __gen_address_type CompareAddress; -}; - -static inline void -GEN9_MI_CONDITIONAL_BATCH_BUFFER_END_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_CONDITIONAL_BATCH_BUFFER_END * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->CompareSemaphore, 21, 21) | - __gen_field(values->CompareMaskMode, 19, 19) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->CompareDataDword, 0, 31) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->CompareAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - -} - -#define GEN9_MI_FORCE_WAKEUP_length_bias 0x00000002 -#define GEN9_MI_FORCE_WAKEUP_header \ - .CommandType = 0, \ - .MICommandOpcode = 29, \ - .DwordLength = 0 - -#define GEN9_MI_FORCE_WAKEUP_length 0x00000002 - -struct GEN9_MI_FORCE_WAKEUP { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t MaskBits; - uint32_t ForceRenderAwake; - uint32_t ForceMediaAwake; -}; - -static inline void -GEN9_MI_FORCE_WAKEUP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_FORCE_WAKEUP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->MaskBits, 16, 31) | - __gen_field(values->ForceRenderAwake, 1, 1) | - __gen_field(values->ForceMediaAwake, 0, 0) | - 0; - -} - -#define GEN9_MI_LOAD_REGISTER_IMM_length_bias 0x00000002 -#define GEN9_MI_LOAD_REGISTER_IMM_header \ - .CommandType = 0, \ - .MICommandOpcode = 34, \ - .DwordLength = 1 - -#define GEN9_MI_LOAD_REGISTER_IMM_length 0x00000003 - -struct GEN9_MI_LOAD_REGISTER_IMM { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t ByteWriteDisables; - uint32_t DwordLength; - uint32_t RegisterOffset; - uint32_t DataDWord; -}; - -static inline void -GEN9_MI_LOAD_REGISTER_IMM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_LOAD_REGISTER_IMM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->ByteWriteDisables, 8, 11) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->RegisterOffset, 2, 22) | - 0; - - dw[2] = - __gen_field(values->DataDWord, 0, 31) | - 0; - -} - -#define GEN9_MI_LOAD_REGISTER_REG_length_bias 0x00000002 -#define GEN9_MI_LOAD_REGISTER_REG_header \ - .CommandType = 0, \ - .MICommandOpcode = 42, \ - .DwordLength = 1 - -#define GEN9_MI_LOAD_REGISTER_REG_length 0x00000003 - -struct GEN9_MI_LOAD_REGISTER_REG { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t SourceRegisterAddress; - uint32_t DestinationRegisterAddress; -}; - -static inline void -GEN9_MI_LOAD_REGISTER_REG_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_LOAD_REGISTER_REG * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->SourceRegisterAddress, 2, 22) | - 0; - - dw[2] = - __gen_offset(values->DestinationRegisterAddress, 2, 22) | - 0; - -} - -#define GEN9_MI_SEMAPHORE_SIGNAL_length_bias 0x00000002 -#define GEN9_MI_SEMAPHORE_SIGNAL_header \ - .CommandType = 0, \ - .MICommandOpcode = 27, \ - .DwordLength = 0 - -#define GEN9_MI_SEMAPHORE_SIGNAL_length 0x00000002 - -struct GEN9_MI_SEMAPHORE_SIGNAL { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t PostSyncOperation; -#define RCS 0 -#define VCS0 1 -#define BCS 2 -#define VECS 3 -#define VCS1 4 - uint32_t TargetEngineSelect; - uint32_t DwordLength; - uint32_t TargetContextID; -}; - -static inline void -GEN9_MI_SEMAPHORE_SIGNAL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_SEMAPHORE_SIGNAL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->PostSyncOperation, 21, 21) | - __gen_field(values->TargetEngineSelect, 15, 17) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->TargetContextID, 0, 31) | - 0; - -} - -#define GEN9_MI_SEMAPHORE_WAIT_length_bias 0x00000002 -#define GEN9_MI_SEMAPHORE_WAIT_header \ - .CommandType = 0, \ - .MICommandOpcode = 28, \ - .DwordLength = 2 - -#define GEN9_MI_SEMAPHORE_WAIT_length 0x00000004 - -struct GEN9_MI_SEMAPHORE_WAIT { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t MemoryType; -#define PollingMode 1 -#define SignalMode 0 - uint32_t WaitMode; -#define SAD_GREATER_THAN_SDD 0 -#define SAD_GREATER_THAN_OR_EQUAL_SDD 1 -#define SAD_LESS_THAN_SDD 2 -#define SAD_LESS_THAN_OR_EQUAL_SDD 3 -#define SAD_EQUAL_SDD 4 -#define SAD_NOT_EQUAL_SDD 5 - uint32_t CompareOperation; - uint32_t DwordLength; - uint32_t SemaphoreDataDword; - __gen_address_type SemaphoreAddress; -}; - -static inline void -GEN9_MI_SEMAPHORE_WAIT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_SEMAPHORE_WAIT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->MemoryType, 22, 22) | - __gen_field(values->WaitMode, 15, 15) | - __gen_field(values->CompareOperation, 12, 14) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SemaphoreDataDword, 0, 31) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->SemaphoreAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - -} - -#define GEN9_MI_STORE_DATA_IMM_length_bias 0x00000002 -#define GEN9_MI_STORE_DATA_IMM_header \ - .CommandType = 0, \ - .MICommandOpcode = 32, \ - .DwordLength = 2 - -#define GEN9_MI_STORE_DATA_IMM_length 0x00000004 - -struct GEN9_MI_STORE_DATA_IMM { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool UseGlobalGTT; - bool StoreQword; - uint32_t DwordLength; - __gen_address_type Address; - uint32_t CoreModeEnable; - uint32_t DataDWord0; - uint32_t DataDWord1; -}; - -static inline void -GEN9_MI_STORE_DATA_IMM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_STORE_DATA_IMM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->StoreQword, 21, 21) | - __gen_field(values->DwordLength, 0, 9) | - 0; - - uint32_t dw1 = - __gen_field(values->CoreModeEnable, 0, 0) | - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->Address, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->DataDWord0, 0, 31) | - 0; - - dw[4] = - __gen_field(values->DataDWord1, 0, 31) | - 0; - -} - -#define GEN9_MI_STORE_REGISTER_MEM_length_bias 0x00000002 -#define GEN9_MI_STORE_REGISTER_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 36, \ - .DwordLength = 2 - -#define GEN9_MI_STORE_REGISTER_MEM_length 0x00000004 - -struct GEN9_MI_STORE_REGISTER_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool UseGlobalGTT; - uint32_t PredicateEnable; - uint32_t DwordLength; - uint32_t RegisterAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN9_MI_STORE_REGISTER_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_STORE_REGISTER_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->PredicateEnable, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->RegisterAddress, 2, 22) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - -} - -#define GEN9_PIPELINE_SELECT_length_bias 0x00000001 -#define GEN9_PIPELINE_SELECT_header \ - .CommandType = 3, \ - .CommandSubType = 1, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 4 - -#define GEN9_PIPELINE_SELECT_length 0x00000001 - -struct GEN9_PIPELINE_SELECT { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t MaskBits; - uint32_t ForceMediaAwake; - uint32_t MediaSamplerDOPClockGateEnable; -#define _3D 0 -#define Media 1 -#define GPGPU 2 - uint32_t PipelineSelection; -}; - -static inline void -GEN9_PIPELINE_SELECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_PIPELINE_SELECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->MaskBits, 8, 15) | - __gen_field(values->ForceMediaAwake, 5, 5) | - __gen_field(values->MediaSamplerDOPClockGateEnable, 4, 4) | - __gen_field(values->PipelineSelection, 0, 1) | - 0; - -} - -#define GEN9_STATE_BASE_ADDRESS_length_bias 0x00000002 -#define GEN9_STATE_BASE_ADDRESS_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 1, \ - .DwordLength = 17 - -#define GEN9_STATE_BASE_ADDRESS_length 0x00000013 - -#define GEN9_MEMORY_OBJECT_CONTROL_STATE_length 0x00000001 - -struct GEN9_MEMORY_OBJECT_CONTROL_STATE { - uint32_t IndextoMOCSTables; -}; - -static inline void -GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MEMORY_OBJECT_CONTROL_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->IndextoMOCSTables, 1, 6) | - 0; - -} - -struct GEN9_STATE_BASE_ADDRESS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type GeneralStateBaseAddress; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE GeneralStateMemoryObjectControlState; - bool GeneralStateBaseAddressModifyEnable; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE StatelessDataPortAccessMemoryObjectControlState; - __gen_address_type SurfaceStateBaseAddress; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE SurfaceStateMemoryObjectControlState; - bool SurfaceStateBaseAddressModifyEnable; - __gen_address_type DynamicStateBaseAddress; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE DynamicStateMemoryObjectControlState; - bool DynamicStateBaseAddressModifyEnable; - __gen_address_type IndirectObjectBaseAddress; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE IndirectObjectMemoryObjectControlState; - bool IndirectObjectBaseAddressModifyEnable; - __gen_address_type InstructionBaseAddress; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE InstructionMemoryObjectControlState; - bool InstructionBaseAddressModifyEnable; - uint32_t GeneralStateBufferSize; - bool GeneralStateBufferSizeModifyEnable; - uint32_t DynamicStateBufferSize; - bool DynamicStateBufferSizeModifyEnable; - uint32_t IndirectObjectBufferSize; - bool IndirectObjectBufferSizeModifyEnable; - uint32_t InstructionBufferSize; - bool InstructionBuffersizeModifyEnable; - __gen_address_type BindlessSurfaceStateBaseAddress; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE BindlessSurfaceStateMemoryObjectControlState; - bool BindlessSurfaceStateBaseAddressModifyEnable; - uint32_t BindlessSurfaceStateSize; -}; - -static inline void -GEN9_STATE_BASE_ADDRESS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_STATE_BASE_ADDRESS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_GeneralStateMemoryObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_GeneralStateMemoryObjectControlState, &values->GeneralStateMemoryObjectControlState); - uint32_t dw1 = - __gen_field(dw_GeneralStateMemoryObjectControlState, 4, 10) | - __gen_field(values->GeneralStateBaseAddressModifyEnable, 0, 0) | - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->GeneralStateBaseAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - uint32_t dw_StatelessDataPortAccessMemoryObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StatelessDataPortAccessMemoryObjectControlState, &values->StatelessDataPortAccessMemoryObjectControlState); - dw[3] = - __gen_field(dw_StatelessDataPortAccessMemoryObjectControlState, 16, 22) | - 0; - - uint32_t dw_SurfaceStateMemoryObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceStateMemoryObjectControlState, &values->SurfaceStateMemoryObjectControlState); - uint32_t dw4 = - __gen_field(dw_SurfaceStateMemoryObjectControlState, 4, 10) | - __gen_field(values->SurfaceStateBaseAddressModifyEnable, 0, 0) | - 0; - - uint64_t qw4 = - __gen_combine_address(data, &dw[4], values->SurfaceStateBaseAddress, dw4); - - dw[4] = qw4; - dw[5] = qw4 >> 32; - - uint32_t dw_DynamicStateMemoryObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DynamicStateMemoryObjectControlState, &values->DynamicStateMemoryObjectControlState); - uint32_t dw6 = - __gen_field(dw_DynamicStateMemoryObjectControlState, 4, 10) | - __gen_field(values->DynamicStateBaseAddressModifyEnable, 0, 0) | - 0; - - uint64_t qw6 = - __gen_combine_address(data, &dw[6], values->DynamicStateBaseAddress, dw6); - - dw[6] = qw6; - dw[7] = qw6 >> 32; - - uint32_t dw_IndirectObjectMemoryObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_IndirectObjectMemoryObjectControlState, &values->IndirectObjectMemoryObjectControlState); - uint32_t dw8 = - __gen_field(dw_IndirectObjectMemoryObjectControlState, 4, 10) | - __gen_field(values->IndirectObjectBaseAddressModifyEnable, 0, 0) | - 0; - - uint64_t qw8 = - __gen_combine_address(data, &dw[8], values->IndirectObjectBaseAddress, dw8); - - dw[8] = qw8; - dw[9] = qw8 >> 32; - - uint32_t dw_InstructionMemoryObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_InstructionMemoryObjectControlState, &values->InstructionMemoryObjectControlState); - uint32_t dw10 = - __gen_field(dw_InstructionMemoryObjectControlState, 4, 10) | - __gen_field(values->InstructionBaseAddressModifyEnable, 0, 0) | - 0; - - uint64_t qw10 = - __gen_combine_address(data, &dw[10], values->InstructionBaseAddress, dw10); - - dw[10] = qw10; - dw[11] = qw10 >> 32; - - dw[12] = - __gen_field(values->GeneralStateBufferSize, 12, 31) | - __gen_field(values->GeneralStateBufferSizeModifyEnable, 0, 0) | - 0; - - dw[13] = - __gen_field(values->DynamicStateBufferSize, 12, 31) | - __gen_field(values->DynamicStateBufferSizeModifyEnable, 0, 0) | - 0; - - dw[14] = - __gen_field(values->IndirectObjectBufferSize, 12, 31) | - __gen_field(values->IndirectObjectBufferSizeModifyEnable, 0, 0) | - 0; - - dw[15] = - __gen_field(values->InstructionBufferSize, 12, 31) | - __gen_field(values->InstructionBuffersizeModifyEnable, 0, 0) | - 0; - - uint32_t dw_BindlessSurfaceStateMemoryObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_BindlessSurfaceStateMemoryObjectControlState, &values->BindlessSurfaceStateMemoryObjectControlState); - uint32_t dw16 = - __gen_field(dw_BindlessSurfaceStateMemoryObjectControlState, 4, 10) | - __gen_field(values->BindlessSurfaceStateBaseAddressModifyEnable, 0, 0) | - 0; - - uint64_t qw16 = - __gen_combine_address(data, &dw[16], values->BindlessSurfaceStateBaseAddress, dw16); - - dw[16] = qw16; - dw[17] = qw16 >> 32; - - dw[18] = - __gen_field(values->BindlessSurfaceStateSize, 12, 31) | - 0; - -} - -#define GEN9_STATE_PREFETCH_length_bias 0x00000002 -#define GEN9_STATE_PREFETCH_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 3, \ - .DwordLength = 0 - -#define GEN9_STATE_PREFETCH_length 0x00000002 - -struct GEN9_STATE_PREFETCH { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type PrefetchPointer; - uint32_t PrefetchCount; -}; - -static inline void -GEN9_STATE_PREFETCH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_STATE_PREFETCH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - __gen_field(values->PrefetchCount, 0, 2) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->PrefetchPointer, dw1); - -} - -#define GEN9_STATE_SIP_length_bias 0x00000002 -#define GEN9_STATE_SIP_header \ - .CommandType = 3, \ - .CommandSubType = 0, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 2, \ - .DwordLength = 1 - -#define GEN9_STATE_SIP_length 0x00000003 - -struct GEN9_STATE_SIP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint64_t SystemInstructionPointer; -}; - -static inline void -GEN9_STATE_SIP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_STATE_SIP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint64_t qw1 = - __gen_offset(values->SystemInstructionPointer, 4, 63) | - 0; - - dw[1] = qw1; - dw[2] = qw1 >> 32; - -} - -#define GEN9_3DPRIMITIVE_length_bias 0x00000002 -#define GEN9_3DPRIMITIVE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 3, \ - ._3DCommandSubOpcode = 0, \ - .DwordLength = 5 - -#define GEN9_3DPRIMITIVE_length 0x00000007 - -struct GEN9_3DPRIMITIVE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - bool IndirectParameterEnable; - uint32_t UAVCoherencyRequired; - bool PredicateEnable; - uint32_t DwordLength; - bool EndOffsetEnable; -#define SEQUENTIAL 0 -#define RANDOM 1 - uint32_t VertexAccessType; - uint32_t PrimitiveTopologyType; - uint32_t VertexCountPerInstance; - uint32_t StartVertexLocation; - uint32_t InstanceCount; - uint32_t StartInstanceLocation; - uint32_t BaseVertexLocation; -}; - -static inline void -GEN9_3DPRIMITIVE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DPRIMITIVE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->IndirectParameterEnable, 10, 10) | - __gen_field(values->UAVCoherencyRequired, 9, 9) | - __gen_field(values->PredicateEnable, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->EndOffsetEnable, 9, 9) | - __gen_field(values->VertexAccessType, 8, 8) | - __gen_field(values->PrimitiveTopologyType, 0, 5) | - 0; - - dw[2] = - __gen_field(values->VertexCountPerInstance, 0, 31) | - 0; - - dw[3] = - __gen_field(values->StartVertexLocation, 0, 31) | - 0; - - dw[4] = - __gen_field(values->InstanceCount, 0, 31) | - 0; - - dw[5] = - __gen_field(values->StartInstanceLocation, 0, 31) | - 0; - - dw[6] = - __gen_field(values->BaseVertexLocation, 0, 31) | - 0; - -} - -#define GEN9_3DSTATE_AA_LINE_PARAMETERS_length_bias 0x00000002 -#define GEN9_3DSTATE_AA_LINE_PARAMETERS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 10, \ - .DwordLength = 1 - -#define GEN9_3DSTATE_AA_LINE_PARAMETERS_length 0x00000003 - -struct GEN9_3DSTATE_AA_LINE_PARAMETERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - float AAPointCoverageBias; - float AACoverageBias; - float AAPointCoverageSlope; - float AACoverageSlope; - float AAPointCoverageEndCapBias; - float AACoverageEndCapBias; - float AAPointCoverageEndCapSlope; - float AACoverageEndCapSlope; -}; - -static inline void -GEN9_3DSTATE_AA_LINE_PARAMETERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_AA_LINE_PARAMETERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->AAPointCoverageBias * (1 << 8), 24, 31) | - __gen_field(values->AACoverageBias * (1 << 8), 16, 23) | - __gen_field(values->AAPointCoverageSlope * (1 << 8), 8, 15) | - __gen_field(values->AACoverageSlope * (1 << 8), 0, 7) | - 0; - - dw[2] = - __gen_field(values->AAPointCoverageEndCapBias * (1 << 8), 24, 31) | - __gen_field(values->AACoverageEndCapBias * (1 << 8), 16, 23) | - __gen_field(values->AAPointCoverageEndCapSlope * (1 << 8), 8, 15) | - __gen_field(values->AACoverageEndCapSlope * (1 << 8), 0, 7) | - 0; - -} - -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_DS_length_bias 0x00000002 -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 70 - -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_DS_length 0x00000000 - -#define GEN9_BINDING_TABLE_EDIT_ENTRY_length 0x00000001 - -struct GEN9_BINDING_TABLE_EDIT_ENTRY { - uint32_t BindingTableIndex; - uint32_t SurfaceStatePointer; -}; - -static inline void -GEN9_BINDING_TABLE_EDIT_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_BINDING_TABLE_EDIT_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->BindingTableIndex, 16, 23) | - __gen_offset(values->SurfaceStatePointer, 0, 15) | - 0; - -} - -struct GEN9_3DSTATE_BINDING_TABLE_EDIT_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_BINDING_TABLE_EDIT_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_BINDING_TABLE_EDIT_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_GS_length_bias 0x00000002 -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 68 - -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_GS_length 0x00000000 - -struct GEN9_3DSTATE_BINDING_TABLE_EDIT_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_BINDING_TABLE_EDIT_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_BINDING_TABLE_EDIT_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_HS_length_bias 0x00000002 -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 69 - -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_HS_length 0x00000000 - -struct GEN9_3DSTATE_BINDING_TABLE_EDIT_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_BINDING_TABLE_EDIT_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_BINDING_TABLE_EDIT_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_PS_length_bias 0x00000002 -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 71 - -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_PS_length 0x00000000 - -struct GEN9_3DSTATE_BINDING_TABLE_EDIT_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_BINDING_TABLE_EDIT_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_BINDING_TABLE_EDIT_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_VS_length_bias 0x00000002 -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 67 - -#define GEN9_3DSTATE_BINDING_TABLE_EDIT_VS_length 0x00000000 - -struct GEN9_3DSTATE_BINDING_TABLE_EDIT_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BindingTableBlockClear; -#define AllCores 3 -#define Core1 2 -#define Core0 1 - uint32_t BindingTableEditTarget; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_BINDING_TABLE_EDIT_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_BINDING_TABLE_EDIT_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->BindingTableBlockClear, 16, 31) | - __gen_field(values->BindingTableEditTarget, 0, 1) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_DS_length_bias 0x00000002 -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 40, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_DS_length 0x00000002 - -struct GEN9_3DSTATE_BINDING_TABLE_POINTERS_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoDSBindingTable; -}; - -static inline void -GEN9_3DSTATE_BINDING_TABLE_POINTERS_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_BINDING_TABLE_POINTERS_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoDSBindingTable, 5, 15) | - 0; - -} - -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_GS_length_bias 0x00000002 -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 41, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_GS_length 0x00000002 - -struct GEN9_3DSTATE_BINDING_TABLE_POINTERS_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoGSBindingTable; -}; - -static inline void -GEN9_3DSTATE_BINDING_TABLE_POINTERS_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_BINDING_TABLE_POINTERS_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoGSBindingTable, 5, 15) | - 0; - -} - -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_HS_length_bias 0x00000002 -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 39, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_HS_length 0x00000002 - -struct GEN9_3DSTATE_BINDING_TABLE_POINTERS_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoHSBindingTable; -}; - -static inline void -GEN9_3DSTATE_BINDING_TABLE_POINTERS_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_BINDING_TABLE_POINTERS_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoHSBindingTable, 5, 15) | - 0; - -} - -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_PS_length_bias 0x00000002 -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 42, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_PS_length 0x00000002 - -struct GEN9_3DSTATE_BINDING_TABLE_POINTERS_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoPSBindingTable; -}; - -static inline void -GEN9_3DSTATE_BINDING_TABLE_POINTERS_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_BINDING_TABLE_POINTERS_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoPSBindingTable, 5, 15) | - 0; - -} - -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_VS_length_bias 0x00000002 -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 38, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_BINDING_TABLE_POINTERS_VS_length 0x00000002 - -struct GEN9_3DSTATE_BINDING_TABLE_POINTERS_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoVSBindingTable; -}; - -static inline void -GEN9_3DSTATE_BINDING_TABLE_POINTERS_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_BINDING_TABLE_POINTERS_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoVSBindingTable, 5, 15) | - 0; - -} - -#define GEN9_3DSTATE_BINDING_TABLE_POOL_ALLOC_length_bias 0x00000002 -#define GEN9_3DSTATE_BINDING_TABLE_POOL_ALLOC_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 25, \ - .DwordLength = 2 - -#define GEN9_3DSTATE_BINDING_TABLE_POOL_ALLOC_length 0x00000004 - -struct GEN9_3DSTATE_BINDING_TABLE_POOL_ALLOC { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type BindingTablePoolBaseAddress; - uint32_t BindingTablePoolEnable; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE SurfaceObjectControlState; -#define NoValidData 0 - uint32_t BindingTablePoolBufferSize; -}; - -static inline void -GEN9_3DSTATE_BINDING_TABLE_POOL_ALLOC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_BINDING_TABLE_POOL_ALLOC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_SurfaceObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SurfaceObjectControlState, &values->SurfaceObjectControlState); - uint32_t dw1 = - __gen_field(values->BindingTablePoolEnable, 11, 11) | - __gen_field(dw_SurfaceObjectControlState, 0, 6) | - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->BindingTablePoolBaseAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->BindingTablePoolBufferSize, 12, 31) | - 0; - -} - -#define GEN9_3DSTATE_BLEND_STATE_POINTERS_length_bias 0x00000002 -#define GEN9_3DSTATE_BLEND_STATE_POINTERS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 36, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_BLEND_STATE_POINTERS_length 0x00000002 - -struct GEN9_3DSTATE_BLEND_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t BlendStatePointer; - bool BlendStatePointerValid; -}; - -static inline void -GEN9_3DSTATE_BLEND_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_BLEND_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->BlendStatePointer, 6, 31) | - __gen_field(values->BlendStatePointerValid, 0, 0) | - 0; - -} - -#define GEN9_3DSTATE_CC_STATE_POINTERS_length_bias 0x00000002 -#define GEN9_3DSTATE_CC_STATE_POINTERS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 14, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_CC_STATE_POINTERS_length 0x00000002 - -struct GEN9_3DSTATE_CC_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ColorCalcStatePointer; - bool ColorCalcStatePointerValid; -}; - -static inline void -GEN9_3DSTATE_CC_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_CC_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->ColorCalcStatePointer, 6, 31) | - __gen_field(values->ColorCalcStatePointerValid, 0, 0) | - 0; - -} - -#define GEN9_3DSTATE_CHROMA_KEY_length_bias 0x00000002 -#define GEN9_3DSTATE_CHROMA_KEY_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 4, \ - .DwordLength = 2 - -#define GEN9_3DSTATE_CHROMA_KEY_length 0x00000004 - -struct GEN9_3DSTATE_CHROMA_KEY { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ChromaKeyTableIndex; - uint32_t ChromaKeyLowValue; - uint32_t ChromaKeyHighValue; -}; - -static inline void -GEN9_3DSTATE_CHROMA_KEY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_CHROMA_KEY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ChromaKeyTableIndex, 30, 31) | - 0; - - dw[2] = - __gen_field(values->ChromaKeyLowValue, 0, 31) | - 0; - - dw[3] = - __gen_field(values->ChromaKeyHighValue, 0, 31) | - 0; - -} - -#define GEN9_3DSTATE_CLEAR_PARAMS_length_bias 0x00000002 -#define GEN9_3DSTATE_CLEAR_PARAMS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 4, \ - .DwordLength = 1 - -#define GEN9_3DSTATE_CLEAR_PARAMS_length 0x00000003 - -struct GEN9_3DSTATE_CLEAR_PARAMS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - float DepthClearValue; - bool DepthClearValueValid; -}; - -static inline void -GEN9_3DSTATE_CLEAR_PARAMS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_CLEAR_PARAMS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_float(values->DepthClearValue) | - 0; - - dw[2] = - __gen_field(values->DepthClearValueValid, 0, 0) | - 0; - -} - -#define GEN9_3DSTATE_CLIP_length_bias 0x00000002 -#define GEN9_3DSTATE_CLIP_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 18, \ - .DwordLength = 2 - -#define GEN9_3DSTATE_CLIP_length 0x00000004 - -struct GEN9_3DSTATE_CLIP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define Normal 0 -#define Force 1 - bool ForceUserClipDistanceCullTestEnableBitmask; -#define _8Bit 0 -#define _4Bit 1 - uint32_t VertexSubPixelPrecisionSelect; - bool EarlyCullEnable; -#define Normal 0 -#define Force 1 - bool ForceUserClipDistanceClipTestEnableBitmask; -#define Normal 0 -#define Force 1 - bool ForceClipMode; - bool ClipperStatisticsEnable; - uint32_t UserClipDistanceCullTestEnableBitmask; - bool ClipEnable; -#define API_OGL 0 - uint32_t APIMode; - bool ViewportXYClipTestEnable; - bool GuardbandClipTestEnable; - uint32_t UserClipDistanceClipTestEnableBitmask; -#define NORMAL 0 -#define REJECT_ALL 3 -#define ACCEPT_ALL 4 - uint32_t ClipMode; - bool PerspectiveDivideDisable; - bool NonPerspectiveBarycentricEnable; - uint32_t TriangleStripListProvokingVertexSelect; - uint32_t LineStripListProvokingVertexSelect; - uint32_t TriangleFanProvokingVertexSelect; - float MinimumPointWidth; - float MaximumPointWidth; - bool ForceZeroRTAIndexEnable; - uint32_t MaximumVPIndex; -}; - -static inline void -GEN9_3DSTATE_CLIP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_CLIP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ForceUserClipDistanceCullTestEnableBitmask, 20, 20) | - __gen_field(values->VertexSubPixelPrecisionSelect, 19, 19) | - __gen_field(values->EarlyCullEnable, 18, 18) | - __gen_field(values->ForceUserClipDistanceClipTestEnableBitmask, 17, 17) | - __gen_field(values->ForceClipMode, 16, 16) | - __gen_field(values->ClipperStatisticsEnable, 10, 10) | - __gen_field(values->UserClipDistanceCullTestEnableBitmask, 0, 7) | - 0; - - dw[2] = - __gen_field(values->ClipEnable, 31, 31) | - __gen_field(values->APIMode, 30, 30) | - __gen_field(values->ViewportXYClipTestEnable, 28, 28) | - __gen_field(values->GuardbandClipTestEnable, 26, 26) | - __gen_field(values->UserClipDistanceClipTestEnableBitmask, 16, 23) | - __gen_field(values->ClipMode, 13, 15) | - __gen_field(values->PerspectiveDivideDisable, 9, 9) | - __gen_field(values->NonPerspectiveBarycentricEnable, 8, 8) | - __gen_field(values->TriangleStripListProvokingVertexSelect, 4, 5) | - __gen_field(values->LineStripListProvokingVertexSelect, 2, 3) | - __gen_field(values->TriangleFanProvokingVertexSelect, 0, 1) | - 0; - - dw[3] = - __gen_field(values->MinimumPointWidth * (1 << 3), 17, 27) | - __gen_field(values->MaximumPointWidth * (1 << 3), 6, 16) | - __gen_field(values->ForceZeroRTAIndexEnable, 5, 5) | - __gen_field(values->MaximumVPIndex, 0, 3) | - 0; - -} - -#define GEN9_3DSTATE_CONSTANT_DS_length_bias 0x00000002 -#define GEN9_3DSTATE_CONSTANT_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 26, \ - .DwordLength = 9 - -#define GEN9_3DSTATE_CONSTANT_DS_length 0x0000000b - -#define GEN9_3DSTATE_CONSTANT_BODY_length 0x0000000a - -struct GEN9_3DSTATE_CONSTANT_BODY { - uint32_t ConstantBuffer1ReadLength; - uint32_t ConstantBuffer0ReadLength; - uint32_t ConstantBuffer3ReadLength; - uint32_t ConstantBuffer2ReadLength; - __gen_address_type PointerToConstantBuffer0; - __gen_address_type PointerToConstantBuffer1; - __gen_address_type PointerToConstantBuffer2; - __gen_address_type PointerToConstantBuffer3; -}; - -static inline void -GEN9_3DSTATE_CONSTANT_BODY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_CONSTANT_BODY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->ConstantBuffer1ReadLength, 16, 31) | - __gen_field(values->ConstantBuffer0ReadLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->ConstantBuffer3ReadLength, 16, 31) | - __gen_field(values->ConstantBuffer2ReadLength, 0, 15) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->PointerToConstantBuffer0, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - uint32_t dw4 = - 0; - - uint64_t qw4 = - __gen_combine_address(data, &dw[4], values->PointerToConstantBuffer1, dw4); - - dw[4] = qw4; - dw[5] = qw4 >> 32; - - uint32_t dw6 = - 0; - - uint64_t qw6 = - __gen_combine_address(data, &dw[6], values->PointerToConstantBuffer2, dw6); - - dw[6] = qw6; - dw[7] = qw6 >> 32; - - uint32_t dw8 = - 0; - - uint64_t qw8 = - __gen_combine_address(data, &dw[8], values->PointerToConstantBuffer3, dw8); - - dw[8] = qw8; - dw[9] = qw8 >> 32; - -} - -struct GEN9_3DSTATE_CONSTANT_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState; - uint32_t DwordLength; - struct GEN9_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN9_3DSTATE_CONSTANT_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_CONSTANT_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_ConstantBufferObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState); - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(dw_ConstantBufferObjectControlState, 8, 14) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN9_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN9_3DSTATE_CONSTANT_GS_length_bias 0x00000002 -#define GEN9_3DSTATE_CONSTANT_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 22, \ - .DwordLength = 9 - -#define GEN9_3DSTATE_CONSTANT_GS_length 0x0000000b - -struct GEN9_3DSTATE_CONSTANT_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState; - uint32_t DwordLength; - struct GEN9_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN9_3DSTATE_CONSTANT_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_CONSTANT_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_ConstantBufferObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState); - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(dw_ConstantBufferObjectControlState, 8, 14) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN9_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN9_3DSTATE_CONSTANT_HS_length_bias 0x00000002 -#define GEN9_3DSTATE_CONSTANT_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 25, \ - .DwordLength = 9 - -#define GEN9_3DSTATE_CONSTANT_HS_length 0x0000000b - -struct GEN9_3DSTATE_CONSTANT_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState; - uint32_t DwordLength; - struct GEN9_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN9_3DSTATE_CONSTANT_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_CONSTANT_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_ConstantBufferObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState); - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(dw_ConstantBufferObjectControlState, 8, 14) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN9_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN9_3DSTATE_CONSTANT_PS_length_bias 0x00000002 -#define GEN9_3DSTATE_CONSTANT_PS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 23, \ - .DwordLength = 9 - -#define GEN9_3DSTATE_CONSTANT_PS_length 0x0000000b - -struct GEN9_3DSTATE_CONSTANT_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState; - uint32_t DwordLength; - struct GEN9_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN9_3DSTATE_CONSTANT_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_CONSTANT_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_ConstantBufferObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState); - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(dw_ConstantBufferObjectControlState, 8, 14) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN9_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN9_3DSTATE_CONSTANT_VS_length_bias 0x00000002 -#define GEN9_3DSTATE_CONSTANT_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 21, \ - .DwordLength = 9 - -#define GEN9_3DSTATE_CONSTANT_VS_length 0x0000000b - -struct GEN9_3DSTATE_CONSTANT_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE ConstantBufferObjectControlState; - uint32_t DwordLength; - struct GEN9_3DSTATE_CONSTANT_BODY ConstantBody; -}; - -static inline void -GEN9_3DSTATE_CONSTANT_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_CONSTANT_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_ConstantBufferObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_ConstantBufferObjectControlState, &values->ConstantBufferObjectControlState); - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(dw_ConstantBufferObjectControlState, 8, 14) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - GEN9_3DSTATE_CONSTANT_BODY_pack(data, &dw[1], &values->ConstantBody); -} - -#define GEN9_3DSTATE_DEPTH_BUFFER_length_bias 0x00000002 -#define GEN9_3DSTATE_DEPTH_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 5, \ - .DwordLength = 6 - -#define GEN9_3DSTATE_DEPTH_BUFFER_length 0x00000008 - -struct GEN9_3DSTATE_DEPTH_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define SURFTYPE_2D 1 -#define SURFTYPE_CUBE 3 -#define SURFTYPE_NULL 7 - uint32_t SurfaceType; - bool DepthWriteEnable; - bool StencilWriteEnable; - bool HierarchicalDepthBufferEnable; -#define D32_FLOAT 1 -#define D24_UNORM_X8_UINT 3 -#define D16_UNORM 5 - uint32_t SurfaceFormat; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; - uint32_t Height; - uint32_t Width; - uint32_t LOD; - uint32_t Depth; - uint32_t MinimumArrayElement; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE DepthBufferObjectControlState; -#define NONE 0 -#define TILEYF 1 -#define TILEYS 2 - uint32_t TiledResourceMode; - uint32_t MipTailStartLOD; - uint32_t RenderTargetViewExtent; - uint32_t SurfaceQPitch; -}; - -static inline void -GEN9_3DSTATE_DEPTH_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_DEPTH_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SurfaceType, 29, 31) | - __gen_field(values->DepthWriteEnable, 28, 28) | - __gen_field(values->StencilWriteEnable, 27, 27) | - __gen_field(values->HierarchicalDepthBufferEnable, 22, 22) | - __gen_field(values->SurfaceFormat, 18, 20) | - __gen_field(values->SurfacePitch, 0, 17) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - dw[4] = - __gen_field(values->Height, 18, 31) | - __gen_field(values->Width, 4, 17) | - __gen_field(values->LOD, 0, 3) | - 0; - - uint32_t dw_DepthBufferObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_DepthBufferObjectControlState, &values->DepthBufferObjectControlState); - dw[5] = - __gen_field(values->Depth, 21, 31) | - __gen_field(values->MinimumArrayElement, 10, 20) | - __gen_field(dw_DepthBufferObjectControlState, 0, 6) | - 0; - - dw[6] = - __gen_field(values->TiledResourceMode, 30, 31) | - __gen_field(values->MipTailStartLOD, 26, 29) | - 0; - - dw[7] = - __gen_field(values->RenderTargetViewExtent, 21, 31) | - __gen_field(values->SurfaceQPitch, 0, 14) | - 0; - -} - -#define GEN9_3DSTATE_DRAWING_RECTANGLE_length_bias 0x00000002 -#define GEN9_3DSTATE_DRAWING_RECTANGLE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 0, \ - .DwordLength = 2 - -#define GEN9_3DSTATE_DRAWING_RECTANGLE_length 0x00000004 - -struct GEN9_3DSTATE_DRAWING_RECTANGLE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; -#define Legacy 0 -#define Core0Enabled 1 -#define Core1Enabled 2 - uint32_t CoreModeSelect; - uint32_t DwordLength; - uint32_t ClippedDrawingRectangleYMin; - uint32_t ClippedDrawingRectangleXMin; - uint32_t ClippedDrawingRectangleYMax; - uint32_t ClippedDrawingRectangleXMax; - uint32_t DrawingRectangleOriginY; - uint32_t DrawingRectangleOriginX; -}; - -static inline void -GEN9_3DSTATE_DRAWING_RECTANGLE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_DRAWING_RECTANGLE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->CoreModeSelect, 14, 15) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ClippedDrawingRectangleYMin, 16, 31) | - __gen_field(values->ClippedDrawingRectangleXMin, 0, 15) | - 0; - - dw[2] = - __gen_field(values->ClippedDrawingRectangleYMax, 16, 31) | - __gen_field(values->ClippedDrawingRectangleXMax, 0, 15) | - 0; - - dw[3] = - __gen_field(values->DrawingRectangleOriginY, 16, 31) | - __gen_field(values->DrawingRectangleOriginX, 0, 15) | - 0; - -} - -#define GEN9_3DSTATE_DS_length_bias 0x00000002 -#define GEN9_3DSTATE_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 29, \ - .DwordLength = 9 - -#define GEN9_3DSTATE_DS_length 0x0000000b - -struct GEN9_3DSTATE_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint64_t KernelStartPointer; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define Normal 0 -#define High 1 - uint32_t ThreadDispatchPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool AccessesUAV; - bool IllegalOpcodeExceptionEnable; - bool SoftwareExceptionEnable; - uint64_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t DispatchGRFStartRegisterForURBData; - uint32_t PatchURBEntryReadLength; - uint32_t PatchURBEntryReadOffset; - uint32_t MaximumNumberofThreads; - bool StatisticsEnable; -#define SIMD4X2 0 -#define SIMD8_SINGLE_PATCH 1 -#define SIMD8_SINGLE_OR_DUAL_PATCH 2 - uint32_t DispatchMode; - bool ComputeWCoordinateEnable; - bool CacheDisable; - bool FunctionEnable; - uint32_t VertexURBEntryOutputReadOffset; - uint32_t VertexURBEntryOutputLength; - uint32_t UserClipDistanceClipTestEnableBitmask; - uint32_t UserClipDistanceCullTestEnableBitmask; - uint64_t DUAL_PATCHKernelStartPointer; -}; - -static inline void -GEN9_3DSTATE_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint64_t qw1 = - __gen_offset(values->KernelStartPointer, 6, 63) | - 0; - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->VectorMaskEnable, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadDispatchPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->AccessesUAV, 14, 14) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - uint64_t qw4 = - __gen_offset(values->ScratchSpaceBasePointer, 10, 63) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = qw4; - dw[5] = qw4 >> 32; - - dw[6] = - __gen_field(values->DispatchGRFStartRegisterForURBData, 20, 24) | - __gen_field(values->PatchURBEntryReadLength, 11, 17) | - __gen_field(values->PatchURBEntryReadOffset, 4, 9) | - 0; - - dw[7] = - __gen_field(values->MaximumNumberofThreads, 21, 29) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->DispatchMode, 3, 4) | - __gen_field(values->ComputeWCoordinateEnable, 2, 2) | - __gen_field(values->CacheDisable, 1, 1) | - __gen_field(values->FunctionEnable, 0, 0) | - 0; - - dw[8] = - __gen_field(values->VertexURBEntryOutputReadOffset, 21, 26) | - __gen_field(values->VertexURBEntryOutputLength, 16, 20) | - __gen_field(values->UserClipDistanceClipTestEnableBitmask, 8, 15) | - __gen_field(values->UserClipDistanceCullTestEnableBitmask, 0, 7) | - 0; - - uint64_t qw9 = - __gen_offset(values->DUAL_PATCHKernelStartPointer, 6, 63) | - 0; - - dw[9] = qw9; - dw[10] = qw9 >> 32; - -} - -#define GEN9_3DSTATE_GATHER_CONSTANT_DS_length_bias 0x00000002 -#define GEN9_3DSTATE_GATHER_CONSTANT_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 55 - -#define GEN9_3DSTATE_GATHER_CONSTANT_DS_length 0x00000000 - -#define GEN9_GATHER_CONSTANT_ENTRY_length 0x00000001 - -struct GEN9_GATHER_CONSTANT_ENTRY { - uint32_t ConstantBufferOffset; - uint32_t ChannelMask; - uint32_t BindingTableIndexOffset; -}; - -static inline void -GEN9_GATHER_CONSTANT_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_GATHER_CONSTANT_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_offset(values->ConstantBufferOffset, 8, 15) | - __gen_field(values->ChannelMask, 4, 7) | - __gen_field(values->BindingTableIndexOffset, 0, 3) | - 0; - -} - -struct GEN9_3DSTATE_GATHER_CONSTANT_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; -#define CommitGather 0 -#define NonCommitGather 1 - uint32_t UpdateGatherTableOnly; - uint32_t GatherBufferOffset; - bool ConstantBufferDx9GenerateStall; -#define Load 0 -#define Read 1 - uint32_t OnDieTable; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_GATHER_CONSTANT_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_GATHER_CONSTANT_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - __gen_field(values->UpdateGatherTableOnly, 1, 1) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - __gen_field(values->ConstantBufferDx9GenerateStall, 5, 5) | - __gen_field(values->OnDieTable, 3, 3) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_GATHER_CONSTANT_GS_length_bias 0x00000002 -#define GEN9_3DSTATE_GATHER_CONSTANT_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 53 - -#define GEN9_3DSTATE_GATHER_CONSTANT_GS_length 0x00000000 - -struct GEN9_3DSTATE_GATHER_CONSTANT_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; -#define CommitGather 0 -#define NonCommitGather 1 - uint32_t UpdateGatherTableOnly; - uint32_t GatherBufferOffset; - bool ConstantBufferDx9GenerateStall; -#define Load 0 -#define Read 1 - uint32_t OnDieTable; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_GATHER_CONSTANT_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_GATHER_CONSTANT_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - __gen_field(values->UpdateGatherTableOnly, 1, 1) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - __gen_field(values->ConstantBufferDx9GenerateStall, 5, 5) | - __gen_field(values->OnDieTable, 3, 3) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_GATHER_CONSTANT_HS_length_bias 0x00000002 -#define GEN9_3DSTATE_GATHER_CONSTANT_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 54 - -#define GEN9_3DSTATE_GATHER_CONSTANT_HS_length 0x00000000 - -struct GEN9_3DSTATE_GATHER_CONSTANT_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; -#define CommitGather 0 -#define NonCommitGather 1 - uint32_t UpdateGatherTableOnly; - uint32_t GatherBufferOffset; - bool ConstantBufferDx9GenerateStall; -#define Load 0 -#define Read 1 - uint32_t OnDieTable; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_GATHER_CONSTANT_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_GATHER_CONSTANT_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - __gen_field(values->UpdateGatherTableOnly, 1, 1) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - __gen_field(values->ConstantBufferDx9GenerateStall, 5, 5) | - __gen_field(values->OnDieTable, 3, 3) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_GATHER_CONSTANT_PS_length_bias 0x00000002 -#define GEN9_3DSTATE_GATHER_CONSTANT_PS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 56 - -#define GEN9_3DSTATE_GATHER_CONSTANT_PS_length 0x00000000 - -struct GEN9_3DSTATE_GATHER_CONSTANT_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; -#define CommitGather 0 -#define NonCommitGather 1 - uint32_t UpdateGatherTableOnly; - bool DX9OnDieRegisterReadEnable; - uint32_t GatherBufferOffset; - bool ConstantBufferDx9GenerateStall; - bool ConstantBufferDx9Enable; -#define Load 0 -#define Read 1 - uint32_t OnDieTable; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_GATHER_CONSTANT_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_GATHER_CONSTANT_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - __gen_field(values->UpdateGatherTableOnly, 1, 1) | - __gen_field(values->DX9OnDieRegisterReadEnable, 0, 0) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - __gen_field(values->ConstantBufferDx9GenerateStall, 5, 5) | - __gen_field(values->ConstantBufferDx9Enable, 4, 4) | - __gen_field(values->OnDieTable, 3, 3) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_GATHER_CONSTANT_VS_length_bias 0x00000002 -#define GEN9_3DSTATE_GATHER_CONSTANT_VS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 52 - -#define GEN9_3DSTATE_GATHER_CONSTANT_VS_length 0x00000000 - -struct GEN9_3DSTATE_GATHER_CONSTANT_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferValid; - uint32_t ConstantBufferBindingTableBlock; -#define CommitGather 0 -#define NonCommitGather 1 - uint32_t UpdateGatherTableOnly; - bool DX9OnDieRegisterReadEnable; - uint32_t GatherBufferOffset; - bool ConstantBufferDx9GenerateStall; - bool ConstantBufferDx9Enable; -#define Load 0 -#define Read 1 - uint32_t OnDieTable; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_GATHER_CONSTANT_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_GATHER_CONSTANT_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferValid, 16, 31) | - __gen_field(values->ConstantBufferBindingTableBlock, 12, 15) | - __gen_field(values->UpdateGatherTableOnly, 1, 1) | - __gen_field(values->DX9OnDieRegisterReadEnable, 0, 0) | - 0; - - dw[2] = - __gen_offset(values->GatherBufferOffset, 6, 22) | - __gen_field(values->ConstantBufferDx9GenerateStall, 5, 5) | - __gen_field(values->ConstantBufferDx9Enable, 4, 4) | - __gen_field(values->OnDieTable, 3, 3) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_GATHER_POOL_ALLOC_length_bias 0x00000002 -#define GEN9_3DSTATE_GATHER_POOL_ALLOC_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 26, \ - .DwordLength = 2 - -#define GEN9_3DSTATE_GATHER_POOL_ALLOC_length 0x00000004 - -struct GEN9_3DSTATE_GATHER_POOL_ALLOC { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - __gen_address_type GatherPoolBaseAddress; - bool GatherPoolEnable; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; - uint32_t GatherPoolBufferSize; -}; - -static inline void -GEN9_3DSTATE_GATHER_POOL_ALLOC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_GATHER_POOL_ALLOC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_MemoryObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState); - uint32_t dw1 = - __gen_field(values->GatherPoolEnable, 11, 11) | - __gen_field(dw_MemoryObjectControlState, 0, 6) | - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->GatherPoolBaseAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->GatherPoolBufferSize, 12, 31) | - 0; - -} - -#define GEN9_3DSTATE_GS_length_bias 0x00000002 -#define GEN9_3DSTATE_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 17, \ - .DwordLength = 8 - -#define GEN9_3DSTATE_GS_length 0x0000000a - -struct GEN9_3DSTATE_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint64_t KernelStartPointer; - uint32_t SingleProgramFlow; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define Normal 0 -#define High 1 - uint32_t ThreadDispatchPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool AccessesUAV; - bool MaskStackExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t ExpectedVertexCount; - uint64_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t DispatchGRFStartRegisterForURBData54; - uint32_t OutputVertexSize; - uint32_t OutputTopology; - uint32_t VertexURBEntryReadLength; - bool IncludeVertexHandles; - uint32_t VertexURBEntryReadOffset; - uint32_t DispatchGRFStartRegisterForURBData; - uint32_t ControlDataHeaderSize; - uint32_t InstanceControl; - uint32_t DefaultStreamId; -#define DispatchModeSingle 0 -#define DispatchModeDualInstance 1 -#define DispatchModeDualObject 2 -#define DispatchModeSIMD8 3 - uint32_t DispatchMode; - bool StatisticsEnable; - uint32_t InvocationsIncrementValue; - bool IncludePrimitiveID; - uint32_t Hint; -#define LEADING 0 -#define TRAILING 1 - uint32_t ReorderMode; - bool DiscardAdjacency; - bool Enable; -#define CUT 0 -#define SID 1 - uint32_t ControlDataFormat; - bool StaticOutput; - uint32_t StaticOutputVertexCount; - uint32_t MaximumNumberofThreads; - uint32_t VertexURBEntryOutputReadOffset; - uint32_t VertexURBEntryOutputLength; - uint32_t UserClipDistanceClipTestEnableBitmask; - uint32_t UserClipDistanceCullTestEnableBitmask; -}; - -static inline void -GEN9_3DSTATE_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint64_t qw1 = - __gen_offset(values->KernelStartPointer, 6, 63) | - 0; - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->SingleProgramFlow, 31, 31) | - __gen_field(values->VectorMaskEnable, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadDispatchPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->AccessesUAV, 12, 12) | - __gen_field(values->MaskStackExceptionEnable, 11, 11) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - __gen_field(values->ExpectedVertexCount, 0, 5) | - 0; - - uint64_t qw4 = - __gen_offset(values->ScratchSpaceBasePointer, 10, 63) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = qw4; - dw[5] = qw4 >> 32; - - dw[6] = - __gen_field(values->DispatchGRFStartRegisterForURBData54, 29, 30) | - __gen_field(values->OutputVertexSize, 23, 28) | - __gen_field(values->OutputTopology, 17, 22) | - __gen_field(values->VertexURBEntryReadLength, 11, 16) | - __gen_field(values->IncludeVertexHandles, 10, 10) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - __gen_field(values->DispatchGRFStartRegisterForURBData, 0, 3) | - 0; - - dw[7] = - __gen_field(values->ControlDataHeaderSize, 20, 23) | - __gen_field(values->InstanceControl, 15, 19) | - __gen_field(values->DefaultStreamId, 13, 14) | - __gen_field(values->DispatchMode, 11, 12) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->InvocationsIncrementValue, 5, 9) | - __gen_field(values->IncludePrimitiveID, 4, 4) | - __gen_field(values->Hint, 3, 3) | - __gen_field(values->ReorderMode, 2, 2) | - __gen_field(values->DiscardAdjacency, 1, 1) | - __gen_field(values->Enable, 0, 0) | - 0; - - dw[8] = - __gen_field(values->ControlDataFormat, 31, 31) | - __gen_field(values->StaticOutput, 30, 30) | - __gen_field(values->StaticOutputVertexCount, 16, 26) | - __gen_field(values->MaximumNumberofThreads, 0, 8) | - 0; - - dw[9] = - __gen_field(values->VertexURBEntryOutputReadOffset, 21, 26) | - __gen_field(values->VertexURBEntryOutputLength, 16, 20) | - __gen_field(values->UserClipDistanceClipTestEnableBitmask, 8, 15) | - __gen_field(values->UserClipDistanceCullTestEnableBitmask, 0, 7) | - 0; - -} - -#define GEN9_3DSTATE_HIER_DEPTH_BUFFER_length_bias 0x00000002 -#define GEN9_3DSTATE_HIER_DEPTH_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 7, \ - .DwordLength = 3 - -#define GEN9_3DSTATE_HIER_DEPTH_BUFFER_length 0x00000005 - -struct GEN9_3DSTATE_HIER_DEPTH_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE HierarchicalDepthBufferObjectControlState; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; - uint32_t SurfaceQPitch; -}; - -static inline void -GEN9_3DSTATE_HIER_DEPTH_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_HIER_DEPTH_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_HierarchicalDepthBufferObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_HierarchicalDepthBufferObjectControlState, &values->HierarchicalDepthBufferObjectControlState); - dw[1] = - __gen_field(dw_HierarchicalDepthBufferObjectControlState, 25, 31) | - __gen_field(values->SurfacePitch, 0, 16) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - dw[4] = - __gen_field(values->SurfaceQPitch, 0, 14) | - 0; - -} - -#define GEN9_3DSTATE_HS_length_bias 0x00000002 -#define GEN9_3DSTATE_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 27, \ - .DwordLength = 7 - -#define GEN9_3DSTATE_HS_length 0x00000009 - -struct GEN9_3DSTATE_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; - uint32_t BindingTableEntryCount; -#define Normal 0 -#define High 1 - uint32_t ThreadDispatchPriority; -#define IEEE754 0 -#define alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool SoftwareExceptionEnable; - bool Enable; - bool StatisticsEnable; - uint32_t MaximumNumberofThreads; - uint32_t InstanceCount; - uint64_t KernelStartPointer; - uint64_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t DispatchGRFStartRegisterForURBData5; - bool SingleProgramFlow; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; - bool AccessesUAV; - bool IncludeVertexHandles; - uint32_t DispatchGRFStartRegisterForURBData; -#define SINGLE_PATCH 0 -#define DUAL_PATCH 1 -#define _8_PATCH 2 - uint32_t DispatchMode; - uint32_t VertexURBEntryReadLength; - uint32_t VertexURBEntryReadOffset; - bool IncludePrimitiveID; -}; - -static inline void -GEN9_3DSTATE_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadDispatchPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->SoftwareExceptionEnable, 12, 12) | - 0; - - dw[2] = - __gen_field(values->Enable, 31, 31) | - __gen_field(values->StatisticsEnable, 29, 29) | - __gen_field(values->MaximumNumberofThreads, 8, 16) | - __gen_field(values->InstanceCount, 0, 3) | - 0; - - uint64_t qw3 = - __gen_offset(values->KernelStartPointer, 6, 63) | - 0; - - dw[3] = qw3; - dw[4] = qw3 >> 32; - - uint64_t qw5 = - __gen_offset(values->ScratchSpaceBasePointer, 10, 63) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[5] = qw5; - dw[6] = qw5 >> 32; - - dw[7] = - __gen_field(values->DispatchGRFStartRegisterForURBData5, 28, 28) | - __gen_field(values->SingleProgramFlow, 27, 27) | - __gen_field(values->VectorMaskEnable, 26, 26) | - __gen_field(values->AccessesUAV, 25, 25) | - __gen_field(values->IncludeVertexHandles, 24, 24) | - __gen_field(values->DispatchGRFStartRegisterForURBData, 19, 23) | - __gen_field(values->DispatchMode, 17, 18) | - __gen_field(values->VertexURBEntryReadLength, 11, 16) | - __gen_field(values->VertexURBEntryReadOffset, 4, 9) | - __gen_field(values->IncludePrimitiveID, 0, 0) | - 0; - - dw[8] = - 0; - -} - -#define GEN9_3DSTATE_INDEX_BUFFER_length_bias 0x00000002 -#define GEN9_3DSTATE_INDEX_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 10, \ - .DwordLength = 3 - -#define GEN9_3DSTATE_INDEX_BUFFER_length 0x00000005 - -struct GEN9_3DSTATE_INDEX_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define INDEX_BYTE 0 -#define INDEX_WORD 1 -#define INDEX_DWORD 2 - uint32_t IndexFormat; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; - __gen_address_type BufferStartingAddress; - uint32_t BufferSize; -}; - -static inline void -GEN9_3DSTATE_INDEX_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_INDEX_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_MemoryObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState); - dw[1] = - __gen_field(values->IndexFormat, 8, 9) | - __gen_field(dw_MemoryObjectControlState, 0, 6) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->BufferStartingAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - dw[4] = - __gen_field(values->BufferSize, 0, 31) | - 0; - -} - -#define GEN9_3DSTATE_LINE_STIPPLE_length_bias 0x00000002 -#define GEN9_3DSTATE_LINE_STIPPLE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 8, \ - .DwordLength = 1 - -#define GEN9_3DSTATE_LINE_STIPPLE_length 0x00000003 - -struct GEN9_3DSTATE_LINE_STIPPLE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool ModifyEnableCurrentRepeatCounterCurrentStippleIndex; - uint32_t CurrentRepeatCounter; - uint32_t CurrentStippleIndex; - uint32_t LineStipplePattern; - float LineStippleInverseRepeatCount; - uint32_t LineStippleRepeatCount; -}; - -static inline void -GEN9_3DSTATE_LINE_STIPPLE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_LINE_STIPPLE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ModifyEnableCurrentRepeatCounterCurrentStippleIndex, 31, 31) | - __gen_field(values->CurrentRepeatCounter, 21, 29) | - __gen_field(values->CurrentStippleIndex, 16, 19) | - __gen_field(values->LineStipplePattern, 0, 15) | - 0; - - dw[2] = - __gen_field(values->LineStippleInverseRepeatCount * (1 << 16), 15, 31) | - __gen_field(values->LineStippleRepeatCount, 0, 8) | - 0; - -} - -#define GEN9_3DSTATE_MONOFILTER_SIZE_length_bias 0x00000002 -#define GEN9_3DSTATE_MONOFILTER_SIZE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 17, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_MONOFILTER_SIZE_length 0x00000002 - -struct GEN9_3DSTATE_MONOFILTER_SIZE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t MonochromeFilterWidth; - uint32_t MonochromeFilterHeight; -}; - -static inline void -GEN9_3DSTATE_MONOFILTER_SIZE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_MONOFILTER_SIZE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->MonochromeFilterWidth, 3, 5) | - __gen_field(values->MonochromeFilterHeight, 0, 2) | - 0; - -} - -#define GEN9_3DSTATE_MULTISAMPLE_length_bias 0x00000002 -#define GEN9_3DSTATE_MULTISAMPLE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 13, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_MULTISAMPLE_length 0x00000002 - -struct GEN9_3DSTATE_MULTISAMPLE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PixelPositionOffsetEnable; -#define CENTER 0 -#define UL_CORNER 1 - uint32_t PixelLocation; - uint32_t NumberofMultisamples; -}; - -static inline void -GEN9_3DSTATE_MULTISAMPLE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_MULTISAMPLE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->PixelPositionOffsetEnable, 5, 5) | - __gen_field(values->PixelLocation, 4, 4) | - __gen_field(values->NumberofMultisamples, 1, 3) | - 0; - -} - -#define GEN9_3DSTATE_POLY_STIPPLE_OFFSET_length_bias 0x00000002 -#define GEN9_3DSTATE_POLY_STIPPLE_OFFSET_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 6, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_POLY_STIPPLE_OFFSET_length 0x00000002 - -struct GEN9_3DSTATE_POLY_STIPPLE_OFFSET { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PolygonStippleXOffset; - uint32_t PolygonStippleYOffset; -}; - -static inline void -GEN9_3DSTATE_POLY_STIPPLE_OFFSET_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_POLY_STIPPLE_OFFSET * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->PolygonStippleXOffset, 8, 12) | - __gen_field(values->PolygonStippleYOffset, 0, 4) | - 0; - -} - -#define GEN9_3DSTATE_POLY_STIPPLE_PATTERN_length_bias 0x00000002 -#define GEN9_3DSTATE_POLY_STIPPLE_PATTERN_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 7, \ - .DwordLength = 31 - -#define GEN9_3DSTATE_POLY_STIPPLE_PATTERN_length 0x00000021 - -struct GEN9_3DSTATE_POLY_STIPPLE_PATTERN { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PatternRow[32]; -}; - -static inline void -GEN9_3DSTATE_POLY_STIPPLE_PATTERN_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_POLY_STIPPLE_PATTERN * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - for (uint32_t i = 0, j = 1; i < 32; i += 1, j++) { - dw[j] = - __gen_field(values->PatternRow[i + 0], 0, 31) | - 0; - } - -} - -#define GEN9_3DSTATE_PS_length_bias 0x00000002 -#define GEN9_3DSTATE_PS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 32, \ - .DwordLength = 10 - -#define GEN9_3DSTATE_PS_length 0x0000000c - -struct GEN9_3DSTATE_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint64_t KernelStartPointer0; -#define Multiple 0 -#define Single 1 - uint32_t SingleProgramFlow; -#define Dmask 0 -#define Vmask 1 - uint32_t VectorMaskEnable; -#define NoSamplers 0 -#define _14Samplers 1 -#define _58Samplers 2 -#define _912Samplers 3 -#define _1316Samplers 4 - uint32_t SamplerCount; -#define FlushedtoZero 0 -#define Retained 1 - uint32_t SinglePrecisionDenormalMode; - uint32_t BindingTableEntryCount; -#define Normal 0 -#define High 1 - uint32_t ThreadDispatchPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; -#define RTNE 0 -#define RU 1 -#define RD 2 -#define RTZ 3 - uint32_t RoundingMode; - bool IllegalOpcodeExceptionEnable; - bool MaskStackExceptionEnable; - bool SoftwareExceptionEnable; - uint64_t ScratchSpaceBasePointer; - uint32_t PerThreadScratchSpace; - uint32_t MaximumNumberofThreadsPerPSD; - bool PushConstantEnable; - bool RenderTargetFastClearEnable; -#define RESOLVE_DISABLED 0 -#define RESOLVE_PARTIAL 1 -#define RESOLVE_FULL 3 - uint32_t RenderTargetResolveType; -#define POSOFFSET_NONE 0 -#define POSOFFSET_CENTROID 2 -#define POSOFFSET_SAMPLE 3 - uint32_t PositionXYOffsetSelect; - bool _32PixelDispatchEnable; - bool _16PixelDispatchEnable; - bool _8PixelDispatchEnable; - uint32_t DispatchGRFStartRegisterForConstantSetupData0; - uint32_t DispatchGRFStartRegisterForConstantSetupData1; - uint32_t DispatchGRFStartRegisterForConstantSetupData2; - uint64_t KernelStartPointer1; - uint64_t KernelStartPointer2; -}; - -static inline void -GEN9_3DSTATE_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint64_t qw1 = - __gen_offset(values->KernelStartPointer0, 6, 63) | - 0; - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->SingleProgramFlow, 31, 31) | - __gen_field(values->VectorMaskEnable, 30, 30) | - __gen_field(values->SamplerCount, 27, 29) | - __gen_field(values->SinglePrecisionDenormalMode, 26, 26) | - __gen_field(values->BindingTableEntryCount, 18, 25) | - __gen_field(values->ThreadDispatchPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->RoundingMode, 14, 15) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->MaskStackExceptionEnable, 11, 11) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - uint64_t qw4 = - __gen_offset(values->ScratchSpaceBasePointer, 10, 63) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[4] = qw4; - dw[5] = qw4 >> 32; - - dw[6] = - __gen_field(values->MaximumNumberofThreadsPerPSD, 23, 31) | - __gen_field(values->PushConstantEnable, 11, 11) | - __gen_field(values->RenderTargetFastClearEnable, 8, 8) | - __gen_field(values->RenderTargetResolveType, 6, 7) | - __gen_field(values->PositionXYOffsetSelect, 3, 4) | - __gen_field(values->_32PixelDispatchEnable, 2, 2) | - __gen_field(values->_16PixelDispatchEnable, 1, 1) | - __gen_field(values->_8PixelDispatchEnable, 0, 0) | - 0; - - dw[7] = - __gen_field(values->DispatchGRFStartRegisterForConstantSetupData0, 16, 22) | - __gen_field(values->DispatchGRFStartRegisterForConstantSetupData1, 8, 14) | - __gen_field(values->DispatchGRFStartRegisterForConstantSetupData2, 0, 6) | - 0; - - uint64_t qw8 = - __gen_offset(values->KernelStartPointer1, 6, 63) | - 0; - - dw[8] = qw8; - dw[9] = qw8 >> 32; - - uint64_t qw10 = - __gen_offset(values->KernelStartPointer2, 6, 63) | - 0; - - dw[10] = qw10; - dw[11] = qw10 >> 32; - -} - -#define GEN9_3DSTATE_PS_BLEND_length_bias 0x00000002 -#define GEN9_3DSTATE_PS_BLEND_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 77, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_PS_BLEND_length 0x00000002 - -struct GEN9_3DSTATE_PS_BLEND { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool AlphaToCoverageEnable; - bool HasWriteableRT; - bool ColorBufferBlendEnable; - uint32_t SourceAlphaBlendFactor; - uint32_t DestinationAlphaBlendFactor; - uint32_t SourceBlendFactor; - uint32_t DestinationBlendFactor; - bool AlphaTestEnable; - bool IndependentAlphaBlendEnable; -}; - -static inline void -GEN9_3DSTATE_PS_BLEND_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_PS_BLEND * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->AlphaToCoverageEnable, 31, 31) | - __gen_field(values->HasWriteableRT, 30, 30) | - __gen_field(values->ColorBufferBlendEnable, 29, 29) | - __gen_field(values->SourceAlphaBlendFactor, 24, 28) | - __gen_field(values->DestinationAlphaBlendFactor, 19, 23) | - __gen_field(values->SourceBlendFactor, 14, 18) | - __gen_field(values->DestinationBlendFactor, 9, 13) | - __gen_field(values->AlphaTestEnable, 8, 8) | - __gen_field(values->IndependentAlphaBlendEnable, 7, 7) | - 0; - -} - -#define GEN9_3DSTATE_PS_EXTRA_length_bias 0x00000002 -#define GEN9_3DSTATE_PS_EXTRA_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 79, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_PS_EXTRA_length 0x00000002 - -struct GEN9_3DSTATE_PS_EXTRA { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool PixelShaderValid; - bool PixelShaderDoesnotwritetoRT; - bool oMaskPresenttoRenderTarget; - bool PixelShaderKillsPixel; -#define PSCDEPTH_OFF 0 -#define PSCDEPTH_ON 1 -#define PSCDEPTH_ON_GE 2 -#define PSCDEPTH_ON_LE 3 - uint32_t PixelShaderComputedDepthMode; - bool ForceComputedDepth; - bool PixelShaderUsesSourceDepth; - bool PixelShaderUsesSourceW; - uint32_t Removed; - bool AttributeEnable; - bool PixelShaderDisablesAlphaToCoverage; - bool PixelShaderIsPerSample; - bool PixelShaderComputesStencil; - bool PixelShaderPullsBary; - bool PixelShaderHasUAV; -#define ICMS_NONE 0 -#define ICMS_NORMAL 1 -#define ICMS_INNER_CONSERVATIVE 2 -#define ICMS_DEPTH_COVERAGE 3 - uint32_t InputCoverageMaskState; -}; - -static inline void -GEN9_3DSTATE_PS_EXTRA_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_PS_EXTRA * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->PixelShaderValid, 31, 31) | - __gen_field(values->PixelShaderDoesnotwritetoRT, 30, 30) | - __gen_field(values->oMaskPresenttoRenderTarget, 29, 29) | - __gen_field(values->PixelShaderKillsPixel, 28, 28) | - __gen_field(values->PixelShaderComputedDepthMode, 26, 27) | - __gen_field(values->ForceComputedDepth, 25, 25) | - __gen_field(values->PixelShaderUsesSourceDepth, 24, 24) | - __gen_field(values->PixelShaderUsesSourceW, 23, 23) | - __gen_field(values->Removed, 17, 17) | - __gen_field(values->AttributeEnable, 8, 8) | - __gen_field(values->PixelShaderDisablesAlphaToCoverage, 7, 7) | - __gen_field(values->PixelShaderIsPerSample, 6, 6) | - __gen_field(values->PixelShaderComputesStencil, 5, 5) | - __gen_field(values->PixelShaderPullsBary, 3, 3) | - __gen_field(values->PixelShaderHasUAV, 2, 2) | - __gen_field(values->InputCoverageMaskState, 0, 1) | - 0; - -} - -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_DS_length_bias 0x00000002 -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 20, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_DS_length 0x00000002 - -struct GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_GS_length_bias 0x00000002 -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 21, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_GS_length 0x00000002 - -struct GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_HS_length_bias 0x00000002 -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 19, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_HS_length 0x00000002 - -struct GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_PS_length_bias 0x00000002 -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 22, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_PS_length 0x00000002 - -struct GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_VS_length_bias 0x00000002 -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 18, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_VS_length 0x00000002 - -struct GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ConstantBufferOffset; - uint32_t ConstantBufferSize; -}; - -static inline void -GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_PUSH_CONSTANT_ALLOC_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ConstantBufferOffset, 16, 20) | - __gen_field(values->ConstantBufferSize, 0, 5) | - 0; - -} - -#define GEN9_3DSTATE_RASTER_length_bias 0x00000002 -#define GEN9_3DSTATE_RASTER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 80, \ - .DwordLength = 3 - -#define GEN9_3DSTATE_RASTER_length 0x00000005 - -struct GEN9_3DSTATE_RASTER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool ViewportZFarClipTestEnable; - bool ConservativeRasterizationEnable; -#define DX9OGL 0 -#define DX100 1 -#define DX101 2 - uint32_t APIMode; -#define Clockwise 0 -#define CounterClockwise 1 - uint32_t FrontWinding; -#define FSC_NUMRASTSAMPLES_0 0 -#define FSC_NUMRASTSAMPLES_1 1 -#define FSC_NUMRASTSAMPLES_2 2 -#define FSC_NUMRASTSAMPLES_4 3 -#define FSC_NUMRASTSAMPLES_8 4 -#define FSC_NUMRASTSAMPLES_16 5 - uint32_t ForcedSampleCount; -#define CULLMODE_BOTH 0 -#define CULLMODE_NONE 1 -#define CULLMODE_FRONT 2 -#define CULLMODE_BACK 3 - uint32_t CullMode; -#define Normal 0 -#define Force 1 - uint32_t ForceMultisampling; - bool SmoothPointEnable; - bool DXMultisampleRasterizationEnable; -#define MSRASTMODE_OFF_PIXEL 0 -#define MSRASTMODE_OFF_PATTERN 1 -#define MSRASTMODE_ON_PIXEL 2 -#define MSRASTMODE_ON_PATTERN 3 - uint32_t DXMultisampleRasterizationMode; - bool GlobalDepthOffsetEnableSolid; - bool GlobalDepthOffsetEnableWireframe; - bool GlobalDepthOffsetEnablePoint; -#define RASTER_SOLID 0 -#define RASTER_WIREFRAME 1 -#define RASTER_POINT 2 - uint32_t FrontFaceFillMode; -#define RASTER_SOLID 0 -#define RASTER_WIREFRAME 1 -#define RASTER_POINT 2 - uint32_t BackFaceFillMode; - bool AntialiasingEnable; - bool ScissorRectangleEnable; - bool ViewportZNearClipTestEnable; - float GlobalDepthOffsetConstant; - float GlobalDepthOffsetScale; - float GlobalDepthOffsetClamp; -}; - -static inline void -GEN9_3DSTATE_RASTER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_RASTER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ViewportZFarClipTestEnable, 26, 26) | - __gen_field(values->ConservativeRasterizationEnable, 24, 24) | - __gen_field(values->APIMode, 22, 23) | - __gen_field(values->FrontWinding, 21, 21) | - __gen_field(values->ForcedSampleCount, 18, 20) | - __gen_field(values->CullMode, 16, 17) | - __gen_field(values->ForceMultisampling, 14, 14) | - __gen_field(values->SmoothPointEnable, 13, 13) | - __gen_field(values->DXMultisampleRasterizationEnable, 12, 12) | - __gen_field(values->DXMultisampleRasterizationMode, 10, 11) | - __gen_field(values->GlobalDepthOffsetEnableSolid, 9, 9) | - __gen_field(values->GlobalDepthOffsetEnableWireframe, 8, 8) | - __gen_field(values->GlobalDepthOffsetEnablePoint, 7, 7) | - __gen_field(values->FrontFaceFillMode, 5, 6) | - __gen_field(values->BackFaceFillMode, 3, 4) | - __gen_field(values->AntialiasingEnable, 2, 2) | - __gen_field(values->ScissorRectangleEnable, 1, 1) | - __gen_field(values->ViewportZNearClipTestEnable, 0, 0) | - 0; - - dw[2] = - __gen_float(values->GlobalDepthOffsetConstant) | - 0; - - dw[3] = - __gen_float(values->GlobalDepthOffsetScale) | - 0; - - dw[4] = - __gen_float(values->GlobalDepthOffsetClamp) | - 0; - -} - -#define GEN9_3DSTATE_RS_CONSTANT_POINTER_length_bias 0x00000002 -#define GEN9_3DSTATE_RS_CONSTANT_POINTER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 84, \ - .DwordLength = 2 - -#define GEN9_3DSTATE_RS_CONSTANT_POINTER_length 0x00000004 - -struct GEN9_3DSTATE_RS_CONSTANT_POINTER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define VS 0 -#define PS 4 - uint32_t ShaderSelect; -#define RS_STORE 0 -#define RS_LOAD 1 - uint32_t OperationLoadorStore; - __gen_address_type GlobalConstantBufferAddress; - __gen_address_type GlobalConstantBufferAddressHigh; -}; - -static inline void -GEN9_3DSTATE_RS_CONSTANT_POINTER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_RS_CONSTANT_POINTER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ShaderSelect, 28, 30) | - __gen_field(values->OperationLoadorStore, 12, 12) | - 0; - - uint32_t dw2 = - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->GlobalConstantBufferAddress, dw2); - - uint32_t dw3 = - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->GlobalConstantBufferAddressHigh, dw3); - -} - -#define GEN9_3DSTATE_SAMPLER_PALETTE_LOAD0_length_bias 0x00000002 -#define GEN9_3DSTATE_SAMPLER_PALETTE_LOAD0_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 2 - -#define GEN9_3DSTATE_SAMPLER_PALETTE_LOAD0_length 0x00000000 - -#define GEN9_PALETTE_ENTRY_length 0x00000001 - -struct GEN9_PALETTE_ENTRY { - uint32_t Alpha; - uint32_t Red; - uint32_t Green; - uint32_t Blue; -}; - -static inline void -GEN9_PALETTE_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_PALETTE_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->Alpha, 24, 31) | - __gen_field(values->Red, 16, 23) | - __gen_field(values->Green, 8, 15) | - __gen_field(values->Blue, 0, 7) | - 0; - -} - -struct GEN9_3DSTATE_SAMPLER_PALETTE_LOAD0 { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_SAMPLER_PALETTE_LOAD0_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SAMPLER_PALETTE_LOAD0 * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_SAMPLER_PALETTE_LOAD1_length_bias 0x00000002 -#define GEN9_3DSTATE_SAMPLER_PALETTE_LOAD1_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 12 - -#define GEN9_3DSTATE_SAMPLER_PALETTE_LOAD1_length 0x00000000 - -struct GEN9_3DSTATE_SAMPLER_PALETTE_LOAD1 { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_SAMPLER_PALETTE_LOAD1_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SAMPLER_PALETTE_LOAD1 * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_DS_length_bias 0x00000002 -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_DS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 45, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_DS_length 0x00000002 - -struct GEN9_3DSTATE_SAMPLER_STATE_POINTERS_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoDSSamplerState; -}; - -static inline void -GEN9_3DSTATE_SAMPLER_STATE_POINTERS_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SAMPLER_STATE_POINTERS_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoDSSamplerState, 5, 31) | - 0; - -} - -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_GS_length_bias 0x00000002 -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_GS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 46, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_GS_length 0x00000002 - -struct GEN9_3DSTATE_SAMPLER_STATE_POINTERS_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoGSSamplerState; -}; - -static inline void -GEN9_3DSTATE_SAMPLER_STATE_POINTERS_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SAMPLER_STATE_POINTERS_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoGSSamplerState, 5, 31) | - 0; - -} - -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_HS_length_bias 0x00000002 -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_HS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 44, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_HS_length 0x00000002 - -struct GEN9_3DSTATE_SAMPLER_STATE_POINTERS_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoHSSamplerState; -}; - -static inline void -GEN9_3DSTATE_SAMPLER_STATE_POINTERS_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SAMPLER_STATE_POINTERS_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoHSSamplerState, 5, 31) | - 0; - -} - -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_PS_length_bias 0x00000002 -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_PS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 47, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_PS_length 0x00000002 - -struct GEN9_3DSTATE_SAMPLER_STATE_POINTERS_PS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoPSSamplerState; -}; - -static inline void -GEN9_3DSTATE_SAMPLER_STATE_POINTERS_PS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SAMPLER_STATE_POINTERS_PS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoPSSamplerState, 5, 31) | - 0; - -} - -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_VS_length_bias 0x00000002 -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_VS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 43, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_SAMPLER_STATE_POINTERS_VS_length 0x00000002 - -struct GEN9_3DSTATE_SAMPLER_STATE_POINTERS_VS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PointertoVSSamplerState; -}; - -static inline void -GEN9_3DSTATE_SAMPLER_STATE_POINTERS_VS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SAMPLER_STATE_POINTERS_VS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->PointertoVSSamplerState, 5, 31) | - 0; - -} - -#define GEN9_3DSTATE_SAMPLE_MASK_length_bias 0x00000002 -#define GEN9_3DSTATE_SAMPLE_MASK_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 24, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_SAMPLE_MASK_length 0x00000002 - -struct GEN9_3DSTATE_SAMPLE_MASK { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SampleMask; -}; - -static inline void -GEN9_3DSTATE_SAMPLE_MASK_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SAMPLE_MASK * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SampleMask, 0, 15) | - 0; - -} - -#define GEN9_3DSTATE_SAMPLE_PATTERN_length_bias 0x00000002 -#define GEN9_3DSTATE_SAMPLE_PATTERN_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 28, \ - .DwordLength = 7 - -#define GEN9_3DSTATE_SAMPLE_PATTERN_length 0x00000009 - -struct GEN9_3DSTATE_SAMPLE_PATTERN { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - float _16xSample3XOffset; - float _16xSample3YOffset; - float _16xSample2XOffset; - float _16xSample2YOffset; - float _16xSample1XOffset; - float _16xSample1YOffset; - float _16xSample0XOffset; - float _16xSample0YOffset; - float _16xSample7XOffset; - float _16xSample7YOffset; - float _16xSample6XOffset; - float _16xSample6YOffset; - float _16xSample5XOffset; - float _16xSample5YOffset; - float _16xSample4XOffset; - float _16xSample4YOffset; - float _16xSample11XOffset; - float _16xSample11YOffset; - float _16xSample10XOffset; - float _16xSample10YOffset; - float _16xSample9XOffset; - float _16xSample9YOffset; - float _16xSample8XOffset; - float _16xSample8YOffset; - float _16xSample15XOffset; - float _16xSample15YOffset; - float _16xSample14XOffset; - float _16xSample14YOffset; - float _16xSample13XOffset; - float _16xSample13YOffset; - float _16xSample12XOffset; - float _16xSample12YOffset; - float _8xSample7XOffset; - float _8xSample7YOffset; - float _8xSample6XOffset; - float _8xSample6YOffset; - float _8xSample5XOffset; - float _8xSample5YOffset; - float _8xSample4XOffset; - float _8xSample4YOffset; - float _8xSample3XOffset; - float _8xSample3YOffset; - float _8xSample2XOffset; - float _8xSample2YOffset; - float _8xSample1XOffset; - float _8xSample1YOffset; - float _8xSample0XOffset; - float _8xSample0YOffset; - float _4xSample3XOffset; - float _4xSample3YOffset; - float _4xSample2XOffset; - float _4xSample2YOffset; - float _4xSample1XOffset; - float _4xSample1YOffset; - float _4xSample0XOffset; - float _4xSample0YOffset; - float _1xSample0XOffset; - float _1xSample0YOffset; - float _2xSample1XOffset; - float _2xSample1YOffset; - float _2xSample0XOffset; - float _2xSample0YOffset; -}; - -static inline void -GEN9_3DSTATE_SAMPLE_PATTERN_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SAMPLE_PATTERN * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->_16xSample3XOffset * (1 << 4), 28, 31) | - __gen_field(values->_16xSample3YOffset * (1 << 4), 24, 27) | - __gen_field(values->_16xSample2XOffset * (1 << 4), 20, 23) | - __gen_field(values->_16xSample2YOffset * (1 << 4), 16, 19) | - __gen_field(values->_16xSample1XOffset * (1 << 4), 12, 15) | - __gen_field(values->_16xSample1YOffset * (1 << 4), 8, 11) | - __gen_field(values->_16xSample0XOffset * (1 << 4), 4, 7) | - __gen_field(values->_16xSample0YOffset * (1 << 4), 0, 3) | - 0; - - dw[2] = - __gen_field(values->_16xSample7XOffset * (1 << 4), 28, 31) | - __gen_field(values->_16xSample7YOffset * (1 << 4), 24, 27) | - __gen_field(values->_16xSample6XOffset * (1 << 4), 20, 23) | - __gen_field(values->_16xSample6YOffset * (1 << 4), 16, 19) | - __gen_field(values->_16xSample5XOffset * (1 << 4), 12, 15) | - __gen_field(values->_16xSample5YOffset * (1 << 4), 8, 11) | - __gen_field(values->_16xSample4XOffset * (1 << 4), 4, 7) | - __gen_field(values->_16xSample4YOffset * (1 << 4), 0, 3) | - 0; - - dw[3] = - __gen_field(values->_16xSample11XOffset * (1 << 4), 28, 31) | - __gen_field(values->_16xSample11YOffset * (1 << 4), 24, 27) | - __gen_field(values->_16xSample10XOffset * (1 << 4), 20, 23) | - __gen_field(values->_16xSample10YOffset * (1 << 4), 16, 19) | - __gen_field(values->_16xSample9XOffset * (1 << 4), 12, 15) | - __gen_field(values->_16xSample9YOffset * (1 << 4), 8, 11) | - __gen_field(values->_16xSample8XOffset * (1 << 4), 4, 7) | - __gen_field(values->_16xSample8YOffset * (1 << 4), 0, 3) | - 0; - - dw[4] = - __gen_field(values->_16xSample15XOffset * (1 << 4), 28, 31) | - __gen_field(values->_16xSample15YOffset * (1 << 4), 24, 27) | - __gen_field(values->_16xSample14XOffset * (1 << 4), 20, 23) | - __gen_field(values->_16xSample14YOffset * (1 << 4), 16, 19) | - __gen_field(values->_16xSample13XOffset * (1 << 4), 12, 15) | - __gen_field(values->_16xSample13YOffset * (1 << 4), 8, 11) | - __gen_field(values->_16xSample12XOffset * (1 << 4), 4, 7) | - __gen_field(values->_16xSample12YOffset * (1 << 4), 0, 3) | - 0; - - dw[5] = - __gen_field(values->_8xSample7XOffset * (1 << 4), 28, 31) | - __gen_field(values->_8xSample7YOffset * (1 << 4), 24, 27) | - __gen_field(values->_8xSample6XOffset * (1 << 4), 20, 23) | - __gen_field(values->_8xSample6YOffset * (1 << 4), 16, 19) | - __gen_field(values->_8xSample5XOffset * (1 << 4), 12, 15) | - __gen_field(values->_8xSample5YOffset * (1 << 4), 8, 11) | - __gen_field(values->_8xSample4XOffset * (1 << 4), 4, 7) | - __gen_field(values->_8xSample4YOffset * (1 << 4), 0, 3) | - 0; - - dw[6] = - __gen_field(values->_8xSample3XOffset * (1 << 4), 28, 31) | - __gen_field(values->_8xSample3YOffset * (1 << 4), 24, 27) | - __gen_field(values->_8xSample2XOffset * (1 << 4), 20, 23) | - __gen_field(values->_8xSample2YOffset * (1 << 4), 16, 19) | - __gen_field(values->_8xSample1XOffset * (1 << 4), 12, 15) | - __gen_field(values->_8xSample1YOffset * (1 << 4), 8, 11) | - __gen_field(values->_8xSample0XOffset * (1 << 4), 4, 7) | - __gen_field(values->_8xSample0YOffset * (1 << 4), 0, 3) | - 0; - - dw[7] = - __gen_field(values->_4xSample3XOffset * (1 << 4), 28, 31) | - __gen_field(values->_4xSample3YOffset * (1 << 4), 24, 27) | - __gen_field(values->_4xSample2XOffset * (1 << 4), 20, 23) | - __gen_field(values->_4xSample2YOffset * (1 << 4), 16, 19) | - __gen_field(values->_4xSample1XOffset * (1 << 4), 12, 15) | - __gen_field(values->_4xSample1YOffset * (1 << 4), 8, 11) | - __gen_field(values->_4xSample0XOffset * (1 << 4), 4, 7) | - __gen_field(values->_4xSample0YOffset * (1 << 4), 0, 3) | - 0; - - dw[8] = - __gen_field(values->_1xSample0XOffset * (1 << 4), 20, 23) | - __gen_field(values->_1xSample0YOffset * (1 << 4), 16, 19) | - __gen_field(values->_2xSample1XOffset * (1 << 4), 12, 15) | - __gen_field(values->_2xSample1YOffset * (1 << 4), 8, 11) | - __gen_field(values->_2xSample0XOffset * (1 << 4), 4, 7) | - __gen_field(values->_2xSample0YOffset * (1 << 4), 0, 3) | - 0; - -} - -#define GEN9_3DSTATE_SBE_length_bias 0x00000002 -#define GEN9_3DSTATE_SBE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 31, \ - .DwordLength = 4 - -#define GEN9_3DSTATE_SBE_length 0x00000006 - -struct GEN9_3DSTATE_SBE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool ForceVertexURBEntryReadLength; - bool ForceVertexURBEntryReadOffset; - uint32_t NumberofSFOutputAttributes; - bool AttributeSwizzleEnable; -#define UPPERLEFT 0 -#define LOWERLEFT 1 - uint32_t PointSpriteTextureCoordinateOrigin; - bool PrimitiveIDOverrideComponentW; - bool PrimitiveIDOverrideComponentZ; - bool PrimitiveIDOverrideComponentY; - bool PrimitiveIDOverrideComponentX; - uint32_t VertexURBEntryReadLength; - uint32_t VertexURBEntryReadOffset; - uint32_t PrimitiveIDOverrideAttributeSelect; - uint32_t PointSpriteTextureCoordinateEnable; - uint32_t ConstantInterpolationEnable; - uint32_t Attribute15ActiveComponentFormat; - uint32_t Attribute14ActiveComponentFormat; - uint32_t Attribute13ActiveComponentFormat; - uint32_t Attribute12ActiveComponentFormat; - uint32_t Attribute11ActiveComponentFormat; - uint32_t Attribute10ActiveComponentFormat; - uint32_t Attribute9ActiveComponentFormat; - uint32_t Attribute8ActiveComponentFormat; - uint32_t Attribute7ActiveComponentFormat; - uint32_t Attribute6ActiveComponentFormat; - uint32_t Attribute5ActiveComponentFormat; - uint32_t Attribute4ActiveComponentFormat; - uint32_t Attribute3ActiveComponentFormat; - uint32_t Attribute2ActiveComponentFormat; - uint32_t Attribute1ActiveComponentFormat; - uint32_t Attribute0ActiveComponentFormat; - uint32_t Attribute31ActiveComponentFormat; - uint32_t Attribute30ActiveComponentFormat; - uint32_t Attribute29ActiveComponentFormat; - uint32_t Attribute28ActiveComponentFormat; - uint32_t Attribute27ActiveComponentFormat; - uint32_t Attribute26ActiveComponentFormat; - uint32_t Attribute25ActiveComponentFormat; - uint32_t Attribute24ActiveComponentFormat; - uint32_t Attribute23ActiveComponentFormat; - uint32_t Attribute22ActiveComponentFormat; - uint32_t Attribute21ActiveComponentFormat; - uint32_t Attribute20ActiveComponentFormat; - uint32_t Attribute19ActiveComponentFormat; - uint32_t Attribute18ActiveComponentFormat; - uint32_t Attribute17ActiveComponentFormat; - uint32_t Attribute16ActiveComponentFormat; -}; - -static inline void -GEN9_3DSTATE_SBE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SBE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ForceVertexURBEntryReadLength, 29, 29) | - __gen_field(values->ForceVertexURBEntryReadOffset, 28, 28) | - __gen_field(values->NumberofSFOutputAttributes, 22, 27) | - __gen_field(values->AttributeSwizzleEnable, 21, 21) | - __gen_field(values->PointSpriteTextureCoordinateOrigin, 20, 20) | - __gen_field(values->PrimitiveIDOverrideComponentW, 19, 19) | - __gen_field(values->PrimitiveIDOverrideComponentZ, 18, 18) | - __gen_field(values->PrimitiveIDOverrideComponentY, 17, 17) | - __gen_field(values->PrimitiveIDOverrideComponentX, 16, 16) | - __gen_field(values->VertexURBEntryReadLength, 11, 15) | - __gen_field(values->VertexURBEntryReadOffset, 5, 10) | - __gen_field(values->PrimitiveIDOverrideAttributeSelect, 0, 4) | - 0; - - dw[2] = - __gen_field(values->PointSpriteTextureCoordinateEnable, 0, 31) | - 0; - - dw[3] = - __gen_field(values->ConstantInterpolationEnable, 0, 31) | - 0; - - dw[4] = - __gen_field(values->Attribute15ActiveComponentFormat, 30, 31) | - __gen_field(values->Attribute14ActiveComponentFormat, 28, 29) | - __gen_field(values->Attribute13ActiveComponentFormat, 26, 27) | - __gen_field(values->Attribute12ActiveComponentFormat, 24, 25) | - __gen_field(values->Attribute11ActiveComponentFormat, 22, 23) | - __gen_field(values->Attribute10ActiveComponentFormat, 20, 21) | - __gen_field(values->Attribute9ActiveComponentFormat, 18, 19) | - __gen_field(values->Attribute8ActiveComponentFormat, 16, 17) | - __gen_field(values->Attribute7ActiveComponentFormat, 14, 15) | - __gen_field(values->Attribute6ActiveComponentFormat, 12, 13) | - __gen_field(values->Attribute5ActiveComponentFormat, 10, 11) | - __gen_field(values->Attribute4ActiveComponentFormat, 8, 9) | - __gen_field(values->Attribute3ActiveComponentFormat, 6, 7) | - __gen_field(values->Attribute2ActiveComponentFormat, 4, 5) | - __gen_field(values->Attribute1ActiveComponentFormat, 2, 3) | - __gen_field(values->Attribute0ActiveComponentFormat, 0, 1) | - 0; - - dw[5] = - __gen_field(values->Attribute31ActiveComponentFormat, 30, 31) | - __gen_field(values->Attribute30ActiveComponentFormat, 28, 29) | - __gen_field(values->Attribute29ActiveComponentFormat, 26, 27) | - __gen_field(values->Attribute28ActiveComponentFormat, 24, 25) | - __gen_field(values->Attribute27ActiveComponentFormat, 22, 23) | - __gen_field(values->Attribute26ActiveComponentFormat, 20, 21) | - __gen_field(values->Attribute25ActiveComponentFormat, 18, 19) | - __gen_field(values->Attribute24ActiveComponentFormat, 16, 17) | - __gen_field(values->Attribute23ActiveComponentFormat, 14, 15) | - __gen_field(values->Attribute22ActiveComponentFormat, 12, 13) | - __gen_field(values->Attribute21ActiveComponentFormat, 10, 11) | - __gen_field(values->Attribute20ActiveComponentFormat, 8, 9) | - __gen_field(values->Attribute19ActiveComponentFormat, 6, 7) | - __gen_field(values->Attribute18ActiveComponentFormat, 4, 5) | - __gen_field(values->Attribute17ActiveComponentFormat, 2, 3) | - __gen_field(values->Attribute16ActiveComponentFormat, 0, 1) | - 0; - -} - -#define GEN9_3DSTATE_SBE_SWIZ_length_bias 0x00000002 -#define GEN9_3DSTATE_SBE_SWIZ_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 81, \ - .DwordLength = 9 - -#define GEN9_3DSTATE_SBE_SWIZ_length 0x0000000b - -#define GEN9_SF_OUTPUT_ATTRIBUTE_DETAIL_length 0x00000001 - -struct GEN9_SF_OUTPUT_ATTRIBUTE_DETAIL { - bool ComponentOverrideW; - bool ComponentOverrideZ; - bool ComponentOverrideY; - bool ComponentOverrideX; - uint32_t SwizzleControlMode; -#define CONST_0000 0 -#define CONST_0001_FLOAT 1 -#define CONST_1111_FLOAT 2 -#define PRIM_ID 3 - uint32_t ConstantSource; -#define INPUTATTR 0 -#define INPUTATTR_FACING 1 -#define INPUTATTR_W 2 -#define INPUTATTR_FACING_W 3 - uint32_t SwizzleSelect; - uint32_t SourceAttribute; -}; - -static inline void -GEN9_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_SF_OUTPUT_ATTRIBUTE_DETAIL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->ComponentOverrideW, 15, 15) | - __gen_field(values->ComponentOverrideZ, 14, 14) | - __gen_field(values->ComponentOverrideY, 13, 13) | - __gen_field(values->ComponentOverrideX, 12, 12) | - __gen_field(values->SwizzleControlMode, 11, 11) | - __gen_field(values->ConstantSource, 9, 10) | - __gen_field(values->SwizzleSelect, 6, 7) | - __gen_field(values->SourceAttribute, 0, 4) | - 0; - -} - -struct GEN9_3DSTATE_SBE_SWIZ { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - struct GEN9_SF_OUTPUT_ATTRIBUTE_DETAIL Attribute[16]; - uint32_t AttributeWrapShortestEnables[16]; -}; - -static inline void -GEN9_3DSTATE_SBE_SWIZ_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SBE_SWIZ * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - for (uint32_t i = 0, j = 1; i < 16; i += 2, j++) { - uint32_t dw_Attribute0; - GEN9_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &dw_Attribute0, &values->Attribute[i + 0]); - uint32_t dw_Attribute1; - GEN9_SF_OUTPUT_ATTRIBUTE_DETAIL_pack(data, &dw_Attribute1, &values->Attribute[i + 1]); - dw[j] = - __gen_field(dw_Attribute0, 0, 15) | - __gen_field(dw_Attribute1, 16, 31) | - 0; - } - - for (uint32_t i = 0, j = 9; i < 16; i += 8, j++) { - dw[j] = - __gen_field(values->AttributeWrapShortestEnables[i + 0], 0, 3) | - __gen_field(values->AttributeWrapShortestEnables[i + 1], 4, 7) | - __gen_field(values->AttributeWrapShortestEnables[i + 2], 8, 11) | - __gen_field(values->AttributeWrapShortestEnables[i + 3], 12, 15) | - __gen_field(values->AttributeWrapShortestEnables[i + 4], 16, 19) | - __gen_field(values->AttributeWrapShortestEnables[i + 5], 20, 23) | - __gen_field(values->AttributeWrapShortestEnables[i + 6], 24, 27) | - __gen_field(values->AttributeWrapShortestEnables[i + 7], 28, 31) | - 0; - } - -} - -#define GEN9_3DSTATE_SCISSOR_STATE_POINTERS_length_bias 0x00000002 -#define GEN9_3DSTATE_SCISSOR_STATE_POINTERS_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 15, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_SCISSOR_STATE_POINTERS_length 0x00000002 - -struct GEN9_3DSTATE_SCISSOR_STATE_POINTERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t ScissorRectPointer; -}; - -static inline void -GEN9_3DSTATE_SCISSOR_STATE_POINTERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SCISSOR_STATE_POINTERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->ScissorRectPointer, 5, 31) | - 0; - -} - -#define GEN9_3DSTATE_SF_length_bias 0x00000002 -#define GEN9_3DSTATE_SF_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 19, \ - .DwordLength = 2 - -#define GEN9_3DSTATE_SF_length 0x00000004 - -struct GEN9_3DSTATE_SF { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - float LineWidth; - bool LegacyGlobalDepthBiasEnable; - bool StatisticsEnable; - bool ViewportTransformEnable; -#define _05pixels 0 -#define _10pixels 1 -#define _20pixels 2 -#define _40pixels 3 - uint32_t LineEndCapAntialiasingRegionWidth; - bool LastPixelEnable; - uint32_t TriangleStripListProvokingVertexSelect; - uint32_t LineStripListProvokingVertexSelect; - uint32_t TriangleFanProvokingVertexSelect; -#define AALINEDISTANCE_TRUE 1 - uint32_t AALineDistanceMode; - bool SmoothPointEnable; - uint32_t VertexSubPixelPrecisionSelect; -#define Vertex 0 -#define State 1 - uint32_t PointWidthSource; - float PointWidth; -}; - -static inline void -GEN9_3DSTATE_SF_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SF * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->LineWidth * (1 << 7), 12, 29) | - __gen_field(values->LegacyGlobalDepthBiasEnable, 11, 11) | - __gen_field(values->StatisticsEnable, 10, 10) | - __gen_field(values->ViewportTransformEnable, 1, 1) | - 0; - - dw[2] = - __gen_field(values->LineEndCapAntialiasingRegionWidth, 16, 17) | - 0; - - dw[3] = - __gen_field(values->LastPixelEnable, 31, 31) | - __gen_field(values->TriangleStripListProvokingVertexSelect, 29, 30) | - __gen_field(values->LineStripListProvokingVertexSelect, 27, 28) | - __gen_field(values->TriangleFanProvokingVertexSelect, 25, 26) | - __gen_field(values->AALineDistanceMode, 14, 14) | - __gen_field(values->SmoothPointEnable, 13, 13) | - __gen_field(values->VertexSubPixelPrecisionSelect, 12, 12) | - __gen_field(values->PointWidthSource, 11, 11) | - __gen_field(values->PointWidth * (1 << 3), 0, 10) | - 0; - -} - -#define GEN9_3DSTATE_SO_BUFFER_length_bias 0x00000002 -#define GEN9_3DSTATE_SO_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 24, \ - .DwordLength = 6 - -#define GEN9_3DSTATE_SO_BUFFER_length 0x00000008 - -struct GEN9_3DSTATE_SO_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool SOBufferEnable; - uint32_t SOBufferIndex; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE SOBufferObjectControlState; - bool StreamOffsetWriteEnable; - bool StreamOutputBufferOffsetAddressEnable; - __gen_address_type SurfaceBaseAddress; - uint32_t SurfaceSize; - __gen_address_type StreamOutputBufferOffsetAddress; - uint32_t StreamOffset; -}; - -static inline void -GEN9_3DSTATE_SO_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SO_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_SOBufferObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_SOBufferObjectControlState, &values->SOBufferObjectControlState); - dw[1] = - __gen_field(values->SOBufferEnable, 31, 31) | - __gen_field(values->SOBufferIndex, 29, 30) | - __gen_field(dw_SOBufferObjectControlState, 22, 28) | - __gen_field(values->StreamOffsetWriteEnable, 21, 21) | - __gen_field(values->StreamOutputBufferOffsetAddressEnable, 20, 20) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - dw[4] = - __gen_field(values->SurfaceSize, 0, 29) | - 0; - - uint32_t dw5 = - 0; - - uint64_t qw5 = - __gen_combine_address(data, &dw[5], values->StreamOutputBufferOffsetAddress, dw5); - - dw[5] = qw5; - dw[6] = qw5 >> 32; - - dw[7] = - __gen_field(values->StreamOffset, 0, 31) | - 0; - -} - -#define GEN9_3DSTATE_SO_DECL_LIST_length_bias 0x00000002 -#define GEN9_3DSTATE_SO_DECL_LIST_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 23 - -#define GEN9_3DSTATE_SO_DECL_LIST_length 0x00000000 - -#define GEN9_SO_DECL_ENTRY_length 0x00000002 - -#define GEN9_SO_DECL_length 0x00000001 - -struct GEN9_SO_DECL { - uint32_t OutputBufferSlot; - uint32_t HoleFlag; - uint32_t RegisterIndex; - uint32_t ComponentMask; -}; - -static inline void -GEN9_SO_DECL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_SO_DECL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->OutputBufferSlot, 12, 13) | - __gen_field(values->HoleFlag, 11, 11) | - __gen_field(values->RegisterIndex, 4, 9) | - __gen_field(values->ComponentMask, 0, 3) | - 0; - -} - -struct GEN9_SO_DECL_ENTRY { - struct GEN9_SO_DECL Stream3Decl; - struct GEN9_SO_DECL Stream2Decl; - struct GEN9_SO_DECL Stream1Decl; - struct GEN9_SO_DECL Stream0Decl; -}; - -static inline void -GEN9_SO_DECL_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_SO_DECL_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_Stream3Decl; - GEN9_SO_DECL_pack(data, &dw_Stream3Decl, &values->Stream3Decl); - uint32_t dw_Stream2Decl; - GEN9_SO_DECL_pack(data, &dw_Stream2Decl, &values->Stream2Decl); - uint32_t dw_Stream1Decl; - GEN9_SO_DECL_pack(data, &dw_Stream1Decl, &values->Stream1Decl); - uint32_t dw_Stream0Decl; - GEN9_SO_DECL_pack(data, &dw_Stream0Decl, &values->Stream0Decl); - uint64_t qw0 = - __gen_field(dw_Stream3Decl, 48, 63) | - __gen_field(dw_Stream2Decl, 32, 47) | - __gen_field(dw_Stream1Decl, 16, 31) | - __gen_field(dw_Stream0Decl, 0, 15) | - 0; - - dw[0] = qw0; - dw[1] = qw0 >> 32; - -} - -struct GEN9_3DSTATE_SO_DECL_LIST { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t StreamtoBufferSelects3; - uint32_t StreamtoBufferSelects2; - uint32_t StreamtoBufferSelects1; - uint32_t StreamtoBufferSelects0; - uint32_t NumEntries3; - uint32_t NumEntries2; - uint32_t NumEntries1; - uint32_t NumEntries0; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_SO_DECL_LIST_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_SO_DECL_LIST * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 8) | - 0; - - dw[1] = - __gen_field(values->StreamtoBufferSelects3, 12, 15) | - __gen_field(values->StreamtoBufferSelects2, 8, 11) | - __gen_field(values->StreamtoBufferSelects1, 4, 7) | - __gen_field(values->StreamtoBufferSelects0, 0, 3) | - 0; - - dw[2] = - __gen_field(values->NumEntries3, 24, 31) | - __gen_field(values->NumEntries2, 16, 23) | - __gen_field(values->NumEntries1, 8, 15) | - __gen_field(values->NumEntries0, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_STENCIL_BUFFER_length_bias 0x00000002 -#define GEN9_3DSTATE_STENCIL_BUFFER_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 6, \ - .DwordLength = 3 - -#define GEN9_3DSTATE_STENCIL_BUFFER_length 0x00000005 - -struct GEN9_3DSTATE_STENCIL_BUFFER { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t StencilBufferEnable; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE StencilBufferObjectControlState; - uint32_t SurfacePitch; - __gen_address_type SurfaceBaseAddress; - uint32_t SurfaceQPitch; -}; - -static inline void -GEN9_3DSTATE_STENCIL_BUFFER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_STENCIL_BUFFER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw_StencilBufferObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_StencilBufferObjectControlState, &values->StencilBufferObjectControlState); - dw[1] = - __gen_field(values->StencilBufferEnable, 31, 31) | - __gen_field(dw_StencilBufferObjectControlState, 22, 28) | - __gen_field(values->SurfacePitch, 0, 16) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->SurfaceBaseAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - dw[4] = - __gen_field(values->SurfaceQPitch, 0, 14) | - 0; - -} - -#define GEN9_3DSTATE_STREAMOUT_length_bias 0x00000002 -#define GEN9_3DSTATE_STREAMOUT_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 30, \ - .DwordLength = 3 - -#define GEN9_3DSTATE_STREAMOUT_length 0x00000005 - -struct GEN9_3DSTATE_STREAMOUT { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SOFunctionEnable; - uint32_t APIRenderingDisable; - uint32_t RenderStreamSelect; -#define LEADING 0 -#define TRAILING 1 - uint32_t ReorderMode; - bool SOStatisticsEnable; -#define Normal 0 -#define Resreved 1 -#define Force_Off 2 -#define Force_on 3 - uint32_t ForceRendering; - uint32_t Stream3VertexReadOffset; - uint32_t Stream3VertexReadLength; - uint32_t Stream2VertexReadOffset; - uint32_t Stream2VertexReadLength; - uint32_t Stream1VertexReadOffset; - uint32_t Stream1VertexReadLength; - uint32_t Stream0VertexReadOffset; - uint32_t Stream0VertexReadLength; - uint32_t Buffer1SurfacePitch; - uint32_t Buffer0SurfacePitch; - uint32_t Buffer3SurfacePitch; - uint32_t Buffer2SurfacePitch; -}; - -static inline void -GEN9_3DSTATE_STREAMOUT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_STREAMOUT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->SOFunctionEnable, 31, 31) | - __gen_field(values->APIRenderingDisable, 30, 30) | - __gen_field(values->RenderStreamSelect, 27, 28) | - __gen_field(values->ReorderMode, 26, 26) | - __gen_field(values->SOStatisticsEnable, 25, 25) | - __gen_field(values->ForceRendering, 23, 24) | - 0; - - dw[2] = - __gen_field(values->Stream3VertexReadOffset, 29, 29) | - __gen_field(values->Stream3VertexReadLength, 24, 28) | - __gen_field(values->Stream2VertexReadOffset, 21, 21) | - __gen_field(values->Stream2VertexReadLength, 16, 20) | - __gen_field(values->Stream1VertexReadOffset, 13, 13) | - __gen_field(values->Stream1VertexReadLength, 8, 12) | - __gen_field(values->Stream0VertexReadOffset, 5, 5) | - __gen_field(values->Stream0VertexReadLength, 0, 4) | - 0; - - dw[3] = - __gen_field(values->Buffer1SurfacePitch, 16, 27) | - __gen_field(values->Buffer0SurfacePitch, 0, 11) | - 0; - - dw[4] = - __gen_field(values->Buffer3SurfacePitch, 16, 27) | - __gen_field(values->Buffer2SurfacePitch, 0, 11) | - 0; - -} - -#define GEN9_3DSTATE_TE_length_bias 0x00000002 -#define GEN9_3DSTATE_TE_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 28, \ - .DwordLength = 2 - -#define GEN9_3DSTATE_TE_length 0x00000004 - -struct GEN9_3DSTATE_TE { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; -#define INTEGER 0 -#define ODD_FRACTIONAL 1 -#define EVEN_FRACTIONAL 2 - uint32_t Partitioning; -#define POINT 0 -#define OUTPUT_LINE 1 -#define OUTPUT_TRI_CW 2 -#define OUTPUT_TRI_CCW 3 - uint32_t OutputTopology; -#define QUAD 0 -#define TRI 1 -#define ISOLINE 2 - uint32_t TEDomain; -#define HW_TESS 0 - uint32_t TEMode; - bool TEEnable; - float MaximumTessellationFactorOdd; - float MaximumTessellationFactorNotOdd; -}; - -static inline void -GEN9_3DSTATE_TE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_TE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->Partitioning, 12, 13) | - __gen_field(values->OutputTopology, 8, 9) | - __gen_field(values->TEDomain, 4, 5) | - __gen_field(values->TEMode, 1, 2) | - __gen_field(values->TEEnable, 0, 0) | - 0; - - dw[2] = - __gen_float(values->MaximumTessellationFactorOdd) | - 0; - - dw[3] = - __gen_float(values->MaximumTessellationFactorNotOdd) | - 0; - -} - -#define GEN9_3DSTATE_URB_CLEAR_length_bias 0x00000002 -#define GEN9_3DSTATE_URB_CLEAR_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 1, \ - ._3DCommandSubOpcode = 29, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_URB_CLEAR_length 0x00000002 - -struct GEN9_3DSTATE_URB_CLEAR { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t URBClearLength; - uint32_t URBAddress; -}; - -static inline void -GEN9_3DSTATE_URB_CLEAR_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_URB_CLEAR * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->URBClearLength, 16, 29) | - __gen_offset(values->URBAddress, 0, 14) | - 0; - -} - -#define GEN9_3DSTATE_URB_DS_length_bias 0x00000002 -#define GEN9_3DSTATE_URB_DS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 50, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_URB_DS_length 0x00000002 - -struct GEN9_3DSTATE_URB_DS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t DSURBStartingAddress; - uint32_t DSURBEntryAllocationSize; - uint32_t DSNumberofURBEntries; -}; - -static inline void -GEN9_3DSTATE_URB_DS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_URB_DS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->DSURBStartingAddress, 25, 31) | - __gen_field(values->DSURBEntryAllocationSize, 16, 24) | - __gen_field(values->DSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN9_3DSTATE_URB_GS_length_bias 0x00000002 -#define GEN9_3DSTATE_URB_GS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 51, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_URB_GS_length 0x00000002 - -struct GEN9_3DSTATE_URB_GS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t GSURBStartingAddress; - uint32_t GSURBEntryAllocationSize; - uint32_t GSNumberofURBEntries; -}; - -static inline void -GEN9_3DSTATE_URB_GS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_URB_GS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->GSURBStartingAddress, 25, 31) | - __gen_field(values->GSURBEntryAllocationSize, 16, 24) | - __gen_field(values->GSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN9_3DSTATE_URB_HS_length_bias 0x00000002 -#define GEN9_3DSTATE_URB_HS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 49, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_URB_HS_length 0x00000002 - -struct GEN9_3DSTATE_URB_HS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t HSURBStartingAddress; - uint32_t HSURBEntryAllocationSize; - uint32_t HSNumberofURBEntries; -}; - -static inline void -GEN9_3DSTATE_URB_HS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_URB_HS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->HSURBStartingAddress, 25, 31) | - __gen_field(values->HSURBEntryAllocationSize, 16, 24) | - __gen_field(values->HSNumberofURBEntries, 0, 15) | - 0; - -} - -#define GEN9_3DSTATE_VERTEX_BUFFERS_length_bias 0x00000002 -#define GEN9_3DSTATE_VERTEX_BUFFERS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 8 - -#define GEN9_3DSTATE_VERTEX_BUFFERS_length 0x00000000 - -#define GEN9_VERTEX_BUFFER_STATE_length 0x00000004 - -struct GEN9_VERTEX_BUFFER_STATE { - uint32_t VertexBufferIndex; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; - uint32_t AddressModifyEnable; - bool NullVertexBuffer; - uint32_t BufferPitch; - __gen_address_type BufferStartingAddress; - uint32_t BufferSize; -}; - -static inline void -GEN9_VERTEX_BUFFER_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_VERTEX_BUFFER_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint32_t dw_MemoryObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState); - dw[0] = - __gen_field(values->VertexBufferIndex, 26, 31) | - __gen_field(dw_MemoryObjectControlState, 16, 22) | - __gen_field(values->AddressModifyEnable, 14, 14) | - __gen_field(values->NullVertexBuffer, 13, 13) | - __gen_field(values->BufferPitch, 0, 11) | - 0; - - uint32_t dw1 = - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->BufferStartingAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->BufferSize, 0, 31) | - 0; - -} - -struct GEN9_3DSTATE_VERTEX_BUFFERS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_VERTEX_BUFFERS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_VERTEX_BUFFERS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_VERTEX_ELEMENTS_length_bias 0x00000002 -#define GEN9_3DSTATE_VERTEX_ELEMENTS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 9 - -#define GEN9_3DSTATE_VERTEX_ELEMENTS_length 0x00000000 - -#define GEN9_VERTEX_ELEMENT_STATE_length 0x00000002 - -struct GEN9_VERTEX_ELEMENT_STATE { - uint32_t VertexBufferIndex; - bool Valid; - uint32_t SourceElementFormat; - bool EdgeFlagEnable; - uint32_t SourceElementOffset; - uint32_t Component0Control; - uint32_t Component1Control; - uint32_t Component2Control; - uint32_t Component3Control; -}; - -static inline void -GEN9_VERTEX_ELEMENT_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_VERTEX_ELEMENT_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->VertexBufferIndex, 26, 31) | - __gen_field(values->Valid, 25, 25) | - __gen_field(values->SourceElementFormat, 16, 24) | - __gen_field(values->EdgeFlagEnable, 15, 15) | - __gen_field(values->SourceElementOffset, 0, 11) | - 0; - - dw[1] = - __gen_field(values->Component0Control, 28, 30) | - __gen_field(values->Component1Control, 24, 26) | - __gen_field(values->Component2Control, 20, 22) | - __gen_field(values->Component3Control, 16, 18) | - 0; - -} - -struct GEN9_3DSTATE_VERTEX_ELEMENTS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - /* variable length fields follow */ -}; - -static inline void -GEN9_3DSTATE_VERTEX_ELEMENTS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_VERTEX_ELEMENTS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_3DSTATE_VF_length_bias 0x00000002 -#define GEN9_3DSTATE_VF_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 12, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_VF_length 0x00000002 - -struct GEN9_3DSTATE_VF { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - bool SequentialDrawCutIndexEnable; - bool ComponentPackingEnable; - bool IndexedDrawCutIndexEnable; - uint32_t DwordLength; - uint32_t CutIndex; -}; - -static inline void -GEN9_3DSTATE_VF_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_VF * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->SequentialDrawCutIndexEnable, 10, 10) | - __gen_field(values->ComponentPackingEnable, 9, 9) | - __gen_field(values->IndexedDrawCutIndexEnable, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->CutIndex, 0, 31) | - 0; - -} - -#define GEN9_3DSTATE_VF_COMPONENT_PACKING_length_bias 0x00000002 -#define GEN9_3DSTATE_VF_COMPONENT_PACKING_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 85, \ - .DwordLength = 3 - -#define GEN9_3DSTATE_VF_COMPONENT_PACKING_length 0x00000005 - -struct GEN9_3DSTATE_VF_COMPONENT_PACKING { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t VertexElement07Enables; - uint32_t VertexElement06Enables; - uint32_t VertexElement05Enables; - uint32_t VertexElement04Enables; - uint32_t VertexElement03Enables; - uint32_t VertexElement02Enables; - uint32_t VertexElement01Enables; - uint32_t VertexElement00Enables; - uint32_t VertexElement15Enables; - uint32_t VertexElement14Enables; - uint32_t VertexElement13Enables; - uint32_t VertexElement12Enables; - uint32_t VertexElement11Enables; - uint32_t VertexElement10Enables; - uint32_t VertexElement09Enables; - uint32_t VertexElement08Enables; - uint32_t VertexElement23Enables; - uint32_t VertexElement22Enables; - uint32_t VertexElement21Enables; - uint32_t VertexElement20Enables; - uint32_t VertexElement19Enables; - uint32_t VertexElement18Enables; - uint32_t VertexElement17Enables; - uint32_t VertexElement16Enables; - uint32_t VertexElement31Enables; - uint32_t VertexElement30Enables; - uint32_t VertexElement29Enables; - uint32_t VertexElement28Enables; - uint32_t VertexElement27Enables; - uint32_t VertexElement26Enables; - uint32_t VertexElement25Enables; - uint32_t VertexElement24Enables; -}; - -static inline void -GEN9_3DSTATE_VF_COMPONENT_PACKING_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_VF_COMPONENT_PACKING * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->VertexElement07Enables, 28, 31) | - __gen_field(values->VertexElement06Enables, 24, 27) | - __gen_field(values->VertexElement05Enables, 20, 23) | - __gen_field(values->VertexElement04Enables, 16, 19) | - __gen_field(values->VertexElement03Enables, 12, 15) | - __gen_field(values->VertexElement02Enables, 8, 11) | - __gen_field(values->VertexElement01Enables, 4, 7) | - __gen_field(values->VertexElement00Enables, 0, 3) | - 0; - - dw[2] = - __gen_field(values->VertexElement15Enables, 28, 31) | - __gen_field(values->VertexElement14Enables, 24, 27) | - __gen_field(values->VertexElement13Enables, 20, 23) | - __gen_field(values->VertexElement12Enables, 16, 19) | - __gen_field(values->VertexElement11Enables, 12, 15) | - __gen_field(values->VertexElement10Enables, 8, 11) | - __gen_field(values->VertexElement09Enables, 4, 7) | - __gen_field(values->VertexElement08Enables, 0, 3) | - 0; - - dw[3] = - __gen_field(values->VertexElement23Enables, 28, 31) | - __gen_field(values->VertexElement22Enables, 24, 27) | - __gen_field(values->VertexElement21Enables, 20, 23) | - __gen_field(values->VertexElement20Enables, 16, 19) | - __gen_field(values->VertexElement19Enables, 12, 15) | - __gen_field(values->VertexElement18Enables, 8, 11) | - __gen_field(values->VertexElement17Enables, 4, 7) | - __gen_field(values->VertexElement16Enables, 0, 3) | - 0; - - dw[4] = - __gen_field(values->VertexElement31Enables, 28, 31) | - __gen_field(values->VertexElement30Enables, 24, 27) | - __gen_field(values->VertexElement29Enables, 20, 23) | - __gen_field(values->VertexElement28Enables, 16, 19) | - __gen_field(values->VertexElement27Enables, 12, 15) | - __gen_field(values->VertexElement26Enables, 8, 11) | - __gen_field(values->VertexElement25Enables, 4, 7) | - __gen_field(values->VertexElement24Enables, 0, 3) | - 0; - -} - -#define GEN9_3DSTATE_VF_INSTANCING_length_bias 0x00000002 -#define GEN9_3DSTATE_VF_INSTANCING_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 73, \ - .DwordLength = 1 - -#define GEN9_3DSTATE_VF_INSTANCING_length 0x00000003 - -struct GEN9_3DSTATE_VF_INSTANCING { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool InstancingEnable; - uint32_t VertexElementIndex; - uint32_t InstanceDataStepRate; -}; - -static inline void -GEN9_3DSTATE_VF_INSTANCING_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_VF_INSTANCING * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->InstancingEnable, 8, 8) | - __gen_field(values->VertexElementIndex, 0, 5) | - 0; - - dw[2] = - __gen_field(values->InstanceDataStepRate, 0, 31) | - 0; - -} - -#define GEN9_3DSTATE_VF_SGVS_length_bias 0x00000002 -#define GEN9_3DSTATE_VF_SGVS_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 74, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_VF_SGVS_length 0x00000002 - -struct GEN9_3DSTATE_VF_SGVS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool InstanceIDEnable; -#define COMP_0 0 -#define COMP_1 1 -#define COMP_2 2 -#define COMP_3 3 - uint32_t InstanceIDComponentNumber; - uint32_t InstanceIDElementOffset; - bool VertexIDEnable; -#define COMP_0 0 -#define COMP_1 1 -#define COMP_2 2 -#define COMP_3 3 - uint32_t VertexIDComponentNumber; - uint32_t VertexIDElementOffset; -}; - -static inline void -GEN9_3DSTATE_VF_SGVS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_VF_SGVS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->InstanceIDEnable, 31, 31) | - __gen_field(values->InstanceIDComponentNumber, 29, 30) | - __gen_field(values->InstanceIDElementOffset, 16, 21) | - __gen_field(values->VertexIDEnable, 15, 15) | - __gen_field(values->VertexIDComponentNumber, 13, 14) | - __gen_field(values->VertexIDElementOffset, 0, 5) | - 0; - -} - -#define GEN9_3DSTATE_VF_STATISTICS_length_bias 0x00000001 -#define GEN9_3DSTATE_VF_STATISTICS_header \ - .CommandType = 3, \ - .CommandSubType = 1, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 11 - -#define GEN9_3DSTATE_VF_STATISTICS_length 0x00000001 - -struct GEN9_3DSTATE_VF_STATISTICS { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - bool StatisticsEnable; -}; - -static inline void -GEN9_3DSTATE_VF_STATISTICS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_VF_STATISTICS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->StatisticsEnable, 0, 0) | - 0; - -} - -#define GEN9_3DSTATE_VF_TOPOLOGY_length_bias 0x00000002 -#define GEN9_3DSTATE_VF_TOPOLOGY_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 75, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_VF_TOPOLOGY_length 0x00000002 - -struct GEN9_3DSTATE_VF_TOPOLOGY { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t PrimitiveTopologyType; -}; - -static inline void -GEN9_3DSTATE_VF_TOPOLOGY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_VF_TOPOLOGY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->PrimitiveTopologyType, 0, 5) | - 0; - -} - -#define GEN9_3DSTATE_VIEWPORT_STATE_POINTERS_CC_length_bias 0x00000002 -#define GEN9_3DSTATE_VIEWPORT_STATE_POINTERS_CC_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 35, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_VIEWPORT_STATE_POINTERS_CC_length 0x00000002 - -struct GEN9_3DSTATE_VIEWPORT_STATE_POINTERS_CC { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t CCViewportPointer; -}; - -static inline void -GEN9_3DSTATE_VIEWPORT_STATE_POINTERS_CC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_VIEWPORT_STATE_POINTERS_CC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->CCViewportPointer, 5, 31) | - 0; - -} - -#define GEN9_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_length_bias 0x00000002 -#define GEN9_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_header\ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 33, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_length 0x00000002 - -struct GEN9_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t SFClipViewportPointer; -}; - -static inline void -GEN9_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->SFClipViewportPointer, 6, 31) | - 0; - -} - -#define GEN9_3DSTATE_WM_length_bias 0x00000002 -#define GEN9_3DSTATE_WM_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 20, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_WM_length 0x00000002 - -struct GEN9_3DSTATE_WM { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool StatisticsEnable; - bool LegacyDepthBufferClearEnable; - bool LegacyDepthBufferResolveEnable; - bool LegacyHierarchicalDepthBufferResolveEnable; - bool LegacyDiamondLineRasterization; -#define NORMAL 0 -#define PSEXEC 1 -#define PREPS 2 - uint32_t EarlyDepthStencilControl; -#define Normal 0 -#define ForceOff 1 -#define ForceON 2 - uint32_t ForceThreadDispatchEnable; -#define INTERP_PIXEL 0 -#define INTERP_CENTROID 2 -#define INTERP_SAMPLE 3 - uint32_t PositionZWInterpolationMode; - uint32_t BarycentricInterpolationMode; -#define _05pixels 0 -#define _10pixels 1 -#define _20pixels 2 -#define _40pixels 3 - uint32_t LineEndCapAntialiasingRegionWidth; -#define _05pixels 0 -#define _10pixels 1 -#define _20pixels 2 -#define _40pixels 3 - uint32_t LineAntialiasingRegionWidth; - bool PolygonStippleEnable; - bool LineStippleEnable; -#define RASTRULE_UPPER_LEFT 0 -#define RASTRULE_UPPER_RIGHT 1 - uint32_t PointRasterizationRule; -#define Normal 0 -#define ForceOff 1 -#define ForceON 2 - uint32_t ForceKillPixelEnable; -}; - -static inline void -GEN9_3DSTATE_WM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_WM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->StatisticsEnable, 31, 31) | - __gen_field(values->LegacyDepthBufferClearEnable, 30, 30) | - __gen_field(values->LegacyDepthBufferResolveEnable, 28, 28) | - __gen_field(values->LegacyHierarchicalDepthBufferResolveEnable, 27, 27) | - __gen_field(values->LegacyDiamondLineRasterization, 26, 26) | - __gen_field(values->EarlyDepthStencilControl, 21, 22) | - __gen_field(values->ForceThreadDispatchEnable, 19, 20) | - __gen_field(values->PositionZWInterpolationMode, 17, 18) | - __gen_field(values->BarycentricInterpolationMode, 11, 16) | - __gen_field(values->LineEndCapAntialiasingRegionWidth, 8, 9) | - __gen_field(values->LineAntialiasingRegionWidth, 6, 7) | - __gen_field(values->PolygonStippleEnable, 4, 4) | - __gen_field(values->LineStippleEnable, 3, 3) | - __gen_field(values->PointRasterizationRule, 2, 2) | - __gen_field(values->ForceKillPixelEnable, 0, 1) | - 0; - -} - -#define GEN9_3DSTATE_WM_CHROMAKEY_length_bias 0x00000002 -#define GEN9_3DSTATE_WM_CHROMAKEY_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 76, \ - .DwordLength = 0 - -#define GEN9_3DSTATE_WM_CHROMAKEY_length 0x00000002 - -struct GEN9_3DSTATE_WM_CHROMAKEY { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool ChromaKeyKillEnable; -}; - -static inline void -GEN9_3DSTATE_WM_CHROMAKEY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_WM_CHROMAKEY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ChromaKeyKillEnable, 31, 31) | - 0; - -} - -#define GEN9_3DSTATE_WM_DEPTH_STENCIL_length_bias 0x00000002 -#define GEN9_3DSTATE_WM_DEPTH_STENCIL_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 78, \ - .DwordLength = 2 - -#define GEN9_3DSTATE_WM_DEPTH_STENCIL_length 0x00000004 - -struct GEN9_3DSTATE_WM_DEPTH_STENCIL { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - uint32_t StencilFailOp; - uint32_t StencilPassDepthFailOp; - uint32_t StencilPassDepthPassOp; - uint32_t BackfaceStencilTestFunction; - uint32_t BackfaceStencilFailOp; - uint32_t BackfaceStencilPassDepthFailOp; - uint32_t BackfaceStencilPassDepthPassOp; - uint32_t StencilTestFunction; - uint32_t DepthTestFunction; - bool DoubleSidedStencilEnable; - bool StencilTestEnable; - bool StencilBufferWriteEnable; - bool DepthTestEnable; - bool DepthBufferWriteEnable; - uint32_t StencilTestMask; - uint32_t StencilWriteMask; - uint32_t BackfaceStencilTestMask; - uint32_t BackfaceStencilWriteMask; - uint32_t StencilReferenceValue; - uint32_t BackfaceStencilReferenceValue; -}; - -static inline void -GEN9_3DSTATE_WM_DEPTH_STENCIL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_WM_DEPTH_STENCIL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->StencilFailOp, 29, 31) | - __gen_field(values->StencilPassDepthFailOp, 26, 28) | - __gen_field(values->StencilPassDepthPassOp, 23, 25) | - __gen_field(values->BackfaceStencilTestFunction, 20, 22) | - __gen_field(values->BackfaceStencilFailOp, 17, 19) | - __gen_field(values->BackfaceStencilPassDepthFailOp, 14, 16) | - __gen_field(values->BackfaceStencilPassDepthPassOp, 11, 13) | - __gen_field(values->StencilTestFunction, 8, 10) | - __gen_field(values->DepthTestFunction, 5, 7) | - __gen_field(values->DoubleSidedStencilEnable, 4, 4) | - __gen_field(values->StencilTestEnable, 3, 3) | - __gen_field(values->StencilBufferWriteEnable, 2, 2) | - __gen_field(values->DepthTestEnable, 1, 1) | - __gen_field(values->DepthBufferWriteEnable, 0, 0) | - 0; - - dw[2] = - __gen_field(values->StencilTestMask, 24, 31) | - __gen_field(values->StencilWriteMask, 16, 23) | - __gen_field(values->BackfaceStencilTestMask, 8, 15) | - __gen_field(values->BackfaceStencilWriteMask, 0, 7) | - 0; - - dw[3] = - __gen_field(values->StencilReferenceValue, 8, 15) | - __gen_field(values->BackfaceStencilReferenceValue, 0, 7) | - 0; - -} - -#define GEN9_3DSTATE_WM_HZ_OP_length_bias 0x00000002 -#define GEN9_3DSTATE_WM_HZ_OP_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 0, \ - ._3DCommandSubOpcode = 82, \ - .DwordLength = 3 - -#define GEN9_3DSTATE_WM_HZ_OP_length 0x00000005 - -struct GEN9_3DSTATE_WM_HZ_OP { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool StencilBufferClearEnable; - bool DepthBufferClearEnable; - bool ScissorRectangleEnable; - bool DepthBufferResolveEnable; - bool HierarchicalDepthBufferResolveEnable; - uint32_t PixelPositionOffsetEnable; - bool FullSurfaceDepthClear; - uint32_t StencilClearValue; - uint32_t NumberofMultisamples; - uint32_t ClearRectangleYMin; - uint32_t ClearRectangleXMin; - uint32_t ClearRectangleYMax; - uint32_t ClearRectangleXMax; - uint32_t SampleMask; -}; - -static inline void -GEN9_3DSTATE_WM_HZ_OP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_3DSTATE_WM_HZ_OP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->StencilBufferClearEnable, 31, 31) | - __gen_field(values->DepthBufferClearEnable, 30, 30) | - __gen_field(values->ScissorRectangleEnable, 29, 29) | - __gen_field(values->DepthBufferResolveEnable, 28, 28) | - __gen_field(values->HierarchicalDepthBufferResolveEnable, 27, 27) | - __gen_field(values->PixelPositionOffsetEnable, 26, 26) | - __gen_field(values->FullSurfaceDepthClear, 25, 25) | - __gen_field(values->StencilClearValue, 16, 23) | - __gen_field(values->NumberofMultisamples, 13, 15) | - 0; - - dw[2] = - __gen_field(values->ClearRectangleYMin, 16, 31) | - __gen_field(values->ClearRectangleXMin, 0, 15) | - 0; - - dw[3] = - __gen_field(values->ClearRectangleYMax, 16, 31) | - __gen_field(values->ClearRectangleXMax, 0, 15) | - 0; - - dw[4] = - __gen_field(values->SampleMask, 0, 15) | - 0; - -} - -#define GEN9_GPGPU_WALKER_length_bias 0x00000002 -#define GEN9_GPGPU_WALKER_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcode = 5, \ - .DwordLength = 13 - -#define GEN9_GPGPU_WALKER_length 0x0000000f - -struct GEN9_GPGPU_WALKER { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - bool IndirectParameterEnable; - bool PredicateEnable; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - uint32_t IndirectDataLength; - uint32_t IndirectDataStartAddress; -#define SIMD8 0 -#define SIMD16 1 -#define SIMD32 2 - uint32_t SIMDSize; - uint32_t ThreadDepthCounterMaximum; - uint32_t ThreadHeightCounterMaximum; - uint32_t ThreadWidthCounterMaximum; - uint32_t ThreadGroupIDStartingX; - uint32_t ThreadGroupIDXDimension; - uint32_t ThreadGroupIDStartingY; - uint32_t ThreadGroupIDYDimension; - uint32_t ThreadGroupIDStartingResumeZ; - uint32_t ThreadGroupIDZDimension; - uint32_t RightExecutionMask; - uint32_t BottomExecutionMask; -}; - -static inline void -GEN9_GPGPU_WALKER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_GPGPU_WALKER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->IndirectParameterEnable, 10, 10) | - __gen_field(values->PredicateEnable, 8, 8) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - dw[3] = - __gen_offset(values->IndirectDataStartAddress, 6, 31) | - 0; - - dw[4] = - __gen_field(values->SIMDSize, 30, 31) | - __gen_field(values->ThreadDepthCounterMaximum, 16, 21) | - __gen_field(values->ThreadHeightCounterMaximum, 8, 13) | - __gen_field(values->ThreadWidthCounterMaximum, 0, 5) | - 0; - - dw[5] = - __gen_field(values->ThreadGroupIDStartingX, 0, 31) | - 0; - - dw[6] = - 0; - - dw[7] = - __gen_field(values->ThreadGroupIDXDimension, 0, 31) | - 0; - - dw[8] = - __gen_field(values->ThreadGroupIDStartingY, 0, 31) | - 0; - - dw[9] = - 0; - - dw[10] = - __gen_field(values->ThreadGroupIDYDimension, 0, 31) | - 0; - - dw[11] = - __gen_field(values->ThreadGroupIDStartingResumeZ, 0, 31) | - 0; - - dw[12] = - __gen_field(values->ThreadGroupIDZDimension, 0, 31) | - 0; - - dw[13] = - __gen_field(values->RightExecutionMask, 0, 31) | - 0; - - dw[14] = - __gen_field(values->BottomExecutionMask, 0, 31) | - 0; - -} - -#define GEN9_MEDIA_CURBE_LOAD_length_bias 0x00000002 -#define GEN9_MEDIA_CURBE_LOAD_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 1, \ - .DwordLength = 2 - -#define GEN9_MEDIA_CURBE_LOAD_length 0x00000004 - -struct GEN9_MEDIA_CURBE_LOAD { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t CURBETotalDataLength; - uint32_t CURBEDataStartAddress; -}; - -static inline void -GEN9_MEDIA_CURBE_LOAD_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MEDIA_CURBE_LOAD * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - 0; - - dw[2] = - __gen_field(values->CURBETotalDataLength, 0, 16) | - 0; - - dw[3] = - __gen_field(values->CURBEDataStartAddress, 0, 31) | - 0; - -} - -#define GEN9_MEDIA_INTERFACE_DESCRIPTOR_LOAD_length_bias 0x00000002 -#define GEN9_MEDIA_INTERFACE_DESCRIPTOR_LOAD_header\ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 2, \ - .DwordLength = 2 - -#define GEN9_MEDIA_INTERFACE_DESCRIPTOR_LOAD_length 0x00000004 - -struct GEN9_MEDIA_INTERFACE_DESCRIPTOR_LOAD { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorTotalLength; - uint32_t InterfaceDescriptorDataStartAddress; -}; - -static inline void -GEN9_MEDIA_INTERFACE_DESCRIPTOR_LOAD_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MEDIA_INTERFACE_DESCRIPTOR_LOAD * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - 0; - - dw[2] = - __gen_field(values->InterfaceDescriptorTotalLength, 0, 16) | - 0; - - dw[3] = - __gen_offset(values->InterfaceDescriptorDataStartAddress, 0, 31) | - 0; - -} - -#define GEN9_MEDIA_OBJECT_length_bias 0x00000002 -#define GEN9_MEDIA_OBJECT_header \ - .CommandType = 3, \ - .MediaCommandPipeline = 2, \ - .MediaCommandOpcode = 1, \ - .MediaCommandSubOpcode = 0 - -#define GEN9_MEDIA_OBJECT_length 0x00000000 - -struct GEN9_MEDIA_OBJECT { - uint32_t CommandType; - uint32_t MediaCommandPipeline; - uint32_t MediaCommandOpcode; - uint32_t MediaCommandSubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - bool ChildrenPresent; - uint32_t SliceDestinationSelectMSBs; -#define Nothreadsynchronization 0 -#define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 - uint32_t ThreadSynchronization; - uint32_t ForceDestination; -#define Notusingscoreboard 0 -#define Usingscoreboard 1 - uint32_t UseScoreboard; -#define Slice0 0 -#define Slice1 1 -#define Slice2 2 - uint32_t SliceDestinationSelect; -#define Subslice3 3 -#define SubSlice2 2 -#define SubSlice1 1 -#define SubSlice0 0 - uint32_t SubSliceDestinationSelect; - uint32_t IndirectDataLength; - __gen_address_type IndirectDataStartAddress; - uint32_t ScoredboardY; - uint32_t ScoreboardX; - uint32_t ScoreboardColor; - bool ScoreboardMask; - /* variable length fields follow */ -}; - -static inline void -GEN9_MEDIA_OBJECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MEDIA_OBJECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MediaCommandPipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->MediaCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->ChildrenPresent, 31, 31) | - __gen_field(values->SliceDestinationSelectMSBs, 25, 26) | - __gen_field(values->ThreadSynchronization, 24, 24) | - __gen_field(values->ForceDestination, 22, 22) | - __gen_field(values->UseScoreboard, 21, 21) | - __gen_field(values->SliceDestinationSelect, 19, 20) | - __gen_field(values->SubSliceDestinationSelect, 17, 18) | - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - uint32_t dw3 = - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->IndirectDataStartAddress, dw3); - - dw[4] = - __gen_field(values->ScoredboardY, 16, 24) | - __gen_field(values->ScoreboardX, 0, 8) | - 0; - - dw[5] = - __gen_field(values->ScoreboardColor, 16, 19) | - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_MEDIA_OBJECT_GRPID_length_bias 0x00000002 -#define GEN9_MEDIA_OBJECT_GRPID_header \ - .CommandType = 3, \ - .MediaCommandPipeline = 2, \ - .MediaCommandOpcode = 1, \ - .MediaCommandSubOpcode = 6 - -#define GEN9_MEDIA_OBJECT_GRPID_length 0x00000000 - -struct GEN9_MEDIA_OBJECT_GRPID { - uint32_t CommandType; - uint32_t MediaCommandPipeline; - uint32_t MediaCommandOpcode; - uint32_t MediaCommandSubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - uint32_t SliceDestinationSelectMSB; - uint32_t EndofThreadGroup; - uint32_t ForceDestination; -#define Notusingscoreboard 0 -#define Usingscoreboard 1 - uint32_t UseScoreboard; -#define Slice0 0 -#define Slice1 1 -#define Slice2 2 - uint32_t SliceDestinationSelect; -#define Subslice3 3 -#define SubSlice2 2 -#define SubSlice1 1 -#define SubSlice0 0 - uint32_t SubSliceDestinationSelect; - uint32_t IndirectDataLength; - __gen_address_type IndirectDataStartAddress; - uint32_t ScoreboardY; - uint32_t ScoreboardX; - uint32_t ScoreboardColor; - bool ScoreboardMask; - uint32_t GroupID; - /* variable length fields follow */ -}; - -static inline void -GEN9_MEDIA_OBJECT_GRPID_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MEDIA_OBJECT_GRPID * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MediaCommandPipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->MediaCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->SliceDestinationSelectMSB, 24, 24) | - __gen_field(values->EndofThreadGroup, 23, 23) | - __gen_field(values->ForceDestination, 22, 22) | - __gen_field(values->UseScoreboard, 21, 21) | - __gen_field(values->SliceDestinationSelect, 19, 20) | - __gen_field(values->SubSliceDestinationSelect, 17, 18) | - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - uint32_t dw3 = - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->IndirectDataStartAddress, dw3); - - dw[4] = - __gen_field(values->ScoreboardY, 16, 24) | - __gen_field(values->ScoreboardX, 0, 8) | - 0; - - dw[5] = - __gen_field(values->ScoreboardColor, 16, 19) | - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - dw[6] = - __gen_field(values->GroupID, 0, 31) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_MEDIA_OBJECT_PRT_length_bias 0x00000002 -#define GEN9_MEDIA_OBJECT_PRT_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcode = 2, \ - .DwordLength = 14 - -#define GEN9_MEDIA_OBJECT_PRT_length 0x00000010 - -struct GEN9_MEDIA_OBJECT_PRT { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; - bool ChildrenPresent; - bool PRT_FenceNeeded; -#define Rootthreadqueue 0 -#define VFEstateflush 1 - uint32_t PRT_FenceType; - uint32_t InlineData[12]; -}; - -static inline void -GEN9_MEDIA_OBJECT_PRT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MEDIA_OBJECT_PRT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->ChildrenPresent, 31, 31) | - __gen_field(values->PRT_FenceNeeded, 23, 23) | - __gen_field(values->PRT_FenceType, 22, 22) | - 0; - - dw[3] = - 0; - - for (uint32_t i = 0, j = 4; i < 12; i += 1, j++) { - dw[j] = - __gen_field(values->InlineData[i + 0], 0, 31) | - 0; - } - -} - -#define GEN9_MEDIA_OBJECT_WALKER_length_bias 0x00000002 -#define GEN9_MEDIA_OBJECT_WALKER_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 1, \ - .SubOpcode = 3 - -#define GEN9_MEDIA_OBJECT_WALKER_length 0x00000000 - -struct GEN9_MEDIA_OBJECT_WALKER { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t InterfaceDescriptorOffset; -#define Nothreadsynchronization 0 -#define Threaddispatchissynchronizedbythespawnrootthreadmessage 1 - uint32_t ThreadSynchronization; - uint32_t MaskedDispatch; -#define Notusingscoreboard 0 -#define Usingscoreboard 1 - uint32_t UseScoreboard; - uint32_t IndirectDataLength; - uint32_t IndirectDataStartAddress; - uint32_t GroupIDLoopSelect; - bool ScoreboardMask; - uint32_t ColorCountMinusOne; - uint32_t MiddleLoopExtraSteps; - uint32_t LocalMidLoopUnitY; - uint32_t MidLoopUnitX; - uint32_t GlobalLoopExecCount; - uint32_t LocalLoopExecCount; - uint32_t BlockResolutionY; - uint32_t BlockResolutionX; - uint32_t LocalStartY; - uint32_t LocalStartX; - uint32_t LocalOuterLoopStrideY; - uint32_t LocalOuterLoopStrideX; - uint32_t LocalInnerLoopUnitY; - uint32_t LocalInnerLoopUnitX; - uint32_t GlobalResolutionY; - uint32_t GlobalResolutionX; - uint32_t GlobalStartY; - uint32_t GlobalStartX; - uint32_t GlobalOuterLoopStrideY; - uint32_t GlobalOuterLoopStrideX; - uint32_t GlobalInnerLoopUnitY; - uint32_t GlobalInnerLoopUnitX; - /* variable length fields follow */ -}; - -static inline void -GEN9_MEDIA_OBJECT_WALKER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MEDIA_OBJECT_WALKER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - - dw[2] = - __gen_field(values->ThreadSynchronization, 24, 24) | - __gen_field(values->MaskedDispatch, 22, 23) | - __gen_field(values->UseScoreboard, 21, 21) | - __gen_field(values->IndirectDataLength, 0, 16) | - 0; - - dw[3] = - __gen_field(values->IndirectDataStartAddress, 0, 31) | - 0; - - dw[4] = - 0; - - dw[5] = - __gen_field(values->GroupIDLoopSelect, 8, 31) | - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - dw[6] = - __gen_field(values->ColorCountMinusOne, 24, 27) | - __gen_field(values->MiddleLoopExtraSteps, 16, 20) | - __gen_field(values->LocalMidLoopUnitY, 12, 13) | - __gen_field(values->MidLoopUnitX, 8, 9) | - 0; - - dw[7] = - __gen_field(values->GlobalLoopExecCount, 16, 27) | - __gen_field(values->LocalLoopExecCount, 0, 11) | - 0; - - dw[8] = - __gen_field(values->BlockResolutionY, 16, 26) | - __gen_field(values->BlockResolutionX, 0, 10) | - 0; - - dw[9] = - __gen_field(values->LocalStartY, 16, 26) | - __gen_field(values->LocalStartX, 0, 10) | - 0; - - dw[10] = - 0; - - dw[11] = - __gen_field(values->LocalOuterLoopStrideY, 16, 27) | - __gen_field(values->LocalOuterLoopStrideX, 0, 11) | - 0; - - dw[12] = - __gen_field(values->LocalInnerLoopUnitY, 16, 27) | - __gen_field(values->LocalInnerLoopUnitX, 0, 11) | - 0; - - dw[13] = - __gen_field(values->GlobalResolutionY, 16, 26) | - __gen_field(values->GlobalResolutionX, 0, 10) | - 0; - - dw[14] = - __gen_field(values->GlobalStartY, 16, 27) | - __gen_field(values->GlobalStartX, 0, 11) | - 0; - - dw[15] = - __gen_field(values->GlobalOuterLoopStrideY, 16, 27) | - __gen_field(values->GlobalOuterLoopStrideX, 0, 11) | - 0; - - dw[16] = - __gen_field(values->GlobalInnerLoopUnitY, 16, 27) | - __gen_field(values->GlobalInnerLoopUnitX, 0, 11) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_MEDIA_STATE_FLUSH_length_bias 0x00000002 -#define GEN9_MEDIA_STATE_FLUSH_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 4, \ - .DwordLength = 0 - -#define GEN9_MEDIA_STATE_FLUSH_length 0x00000002 - -struct GEN9_MEDIA_STATE_FLUSH { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - bool FlushtoGO; - uint32_t WatermarkRequired; - uint32_t InterfaceDescriptorOffset; -}; - -static inline void -GEN9_MEDIA_STATE_FLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MEDIA_STATE_FLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_field(values->FlushtoGO, 7, 7) | - __gen_field(values->WatermarkRequired, 6, 6) | - __gen_field(values->InterfaceDescriptorOffset, 0, 5) | - 0; - -} - -#define GEN9_MEDIA_VFE_STATE_length_bias 0x00000002 -#define GEN9_MEDIA_VFE_STATE_header \ - .CommandType = 3, \ - .Pipeline = 2, \ - .MediaCommandOpcode = 0, \ - .SubOpcode = 0, \ - .DwordLength = 7 - -#define GEN9_MEDIA_VFE_STATE_length 0x00000009 - -struct GEN9_MEDIA_VFE_STATE { - uint32_t CommandType; - uint32_t Pipeline; - uint32_t MediaCommandOpcode; - uint32_t SubOpcode; - uint32_t DwordLength; - uint32_t ScratchSpaceBasePointer; - uint32_t StackSize; - uint32_t PerThreadScratchSpace; - uint32_t ScratchSpaceBasePointerHigh; - uint32_t MaximumNumberofThreads; - uint32_t NumberofURBEntries; -#define Maintainingtheexistingtimestampstate 0 -#define Resettingrelativetimerandlatchingtheglobaltimestamp 1 - uint32_t ResetGatewayTimer; - uint32_t SliceDisable; - uint32_t URBEntryAllocationSize; - uint32_t CURBEAllocationSize; -#define Scoreboarddisabled 0 -#define Scoreboardenabled 1 - uint32_t ScoreboardEnable; -#define StallingScoreboard 0 -#define NonStallingScoreboard 1 - uint32_t ScoreboardType; - uint32_t ScoreboardMask; - uint32_t Scoreboard3DeltaY; - uint32_t Scoreboard3DeltaX; - uint32_t Scoreboard2DeltaY; - uint32_t Scoreboard2DeltaX; - uint32_t Scoreboard1DeltaY; - uint32_t Scoreboard1DeltaX; - uint32_t Scoreboard0DeltaY; - uint32_t Scoreboard0DeltaX; - uint32_t Scoreboard7DeltaY; - uint32_t Scoreboard7DeltaX; - uint32_t Scoreboard6DeltaY; - uint32_t Scoreboard6DeltaX; - uint32_t Scoreboard5DeltaY; - uint32_t Scoreboard5DeltaX; - uint32_t Scoreboard4DeltaY; - uint32_t Scoreboard4DeltaX; -}; - -static inline void -GEN9_MEDIA_VFE_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MEDIA_VFE_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->Pipeline, 27, 28) | - __gen_field(values->MediaCommandOpcode, 24, 26) | - __gen_field(values->SubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 15) | - 0; - - dw[1] = - __gen_offset(values->ScratchSpaceBasePointer, 10, 31) | - __gen_field(values->StackSize, 4, 7) | - __gen_field(values->PerThreadScratchSpace, 0, 3) | - 0; - - dw[2] = - __gen_offset(values->ScratchSpaceBasePointerHigh, 0, 15) | - 0; - - dw[3] = - __gen_field(values->MaximumNumberofThreads, 16, 31) | - __gen_field(values->NumberofURBEntries, 8, 15) | - __gen_field(values->ResetGatewayTimer, 7, 7) | - 0; - - dw[4] = - __gen_field(values->SliceDisable, 0, 1) | - 0; - - dw[5] = - __gen_field(values->URBEntryAllocationSize, 16, 31) | - __gen_field(values->CURBEAllocationSize, 0, 15) | - 0; - - dw[6] = - __gen_field(values->ScoreboardEnable, 31, 31) | - __gen_field(values->ScoreboardType, 30, 30) | - __gen_field(values->ScoreboardMask, 0, 7) | - 0; - - dw[7] = - __gen_field(values->Scoreboard3DeltaY, 28, 31) | - __gen_field(values->Scoreboard3DeltaX, 24, 27) | - __gen_field(values->Scoreboard2DeltaY, 20, 23) | - __gen_field(values->Scoreboard2DeltaX, 16, 19) | - __gen_field(values->Scoreboard1DeltaY, 12, 15) | - __gen_field(values->Scoreboard1DeltaX, 8, 11) | - __gen_field(values->Scoreboard0DeltaY, 4, 7) | - __gen_field(values->Scoreboard0DeltaX, 0, 3) | - 0; - - dw[8] = - __gen_field(values->Scoreboard7DeltaY, 28, 31) | - __gen_field(values->Scoreboard7DeltaX, 24, 27) | - __gen_field(values->Scoreboard6DeltaY, 20, 23) | - __gen_field(values->Scoreboard6DeltaX, 16, 19) | - __gen_field(values->Scoreboard5DeltaY, 12, 15) | - __gen_field(values->Scoreboard5DeltaX, 8, 11) | - __gen_field(values->Scoreboard4DeltaY, 4, 7) | - __gen_field(values->Scoreboard4DeltaX, 0, 3) | - 0; - -} - -#define GEN9_MI_ARB_CHECK_length_bias 0x00000001 -#define GEN9_MI_ARB_CHECK_header \ - .CommandType = 0, \ - .MICommandOpcode = 5 - -#define GEN9_MI_ARB_CHECK_length 0x00000001 - -struct GEN9_MI_ARB_CHECK { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN9_MI_ARB_CHECK_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_ARB_CHECK * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN9_MI_BATCH_BUFFER_END_length_bias 0x00000001 -#define GEN9_MI_BATCH_BUFFER_END_header \ - .CommandType = 0, \ - .MICommandOpcode = 10 - -#define GEN9_MI_BATCH_BUFFER_END_length 0x00000001 - -struct GEN9_MI_BATCH_BUFFER_END { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN9_MI_BATCH_BUFFER_END_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_BATCH_BUFFER_END * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN9_MI_CLFLUSH_length_bias 0x00000002 -#define GEN9_MI_CLFLUSH_header \ - .CommandType = 0, \ - .MICommandOpcode = 39 - -#define GEN9_MI_CLFLUSH_length 0x00000000 - -struct GEN9_MI_CLFLUSH { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t UseGlobalGTT; - uint32_t DwordLength; - __gen_address_type PageBaseAddress; - uint32_t StartingCachelineOffset; - /* variable length fields follow */ -}; - -static inline void -GEN9_MI_CLFLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_CLFLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->DwordLength, 0, 9) | - 0; - - uint32_t dw1 = - __gen_field(values->StartingCachelineOffset, 6, 11) | - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->PageBaseAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - /* variable length fields follow */ -} - -#define GEN9_MI_COPY_MEM_MEM_length_bias 0x00000002 -#define GEN9_MI_COPY_MEM_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 46, \ - .DwordLength = 3 - -#define GEN9_MI_COPY_MEM_MEM_length 0x00000005 - -struct GEN9_MI_COPY_MEM_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t UseGlobalGTTSource; -#define PerProcessGraphicsAddress 0 -#define GlobalGraphicsAddress 1 - uint32_t UseGlobalGTTDestination; - uint32_t DwordLength; - __gen_address_type DestinationMemoryAddress; - __gen_address_type SourceMemoryAddress; -}; - -static inline void -GEN9_MI_COPY_MEM_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_COPY_MEM_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTTSource, 22, 22) | - __gen_field(values->UseGlobalGTTDestination, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->DestinationMemoryAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - uint32_t dw3 = - 0; - - uint64_t qw3 = - __gen_combine_address(data, &dw[3], values->SourceMemoryAddress, dw3); - - dw[3] = qw3; - dw[4] = qw3 >> 32; - -} - -#define GEN9_MI_DISPLAY_FLIP_length_bias 0x00000002 -#define GEN9_MI_DISPLAY_FLIP_header \ - .CommandType = 0, \ - .MICommandOpcode = 20 - -#define GEN9_MI_DISPLAY_FLIP_length 0x00000003 - -struct GEN9_MI_DISPLAY_FLIP { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool AsyncFlipIndicator; -#define DisplayPlane1 0 -#define DisplayPlane2 1 -#define DisplayPlane3 2 -#define DisplayPlane4 4 -#define DisplayPlane5 5 -#define DisplayPlane6 6 -#define DisplayPlane7 7 -#define DisplayPlane8 8 -#define DisplayPlane9 9 -#define DisplayPlane10 10 -#define DisplayPlane11 11 -#define DisplayPlane12 12 - uint32_t DisplayPlaneSelect; - uint32_t DwordLength; - bool Stereoscopic3DMode; - uint32_t DisplayBufferPitch; -#define Linear 0 -#define TiledX 1 -#define TiledYLegacyYB 4 -#define TiledYF 5 - bool TileParameter; - __gen_address_type DisplayBufferBaseAddress; -#define SyncFlip 0 -#define AsyncFlip 1 -#define Stereo3DFlip 2 - uint32_t FlipType; - __gen_address_type LeftEyeDisplayBufferBaseAddress; -}; - -static inline void -GEN9_MI_DISPLAY_FLIP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_DISPLAY_FLIP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->AsyncFlipIndicator, 22, 22) | - __gen_field(values->DisplayPlaneSelect, 8, 12) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->Stereoscopic3DMode, 31, 31) | - __gen_field(values->DisplayBufferPitch, 6, 15) | - __gen_field(values->TileParameter, 0, 2) | - 0; - - uint32_t dw2 = - __gen_field(values->FlipType, 0, 1) | - 0; - - dw[2] = - __gen_combine_address(data, &dw[2], values->DisplayBufferBaseAddress, dw2); - - uint32_t dw3 = - 0; - - dw[3] = - __gen_combine_address(data, &dw[3], values->LeftEyeDisplayBufferBaseAddress, dw3); - -} - -#define GEN9_MI_LOAD_REGISTER_MEM_length_bias 0x00000002 -#define GEN9_MI_LOAD_REGISTER_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 41, \ - .DwordLength = 2 - -#define GEN9_MI_LOAD_REGISTER_MEM_length 0x00000004 - -struct GEN9_MI_LOAD_REGISTER_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool UseGlobalGTT; - uint32_t AsyncModeEnable; - uint32_t DwordLength; - uint32_t RegisterAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN9_MI_LOAD_REGISTER_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_LOAD_REGISTER_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UseGlobalGTT, 22, 22) | - __gen_field(values->AsyncModeEnable, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_offset(values->RegisterAddress, 2, 22) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - -} - -#define GEN9_MI_LOAD_SCAN_LINES_EXCL_length_bias 0x00000002 -#define GEN9_MI_LOAD_SCAN_LINES_EXCL_header \ - .CommandType = 0, \ - .MICommandOpcode = 19, \ - .DwordLength = 0 - -#define GEN9_MI_LOAD_SCAN_LINES_EXCL_length 0x00000002 - -struct GEN9_MI_LOAD_SCAN_LINES_EXCL { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define DisplayPlaneA 0 -#define DisplayPlaneB 1 -#define DisplayPlaneC 4 - uint32_t DisplayPlaneSelect; - uint32_t DwordLength; - uint32_t StartScanLineNumber; - uint32_t EndScanLineNumber; -}; - -static inline void -GEN9_MI_LOAD_SCAN_LINES_EXCL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_LOAD_SCAN_LINES_EXCL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DisplayPlaneSelect, 19, 21) | - __gen_field(values->DwordLength, 0, 5) | - 0; - - dw[1] = - __gen_field(values->StartScanLineNumber, 16, 28) | - __gen_field(values->EndScanLineNumber, 0, 12) | - 0; - -} - -#define GEN9_MI_LOAD_SCAN_LINES_INCL_length_bias 0x00000002 -#define GEN9_MI_LOAD_SCAN_LINES_INCL_header \ - .CommandType = 0, \ - .MICommandOpcode = 18, \ - .DwordLength = 0 - -#define GEN9_MI_LOAD_SCAN_LINES_INCL_length 0x00000002 - -struct GEN9_MI_LOAD_SCAN_LINES_INCL { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define DisplayPlane1A 0 -#define DisplayPlane1B 1 -#define DisplayPlane1C 4 - uint32_t DisplayPlaneSelect; -#define NeverForward 0 -#define AlwaysForward 1 -#define ConditionallyForward 2 - bool ScanLineEventDoneForward; - uint32_t DwordLength; - uint32_t StartScanLineNumber; - uint32_t EndScanLineNumber; -}; - -static inline void -GEN9_MI_LOAD_SCAN_LINES_INCL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_LOAD_SCAN_LINES_INCL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DisplayPlaneSelect, 19, 21) | - __gen_field(values->ScanLineEventDoneForward, 17, 18) | - __gen_field(values->DwordLength, 0, 5) | - 0; - - dw[1] = - __gen_field(values->StartScanLineNumber, 16, 28) | - __gen_field(values->EndScanLineNumber, 0, 12) | - 0; - -} - -#define GEN9_MI_LOAD_URB_MEM_length_bias 0x00000002 -#define GEN9_MI_LOAD_URB_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 44, \ - .DwordLength = 2 - -#define GEN9_MI_LOAD_URB_MEM_length 0x00000004 - -struct GEN9_MI_LOAD_URB_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t URBAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN9_MI_LOAD_URB_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_LOAD_URB_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->URBAddress, 2, 14) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - -} - -#define GEN9_MI_MATH_length_bias 0x00000002 -#define GEN9_MI_MATH_header \ - .CommandType = 0, \ - .MICommandOpcode = 26 - -#define GEN9_MI_MATH_length 0x00000000 - -struct GEN9_MI_MATH { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t ALUINSTRUCTION1; - uint32_t ALUINSTRUCTION2; - /* variable length fields follow */ -}; - -static inline void -GEN9_MI_MATH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_MATH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->ALUINSTRUCTION1, 0, 31) | - 0; - - dw[2] = - __gen_field(values->ALUINSTRUCTION2, 0, 31) | - 0; - - /* variable length fields follow */ -} - -#define GEN9_MI_NOOP_length_bias 0x00000001 -#define GEN9_MI_NOOP_header \ - .CommandType = 0, \ - .MICommandOpcode = 0 - -#define GEN9_MI_NOOP_length 0x00000001 - -struct GEN9_MI_NOOP { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool IdentificationNumberRegisterWriteEnable; - uint32_t IdentificationNumber; -}; - -static inline void -GEN9_MI_NOOP_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_NOOP * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->IdentificationNumberRegisterWriteEnable, 22, 22) | - __gen_field(values->IdentificationNumber, 0, 21) | - 0; - -} - -#define GEN9_MI_PREDICATE_length_bias 0x00000001 -#define GEN9_MI_PREDICATE_header \ - .CommandType = 0, \ - .MICommandOpcode = 12 - -#define GEN9_MI_PREDICATE_length 0x00000001 - -struct GEN9_MI_PREDICATE { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define LOAD_KEEP 0 -#define LOAD_LOAD 2 -#define LOAD_LOADINV 3 - uint32_t LoadOperation; -#define COMBINE_SET 0 -#define COMBINE_AND 1 -#define COMBINE_OR 2 -#define COMBINE_XOR 3 - uint32_t CombineOperation; -#define COMPARE_SRCS_EQUAL 2 -#define COMPARE_DELTAS_EQUAL 3 - uint32_t CompareOperation; -}; - -static inline void -GEN9_MI_PREDICATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_PREDICATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->LoadOperation, 6, 7) | - __gen_field(values->CombineOperation, 3, 4) | - __gen_field(values->CompareOperation, 0, 1) | - 0; - -} - -#define GEN9_MI_REPORT_HEAD_length_bias 0x00000001 -#define GEN9_MI_REPORT_HEAD_header \ - .CommandType = 0, \ - .MICommandOpcode = 7 - -#define GEN9_MI_REPORT_HEAD_length 0x00000001 - -struct GEN9_MI_REPORT_HEAD { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN9_MI_REPORT_HEAD_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_REPORT_HEAD * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN9_MI_RS_CONTEXT_length_bias 0x00000001 -#define GEN9_MI_RS_CONTEXT_header \ - .CommandType = 0, \ - .MICommandOpcode = 15 - -#define GEN9_MI_RS_CONTEXT_length 0x00000001 - -struct GEN9_MI_RS_CONTEXT { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define RS_RESTORE 0 -#define RS_SAVE 1 - uint32_t ResourceStreamerSave; -}; - -static inline void -GEN9_MI_RS_CONTEXT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_RS_CONTEXT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->ResourceStreamerSave, 0, 0) | - 0; - -} - -#define GEN9_MI_RS_CONTROL_length_bias 0x00000001 -#define GEN9_MI_RS_CONTROL_header \ - .CommandType = 0, \ - .MICommandOpcode = 6 - -#define GEN9_MI_RS_CONTROL_length 0x00000001 - -struct GEN9_MI_RS_CONTROL { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define RS_STOP 0 -#define RS_START 1 - uint32_t ResourceStreamerControl; -}; - -static inline void -GEN9_MI_RS_CONTROL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_RS_CONTROL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->ResourceStreamerControl, 0, 0) | - 0; - -} - -#define GEN9_MI_RS_STORE_DATA_IMM_length_bias 0x00000002 -#define GEN9_MI_RS_STORE_DATA_IMM_header \ - .CommandType = 0, \ - .MICommandOpcode = 43, \ - .DwordLength = 2 - -#define GEN9_MI_RS_STORE_DATA_IMM_length 0x00000004 - -struct GEN9_MI_RS_STORE_DATA_IMM { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - __gen_address_type DestinationAddress; - uint32_t CoreModeEnable; - uint32_t DataDWord0; -}; - -static inline void -GEN9_MI_RS_STORE_DATA_IMM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_RS_STORE_DATA_IMM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - __gen_field(values->CoreModeEnable, 0, 0) | - 0; - - uint64_t qw1 = - __gen_combine_address(data, &dw[1], values->DestinationAddress, dw1); - - dw[1] = qw1; - dw[2] = qw1 >> 32; - - dw[3] = - __gen_field(values->DataDWord0, 0, 31) | - 0; - -} - -#define GEN9_MI_SET_CONTEXT_length_bias 0x00000002 -#define GEN9_MI_SET_CONTEXT_header \ - .CommandType = 0, \ - .MICommandOpcode = 24, \ - .DwordLength = 0 - -#define GEN9_MI_SET_CONTEXT_length 0x00000002 - -struct GEN9_MI_SET_CONTEXT { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - __gen_address_type LogicalContextAddress; - uint32_t ReservedMustbe1; - bool CoreModeEnable; - bool ResourceStreamerStateSaveEnable; - bool ResourceStreamerStateRestoreEnable; - uint32_t ForceRestore; - uint32_t RestoreInhibit; -}; - -static inline void -GEN9_MI_SET_CONTEXT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_SET_CONTEXT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - uint32_t dw1 = - __gen_field(values->ReservedMustbe1, 8, 8) | - __gen_field(values->CoreModeEnable, 4, 4) | - __gen_field(values->ResourceStreamerStateSaveEnable, 3, 3) | - __gen_field(values->ResourceStreamerStateRestoreEnable, 2, 2) | - __gen_field(values->ForceRestore, 1, 1) | - __gen_field(values->RestoreInhibit, 0, 0) | - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->LogicalContextAddress, dw1); - -} - -#define GEN9_MI_SET_PREDICATE_length_bias 0x00000001 -#define GEN9_MI_SET_PREDICATE_header \ - .CommandType = 0, \ - .MICommandOpcode = 1 - -#define GEN9_MI_SET_PREDICATE_length 0x00000001 - -struct GEN9_MI_SET_PREDICATE { - uint32_t CommandType; - uint32_t MICommandOpcode; -#define NOOPNever 0 -#define NOOPonResult2clear 1 -#define NOOPonResult2set 2 -#define NOOPonResultclear 3 -#define NOOPonResultset 4 -#define Executewhenonesliceenabled 5 -#define Executewhentwoslicesareenabled 6 -#define Executewhenthreeslicesareenabled 7 -#define NOOPAlways 15 - uint32_t PREDICATEENABLE; -}; - -static inline void -GEN9_MI_SET_PREDICATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_SET_PREDICATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->PREDICATEENABLE, 0, 3) | - 0; - -} - -#define GEN9_MI_STORE_DATA_INDEX_length_bias 0x00000002 -#define GEN9_MI_STORE_DATA_INDEX_header \ - .CommandType = 0, \ - .MICommandOpcode = 33, \ - .DwordLength = 1 - -#define GEN9_MI_STORE_DATA_INDEX_length 0x00000003 - -struct GEN9_MI_STORE_DATA_INDEX { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t UsePerProcessHardwareStatusPage; - uint32_t DwordLength; - uint32_t Offset; - uint32_t DataDWord0; - uint32_t DataDWord1; -}; - -static inline void -GEN9_MI_STORE_DATA_INDEX_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_STORE_DATA_INDEX * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->UsePerProcessHardwareStatusPage, 21, 21) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->Offset, 2, 11) | - 0; - - dw[2] = - __gen_field(values->DataDWord0, 0, 31) | - 0; - - dw[3] = - __gen_field(values->DataDWord1, 0, 31) | - 0; - -} - -#define GEN9_MI_STORE_URB_MEM_length_bias 0x00000002 -#define GEN9_MI_STORE_URB_MEM_header \ - .CommandType = 0, \ - .MICommandOpcode = 45, \ - .DwordLength = 2 - -#define GEN9_MI_STORE_URB_MEM_length 0x00000004 - -struct GEN9_MI_STORE_URB_MEM { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - uint32_t URBAddress; - __gen_address_type MemoryAddress; -}; - -static inline void -GEN9_MI_STORE_URB_MEM_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_STORE_URB_MEM * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->URBAddress, 2, 14) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->MemoryAddress, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - -} - -#define GEN9_MI_SUSPEND_FLUSH_length_bias 0x00000001 -#define GEN9_MI_SUSPEND_FLUSH_header \ - .CommandType = 0, \ - .MICommandOpcode = 11 - -#define GEN9_MI_SUSPEND_FLUSH_length 0x00000001 - -struct GEN9_MI_SUSPEND_FLUSH { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool SuspendFlush; -}; - -static inline void -GEN9_MI_SUSPEND_FLUSH_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_SUSPEND_FLUSH * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->SuspendFlush, 0, 0) | - 0; - -} - -#define GEN9_MI_TOPOLOGY_FILTER_length_bias 0x00000001 -#define GEN9_MI_TOPOLOGY_FILTER_header \ - .CommandType = 0, \ - .MICommandOpcode = 13 - -#define GEN9_MI_TOPOLOGY_FILTER_length 0x00000001 - -struct GEN9_MI_TOPOLOGY_FILTER { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t TopologyFilterValue; -}; - -static inline void -GEN9_MI_TOPOLOGY_FILTER_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_TOPOLOGY_FILTER * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->TopologyFilterValue, 0, 5) | - 0; - -} - -#define GEN9_MI_UPDATE_GTT_length_bias 0x00000002 -#define GEN9_MI_UPDATE_GTT_header \ - .CommandType = 0, \ - .MICommandOpcode = 35 - -#define GEN9_MI_UPDATE_GTT_length 0x00000000 - -struct GEN9_MI_UPDATE_GTT { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t DwordLength; - __gen_address_type EntryAddress; - /* variable length fields follow */ -}; - -static inline void -GEN9_MI_UPDATE_GTT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_UPDATE_GTT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DwordLength, 0, 9) | - 0; - - uint32_t dw1 = - 0; - - dw[1] = - __gen_combine_address(data, &dw[1], values->EntryAddress, dw1); - - /* variable length fields follow */ -} - -#define GEN9_MI_URB_ATOMIC_ALLOC_length_bias 0x00000001 -#define GEN9_MI_URB_ATOMIC_ALLOC_header \ - .CommandType = 0, \ - .MICommandOpcode = 9 - -#define GEN9_MI_URB_ATOMIC_ALLOC_length 0x00000001 - -struct GEN9_MI_URB_ATOMIC_ALLOC { - uint32_t CommandType; - uint32_t MICommandOpcode; - uint32_t URBAtomicStorageOffset; - uint32_t URBAtomicStorageSize; -}; - -static inline void -GEN9_MI_URB_ATOMIC_ALLOC_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_URB_ATOMIC_ALLOC * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->URBAtomicStorageOffset, 12, 19) | - __gen_field(values->URBAtomicStorageSize, 0, 8) | - 0; - -} - -#define GEN9_MI_USER_INTERRUPT_length_bias 0x00000001 -#define GEN9_MI_USER_INTERRUPT_header \ - .CommandType = 0, \ - .MICommandOpcode = 2 - -#define GEN9_MI_USER_INTERRUPT_length 0x00000001 - -struct GEN9_MI_USER_INTERRUPT { - uint32_t CommandType; - uint32_t MICommandOpcode; -}; - -static inline void -GEN9_MI_USER_INTERRUPT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_USER_INTERRUPT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - 0; - -} - -#define GEN9_MI_WAIT_FOR_EVENT_length_bias 0x00000001 -#define GEN9_MI_WAIT_FOR_EVENT_header \ - .CommandType = 0, \ - .MICommandOpcode = 3 - -#define GEN9_MI_WAIT_FOR_EVENT_length 0x00000001 - -struct GEN9_MI_WAIT_FOR_EVENT { - uint32_t CommandType; - uint32_t MICommandOpcode; - bool DisplayPlane1CVerticalBlankWaitEnable; - bool DisplayPlane6FlipPendingWaitEnable; - bool DisplayPlane12FlipPendingWaitEnable; - bool DisplayPlane11FlipPendingWaitEnable; - bool DisplayPlane10FlipPendingWaitEnable; - bool DisplayPlane9FlipPendingWaitEnable; - bool DisplayPlane3FlipPendingWaitEnable; - bool DisplayPlane1CScanLineWaitEnable; - bool DisplayPlane1BVerticalBlankWaitEnable; - bool DisplayPlane5FlipPendingWaitEnable; - bool DisplayPlane2FlipPendingWaitEnable; - bool DisplayPlane1BScanLineWaitEnable; - bool DisplayPlane8FlipPendingWaitEnable; - bool DisplayPlane7FlipPendingWaitEnable; - bool DisplayPlane1AVerticalBlankWaitEnable; - bool DisplayPlane4FlipPendingWaitEnable; - bool DisplayPlane1FlipPendingWaitEnable; - bool DisplayPlnae1AScanLineWaitEnable; -}; - -static inline void -GEN9_MI_WAIT_FOR_EVENT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_MI_WAIT_FOR_EVENT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->MICommandOpcode, 23, 28) | - __gen_field(values->DisplayPlane1CVerticalBlankWaitEnable, 21, 21) | - __gen_field(values->DisplayPlane6FlipPendingWaitEnable, 20, 20) | - __gen_field(values->DisplayPlane12FlipPendingWaitEnable, 19, 19) | - __gen_field(values->DisplayPlane11FlipPendingWaitEnable, 18, 18) | - __gen_field(values->DisplayPlane10FlipPendingWaitEnable, 17, 17) | - __gen_field(values->DisplayPlane9FlipPendingWaitEnable, 16, 16) | - __gen_field(values->DisplayPlane3FlipPendingWaitEnable, 15, 15) | - __gen_field(values->DisplayPlane1CScanLineWaitEnable, 14, 14) | - __gen_field(values->DisplayPlane1BVerticalBlankWaitEnable, 11, 11) | - __gen_field(values->DisplayPlane5FlipPendingWaitEnable, 10, 10) | - __gen_field(values->DisplayPlane2FlipPendingWaitEnable, 9, 9) | - __gen_field(values->DisplayPlane1BScanLineWaitEnable, 8, 8) | - __gen_field(values->DisplayPlane8FlipPendingWaitEnable, 7, 7) | - __gen_field(values->DisplayPlane7FlipPendingWaitEnable, 6, 6) | - __gen_field(values->DisplayPlane1AVerticalBlankWaitEnable, 3, 3) | - __gen_field(values->DisplayPlane4FlipPendingWaitEnable, 2, 2) | - __gen_field(values->DisplayPlane1FlipPendingWaitEnable, 1, 1) | - __gen_field(values->DisplayPlnae1AScanLineWaitEnable, 0, 0) | - 0; - -} - -#define GEN9_PIPE_CONTROL_length_bias 0x00000002 -#define GEN9_PIPE_CONTROL_header \ - .CommandType = 3, \ - .CommandSubType = 3, \ - ._3DCommandOpcode = 2, \ - ._3DCommandSubOpcode = 0, \ - .DwordLength = 4 - -#define GEN9_PIPE_CONTROL_length 0x00000006 - -struct GEN9_PIPE_CONTROL { - uint32_t CommandType; - uint32_t CommandSubType; - uint32_t _3DCommandOpcode; - uint32_t _3DCommandSubOpcode; - uint32_t DwordLength; - bool FlushLLC; -#define DAT_PPGTT 0 -#define DAT_GGTT 1 - uint32_t DestinationAddressType; -#define NoLRIOperation 0 -#define MMIOWriteImmediateData 1 - uint32_t LRIPostSyncOperation; - uint32_t StoreDataIndex; - uint32_t CommandStreamerStallEnable; -#define DontReset 0 -#define Reset 1 - uint32_t GlobalSnapshotCountReset; - uint32_t TLBInvalidate; - bool GenericMediaStateClear; -#define NoWrite 0 -#define WriteImmediateData 1 -#define WritePSDepthCount 2 -#define WriteTimestamp 3 - uint32_t PostSyncOperation; - bool DepthStallEnable; -#define DisableFlush 0 -#define EnableFlush 1 - bool RenderTargetCacheFlushEnable; - bool InstructionCacheInvalidateEnable; - bool TextureCacheInvalidationEnable; - bool IndirectStatePointersDisable; - bool NotifyEnable; - bool PipeControlFlushEnable; - bool DCFlushEnable; - bool VFCacheInvalidationEnable; - bool ConstantCacheInvalidationEnable; - bool StateCacheInvalidationEnable; - bool StallAtPixelScoreboard; -#define FlushDisabled 0 -#define FlushEnabled 1 - bool DepthCacheFlushEnable; - __gen_address_type Address; - uint64_t ImmediateData; -}; - -static inline void -GEN9_PIPE_CONTROL_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_PIPE_CONTROL * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->CommandType, 29, 31) | - __gen_field(values->CommandSubType, 27, 28) | - __gen_field(values->_3DCommandOpcode, 24, 26) | - __gen_field(values->_3DCommandSubOpcode, 16, 23) | - __gen_field(values->DwordLength, 0, 7) | - 0; - - dw[1] = - __gen_field(values->FlushLLC, 26, 26) | - __gen_field(values->DestinationAddressType, 24, 24) | - __gen_field(values->LRIPostSyncOperation, 23, 23) | - __gen_field(values->StoreDataIndex, 21, 21) | - __gen_field(values->CommandStreamerStallEnable, 20, 20) | - __gen_field(values->GlobalSnapshotCountReset, 19, 19) | - __gen_field(values->TLBInvalidate, 18, 18) | - __gen_field(values->GenericMediaStateClear, 16, 16) | - __gen_field(values->PostSyncOperation, 14, 15) | - __gen_field(values->DepthStallEnable, 13, 13) | - __gen_field(values->RenderTargetCacheFlushEnable, 12, 12) | - __gen_field(values->InstructionCacheInvalidateEnable, 11, 11) | - __gen_field(values->TextureCacheInvalidationEnable, 10, 10) | - __gen_field(values->IndirectStatePointersDisable, 9, 9) | - __gen_field(values->NotifyEnable, 8, 8) | - __gen_field(values->PipeControlFlushEnable, 7, 7) | - __gen_field(values->DCFlushEnable, 5, 5) | - __gen_field(values->VFCacheInvalidationEnable, 4, 4) | - __gen_field(values->ConstantCacheInvalidationEnable, 3, 3) | - __gen_field(values->StateCacheInvalidationEnable, 2, 2) | - __gen_field(values->StallAtPixelScoreboard, 1, 1) | - __gen_field(values->DepthCacheFlushEnable, 0, 0) | - 0; - - uint32_t dw2 = - 0; - - uint64_t qw2 = - __gen_combine_address(data, &dw[2], values->Address, dw2); - - dw[2] = qw2; - dw[3] = qw2 >> 32; - - uint64_t qw4 = - __gen_field(values->ImmediateData, 0, 63) | - 0; - - dw[4] = qw4; - dw[5] = qw4 >> 32; - -} - -#define GEN9_SCISSOR_RECT_length 0x00000002 - -struct GEN9_SCISSOR_RECT { - uint32_t ScissorRectangleYMin; - uint32_t ScissorRectangleXMin; - uint32_t ScissorRectangleYMax; - uint32_t ScissorRectangleXMax; -}; - -static inline void -GEN9_SCISSOR_RECT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_SCISSOR_RECT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->ScissorRectangleYMin, 16, 31) | - __gen_field(values->ScissorRectangleXMin, 0, 15) | - 0; - - dw[1] = - __gen_field(values->ScissorRectangleYMax, 16, 31) | - __gen_field(values->ScissorRectangleXMax, 0, 15) | - 0; - -} - -#define GEN9_SF_CLIP_VIEWPORT_length 0x00000010 - -struct GEN9_SF_CLIP_VIEWPORT { - float ViewportMatrixElementm00; - float ViewportMatrixElementm11; - float ViewportMatrixElementm22; - float ViewportMatrixElementm30; - float ViewportMatrixElementm31; - float ViewportMatrixElementm32; - float XMinClipGuardband; - float XMaxClipGuardband; - float YMinClipGuardband; - float YMaxClipGuardband; - float XMinViewPort; - float XMaxViewPort; - float YMinViewPort; - float YMaxViewPort; -}; - -static inline void -GEN9_SF_CLIP_VIEWPORT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_SF_CLIP_VIEWPORT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_float(values->ViewportMatrixElementm00) | - 0; - - dw[1] = - __gen_float(values->ViewportMatrixElementm11) | - 0; - - dw[2] = - __gen_float(values->ViewportMatrixElementm22) | - 0; - - dw[3] = - __gen_float(values->ViewportMatrixElementm30) | - 0; - - dw[4] = - __gen_float(values->ViewportMatrixElementm31) | - 0; - - dw[5] = - __gen_float(values->ViewportMatrixElementm32) | - 0; - - dw[6] = - 0; - - dw[7] = - 0; - - dw[8] = - __gen_float(values->XMinClipGuardband) | - 0; - - dw[9] = - __gen_float(values->XMaxClipGuardband) | - 0; - - dw[10] = - __gen_float(values->YMinClipGuardband) | - 0; - - dw[11] = - __gen_float(values->YMaxClipGuardband) | - 0; - - dw[12] = - __gen_float(values->XMinViewPort) | - 0; - - dw[13] = - __gen_float(values->XMaxViewPort) | - 0; - - dw[14] = - __gen_float(values->YMinViewPort) | - 0; - - dw[15] = - __gen_float(values->YMaxViewPort) | - 0; - -} - -#define GEN9_BLEND_STATE_length 0x00000011 - -#define GEN9_BLEND_STATE_ENTRY_length 0x00000002 - -struct GEN9_BLEND_STATE_ENTRY { - bool LogicOpEnable; - uint32_t LogicOpFunction; - uint32_t PreBlendSourceOnlyClampEnable; -#define COLORCLAMP_UNORM 0 -#define COLORCLAMP_SNORM 1 -#define COLORCLAMP_RTFORMAT 2 - uint32_t ColorClampRange; - bool PreBlendColorClampEnable; - bool PostBlendColorClampEnable; - bool ColorBufferBlendEnable; - uint32_t SourceBlendFactor; - uint32_t DestinationBlendFactor; - uint32_t ColorBlendFunction; - uint32_t SourceAlphaBlendFactor; - uint32_t DestinationAlphaBlendFactor; - uint32_t AlphaBlendFunction; - bool WriteDisableAlpha; - bool WriteDisableRed; - bool WriteDisableGreen; - bool WriteDisableBlue; -}; - -static inline void -GEN9_BLEND_STATE_ENTRY_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_BLEND_STATE_ENTRY * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - uint64_t qw0 = - __gen_field(values->LogicOpEnable, 63, 63) | - __gen_field(values->LogicOpFunction, 59, 62) | - __gen_field(values->PreBlendSourceOnlyClampEnable, 36, 36) | - __gen_field(values->ColorClampRange, 34, 35) | - __gen_field(values->PreBlendColorClampEnable, 33, 33) | - __gen_field(values->PostBlendColorClampEnable, 32, 32) | - __gen_field(values->ColorBufferBlendEnable, 31, 31) | - __gen_field(values->SourceBlendFactor, 26, 30) | - __gen_field(values->DestinationBlendFactor, 21, 25) | - __gen_field(values->ColorBlendFunction, 18, 20) | - __gen_field(values->SourceAlphaBlendFactor, 13, 17) | - __gen_field(values->DestinationAlphaBlendFactor, 8, 12) | - __gen_field(values->AlphaBlendFunction, 5, 7) | - __gen_field(values->WriteDisableAlpha, 3, 3) | - __gen_field(values->WriteDisableRed, 2, 2) | - __gen_field(values->WriteDisableGreen, 1, 1) | - __gen_field(values->WriteDisableBlue, 0, 0) | - 0; - - dw[0] = qw0; - dw[1] = qw0 >> 32; - -} - -struct GEN9_BLEND_STATE { - bool AlphaToCoverageEnable; - bool IndependentAlphaBlendEnable; - bool AlphaToOneEnable; - bool AlphaToCoverageDitherEnable; - bool AlphaTestEnable; - uint32_t AlphaTestFunction; - bool ColorDitherEnable; - uint32_t XDitherOffset; - uint32_t YDitherOffset; - struct GEN9_BLEND_STATE_ENTRY Entry[8]; -}; - -static inline void -GEN9_BLEND_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_BLEND_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->AlphaToCoverageEnable, 31, 31) | - __gen_field(values->IndependentAlphaBlendEnable, 30, 30) | - __gen_field(values->AlphaToOneEnable, 29, 29) | - __gen_field(values->AlphaToCoverageDitherEnable, 28, 28) | - __gen_field(values->AlphaTestEnable, 27, 27) | - __gen_field(values->AlphaTestFunction, 24, 26) | - __gen_field(values->ColorDitherEnable, 23, 23) | - __gen_field(values->XDitherOffset, 21, 22) | - __gen_field(values->YDitherOffset, 19, 20) | - 0; - - for (uint32_t i = 0, j = 1; i < 8; i++, j += 2) - GEN9_BLEND_STATE_ENTRY_pack(data, &dw[j], &values->Entry[i]); -} - -#define GEN9_CC_VIEWPORT_length 0x00000002 - -struct GEN9_CC_VIEWPORT { - float MinimumDepth; - float MaximumDepth; -}; - -static inline void -GEN9_CC_VIEWPORT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_CC_VIEWPORT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_float(values->MinimumDepth) | - 0; - - dw[1] = - __gen_float(values->MaximumDepth) | - 0; - -} - -#define GEN9_COLOR_CALC_STATE_length 0x00000006 - -struct GEN9_COLOR_CALC_STATE { -#define Cancelled 0 -#define NotCancelled 1 - uint32_t RoundDisableFunctionDisable; -#define ALPHATEST_UNORM8 0 -#define ALPHATEST_FLOAT32 1 - uint32_t AlphaTestFormat; - uint32_t AlphaReferenceValueAsUNORM8; - float AlphaReferenceValueAsFLOAT32; - float BlendConstantColorRed; - float BlendConstantColorGreen; - float BlendConstantColorBlue; - float BlendConstantColorAlpha; -}; - -static inline void -GEN9_COLOR_CALC_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_COLOR_CALC_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->RoundDisableFunctionDisable, 15, 15) | - __gen_field(values->AlphaTestFormat, 0, 0) | - 0; - - dw[1] = - __gen_field(values->AlphaReferenceValueAsUNORM8, 0, 31) | - __gen_float(values->AlphaReferenceValueAsFLOAT32) | - 0; - - dw[2] = - __gen_float(values->BlendConstantColorRed) | - 0; - - dw[3] = - __gen_float(values->BlendConstantColorGreen) | - 0; - - dw[4] = - __gen_float(values->BlendConstantColorBlue) | - 0; - - dw[5] = - __gen_float(values->BlendConstantColorAlpha) | - 0; - -} - -#define GEN9_EXECUTION_UNIT_EXTENDED_MESSAGE_DESCRIPTOR_length 0x00000001 - -struct GEN9_EXECUTION_UNIT_EXTENDED_MESSAGE_DESCRIPTOR { - uint32_t ExtendedMessageLength; -#define NoTermination 0 -#define EOT 1 - uint32_t EndOfThread; - uint32_t TargetFunctionID; -}; - -static inline void -GEN9_EXECUTION_UNIT_EXTENDED_MESSAGE_DESCRIPTOR_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_EXECUTION_UNIT_EXTENDED_MESSAGE_DESCRIPTOR * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->ExtendedMessageLength, 6, 9) | - __gen_field(values->EndOfThread, 5, 5) | - __gen_field(values->TargetFunctionID, 0, 3) | - 0; - -} - -#define GEN9_INTERFACE_DESCRIPTOR_DATA_length 0x00000008 - -struct GEN9_INTERFACE_DESCRIPTOR_DATA { - uint32_t KernelStartPointer; - uint32_t KernelStartPointerHigh; -#define Ftz 0 -#define SetByKernel 1 - uint32_t DenormMode; -#define Multiple 0 -#define Single 1 - uint32_t SingleProgramFlow; -#define NormalPriority 0 -#define HighPriority 1 - uint32_t ThreadPriority; -#define IEEE754 0 -#define Alternate 1 - uint32_t FloatingPointMode; - bool IllegalOpcodeExceptionEnable; - bool MaskStackExceptionEnable; - bool SoftwareExceptionEnable; - uint32_t SamplerStatePointer; -#define Nosamplersused 0 -#define Between1and4samplersused 1 -#define Between5and8samplersused 2 -#define Between9and12samplersused 3 -#define Between13and16samplersused 4 - uint32_t SamplerCount; - uint32_t BindingTablePointer; - uint32_t BindingTableEntryCount; - uint32_t ConstantIndirectURBEntryReadLength; - uint32_t ConstantURBEntryReadOffset; -#define RTNE 0 -#define RU 1 -#define RD 2 -#define RTZ 3 - uint32_t RoundingMode; - bool BarrierEnable; -#define Encodes0K 0 -#define Encodes1K 1 -#define Encodes2K 2 -#define Encodes4K 3 -#define Encodes8K 4 -#define Encodes16K 5 -#define Encodes32K 6 -#define Encodes64K 7 - uint32_t SharedLocalMemorySize; - bool GlobalBarrierEnable; - uint32_t NumberofThreadsinGPGPUThreadGroup; - uint32_t CrossThreadConstantDataReadLength; -}; - -static inline void -GEN9_INTERFACE_DESCRIPTOR_DATA_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_INTERFACE_DESCRIPTOR_DATA * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_offset(values->KernelStartPointer, 6, 31) | - 0; - - dw[1] = - __gen_offset(values->KernelStartPointerHigh, 0, 15) | - 0; - - dw[2] = - __gen_field(values->DenormMode, 19, 19) | - __gen_field(values->SingleProgramFlow, 18, 18) | - __gen_field(values->ThreadPriority, 17, 17) | - __gen_field(values->FloatingPointMode, 16, 16) | - __gen_field(values->IllegalOpcodeExceptionEnable, 13, 13) | - __gen_field(values->MaskStackExceptionEnable, 11, 11) | - __gen_field(values->SoftwareExceptionEnable, 7, 7) | - 0; - - dw[3] = - __gen_offset(values->SamplerStatePointer, 5, 31) | - __gen_field(values->SamplerCount, 2, 4) | - 0; - - dw[4] = - __gen_offset(values->BindingTablePointer, 5, 15) | - __gen_field(values->BindingTableEntryCount, 0, 4) | - 0; - - dw[5] = - __gen_field(values->ConstantIndirectURBEntryReadLength, 16, 31) | - __gen_field(values->ConstantURBEntryReadOffset, 0, 15) | - 0; - - dw[6] = - __gen_field(values->RoundingMode, 22, 23) | - __gen_field(values->BarrierEnable, 21, 21) | - __gen_field(values->SharedLocalMemorySize, 16, 20) | - __gen_field(values->GlobalBarrierEnable, 15, 15) | - __gen_field(values->NumberofThreadsinGPGPUThreadGroup, 0, 9) | - 0; - - dw[7] = - __gen_field(values->CrossThreadConstantDataReadLength, 0, 7) | - 0; - -} - -#define GEN9_ROUNDINGPRECISIONTABLE_3_BITS_length 0x00000001 - -struct GEN9_ROUNDINGPRECISIONTABLE_3_BITS { -#define _116 0 -#define _216 1 -#define _316 2 -#define _416 3 -#define _516 4 -#define _616 5 -#define _716 6 -#define _816 7 - uint32_t RoundingPrecision; -}; - -static inline void -GEN9_ROUNDINGPRECISIONTABLE_3_BITS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_ROUNDINGPRECISIONTABLE_3_BITS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->RoundingPrecision, 0, 2) | - 0; - -} - -#define GEN9_BINDING_TABLE_STATE_length 0x00000001 - -struct GEN9_BINDING_TABLE_STATE { - uint32_t SurfaceStatePointer; -}; - -static inline void -GEN9_BINDING_TABLE_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_BINDING_TABLE_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_offset(values->SurfaceStatePointer, 6, 31) | - 0; - -} - -#define GEN9_RENDER_SURFACE_STATE_length 0x00000010 - -struct GEN9_RENDER_SURFACE_STATE { -#define SURFTYPE_1D 0 -#define SURFTYPE_2D 1 -#define SURFTYPE_3D 2 -#define SURFTYPE_CUBE 3 -#define SURFTYPE_BUFFER 4 -#define SURFTYPE_STRBUF 5 -#define SURFTYPE_NULL 7 - uint32_t SurfaceType; - bool SurfaceArray; - bool ASTC_Enable; - uint32_t SurfaceFormat; -#define VALIGN4 1 -#define VALIGN8 2 -#define VALIGN16 3 - uint32_t SurfaceVerticalAlignment; -#define HALIGN4 1 -#define HALIGN8 2 -#define HALIGN16 3 - uint32_t SurfaceHorizontalAlignment; -#define LINEAR 0 -#define WMAJOR 1 -#define XMAJOR 2 -#define YMAJOR 3 - uint32_t TileMode; - uint32_t VerticalLineStride; - uint32_t VerticalLineStrideOffset; - bool SamplerL2BypassModeDisable; -#define WriteOnlyCache 0 -#define ReadWriteCache 1 - uint32_t RenderCacheReadWriteMode; -#define NORMAL_MODE 0 -#define PROGRESSIVE_FRAME 2 -#define INTERLACED_FRAME 3 - uint32_t MediaBoundaryPixelMode; - bool CubeFaceEnablePositiveZ; - bool CubeFaceEnableNegativeZ; - bool CubeFaceEnablePositiveY; - bool CubeFaceEnableNegativeY; - bool CubeFaceEnablePositiveX; - bool CubeFaceEnableNegativeX; - struct GEN9_MEMORY_OBJECT_CONTROL_STATE MemoryObjectControlState; - float BaseMipLevel; - uint32_t SurfaceQPitch; - uint32_t Height; - uint32_t Width; - uint32_t Depth; - uint32_t SurfacePitch; -#define _0DEG 0 -#define _90DEG 1 -#define _180DEG 2 -#define _270DEG 3 - uint32_t RenderTargetAndSampleUnormRotation; - uint32_t MinimumArrayElement; - uint32_t RenderTargetViewExtent; -#define MSS 0 -#define DEPTH_STENCIL 1 - uint32_t MultisampledSurfaceStorageFormat; -#define MULTISAMPLECOUNT_1 0 -#define MULTISAMPLECOUNT_2 1 -#define MULTISAMPLECOUNT_4 2 -#define MULTISAMPLECOUNT_8 3 -#define MULTISAMPLECOUNT_16 4 - uint32_t NumberofMultisamples; - uint32_t MultisamplePositionPaletteIndex; - uint32_t XOffset; - uint32_t YOffset; - bool EWADisableForCube; -#define NONE 0 -#define _4KB 1 -#define _64KB 2 -#define TILEYF 1 -#define TILEYS 2 - uint32_t TiledResourceMode; -#define GPUcoherent 0 -#define IAcoherent 1 - uint32_t CoherencyType; - uint32_t MipTailStartLOD; - uint32_t SurfaceMinLOD; - uint32_t MIPCountLOD; - uint32_t AuxiliarySurfaceQPitch; - uint32_t AuxiliarySurfacePitch; -#define AUX_NONE 0 -#define AUX_CCS_D 1 -#define AUX_APPEND 2 -#define AUX_HIZ 3 -#define AUX_CCS_E 5 - uint32_t AuxiliarySurfaceMode; - bool SeparateUVPlaneEnable; - uint32_t XOffsetforUorUVPlane; - uint32_t YOffsetforUorUVPlane; -#define Horizontal 0 -#define Vertical 1 - uint32_t MemoryCompressionMode; - bool MemoryCompressionEnable; - uint32_t ShaderChannelSelectRed; - uint32_t ShaderChannelSelectGreen; - uint32_t ShaderChannelSelectBlue; - uint32_t ShaderChannelSelectAlpha; - float ResourceMinLOD; - __gen_address_type SurfaceBaseAddress; - uint32_t XOffsetforVPlane; - uint32_t YOffsetforVPlane; - uint32_t AuxiliaryTableIndexforMediaCompressedSurface; - __gen_address_type AuxiliarySurfaceBaseAddress; - uint32_t QuiltHeight; - uint32_t QuiltWidth; - float HierarchicalDepthClearValue; - uint32_t RedClearColor; - uint32_t GreenClearColor; - uint32_t BlueClearColor; - uint32_t AlphaClearColor; -}; - -static inline void -GEN9_RENDER_SURFACE_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_RENDER_SURFACE_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->SurfaceType, 29, 31) | - __gen_field(values->SurfaceArray, 28, 28) | - __gen_field(values->ASTC_Enable, 27, 27) | - __gen_field(values->SurfaceFormat, 18, 26) | - __gen_field(values->SurfaceVerticalAlignment, 16, 17) | - __gen_field(values->SurfaceHorizontalAlignment, 14, 15) | - __gen_field(values->TileMode, 12, 13) | - __gen_field(values->VerticalLineStride, 11, 11) | - __gen_field(values->VerticalLineStrideOffset, 10, 10) | - __gen_field(values->SamplerL2BypassModeDisable, 9, 9) | - __gen_field(values->RenderCacheReadWriteMode, 8, 8) | - __gen_field(values->MediaBoundaryPixelMode, 6, 7) | - __gen_field(values->CubeFaceEnablePositiveZ, 0, 0) | - __gen_field(values->CubeFaceEnableNegativeZ, 1, 1) | - __gen_field(values->CubeFaceEnablePositiveY, 2, 2) | - __gen_field(values->CubeFaceEnableNegativeY, 3, 3) | - __gen_field(values->CubeFaceEnablePositiveX, 4, 4) | - __gen_field(values->CubeFaceEnableNegativeX, 5, 5) | - 0; - - uint32_t dw_MemoryObjectControlState; - GEN9_MEMORY_OBJECT_CONTROL_STATE_pack(data, &dw_MemoryObjectControlState, &values->MemoryObjectControlState); - dw[1] = - __gen_field(dw_MemoryObjectControlState, 24, 30) | - __gen_field(values->BaseMipLevel * (1 << 1), 19, 23) | - __gen_field(values->SurfaceQPitch, 0, 14) | - 0; - - dw[2] = - __gen_field(values->Height, 16, 29) | - __gen_field(values->Width, 0, 13) | - 0; - - dw[3] = - __gen_field(values->Depth, 21, 31) | - __gen_field(values->SurfacePitch, 0, 17) | - 0; - - dw[4] = - __gen_field(values->RenderTargetAndSampleUnormRotation, 29, 30) | - __gen_field(values->MinimumArrayElement, 18, 28) | - __gen_field(values->RenderTargetViewExtent, 7, 17) | - __gen_field(values->MultisampledSurfaceStorageFormat, 6, 6) | - __gen_field(values->NumberofMultisamples, 3, 5) | - __gen_field(values->MultisamplePositionPaletteIndex, 0, 2) | - 0; - - dw[5] = - __gen_offset(values->XOffset, 25, 31) | - __gen_offset(values->YOffset, 21, 23) | - __gen_field(values->EWADisableForCube, 20, 20) | - __gen_field(values->TiledResourceMode, 18, 19) | - __gen_field(values->CoherencyType, 14, 14) | - __gen_field(values->MipTailStartLOD, 8, 11) | - __gen_field(values->SurfaceMinLOD, 4, 7) | - __gen_field(values->MIPCountLOD, 0, 3) | - 0; - - dw[6] = - __gen_field(values->AuxiliarySurfaceQPitch, 16, 30) | - __gen_field(values->AuxiliarySurfacePitch, 3, 11) | - __gen_field(values->AuxiliarySurfaceMode, 0, 2) | - __gen_field(values->SeparateUVPlaneEnable, 31, 31) | - __gen_field(values->XOffsetforUorUVPlane, 16, 29) | - __gen_field(values->YOffsetforUorUVPlane, 0, 13) | - 0; - - dw[7] = - __gen_field(values->MemoryCompressionMode, 31, 31) | - __gen_field(values->MemoryCompressionEnable, 30, 30) | - __gen_field(values->ShaderChannelSelectRed, 25, 27) | - __gen_field(values->ShaderChannelSelectGreen, 22, 24) | - __gen_field(values->ShaderChannelSelectBlue, 19, 21) | - __gen_field(values->ShaderChannelSelectAlpha, 16, 18) | - __gen_field(values->ResourceMinLOD * (1 << 8), 0, 11) | - 0; - - uint32_t dw8 = - 0; - - uint64_t qw8 = - __gen_combine_address(data, &dw[8], values->SurfaceBaseAddress, dw8); - - dw[8] = qw8; - dw[9] = qw8 >> 32; - - uint32_t dw10 = - __gen_field(values->XOffsetforVPlane, 48, 61) | - __gen_field(values->YOffsetforVPlane, 32, 45) | - __gen_field(values->AuxiliaryTableIndexforMediaCompressedSurface, 21, 31) | - __gen_field(values->QuiltHeight, 5, 9) | - __gen_field(values->QuiltWidth, 0, 4) | - 0; - - uint64_t qw10 = - __gen_combine_address(data, &dw[10], values->AuxiliarySurfaceBaseAddress, dw10); - - dw[10] = qw10; - dw[11] = qw10 >> 32; - - dw[12] = - __gen_float(values->HierarchicalDepthClearValue) | - __gen_field(values->RedClearColor, 0, 31) | - 0; - - dw[13] = - __gen_field(values->GreenClearColor, 0, 31) | - 0; - - dw[14] = - __gen_field(values->BlueClearColor, 0, 31) | - 0; - - dw[15] = - __gen_field(values->AlphaClearColor, 0, 31) | - 0; - -} - -#define GEN9_FILTER_COEFFICIENT_length 0x00000001 - -struct GEN9_FILTER_COEFFICIENT { - uint32_t FilterCoefficient; -}; - -static inline void -GEN9_FILTER_COEFFICIENT_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_FILTER_COEFFICIENT * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->FilterCoefficient, 0, 7) | - 0; - -} - -#define GEN9_SAMPLER_STATE_length 0x00000004 - -struct GEN9_SAMPLER_STATE { - bool SamplerDisable; -#define DX10OGL 0 -#define DX9 1 - uint32_t TextureBorderColorMode; -#define CLAMP_NONE 0 -#define CLAMP_OGL 2 - uint32_t LODPreClampMode; - uint32_t CoarseLODQualityMode; -#define MIPFILTER_NONE 0 -#define MIPFILTER_NEAREST 1 -#define MIPFILTER_LINEAR 3 - uint32_t MipModeFilter; -#define MAPFILTER_NEAREST 0 -#define MAPFILTER_LINEAR 1 -#define MAPFILTER_ANISOTROPIC 2 -#define MAPFILTER_MONO 6 - uint32_t MagModeFilter; -#define MAPFILTER_NEAREST 0 -#define MAPFILTER_LINEAR 1 -#define MAPFILTER_ANISOTROPIC 2 -#define MAPFILTER_MONO 6 - uint32_t MinModeFilter; - float TextureLODBias; -#define LEGACY 0 -#define EWAApproximation 1 - uint32_t AnisotropicAlgorithm; - float MinLOD; - float MaxLOD; - bool ChromaKeyEnable; - uint32_t ChromaKeyIndex; -#define KEYFILTER_KILL_ON_ANY_MATCH 0 -#define KEYFILTER_REPLACE_BLACK 1 - uint32_t ChromaKeyMode; -#define PREFILTEROPALWAYS 0 -#define PREFILTEROPNEVER 1 -#define PREFILTEROPLESS 2 -#define PREFILTEROPEQUAL 3 -#define PREFILTEROPLEQUAL 4 -#define PREFILTEROPGREATER 5 -#define PREFILTEROPNOTEQUAL 6 -#define PREFILTEROPGEQUAL 7 - uint32_t ShadowFunction; -#define PROGRAMMED 0 -#define OVERRIDE 1 - uint32_t CubeSurfaceControlMode; - uint32_t IndirectStatePointer; -#define MIPNONE 0 -#define MIPFILTER 1 - uint32_t LODClampMagnificationMode; -#define STD_FILTER 0 -#define COMPARISON 1 -#define MINIMUM 2 -#define MAXIMUM 3 - uint32_t ReductionType; -#define RATIO21 0 -#define RATIO41 1 -#define RATIO61 2 -#define RATIO81 3 -#define RATIO101 4 -#define RATIO121 5 -#define RATIO141 6 -#define RATIO161 7 - uint32_t MaximumAnisotropy; - bool RAddressMinFilterRoundingEnable; - bool RAddressMagFilterRoundingEnable; - bool VAddressMinFilterRoundingEnable; - bool VAddressMagFilterRoundingEnable; - bool UAddressMinFilterRoundingEnable; - bool UAddressMagFilterRoundingEnable; -#define FULL 0 -#define HIGH 1 -#define MED 2 -#define LOW 3 - uint32_t TrilinearFilterQuality; - bool NonnormalizedCoordinateEnable; - bool ReductionTypeEnable; - uint32_t TCXAddressControlMode; - uint32_t TCYAddressControlMode; - uint32_t TCZAddressControlMode; -}; - -static inline void -GEN9_SAMPLER_STATE_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_SAMPLER_STATE * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->SamplerDisable, 31, 31) | - __gen_field(values->TextureBorderColorMode, 29, 29) | - __gen_field(values->LODPreClampMode, 27, 28) | - __gen_field(values->CoarseLODQualityMode, 22, 26) | - __gen_field(values->MipModeFilter, 20, 21) | - __gen_field(values->MagModeFilter, 17, 19) | - __gen_field(values->MinModeFilter, 14, 16) | - __gen_fixed(values->TextureLODBias, 1, 13, true, 8) | - __gen_field(values->AnisotropicAlgorithm, 0, 0) | - 0; - - dw[1] = - __gen_field(values->MinLOD * (1 << 8), 20, 31) | - __gen_field(values->MaxLOD * (1 << 8), 8, 19) | - __gen_field(values->ChromaKeyEnable, 7, 7) | - __gen_field(values->ChromaKeyIndex, 5, 6) | - __gen_field(values->ChromaKeyMode, 4, 4) | - __gen_field(values->ShadowFunction, 1, 3) | - __gen_field(values->CubeSurfaceControlMode, 0, 0) | - 0; - - dw[2] = - __gen_field(values->IndirectStatePointer, 6, 23) | - __gen_field(values->LODClampMagnificationMode, 0, 0) | - 0; - - dw[3] = - __gen_field(values->ReductionType, 22, 23) | - __gen_field(values->MaximumAnisotropy, 19, 21) | - __gen_field(values->RAddressMinFilterRoundingEnable, 13, 13) | - __gen_field(values->RAddressMagFilterRoundingEnable, 14, 14) | - __gen_field(values->VAddressMinFilterRoundingEnable, 15, 15) | - __gen_field(values->VAddressMagFilterRoundingEnable, 16, 16) | - __gen_field(values->UAddressMinFilterRoundingEnable, 17, 17) | - __gen_field(values->UAddressMagFilterRoundingEnable, 18, 18) | - __gen_field(values->TrilinearFilterQuality, 11, 12) | - __gen_field(values->NonnormalizedCoordinateEnable, 10, 10) | - __gen_field(values->ReductionTypeEnable, 9, 9) | - __gen_field(values->TCXAddressControlMode, 6, 8) | - __gen_field(values->TCYAddressControlMode, 3, 5) | - __gen_field(values->TCZAddressControlMode, 0, 2) | - 0; - -} - -#define GEN9_SAMPLER_STATE_8X8_AVS_COEFFICIENTS_length 0x00000008 - -struct GEN9_SAMPLER_STATE_8X8_AVS_COEFFICIENTS { - uint32_t Table0YFilterCoefficientn1; - uint32_t Table0XFilterCoefficientn1; - uint32_t Table0YFilterCoefficientn0; - uint32_t Table0XFilterCoefficientn0; - uint32_t Table0YFilterCoefficientn3; - uint32_t Table0XFilterCoefficientn3; - uint32_t Table0YFilterCoefficientn2; - uint32_t Table0XFilterCoefficientn2; - uint32_t Table0YFilterCoefficientn5; - uint32_t Table0XFilterCoefficientn5; - uint32_t Table0YFilterCoefficientn4; - uint32_t Table0XFilterCoefficientn4; - uint32_t Table0YFilterCoefficientn7; - uint32_t Table0XFilterCoefficientn7; - uint32_t Table0YFilterCoefficientn6; - uint32_t Table0XFilterCoefficientn6; - uint32_t Table1XFilterCoefficientn3; - uint32_t Table1XFilterCoefficientn2; - uint32_t Table1XFilterCoefficientn5; - uint32_t Table1XFilterCoefficientn4; - uint32_t Table1YFilterCoefficientn3; - uint32_t Table1YFilterCoefficientn2; - uint32_t Table1YFilterCoefficientn5; - uint32_t Table1YFilterCoefficientn4; -}; - -static inline void -GEN9_SAMPLER_STATE_8X8_AVS_COEFFICIENTS_pack(__gen_user_data *data, void * restrict dst, - const struct GEN9_SAMPLER_STATE_8X8_AVS_COEFFICIENTS * restrict values) -{ - uint32_t *dw = (uint32_t * restrict) dst; - - dw[0] = - __gen_field(values->Table0YFilterCoefficientn1, 24, 31) | - __gen_field(values->Table0XFilterCoefficientn1, 16, 23) | - __gen_field(values->Table0YFilterCoefficientn0, 8, 15) | - __gen_field(values->Table0XFilterCoefficientn0, 0, 7) | - 0; - - dw[1] = - __gen_field(values->Table0YFilterCoefficientn3, 24, 31) | - __gen_field(values->Table0XFilterCoefficientn3, 16, 23) | - __gen_field(values->Table0YFilterCoefficientn2, 8, 15) | - __gen_field(values->Table0XFilterCoefficientn2, 0, 7) | - 0; - - dw[2] = - __gen_field(values->Table0YFilterCoefficientn5, 24, 31) | - __gen_field(values->Table0XFilterCoefficientn5, 16, 23) | - __gen_field(values->Table0YFilterCoefficientn4, 8, 15) | - __gen_field(values->Table0XFilterCoefficientn4, 0, 7) | - 0; - - dw[3] = - __gen_field(values->Table0YFilterCoefficientn7, 24, 31) | - __gen_field(values->Table0XFilterCoefficientn7, 16, 23) | - __gen_field(values->Table0YFilterCoefficientn6, 8, 15) | - __gen_field(values->Table0XFilterCoefficientn6, 0, 7) | - 0; - - dw[4] = - __gen_field(values->Table1XFilterCoefficientn3, 24, 31) | - __gen_field(values->Table1XFilterCoefficientn2, 16, 23) | - 0; - - dw[5] = - __gen_field(values->Table1XFilterCoefficientn5, 8, 15) | - __gen_field(values->Table1XFilterCoefficientn4, 0, 7) | - 0; - - dw[6] = - __gen_field(values->Table1YFilterCoefficientn3, 24, 31) | - __gen_field(values->Table1YFilterCoefficientn2, 16, 23) | - 0; - - dw[7] = - __gen_field(values->Table1YFilterCoefficientn5, 8, 15) | - __gen_field(values->Table1YFilterCoefficientn4, 0, 7) | - 0; - -} - -/* Enum 3D_Prim_Topo_Type */ -#define _3DPRIM_POINTLIST 1 -#define _3DPRIM_LINELIST 2 -#define _3DPRIM_LINESTRIP 3 -#define _3DPRIM_TRILIST 4 -#define _3DPRIM_TRISTRIP 5 -#define _3DPRIM_TRIFAN 6 -#define _3DPRIM_QUADLIST 7 -#define _3DPRIM_QUADSTRIP 8 -#define _3DPRIM_LINELIST_ADJ 9 -#define _3DPRIM_LINESTRIP_ADJ 10 -#define _3DPRIM_TRILIST_ADJ 11 -#define _3DPRIM_TRISTRIP_ADJ 12 -#define _3DPRIM_TRISTRIP_REVERSE 13 -#define _3DPRIM_POLYGON 14 -#define _3DPRIM_RECTLIST 15 -#define _3DPRIM_LINELOOP 16 -#define _3DPRIM_POINTLIST_BF 17 -#define _3DPRIM_LINESTRIP_CONT 18 -#define _3DPRIM_LINESTRIP_BF 19 -#define _3DPRIM_LINESTRIP_CONT_BF 20 -#define _3DPRIM_TRIFAN_NOSTIPPLE 22 -#define _3DPRIM_PATCHLIST_1 32 -#define _3DPRIM_PATCHLIST_2 33 -#define _3DPRIM_PATCHLIST_3 34 -#define _3DPRIM_PATCHLIST_4 35 -#define _3DPRIM_PATCHLIST_5 36 -#define _3DPRIM_PATCHLIST_6 37 -#define _3DPRIM_PATCHLIST_7 38 -#define _3DPRIM_PATCHLIST_8 39 -#define _3DPRIM_PATCHLIST_9 40 -#define _3DPRIM_PATCHLIST_10 41 -#define _3DPRIM_PATCHLIST_11 42 -#define _3DPRIM_PATCHLIST_12 43 -#define _3DPRIM_PATCHLIST_13 44 -#define _3DPRIM_PATCHLIST_14 45 -#define _3DPRIM_PATCHLIST_15 46 -#define _3DPRIM_PATCHLIST_16 47 -#define _3DPRIM_PATCHLIST_17 48 -#define _3DPRIM_PATCHLIST_18 49 -#define _3DPRIM_PATCHLIST_19 50 -#define _3DPRIM_PATCHLIST_20 51 -#define _3DPRIM_PATCHLIST_21 52 -#define _3DPRIM_PATCHLIST_22 53 -#define _3DPRIM_PATCHLIST_23 54 -#define _3DPRIM_PATCHLIST_24 55 -#define _3DPRIM_PATCHLIST_25 56 -#define _3DPRIM_PATCHLIST_26 57 -#define _3DPRIM_PATCHLIST_27 58 -#define _3DPRIM_PATCHLIST_28 59 -#define _3DPRIM_PATCHLIST_29 60 -#define _3DPRIM_PATCHLIST_30 61 -#define _3DPRIM_PATCHLIST_31 62 -#define _3DPRIM_PATCHLIST_32 63 - -/* Enum 3D_Vertex_Component_Control */ -#define VFCOMP_NOSTORE 0 -#define VFCOMP_STORE_SRC 1 -#define VFCOMP_STORE_0 2 -#define VFCOMP_STORE_1_FP 3 -#define VFCOMP_STORE_1_INT 4 -#define VFCOMP_STORE_PID 7 - -/* Enum COMPONENT_ENABLES */ -#define CE_NONE 0 -#define CE_X 1 -#define CE_Y 2 -#define CE_XY 3 -#define CE_Z 4 -#define CE_XZ 5 -#define CE_YZ 6 -#define CE_XYZ 7 -#define CE_W 8 -#define CE_XW 9 -#define CE_YW 10 -#define CE_XYW 11 -#define CE_ZW 12 -#define CE_XZW 13 -#define CE_YZW 14 -#define CE_XYZW 15 - -/* Enum Attribute_Component_Format */ -#define ACF_DISABLED 0 -#define ACF_XY 1 -#define ACF_XYZ 2 -#define ACF_XYZW 3 - -/* Enum WRAP_SHORTEST_ENABLE */ -#define WSE_X 1 -#define WSE_Y 2 -#define WSE_XY 3 -#define WSE_Z 4 -#define WSE_XZ 5 -#define WSE_YZ 6 -#define WSE_XYZ 7 -#define WSE_W 8 -#define WSE_XW 9 -#define WSE_YW 10 -#define WSE_XYW 11 -#define WSE_ZW 12 -#define WSE_XZW 13 -#define WSE_YZW 14 -#define WSE_XYZW 15 - -/* Enum 3D_Stencil_Operation */ -#define STENCILOP_KEEP 0 -#define STENCILOP_ZERO 1 -#define STENCILOP_REPLACE 2 -#define STENCILOP_INCRSAT 3 -#define STENCILOP_DECRSAT 4 -#define STENCILOP_INCR 5 -#define STENCILOP_DECR 6 -#define STENCILOP_INVERT 7 - -/* Enum 3D_Color_Buffer_Blend_Factor */ -#define BLENDFACTOR_ONE 1 -#define BLENDFACTOR_SRC_COLOR 2 -#define BLENDFACTOR_SRC_ALPHA 3 -#define BLENDFACTOR_DST_ALPHA 4 -#define BLENDFACTOR_DST_COLOR 5 -#define BLENDFACTOR_SRC_ALPHA_SATURATE 6 -#define BLENDFACTOR_CONST_COLOR 7 -#define BLENDFACTOR_CONST_ALPHA 8 -#define BLENDFACTOR_SRC1_COLOR 9 -#define BLENDFACTOR_SRC1_ALPHA 10 -#define BLENDFACTOR_ZERO 17 -#define BLENDFACTOR_INV_SRC_COLOR 18 -#define BLENDFACTOR_INV_SRC_ALPHA 19 -#define BLENDFACTOR_INV_DST_ALPHA 20 -#define BLENDFACTOR_INV_DST_COLOR 21 -#define BLENDFACTOR_INV_CONST_COLOR 23 -#define BLENDFACTOR_INV_CONST_ALPHA 24 -#define BLENDFACTOR_INV_SRC1_COLOR 25 -#define BLENDFACTOR_INV_SRC1_ALPHA 26 - -/* Enum 3D_Color_Buffer_Blend_Function */ -#define BLENDFUNCTION_ADD 0 -#define BLENDFUNCTION_SUBTRACT 1 -#define BLENDFUNCTION_REVERSE_SUBTRACT 2 -#define BLENDFUNCTION_MIN 3 -#define BLENDFUNCTION_MAX 4 - -/* Enum 3D_Compare_Function */ -#define COMPAREFUNCTION_ALWAYS 0 -#define COMPAREFUNCTION_NEVER 1 -#define COMPAREFUNCTION_LESS 2 -#define COMPAREFUNCTION_EQUAL 3 -#define COMPAREFUNCTION_LEQUAL 4 -#define COMPAREFUNCTION_GREATER 5 -#define COMPAREFUNCTION_NOTEQUAL 6 -#define COMPAREFUNCTION_GEQUAL 7 - -/* Enum 3D_Logic_Op_Function */ -#define LOGICOP_CLEAR 0 -#define LOGICOP_NOR 1 -#define LOGICOP_AND_INVERTED 2 -#define LOGICOP_COPY_INVERTED 3 -#define LOGICOP_AND_REVERSE 4 -#define LOGICOP_INVERT 5 -#define LOGICOP_XOR 6 -#define LOGICOP_NAND 7 -#define LOGICOP_AND 8 -#define LOGICOP_EQUIV 9 -#define LOGICOP_NOOP 10 -#define LOGICOP_OR_INVERTED 11 -#define LOGICOP_COPY 12 -#define LOGICOP_OR_REVERSE 13 -#define LOGICOP_OR 14 -#define LOGICOP_SET 15 - -/* Enum SURFACE_FORMAT */ -#define R32G32B32A32_FLOAT 0 -#define R32G32B32A32_SINT 1 -#define R32G32B32A32_UINT 2 -#define R32G32B32A32_UNORM 3 -#define R32G32B32A32_SNORM 4 -#define R64G64_FLOAT 5 -#define R32G32B32X32_FLOAT 6 -#define R32G32B32A32_SSCALED 7 -#define R32G32B32A32_USCALED 8 -#define R32G32B32A32_SFIXED 32 -#define R64G64_PASSTHRU 33 -#define R32G32B32_FLOAT 64 -#define R32G32B32_SINT 65 -#define R32G32B32_UINT 66 -#define R32G32B32_UNORM 67 -#define R32G32B32_SNORM 68 -#define R32G32B32_SSCALED 69 -#define R32G32B32_USCALED 70 -#define R32G32B32_SFIXED 80 -#define R16G16B16A16_UNORM 128 -#define R16G16B16A16_SNORM 129 -#define R16G16B16A16_SINT 130 -#define R16G16B16A16_UINT 131 -#define R16G16B16A16_FLOAT 132 -#define R32G32_FLOAT 133 -#define R32G32_SINT 134 -#define R32G32_UINT 135 -#define R32_FLOAT_X8X24_TYPELESS 136 -#define X32_TYPELESS_G8X24_UINT 137 -#define L32A32_FLOAT 138 -#define R32G32_UNORM 139 -#define R32G32_SNORM 140 -#define R64_FLOAT 141 -#define R16G16B16X16_UNORM 142 -#define R16G16B16X16_FLOAT 143 -#define A32X32_FLOAT 144 -#define L32X32_FLOAT 145 -#define I32X32_FLOAT 146 -#define R16G16B16A16_SSCALED 147 -#define R16G16B16A16_USCALED 148 -#define R32G32_SSCALED 149 -#define R32G32_USCALED 150 -#define R32G32_SFIXED 160 -#define R64_PASSTHRU 161 -#define B8G8R8A8_UNORM 192 -#define B8G8R8A8_UNORM_SRGB 193 -#define R10G10B10A2_UNORM 194 -#define R10G10B10A2_UNORM_SRGB 195 -#define R10G10B10A2_UINT 196 -#define R10G10B10_SNORM_A2_UNORM 197 -#define R8G8B8A8_UNORM 199 -#define R8G8B8A8_UNORM_SRGB 200 -#define R8G8B8A8_SNORM 201 -#define R8G8B8A8_SINT 202 -#define R8G8B8A8_UINT 203 -#define R16G16_UNORM 204 -#define R16G16_SNORM 205 -#define R16G16_SINT 206 -#define R16G16_UINT 207 -#define R16G16_FLOAT 208 -#define B10G10R10A2_UNORM 209 -#define B10G10R10A2_UNORM_SRGB 210 -#define R11G11B10_FLOAT 211 -#define R32_SINT 214 -#define R32_UINT 215 -#define R32_FLOAT 216 -#define R24_UNORM_X8_TYPELESS 217 -#define X24_TYPELESS_G8_UINT 218 -#define L32_UNORM 221 -#define A32_UNORM 222 -#define L16A16_UNORM 223 -#define I24X8_UNORM 224 -#define L24X8_UNORM 225 -#define A24X8_UNORM 226 -#define I32_FLOAT 227 -#define L32_FLOAT 228 -#define A32_FLOAT 229 -#define X8B8_UNORM_G8R8_SNORM 230 -#define A8X8_UNORM_G8R8_SNORM 231 -#define B8X8_UNORM_G8R8_SNORM 232 -#define B8G8R8X8_UNORM 233 -#define B8G8R8X8_UNORM_SRGB 234 -#define R8G8B8X8_UNORM 235 -#define R8G8B8X8_UNORM_SRGB 236 -#define R9G9B9E5_SHAREDEXP 237 -#define B10G10R10X2_UNORM 238 -#define L16A16_FLOAT 240 -#define R32_UNORM 241 -#define R32_SNORM 242 -#define R10G10B10X2_USCALED 243 -#define R8G8B8A8_SSCALED 244 -#define R8G8B8A8_USCALED 245 -#define R16G16_SSCALED 246 -#define R16G16_USCALED 247 -#define R32_SSCALED 248 -#define R32_USCALED 249 -#define B5G6R5_UNORM 256 -#define B5G6R5_UNORM_SRGB 257 -#define B5G5R5A1_UNORM 258 -#define B5G5R5A1_UNORM_SRGB 259 -#define B4G4R4A4_UNORM 260 -#define B4G4R4A4_UNORM_SRGB 261 -#define R8G8_UNORM 262 -#define R8G8_SNORM 263 -#define R8G8_SINT 264 -#define R8G8_UINT 265 -#define R16_UNORM 266 -#define R16_SNORM 267 -#define R16_SINT 268 -#define R16_UINT 269 -#define R16_FLOAT 270 -#define A8P8_UNORM_PALETTE0 271 -#define A8P8_UNORM_PALETTE1 272 -#define I16_UNORM 273 -#define L16_UNORM 274 -#define A16_UNORM 275 -#define L8A8_UNORM 276 -#define I16_FLOAT 277 -#define L16_FLOAT 278 -#define A16_FLOAT 279 -#define L8A8_UNORM_SRGB 280 -#define R5G5_SNORM_B6_UNORM 281 -#define B5G5R5X1_UNORM 282 -#define B5G5R5X1_UNORM_SRGB 283 -#define R8G8_SSCALED 284 -#define R8G8_USCALED 285 -#define R16_SSCALED 286 -#define R16_USCALED 287 -#define P8A8_UNORM_PALETTE0 290 -#define P8A8_UNORM_PALETTE1 291 -#define A1B5G5R5_UNORM 292 -#define A4B4G4R4_UNORM 293 -#define L8A8_UINT 294 -#define L8A8_SINT 295 -#define R8_UNORM 320 -#define R8_SNORM 321 -#define R8_SINT 322 -#define R8_UINT 323 -#define A8_UNORM 324 -#define I8_UNORM 325 -#define L8_UNORM 326 -#define P4A4_UNORM_PALETTE0 327 -#define A4P4_UNORM_PALETTE0 328 -#define R8_SSCALED 329 -#define R8_USCALED 330 -#define P8_UNORM_PALETTE0 331 -#define L8_UNORM_SRGB 332 -#define P8_UNORM_PALETTE1 333 -#define P4A4_UNORM_PALETTE1 334 -#define A4P4_UNORM_PALETTE1 335 -#define Y8_UNORM 336 -#define L8_UINT 338 -#define L8_SINT 339 -#define I8_UINT 340 -#define I8_SINT 341 -#define DXT1_RGB_SRGB 384 -#define R1_UNORM 385 -#define YCRCB_NORMAL 386 -#define YCRCB_SWAPUVY 387 -#define P2_UNORM_PALETTE0 388 -#define P2_UNORM_PALETTE1 389 -#define BC1_UNORM 390 -#define BC2_UNORM 391 -#define BC3_UNORM 392 -#define BC4_UNORM 393 -#define BC5_UNORM 394 -#define BC1_UNORM_SRGB 395 -#define BC2_UNORM_SRGB 396 -#define BC3_UNORM_SRGB 397 -#define MONO8 398 -#define YCRCB_SWAPUV 399 -#define YCRCB_SWAPY 400 -#define DXT1_RGB 401 -#define FXT1 402 -#define R8G8B8_UNORM 403 -#define R8G8B8_SNORM 404 -#define R8G8B8_SSCALED 405 -#define R8G8B8_USCALED 406 -#define R64G64B64A64_FLOAT 407 -#define R64G64B64_FLOAT 408 -#define BC4_SNORM 409 -#define BC5_SNORM 410 -#define R16G16B16_FLOAT 411 -#define R16G16B16_UNORM 412 -#define R16G16B16_SNORM 413 -#define R16G16B16_SSCALED 414 -#define R16G16B16_USCALED 415 -#define BC6H_SF16 417 -#define BC7_UNORM 418 -#define BC7_UNORM_SRGB 419 -#define BC6H_UF16 420 -#define PLANAR_420_8 421 -#define R8G8B8_UNORM_SRGB 424 -#define ETC1_RGB8 425 -#define ETC2_RGB8 426 -#define EAC_R11 427 -#define EAC_RG11 428 -#define EAC_SIGNED_R11 429 -#define EAC_SIGNED_RG11 430 -#define ETC2_SRGB8 431 -#define R16G16B16_UINT 432 -#define R16G16B16_SINT 433 -#define R32_SFIXED 434 -#define R10G10B10A2_SNORM 435 -#define R10G10B10A2_USCALED 436 -#define R10G10B10A2_SSCALED 437 -#define R10G10B10A2_SINT 438 -#define B10G10R10A2_SNORM 439 -#define B10G10R10A2_USCALED 440 -#define B10G10R10A2_SSCALED 441 -#define B10G10R10A2_UINT 442 -#define B10G10R10A2_SINT 443 -#define R64G64B64A64_PASSTHRU 444 -#define R64G64B64_PASSTHRU 445 -#define ETC2_RGB8_PTA 448 -#define ETC2_SRGB8_PTA 449 -#define ETC2_EAC_RGBA8 450 -#define ETC2_EAC_SRGB8_A8 451 -#define R8G8B8_UINT 456 -#define R8G8B8_SINT 457 -#define RAW 511 - -/* Enum Shader Channel Select */ -#define SCS_ZERO 0 -#define SCS_ONE 1 -#define SCS_RED 4 -#define SCS_GREEN 5 -#define SCS_BLUE 6 -#define SCS_ALPHA 7 - -/* Enum Texture Coordinate Mode */ -#define TCM_WRAP 0 -#define TCM_MIRROR 1 -#define TCM_CLAMP 2 -#define TCM_CUBE 3 -#define TCM_CLAMP_BORDER 4 -#define TCM_MIRROR_ONCE 5 -#define TCM_HALF_BORDER 6 - diff --git a/src/vulkan/genX_pipeline_util.h b/src/vulkan/genX_pipeline_util.h index 9e0f82e7167..077281d2f56 100644 --- a/src/vulkan/genX_pipeline_util.h +++ b/src/vulkan/genX_pipeline_util.h @@ -244,9 +244,9 @@ static const uint32_t vk_to_gen_cullmode[] = { }; static const uint32_t vk_to_gen_fillmode[] = { - [VK_POLYGON_MODE_FILL] = RASTER_SOLID, - [VK_POLYGON_MODE_LINE] = RASTER_WIREFRAME, - [VK_POLYGON_MODE_POINT] = RASTER_POINT, + [VK_POLYGON_MODE_FILL] = FILL_MODE_SOLID, + [VK_POLYGON_MODE_LINE] = FILL_MODE_WIREFRAME, + [VK_POLYGON_MODE_POINT] = FILL_MODE_POINT, }; static const uint32_t vk_to_gen_front_face[] = { diff --git a/src/vulkan/gen_pack_header.py b/src/vulkan/gen_pack_header.py new file mode 100755 index 00000000000..58da0184faf --- /dev/null +++ b/src/vulkan/gen_pack_header.py @@ -0,0 +1,585 @@ +#!/usr/bin/env python3 + +import xml.parsers.expat +import re +import sys +import copy + +license = """/* + * Copyright © 2016 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ +""" + +pack_header = """%(license)s + +/* Instructions, enums and structures for %(platform)s. + * + * This file has been generated, do not hand edit. + */ + +#pragma once + +#include <stdio.h> +#include <assert.h> + +#ifndef __gen_validate_value +#define __gen_validate_value(x) +#endif + +#ifndef __gen_field_functions +#define __gen_field_functions + +union __gen_value { + float f; + uint32_t dw; +}; + +static inline uint64_t +__gen_mbo(uint32_t start, uint32_t end) +{ + return (~0ull >> (64 - (end - start + 1))) << start; +} + +static inline uint64_t +__gen_uint(uint64_t v, uint32_t start, uint32_t end) +{ + const int width = end - start + 1; + + __gen_validate_value(v); + +#if DEBUG + if (width < 64) { + const uint64_t max = (1ull << width) - 1; + assert(v <= max); + } +#endif + + return v << start; +} + +static inline uint64_t +__gen_sint(int64_t v, uint32_t start, uint32_t end) +{ + const int width = end - start + 1; + + __gen_validate_value(v); + +#if DEBUG + if (width < 64) { + const int64_t max = (1ll << (width - 1)) - 1; + const int64_t min = -(1ll << (width - 1)); + assert(min <= v && v <= max); + } +#endif + + const uint64_t mask = ~0ull >> (64 - width); + + return (v & mask) << start; +} + +static inline uint64_t +__gen_offset(uint64_t v, uint32_t start, uint32_t end) +{ + __gen_validate_value(v); +#if DEBUG + uint64_t mask = (~0ull >> (64 - (end - start + 1))) << start; + + assert((v & ~mask) == 0); +#endif + + return v; +} + +static inline uint32_t +__gen_float(float v) +{ + __gen_validate_value(v); + return ((union __gen_value) { .f = (v) }).dw; +} + +static inline uint64_t +__gen_sfixed(float v, uint32_t start, uint32_t end, uint32_t fract_bits) +{ + __gen_validate_value(v); + + const float factor = (1 << fract_bits); + +#if DEBUG + const float max = ((1 << (end - start)) - 1) / factor; + const float min = -(1 << (end - start)) / factor; + assert(min <= v && v <= max); +#endif + + const int32_t int_val = roundf(v * factor); + const uint64_t mask = ~0ull >> (64 - (end - start + 1)); + + return (int_val & mask) << start; +} + +static inline uint64_t +__gen_ufixed(float v, uint32_t start, uint32_t end, uint32_t fract_bits) +{ + __gen_validate_value(v); + + const float factor = (1 << fract_bits); + +#if DEBUG + const float max = ((1 << (end - start + 1)) - 1) / factor; + const float min = 0.0f; + assert(min <= v && v <= max); +#endif + + const uint32_t uint_val = roundf(v * factor); + + return uint_val << start; +} + +#ifndef __gen_address_type +#error #define __gen_address_type before including this file +#endif + +#ifndef __gen_user_data +#error #define __gen_combine_address before including this file +#endif + +#endif + +""" + +def to_alphanum(name): + substitutions = { + ' ': '', + '/': '', + '[': '', + ']': '', + '(': '', + ')': '', + '-': '', + ':': '', + '.': '', + ',': '', + '=': '', + '>': '', + '#': '', + 'α': 'alpha', + '&': '', + '*': '', + '"': '', + '+': '', + '\'': '', + } + + for i, j in substitutions.items(): + name = name.replace(i, j) + + return name + +def safe_name(name): + name = to_alphanum(name) + if not str.isalpha(name[0]): + name = '_' + name + + return name + +class Field: + ufixed_pattern = re.compile("u(\d+)\.(\d+)") + sfixed_pattern = re.compile("s(\d+)\.(\d+)") + + def __init__(self, parser, attrs): + self.parser = parser + self.name = safe_name(attrs["name"]) + self.start = int(attrs["start"]) + self.end = int(attrs["end"]) + self.type = attrs["type"] + + if "prefix" in attrs: + self.prefix = attrs["prefix"] + else: + self.prefix = None + + if "default" in attrs: + self.default = int(attrs["default"]) + else: + self.default = None + + ufixed_match = Field.ufixed_pattern.match(self.type) + if ufixed_match: + self.type = 'ufixed' + self.fractional_size = int(ufixed_match.group(2)) + + sfixed_match = Field.sfixed_pattern.match(self.type) + if sfixed_match: + self.type = 'sfixed' + self.fractional_size = int(sfixed_match.group(2)) + + def emit_template_struct(self, dim): + if self.type == 'address': + type = '__gen_address_type' + elif self.type == 'bool': + type = 'bool' + elif self.type == 'float': + type = 'float' + elif self.type == 'ufixed': + type = 'float' + elif self.type == 'sfixed': + type = 'float' + elif self.type == 'uint' and self.end - self.start > 32: + type = 'uint64_t' + elif self.type == 'offset': + type = 'uint64_t' + elif self.type == 'int': + type = 'int32_t' + elif self.type == 'uint': + type = 'uint32_t' + elif self.type in self.parser.structs: + type = 'struct ' + self.parser.gen_prefix(safe_name(self.type)) + else: + print("#error unhandled type: %s" % self.type) + + print(" %-36s %s%s;" % (type, self.name, dim)) + + if len(self.values) > 0 and self.default == None: + if self.prefix: + prefix = self.prefix + "_" + else: + prefix = "" + + for value in self.values: + print("#define %-40s %d" % (prefix + value.name, value.value)) + +class Group: + def __init__(self, parser, parent, start, count, size): + self.parser = parser + self.parent = parent + self.start = start + self.count = count + self.size = size + self.fields = [] + + def emit_template_struct(self, dim): + if self.count == 0: + print(" /* variable length fields follow */") + else: + if self.count > 1: + dim = "%s[%d]" % (dim, self.count) + + for field in self.fields: + field.emit_template_struct(dim) + + class DWord: + def __init__(self): + self.size = 32 + self.fields = [] + self.address = None + + def collect_dwords(self, dwords, start, dim): + for field in self.fields: + if type(field) is Group: + if field.count == 1: + field.collect_dwords(dwords, start + field.start, dim) + else: + for i in range(field.count): + field.collect_dwords(dwords, + start + field.start + i * field.size, + "%s[%d]" % (dim, i)) + continue + + index = (start + field.start) // 32 + if not index in dwords: + dwords[index] = self.DWord() + + clone = copy.copy(field) + clone.start = clone.start + start + clone.end = clone.end + start + clone.dim = dim + dwords[index].fields.append(clone) + + if field.type == "address": + # assert dwords[index].address == None + dwords[index].address = field + + # Does this field extend into the next dword? + if index < field.end // 32 and dwords[index].size == 32: + if index + 1 in dwords: + assert dwords[index + 1].size == 32 + dwords[index].fields.extend(dwords[index + 1].fields) + dwords[index].size = 64 + dwords[index + 1] = dwords[index] + + def emit_pack_function(self, start): + dwords = {} + self.collect_dwords(dwords, 0, "") + + for index, dw in dwords.items(): + # For 64 bit dwords, we aliased the two dword entries in the dword + # dict it occupies. Now that we're emitting the pack function, + # skip the duplicate entries. + if index > 0 and index - 1 in dwords and dwords[index - 1] == dwords[index]: + continue + + # Special case: only one field and it's a struct at the beginning + # of the dword. In this case we pack directly into the + # destination. This is the only way we handle embedded structs + # larger than 32 bits. + if len(dw.fields) == 1: + field = dw.fields[0] + name = field.name + field.dim + if field.type in self.parser.structs and field.start % 32 == 0: + print("") + print(" %s_pack(data, &dw[%d], &values->%s);" % + (self.parser.gen_prefix(safe_name(field.type)), index, name)) + continue + + # Pack any fields of struct type first so we have integer values + # to the dword for those fields. + field_index = 0 + for field in dw.fields: + if type(field) is Field and field.type in self.parser.structs: + name = field.name + field.dim + print("") + print(" uint32_t v%d_%d;" % (index, field_index)) + print(" %s_pack(data, &v%d_%d, &values->%s);" % + (self.parser.gen_prefix(safe_name(field.type)), index, field_index, name)) + field_index = field_index + 1 + + print("") + dword_start = index * 32 + if dw.address == None: + address_count = 0 + else: + address_count = 1 + + if dw.size == 32 and dw.address == None: + v = None + print(" dw[%d] =" % index) + elif len(dw.fields) > address_count: + v = "v%d" % index + print(" const uint%d_t %s =" % (dw.size, v)) + else: + v = "0" + + field_index = 0 + for field in dw.fields: + name = field.name + field.dim + if field.type == "mbo": + s = "__gen_mbo(%d, %d)" % \ + (field.start - dword_start, field.end - dword_start) + elif field.type == "address": + s = None + elif field.type == "uint": + s = "__gen_uint(values->%s, %d, %d)" % \ + (name, field.start - dword_start, field.end - dword_start) + elif field.type == "int": + s = "__gen_sint(values->%s, %d, %d)" % \ + (name, field.start - dword_start, field.end - dword_start) + elif field.type == "bool": + s = "__gen_uint(values->%s, %d, %d)" % \ + (name, field.start - dword_start, field.end - dword_start) + elif field.type == "float": + s = "__gen_float(values->%s)" % name + elif field.type == "offset": + s = "__gen_offset(values->%s, %d, %d)" % \ + (name, field.start - dword_start, field.end - dword_start) + elif field.type == 'ufixed': + s = "__gen_ufixed(values->%s, %d, %d, %d)" % \ + (name, field.start - dword_start, field.end - dword_start, field.fractional_size) + elif field.type == 'sfixed': + s = "__gen_sfixed(values->%s, %d, %d, %d)" % \ + (name, field.start - dword_start, field.end - dword_start, field.fractional_size) + elif field.type in self.parser.structs: + s = "__gen_uint(v%d_%d, %d, %d)" % \ + (index, field_index, field.start - dword_start, field.end - dword_start) + field_index = field_index + 1 + else: + print("/* unhandled field %s, type %s */\n" % (name, field.type)) + s = None + + if not s == None: + if field == dw.fields[-1]: + print(" %s;" % s) + else: + print(" %s |" % s) + + if dw.size == 32: + if dw.address: + print(" dw[%d] = __gen_combine_address(data, &dw[%d], values->%s, %s);" % (index, index, dw.address.name, v)) + continue + + if dw.address: + v_address = "v%d_address" % index + print(" const uint64_t %s =\n __gen_combine_address(data, &dw[%d], values->%s, %s);" % + (v_address, index, dw.address.name, v)) + v = v_address + + print(" dw[%d] = %s;" % (index, v)) + print(" dw[%d] = %s >> 32;" % (index + 1, v)) + +class Value: + def __init__(self, attrs): + self.name = safe_name(attrs["name"]) + self.value = int(attrs["value"]) + +class Parser: + def __init__(self): + self.parser = xml.parsers.expat.ParserCreate() + self.parser.StartElementHandler = self.start_element + self.parser.EndElementHandler = self.end_element + + self.instruction = None + self.structs = {} + + def start_element(self, name, attrs): + if name == "genxml": + self.platform = attrs["name"] + self.gen = attrs["gen"].replace('.', '') + print(pack_header % {'license': license, 'platform': self.platform}) + elif name == "instruction": + self.group = Group(self, None, 0, 1, 0) + self.instruction = safe_name(attrs["name"]) + self.length_bias = int(attrs["bias"]) + if "length" in attrs: + self.length = int(attrs["length"]) + else: + self.length = None + elif name == "struct": + self.group = Group(self, None, 0, 1, 0) + self.struct = safe_name(attrs["name"]) + self.structs[attrs["name"]] = 1 + if "length" in attrs: + self.length = int(attrs["length"]) + else: + self.length = None + elif name == "group": + group = Group(self, self.group, + int(attrs["start"]), int(attrs["count"]), int(attrs["size"])) + self.group.fields.append(group) + self.group = group + elif name == "field": + self.group.fields.append(Field(self, attrs)) + self.values = [] + elif name == "enum": + self.values = [] + self.enum = safe_name(attrs["name"]) + if "prefix" in attrs: + self.prefix = safe_name(attrs["prefix"]) + else: + self.prefix= None + elif name == "value": + self.values.append(Value(attrs)) + + def end_element(self, name): + if name == "instruction": + self.emit_instruction() + self.instruction = None + self.group = None + elif name == "struct": + self.emit_struct() + self.struct = None + self.group = None + elif name == "group": + self.group = self.group.parent + elif name == "field": + self.group.fields[-1].values = self.values + elif name == "enum": + self.emit_enum() + self.enum = None + + def gen_prefix(self, name): + if name[0] == "_": + return 'GEN%s%s' % (self.gen, name) + else: + return 'GEN%s_%s' % (self.gen, name) + + def emit_template_struct(self, name, group): + print("struct %s {" % self.gen_prefix(name)) + group.emit_template_struct("") + print("};\n") + + def emit_pack_function(self, name, group): + name = self.gen_prefix(name) + print("static inline void\n%s_pack(__gen_user_data *data, void * restrict dst,\n%sconst struct %s * restrict values)\n{" % + (name, ' ' * (len(name) + 6), name)) + + # Cast dst to make header C++ friendly + print(" uint32_t * restrict dw = (uint32_t * restrict) dst;") + + group.emit_pack_function(0) + + print("}\n") + + def emit_instruction(self): + name = self.instruction + if not self.length == None: + print('#define %-33s %4d' % + (self.gen_prefix(name + "_length"), self.length)) + print('#define %-33s %4d' % + (self.gen_prefix(name + "_length_bias"), self.length_bias)) + + default_fields = [] + for field in self.group.fields: + if not type(field) is Field: + continue + if field.default == None: + continue + default_fields.append(" .%-35s = %4d" % (field.name, field.default)) + + if default_fields: + print('#define %-40s\\' % (self.gen_prefix(name + '_header'))) + print(", \\\n".join(default_fields)) + print('') + + self.emit_template_struct(self.instruction, self.group) + + self.emit_pack_function(self.instruction, self.group) + + def emit_struct(self): + name = self.struct + if not self.length == None: + print('#define %-33s %4d' % + (self.gen_prefix(name + "_length"), self.length)) + + self.emit_template_struct(self.struct, self.group) + self.emit_pack_function(self.struct, self.group) + + def emit_enum(self): + print('/* enum %s */' % self.gen_prefix(self.enum)) + for value in self.values: + if self.prefix: + name = self.prefix + "_" + value.name + else: + name = value.name + print('#define %-36s %4d' % (name.upper(), value.value)) + print('') + + def parse(self, filename): + file = open(filename, "rb") + self.parser.ParseFile(file) + file.close() + +if len(sys.argv) < 2: + print("No input xml file specified") + sys.exit(1) + +input_file = sys.argv[1] + +p = Parser() +p.parse(input_file) |