lib/genxml: Introduce Mesa genxml infrastructure to IGT
Subsystems (2)
Re: [PATCH 04/10] lib/intel/genxml: Import Xe2/Xe3/Xe3p XML hardware definitions from Mesa
In reply to Jan MaslakQuoted 9 lines · Jan Maslak
Import xe2.xml, xe3.xml, and xe3p.xml from Mesa (MIT-licensed, Mesa commit
3a62dc0218d3) unchanged.These files define the hardware command, struct, and register layouts for Xe2 (LNL/BMG), Xe3 (PTL), and Xe3p (WHL) Intel graphics generations. xe3p.xml is a stub that imports xe3.xml; the Xe3p architecture shares its command encoding with Xe3.
Signed-off-by Jan Maslak <[email protected]>
--
Zbigniew
Quoted 2,843 lines
--- lib/intel/genxml/xe2.xml | 1969 +++++++++++++++++++++++++++++++++++++ lib/intel/genxml/xe3.xml | 816 +++++++++++++++ lib/intel/genxml/xe3p.xml | 4 + lib/meson.build | 5 +- 4 files changed, 2793 insertions(+), 1 deletion(-) create mode 100644 lib/intel/genxml/xe2.xml create mode 100644 lib/intel/genxml/xe3.xml create mode 100644 lib/intel/genxml/xe3p.xmllib/intel/genxml/xe2.xml new file +1969
-0@@ -0,0 +1,1969 @@ +<?xml version='1.0' encoding='utf-8'?> +<genxml name="XE2" gen="20"> + <import name="gen125.xml"> + <exclude name="3DSTATE_CLEAR_PARAMS" /> + <exclude name="CLEAR_COLOR" /> + <exclude name="L3ALLOC" /> + </import> + <enum name="PREF_SLM_ALLOCATION_SIZE"> + <value name="SLM_ENCODES_0K" value="0" /> + <value name="SLM_ENCODES_16K" value="1" /> + <value name="SLM_ENCODES_32K" value="2" /> + <value name="SLM_ENCODES_64K" value="3" /> + <value name="SLM_ENCODES_96K" value="4" /> + <value name="SLM_ENCODES_128K" value="5" /> + <value name="SLM_ENCODES_160K" value="6" /> + <value name="SLM_ENCODES_192K" value="7" /> + <value name="SLM_ENCODES_224K" value="8" /> + <value name="SLM_ENCODES_256K" value="9" /> + <value name="SLM_ENCODES_384K" value="10" /> + </enum> + <enum name="RESOURCE_BARRIER_STAGE" prefix="RESOURCE_BARRIER_STAGE"> + <value name="None" value="0" /> + <value name="TOP" value="1" /> + <value name="Color" value="2" /> + <value name="Gpgpu" value="4" /> + <value name="Color and Compute" value="6" /> + <value name="Geom" value="16" /> + <value name="Geometry and Compute" value="20" /> + <value name="Raster" value="32" /> + <value name="Depth" value="64" /> + <value name="Pixel" value="128" /> + </enum> + <enum name="RESOURCE_BARRIER_TYPE" prefix="RESOURCE_BARRIER_TYPE"> + <value name="Immediate" value="0" /> + <value name="Signal" value="1" /> + <value name="Wait" value="2" /> + <value name="UAV" value="3" /> + </enum> + <enum name="UNIFIED_COMPRESSION_FORMAT"> + <value name="CMF_R8" value="0" /> + <value name="CMF_R8_G8" value="1" /> + <value name="CMF_R8_G8_B8_A8" value="2" /> + <value name="CMF_R10_G10_B10_A2" value="3" /> + <value name="CMF_R11_G11_B10" value="4" /> + <value name="CMF_R16" value="5" /> + <value name="CMF_R16_G16" value="6" /> + <value name="CMF_R16_G16_B16_A16" value="7" /> + <value name="CMF_R32" value="8" /> + <value name="CMF_R32_G32" value="9" /> + <value name="CMF_R32_G32_B32_A32" value="10" /> + <value name="CMF_Y16_U16_Y16_V16" value="11" /> + <value name="CMF_ML8" value="15" /> + </enum> + <struct name="INTERFACE_DESCRIPTOR_DATA" length="8"> + <field name="Kernel Start Pointer" dword="0" bits="31:6" type="offset" /> + <field name="Software Exception Enable" dword="2" bits="7:7" type="bool" /> + <field name="Illegal Opcode Exception Enable" dword="2" bits="13:13" type="bool" /> + <field name="Floating Point Mode" dword="2" bits="16:16" type="uint"> + <value name="IEEE-754" value="0" /> + <value name="Alternate" value="1" /> + </field> + <field name="Single Program Flow" dword="2" bits="18:18" type="bool" /> + <field name="Denorm Mode" dword="2" bits="19:19" type="uint"> + <value name="Ftz" value="0" /> + <value name="SetByKernel" value="1" /> + </field> + <field name="Thread Preemption" dword="2" bits="20:20" type="bool" default="1" /> + <field name="Sampler Count" dword="3" bits="4:2" 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="Sampler State Pointer" dword="3" bits="31:5" type="offset" /> + <field name="Binding Table Entry Count" dword="4" bits="4:0" type="uint" /> + <field name="Binding Table Pointer" dword="4" bits="20:5" type="offset" /> + <field name="Number of Threads in GPGPU Thread Group" dword="5" bits="9:0" type="uint" /> + <field name="Thread group forward progress guarantee" dword="5" bits="13:13" type="bool" /> + <field name="Shared Local Memory Size" dword="5" bits="20:16" 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" /> + <value name="Encodes 96K" value="10" /> + <value name="Encodes 128K" value="11" /> + <value name="Encodes 192K" value="12" /> + <value name="Encodes 256K" value="13" /> + <value name="Encodes 384K" value="14" /> + </field> + <field name="Rounding Mode" dword="5" bits="23:22" 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="Thread Group Dispatch Size" dword="5" bits="27:26" type="uint"> + <value name="TG size 8" value="0" /> + <value name="TG size 4" value="1" /> + <value name="TG size 2" value="2" /> + <value name="TG size 1" value="3" /> + </field> + <field name="Number Of Barriers" dword="5" bits="30:28" type="uint" prefix="BARRIER_SIZE"> + <value name="NONE" value="0" /> + <value name="B1" value="1" /> + <value name="B2" value="2" /> + <value name="B4" value="3" /> + <value name="B8" value="4" /> + <value name="B16" value="5" /> + <value name="B24" value="6" /> + <value name="B32" value="7" /> + </field> + <field name="BTD Mode" dword="5" bits="31:31" type="uint" /> + <field name="Preferred SLM Allocation Size" dword="7" bits="3:0" type="PREF_SLM_ALLOCATION_SIZE" /> + </struct> + <struct name="POSTSYNC_DATA" length="5"> + <field name="Operation" dword="0" bits="1:0" type="uint" default="0"> + <value name="No Write" value="0" /> + <value name="Write Immediate Data" value="1" /> + <value name="Write Timestamp" value="3" /> + </field> + <field name="HDC Pipeline Flush" dword="0" bits="2:2" type="bool" /> + <field name="MOCS" dword="0" bits="10:4" type="uint" nonzero="true" /> + <field name="System Memory Fence Request" dword="0" bits="11:11" type="bool" /> + <field name="Dataport Subslice Cache Flush" dword="0" bits="12:12" type="bool" /> + <field name="Destination Address" dword="1" bits="63:0" type="address" /> + <field name="Immediate Data" dword="3" bits="63:0" type="uint" /> + </struct> + <struct name="COMPUTE_WALKER_BODY" length="39"> + <field name="Indirect Data Length" dword="1" bits="16:0" type="uint" /> + <field name="L3 prefetch disable" dword="1" bits="17:17" type="bool" /> + <field name="Partition Dispatch Parameter" dword="1" bits="29:18" type="uint" /> + <field name="Partition Type" dword="1" bits="31:30" type="uint"> + <value name="PartitionX" value="1" /> + <value name="PartitionY" value="2" /> + <value name="PartitionZ" value="3" /> + </field> + <field name="Indirect Data Start Address" dword="2" bits="31:6" type="offset" /> + <field name="Compute Dispatch All walker Enable" dword="3" bits="0:0" type="uint"> + <value name="Disabled" value="0" /> + <value name="Enabled" value="1" /> + </field> + <field name="Dispatch Walk Order" dword="3" bits="6:5" type="uint"> + <value name="Linear Walk" value="0" /> + <value name="Y order walk" value="1" /> + </field> + <field name="Message SIMD" dword="3" bits="18:17" type="uint"> + <value name="SIMT16" value="1" /> + <value name="SIMT32" value="2" /> + </field> + <field name="Tile Layout" dword="3" bits="21:19" type="uint"> + <value name="Linear" value="0" /> + <value name="TileY 32bpe" value="1" /> + <value name="TileY 64bpe" value="2" /> + <value name="TileY 128bpe" value="3" /> + </field> + <field name="Walk Order" dword="3" bits="24:22" type="uint"> + <value name="Walk 012" value="0" /> + <value name="Walk 021" value="1" /> + <value name="Walk 102" value="2" /> + <value name="Walk 120" value="3" /> + <value name="Walk 201" value="4" /> + <value name="Walk 210" value="5" /> + </field> + <field name="Emit Inline Parameter" dword="3" bits="25:25" type="bool" /> + <field name="Emit Local" dword="3" bits="28:26" type="uint"> + <value name="Emit None" value="0" /> + <value name="Emit X" value="1" /> + <value name="Emit XY" value="3" /> + <value name="Emit XYZ" value="7" /> + </field> + <field name="Generate Local ID" dword="3" bits="29:29" type="bool" /> + <field name="SIMD Size" dword="3" bits="31:30" type="uint"> + <value name="SIMT16" value="1" /> + <value name="SIMT32" value="2" /> + </field> + <field name="Execution Mask" dword="4" bits="31:0" type="uint" /> + <field name="Local X Maximum" dword="5" bits="9:0" type="uint" /> + <field name="Local Y Maximum" dword="5" bits="19:10" type="uint" /> + <field name="Local Z Maximum" dword="5" bits="29:20" type="uint" /> + <field name="Thread Group ID X Dimension" dword="6" bits="31:0" type="uint" /> + <field name="Thread Group ID Y Dimension" dword="7" bits="31:0" type="uint" /> + <field name="Thread Group ID Z Dimension" dword="8" bits="31:0" type="uint" /> + <field name="Thread Group ID Starting X" dword="9" bits="31:0" type="uint" /> + <field name="Thread Group ID Starting Y" dword="10" bits="31:0" type="uint" /> + <field name="Thread Group ID Starting Z" dword="11" bits="31:0" type="uint" /> + <field name="Partition ID" dword="12" bits="31:0" type="uint" /> + <field name="Partition Size" dword="13" bits="31:0" type="uint" /> + <field name="Preempt X" dword="14" bits="31:0" type="uint" /> + <field name="Preempt Y" dword="15" bits="31:0" type="uint" /> + <field name="Preempt Z" dword="16" bits="31:0" type="uint" /> + <field name="Walker ID" dword="17" bits="3:0" type="uint" /> + <field name="Over dispatch TG count" dword="17" bits="23:8" type="uint" /> + <field name="Interface Descriptor" dword="18" bits="255:0" type="INTERFACE_DESCRIPTOR_DATA" /> + <field name="Post Sync" dword="26" bits="159:0" type="POSTSYNC_DATA" /> + <group count="8" dword="31" size="32"> + <field name="Inline Data" dword="0" bits="31:0" type="uint" /> + </group> + </struct> + <struct name="RENDER_SURFACE_STATE" length="16"> + <field name="Cube Face Enable - Positive Z" dword="0" bits="0:0" type="bool" /> + <field name="Cube Face Enable - Negative Z" dword="0" bits="1:1" type="bool" /> + <field name="Cube Face Enable - Positive Y" dword="0" bits="2:2" type="bool" /> + <field name="Cube Face Enable - Negative Y" dword="0" bits="3:3" type="bool" /> + <field name="Cube Face Enable - Positive X" dword="0" bits="4:4" type="bool" /> + <field name="Cube Face Enable - Negative X" dword="0" bits="5:5" type="bool" /> + <field name="Media Boundary Pixel Mode" dword="0" bits="7:6" type="uint"> + <value name="NORMAL_MODE" value="0" /> + <value name="PROGRESSIVE_FRAME" value="2" /> + <value name="INTERLACED_FRAME" value="3" /> + </field> + <field name="Render Cache Read Write Mode" dword="0" bits="8:8" type="uint"> + <value name="Write-Only Cache" value="0" /> + <value name="Read-Write Cache" value="1" /> + </field> + <field name="Enable Sampler Route to LSC" dword="0" bits="9:9" type="bool" /> + <field name="Vertical Line Stride Offset" dword="0" bits="10:10" type="uint" /> + <field name="Vertical Line Stride" dword="0" bits="11:11" type="uint" /> + <field name="Tile Mode" dword="0" bits="13:12" type="uint"> + <value name="LINEAR" value="0" /> + <value name="TILE64" value="1" /> + <value name="XMAJOR" value="2" /> + <value name="TILE4" value="3" /> + </field> + <field name="Surface Horizontal Alignment" dword="0" bits="15:14" type="uint"> + <value name="HALIGN_16" value="0" /> + <value name="HALIGN_32" value="1" /> + <value name="HALIGN_64" value="2" /> + <value name="HALIGN_128" value="3" /> + </field> + <field name="Surface Vertical Alignment" dword="0" bits="17:16" type="uint"> + <value name="VALIGN_4" value="1" /> + <value name="VALIGN_8" value="2" /> + <value name="VALIGN_16" value="3" /> + </field> + <field name="Surface Format" dword="0" bits="26:18" type="uint" /> + <field name="Surface Array" dword="0" bits="28:28" type="bool" /> + <field name="Surface Type" dword="0" bits="31:29" type="STATE_SURFACE_TYPE" /> + <field name="Surface QPitch" dword="1" bits="14:0" type="uint" /> + <field name="Sample Tap Discard Disable" dword="1" bits="15:15" type="bool" /> + <field name="Corner Texel Mode" dword="1" bits="18:18" type="bool" /> + <field name="Base Mip Level" dword="1" bits="23:19" type="uint" /> + <field name="MOCS" dword="1" bits="30:24" type="uint" nonzero="true" /> + <field name="Width" dword="2" bits="13:0" type="uint" /> + <field name="Height" dword="2" bits="29:16" type="uint" /> + <field name="Depth Stencil Resource" dword="2" bits="31:31" type="bool" /> + <field name="Surface Pitch" dword="3" bits="17:0" type="uint" /> + <field name="Depth" dword="3" bits="31:21" type="uint" /> + <field name="Multisample Position Palette Index" dword="4" bits="2:0" type="uint" /> + <field name="Number of Multisamples" dword="4" bits="5:3" 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="Multisampled Surface Storage Format" dword="4" bits="6:6" type="uint"> + <value name="MSFMT_MSS" value="0" /> + <value name="MSFMT_DEPTH_STENCIL" value="1" /> + </field> + <field name="Render Target View Extent" dword="4" bits="17:7" type="uint" /> + <field name="Minimum Array Element" dword="4" bits="28:18" type="uint" /> + <field name="Render Target And Sample Unorm Rotation" dword="4" bits="30:29" 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="MIP Count / LOD" dword="5" bits="3:0" type="uint" /> + <field name="Surface Min LOD" dword="5" bits="7:4" type="uint" /> + <field name="Mip Tail Start LOD" dword="5" bits="11:8" type="uint" /> + <field name="L1 Cache Control" dword="5" bits="18:16" type="L1_CACHE_CONTROL" /> + <field name="EWA Disable For Cube" dword="5" bits="20:20" type="bool" /> + <field name="Y Offset" dword="5" bits="23:21" type="uint" /> + <field name="X Offset" dword="5" bits="31:25" type="uint" /> + <field name="Auxiliary Surface Mode" dword="6" bits="2:0" type="uint"> + <value name="AUX_NONE" value="0" /> + <value name="AUX_APPEND" value="1" /> + <value name="AUX_MCS" value="2" /> + </field> + <field name="Y Offset for U or UV Plane" dword="6" bits="13:0" type="uint" /> + <field name="Auxiliary Surface Pitch" dword="6" bits="12:3" type="uint" /> + <field name="YUV Interpolation Enable" dword="6" bits="15:15" type="bool" /> + <field name="X Offset for U or UV Plane" dword="6" bits="29:16" type="uint" /> + <field name="Auxiliary Surface QPitch" dword="6" bits="30:16" type="uint" /> + <field name="Resource Min LOD" dword="7" bits="11:0" type="u4.8" /> + <field name="Shader Channel Select Alpha" dword="7" bits="18:16" type="Shader Channel Select" /> + <field name="Shader Channel Select Blue" dword="7" bits="21:19" type="Shader Channel Select" /> + <field name="Shader Channel Select Green" dword="7" bits="24:22" type="Shader Channel Select" /> + <field name="Shader Channel Select Red" dword="7" bits="27:25" type="Shader Channel Select" /> + <field name="Surface Base Address" dword="8" bits="63:0" type="address" /> + <field name="Mip Region Width In Log2" dword="10" bits="3:0" type="uint" /> + <field name="Append Counter Address" dword="10" bits="63:2" type="address" /> + <field name="Mip Region Height In Log2" dword="10" bits="7:4" type="uint" /> + <field name="Procedural Texture" dword="10" bits="11:11" type="bool" /> + <field name="Auxiliary Surface Base Address" dword="10" bits="63:12" type="address" /> + <field name="Y Offset for V Plane" dword="11" bits="13:0" type="uint" /> + <field name="X Offset for V Plane" dword="11" bits="29:16" type="uint" /> + <field name="Compression Format" dword="12" bits="3:0" type="UNIFIED_COMPRESSION_FORMAT" /> + <field name="Mip Region Depth In Log2" dword="12" bits="7:4" type="uint" /> + <field name="Disallowlowqualityfiltering" dword="13" bits="31:31" type="bool" /> + </struct> + <struct name="RESOURCE_BARRIER_BODY" length="4"> + <field name="Wait Stage" dword="0" bits="11:0" type="RESOURCE_BARRIER_STAGE" /> + <field name="Signal Stage" dword="0" bits="23:12" type="RESOURCE_BARRIER_STAGE" /> + <field name="Barrier Type" dword="0" bits="31:30" type="RESOURCE_BARRIER_TYPE" /> + <field name="L1 Dataport Cache Invalidate" dword="1" bits="21:21" type="bool" /> + <field name="Depth Cache" dword="1" bits="22:22" type="bool" /> + <field name="Color Cache" dword="1" bits="23:23" type="bool" /> + <field name="L1 Dataport UAV Flush" dword="1" bits="24:24" type="bool" /> + <field name="Texture (RO)" dword="1" bits="25:25" type="bool" /> + <field name="State (RO)" dword="1" bits="26:26" type="bool" /> + <field name="VF (RO)" dword="1" bits="27:27" type="bool" /> + <field name="AMFS" dword="1" bits="28:28" type="bool" /> + <field name="Constant Cache" dword="1" bits="29:29" type="bool" /> + <field name="Barrier ID Address" dword="2" bits="63:3" type="address" /> + </struct> + <instruction name="3DSTATE_3D_MODE" bias="2" length="5" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="3" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="30" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="1" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Cross Slice Hashing Mode" dword="1" bits="1:0" type="uint"> + <value name="Normal Mode" value="0" /> + <value name="Disable" value="1" /> + <value name="hashing 32x32" value="3" /> + </field> + <field name="3D Scoreboard Hashing Mode" dword="1" bits="4:4" type="bool" /> + <field name="Subslice Hashing Table Enable" dword="1" bits="5:5" type="bool" /> + <field name="Slice Hashing Table Enable" dword="1" bits="6:6" type="bool" /> + <field name="DX10 OGL Border Mode for YCRCB" dword="1" bits="10:10" type="bool" /> + <field name="Enable OOO reads in RCPB" dword="1" bits="11:11" type="bool" /> + <field name="Cross Slice Hashing Mode Mask" dword="1" bits="17:16" type="int" /> + <field name="3D Scoreboard Hashing Mode Mask" dword="1" bits="20:20" type="bool" /> + <field name="Subslice Hashing Table Enable Mask" dword="1" bits="21:21" type="bool" /> + <field name="Slice Hashing Table Enable Mask" dword="1" bits="22:22" type="bool" /> + <field name="DX10 OGL Border Mode for YCRCB Mask" dword="1" bits="26:26" type="bool" /> + <field name="Enable OOO reads in RCPB Mask" dword="1" bits="27:27" type="bool" /> + <field name="AMFS MOCS" dword="2" bits="6:0" type="uint" /> + <field name="State Cache redirect to CS section enable" dword="2" bits="9:9" type="bool" /> + <field name="AMFS MOCS Mask" dword="2" bits="22:16" type="uint" /> + <field name="State Cache redirect to CS section enable Mask" dword="2" bits="25:25" type="bool" /> + <field name="RCC RHWO Optimization Disable" dword="3" bits="15:15" type="bool" /> + <field name="RCC RHWO Optimization Disable Mask" dword="3" bits="31:31" type="bool" /> + </instruction> + <instruction name="3DSTATE_BTD" bias="2" length="6" engine="render|compute"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="4" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="6" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="1" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="0" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Dispatch Timeout Counter" dword="1" bits="2:0" type="uint"> + <value name="64 clocks" value="0" /> + <value name="128 clocks" value="1" /> + <value name="192 clocks" value="2" /> + <value name="256 clocks" value="3" /> + <value name="512 clocks" value="4" /> + <value name="1024 clocks" value="5" /> + <value name="2048 clocks" value="6" /> + <value name="4096 clocks" value="7" /> + </field> + <field name="Controls the maximum number of outstanding Ray Queries per SS" dword="1" bits="8:7" type="uint" prefix="RAYS_QUERIES_OUTSTANDING"> + <value name="128" value="0" /> + <value name="256" value="1" /> + <value name="512" value="2" /> + <value name="1024" value="3" /> + </field> + <field name="BTD Mid thread preemption" dword="1" bits="31:31" type="bool" default="1" /> + <field name="Per DSS Memory Backed Buffer Size" dword="2" bits="2:0" type="uint" default="6"> + <value name="2KB" value="0" /> + <value name="4KB" value="1" /> + <value name="8KB" value="2" /> + <value name="16KB" value="3" /> + <value name="32KB" value="4" /> + <value name="64KB" value="5" /> + <value name="128KB" value="6" /> + </field> + <field name="Memory Backed Buffer Base Pointer" dword="2" bits="63:10" type="address" /> + <field name="Scratch Space Buffer" dword="4" bits="31:10" type="uint" /> + </instruction> + <instruction name="3DSTATE_CLIP" bias="2" length="4" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="2" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="18" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="User Clip Distance Cull Test Enable Bitmask" dword="1" bits="7:0" type="uint" /> + <field name="Statistics Enable" dword="1" bits="10:10" type="bool" /> + <field name="Force Clip Mode" dword="1" bits="16:16" type="bool" /> + <field name="Force User Clip Distance Clip Test Enable Bitmask" dword="1" bits="17:17" type="bool" /> + <field name="Early Cull Enable" dword="1" bits="18:18" type="bool" /> + <field name="Vertex Sub Pixel Precision Select" dword="1" bits="19:19" type="uint"> + <value name="8 Bit" value="0" /> + <value name="4 Bit" value="1" /> + </field> + <field name="Force User Clip Distance Cull Test Enable Bitmask" dword="1" bits="20:20" type="bool" /> + <field name="Triangle Fan Provoking Vertex Select" dword="2" bits="1:0" type="uint" /> + <field name="Line Strip/List Provoking Vertex Select" dword="2" bits="3:2" type="uint" /> + <field name="Triangle Strip/List Provoking Vertex Select" dword="2" bits="5:4" type="uint" /> + <field name="Triangle Strip Odd Provoking Vertex Select" dword="2" bits="7:6" type="uint" /> + <field name="Non-Perspective Barycentric Enable" dword="2" bits="8:8" type="bool" /> + <field name="Perspective Divide Disable" dword="2" bits="9:9" type="bool" /> + <field name="Clip Mode" dword="2" bits="15:13" 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="User Clip Distance Clip Test Enable Bitmask" dword="2" bits="23:16" type="uint" /> + <field name="Guardband Clip Test Enable" dword="2" bits="26:26" type="bool" /> + <field name="Viewport XY Clip Test Enable" dword="2" bits="28:28" type="bool" /> + <field name="API Mode" dword="2" bits="30:30" type="uint"> + <value name="APIMODE_OGL" value="0" /> + <value name="APIMODE_D3D" value="1" /> + </field> + <field name="Clip Enable" dword="2" bits="31:31" type="bool" /> + <field name="Maximum VP Index" dword="3" bits="3:0" type="uint" /> + <field name="Force Zero RTA Index Enable" dword="3" bits="5:5" type="bool" /> + <field name="Maximum Point Width" dword="3" bits="16:6" type="u8.3" /> + <field name="Minimum Point Width" dword="3" bits="27:17" type="u8.3" /> + </instruction> + <instruction name="3DSTATE_CPSIZE_CONTROL_BUFFER" bias="2" length="8" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="6" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="131" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Surface Pitch" dword="1" bits="16:0" type="uint" /> + <field name="Surface Type" dword="1" bits="31:29" type="uint" /> + <field name="Surface Base Address" dword="2" bits="63:0" type="address" /> + <field name="Width" dword="4" bits="14:1" type="uint" /> + <field name="Height" dword="4" bits="30:17" type="uint" /> + <field name="MOCS" dword="5" bits="6:0" type="uint" /> + <field name="Minimum Array Element" dword="5" bits="18:8" type="uint" /> + <field name="Depth" dword="5" bits="30:20" type="uint" /> + <field name="Compression Format" dword="6" bits="3:0" type="UNIFIED_COMPRESSION_FORMAT" /> + <field name="Mip Tail Start LOD" dword="6" bits="29:26" type="uint" /> + <field name="Tiled Mode" dword="6" bits="31:30" type="uint"> + <value name="TILE64" value="1" /> + <value name="TILE4" value="3" /> + </field> + <field name="Surface QPitch" dword="7" bits="14:0" type="uint" /> + <field name="Surf LOD" dword="7" bits="19:16" type="uint" /> + <field name="Render Target View Extent" dword="7" bits="31:21" type="uint" /> + </instruction> + <instruction name="3DSTATE_DEPTH_BUFFER" bias="2" length="8" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="6" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="5" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Surface Pitch" dword="1" bits="17:0" type="uint" /> + <field name="Hierarchical Depth Buffer Enable" dword="1" bits="22:22" type="bool" /> + <field name="Corner Texel Mode" dword="1" bits="23:23" type="bool" /> + <field name="Surface Format" dword="1" bits="26:24" 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="Null Page Coherency Enable" dword="1" bits="27:27" type="bool" /> + <field name="Depth Write Enable" dword="1" bits="28:28" type="bool" /> + <field name="Surface Type" dword="1" bits="31:29" type="uint"> + <value name="SURFTYPE_2D" value="1" /> + <value name="SURFTYPE_CUBE" value="3" /> + <value name="SURFTYPE_NULL" value="7" /> + </field> + <field name="Surface Base Address" dword="2" bits="63:0" type="address" /> + <field name="Width" dword="4" bits="14:1" type="uint" /> + <field name="Height" dword="4" bits="30:17" type="uint" /> + <field name="MOCS" dword="5" bits="6:0" type="uint" nonzero="true" /> + <field name="Minimum Array Element" dword="5" bits="18:8" type="uint" /> + <field name="Depth" dword="5" bits="30:20" type="uint" /> + <field name="Render Compression Format" dword="6" bits="3:0" type="UNIFIED_COMPRESSION_FORMAT" /> + <field name="Mip Tail Start LOD" dword="6" bits="29:26" type="uint" /> + <field name="Tiled Mode" dword="6" bits="31:30" type="uint"> + <value name="TILE64" value="1" /> + <value name="TILE4" value="3" /> + </field> + <field name="Surface QPitch" dword="7" bits="14:0" type="uint" /> + <field name="LOD" dword="7" bits="19:16" type="uint" /> + <field name="Render Target View Extent" dword="7" bits="31:21" type="uint" /> + </instruction> + <instruction name="3DSTATE_DRAWING_RECTANGLE_FAST" bias="2" length="4" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="2" /> + <field name="Core Mode Select" dword="0" bits="15:14" type="uint"> + <value name="Legacy" value="0" /> + <value name="Core 0 Enabled" value="1" /> + <value name="Core 1 Enabled" value="2" /> + </field> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="0" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Clipped Drawing Rectangle X Min" dword="1" bits="15:0" type="uint" /> + <field name="Clipped Drawing Rectangle Y Min" dword="1" bits="31:16" type="uint" /> + <field name="Clipped Drawing Rectangle X Max" dword="2" bits="15:0" type="uint" /> + <field name="Clipped Drawing Rectangle Y Max" dword="2" bits="31:16" type="uint" /> + <field name="Drawing Rectangle Origin X" dword="3" bits="15:0" type="int" /> + <field name="Drawing Rectangle Origin Y" dword="3" bits="31:16" type="int" /> + </instruction> + <instruction name="3DSTATE_GS" bias="2" length="10" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="8" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="17" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Kernel Start Pointer" dword="1" bits="63:6" type="offset" /> + <field name="Expected Vertex Count" dword="3" bits="5:0" type="uint" /> + <field name="Software Exception Enable" dword="3" bits="7:7" type="bool" /> + <field name="Mask Stack Exception Enable" dword="3" bits="11:11" type="bool" /> + <field name="Accesses UAV" dword="3" bits="12:12" type="bool" /> + <field name="Illegal Opcode Exception Enable" dword="3" bits="13:13" type="bool" /> + <field name="Floating Point Mode" dword="3" bits="16:16" type="uint"> + <value name="IEEE-754" value="0" /> + <value name="Alternate" value="1" /> + </field> + <field name="Thread Dispatch Priority" dword="3" bits="17:17" type="uint"> + <value name="Normal" value="0" /> + <value name="High" value="1" /> + </field> + <field name="Binding Table Entry Count" dword="3" bits="25:18" type="uint" /> + <field name="Sampler Count" dword="3" bits="29:27" 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="Vector Mask Enable" dword="3" bits="30:30" type="uint"> + <value name="Dmask" value="0" /> + </field> + <field name="Single Program Flow" dword="3" bits="31:31" type="bool" /> + <field name="Scratch Space Buffer" dword="4" bits="31:10" type="uint" /> + <field name="Dispatch GRF Start Register For URB Data" dword="6" bits="3:0" type="uint" /> + <field name="Vertex URB Entry Read Offset" dword="6" bits="9:4" type="uint" /> + <field name="Include Vertex Handles" dword="6" bits="10:10" type="bool" /> + <field name="Vertex URB Entry Read Length" dword="6" bits="16:11" type="uint" /> + <field name="Output Topology" dword="6" bits="22:17" type="3D_Prim_Topo_Type" /> + <field name="Output Vertex Size" dword="6" bits="28:23" type="uint" /> + <field name="Dispatch GRF Start Register For URB Data [5:4]" dword="6" bits="30:29" type="uint" /> + <field name="Enable" dword="7" bits="0:0" type="bool" /> + <field name="Discard Adjacency" dword="7" bits="1:1" type="bool" /> + <field name="Reorder Mode" dword="7" bits="2:2" type="uint"> + <value name="LEADING" value="0" /> + <value name="TRAILING" value="1" /> + </field> + <field name="Hint" dword="7" bits="3:3" type="bool" /> + <field name="Include Primitive ID" dword="7" bits="4:4" type="bool" /> + <field name="Invocations Increment Value" dword="7" bits="9:5" type="uint" /> + <field name="Statistics Enable" dword="7" bits="10:10" type="bool" /> + <field name="Default Stream Id" dword="7" bits="14:13" type="uint" /> + <field name="Instance Control" dword="7" bits="19:15" type="uint" /> + <field name="Control Data Header Size" dword="7" bits="23:20" type="uint" /> + <field name="Maximum Number of Threads" dword="8" bits="8:0" type="uint" /> + <field name="Static Output Vertex Count" dword="8" bits="26:16" type="uint" /> + <field name="Static Output" dword="8" bits="30:30" type="bool" /> + <field name="Control Data Format" dword="8" bits="31:31" type="uint"> + <value name="CUT" value="0" /> + <value name="SID" value="1" /> + </field> + <field name="User Clip Distance Cull Test Enable Bitmask" dword="9" bits="7:0" type="uint" /> + <field name="User Clip Distance Clip Test Enable Bitmask" dword="9" bits="15:8" type="uint" /> + <field name="Vertex URB Entry Output Length" dword="9" bits="20:16" type="uint" /> + <field name="Vertex URB Entry Output Read Offset" dword="9" bits="26:21" type="uint" /> + </instruction> + <instruction name="3DSTATE_HS" bias="2" length="8" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="6" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="27" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Patch Count Threshold" dword="1" bits="3:0" type="uint" /> + <field name="Software Exception Enable" dword="1" bits="12:12" type="bool" /> + <field name="Illegal Opcode Exception Enable" dword="1" bits="13:13" type="bool" /> + <field name="Floating Point Mode" dword="1" bits="16:16" type="uint"> + <value name="IEEE-754" value="0" /> + <value name="alternate" value="1" /> + </field> + <field name="Thread Dispatch Priority" dword="1" bits="17:17" type="uint"> + <value name="Normal" value="0" /> + <value name="High" value="1" /> + </field> + <field name="Binding Table Entry Count" dword="1" bits="25:18" type="uint" /> + <field name="Sampler Count" dword="1" bits="29:27" 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="Instance Count" dword="2" bits="4:0" type="uint" /> + <field name="Maximum Number of Threads" dword="2" bits="16:8" type="uint" /> + <field name="Statistics Enable" dword="2" bits="29:29" type="bool" /> + <field name="Enable" dword="2" bits="31:31" type="bool" /> + <field name="Kernel Start Pointer" dword="3" bits="63:6" type="offset" /> + <field name="Scratch Space Buffer" dword="5" bits="31:10" type="uint" /> + <field name="Include Primitive ID" dword="7" bits="0:0" type="bool" /> + <field name="Vertex URB Entry Read Offset" dword="7" bits="9:4" type="uint" /> + <field name="Vertex URB Entry Read Length" dword="7" bits="16:11" type="uint" /> + <field name="Dispatch GRF Start Register For URB Data" dword="7" bits="23:19" type="uint" /> + <field name="Include Vertex Handles" dword="7" bits="24:24" type="bool" /> + <field name="Accesses UAV" dword="7" bits="25:25" type="bool" /> + <field name="Vector Mask Enable" dword="7" bits="26:26" type="uint"> + <value name="Dmask" value="0" /> + </field> + <field name="Single Program Flow" dword="7" bits="27:27" type="bool" /> + <field name="Dispatch GRF Start Register For URB Data [5]" dword="7" bits="28:28" type="uint" /> + </instruction> + <instruction name="3DSTATE_MESH_CONTROL" bias="2" length="3" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="1" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="119" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Maximum Number of ThreadGroups" dword="1" bits="8:0" type="uint" /> + <field name="VP and RTA Index Autostrip Enable" dword="1" bits="27:27" type="bool" /> + <field name="Thread Dispatch Priority" dword="1" bits="28:28" type="uint"> + <value name="High" value="1" /> + </field> + <field name="Fused EU Dispatch" dword="1" bits="29:29" type="bool" /> + <field name="Statistics Enable" dword="1" bits="30:30" type="bool" /> + <field name="MeshShader Enable" dword="1" bits="31:31" type="uint" /> + <field name="Scratch Space Buffer" dword="2" bits="31:10" type="uint" /> + </instruction> + <instruction name="3DSTATE_PS" bias="2" length="12" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="10" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="32" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Kernel 0 Enable" dword="1" bits="0:0" type="bool" /> + <field name="Kernel[0] : SIMD Width" dword="1" bits="1:1" type="uint" prefix="PS"> + <value name="SIMD16" value="0" /> + <value name="SIMD32" value="1" /> + </field> + <field name="Kernel Start Pointer 0" dword="1" bits="63:6" type="offset" /> + <field name="Software Exception Enable" dword="3" bits="7:7" type="bool" /> + <field name="Mask Stack Exception Enable" dword="3" bits="11:11" type="bool" /> + <field name="Illegal Opcode Exception Enable" dword="3" bits="13:13" type="bool" /> + <field name="Rounding Mode" dword="3" bits="15:14" 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="Floating Point Mode" dword="3" bits="16:16" type="uint"> + <value name="IEEE-754" value="0" /> + <value name="Alternate" value="1" /> + </field> + <field name="Thread Dispatch Priority" dword="3" bits="17:17" type="uint"> + <value name="Normal" value="0" /> + <value name="High" value="1" /> + </field> + <field name="Binding Table Entry Count" dword="3" bits="25:18" type="uint" /> + <field name="Single Precision Denormal Mode" dword="3" bits="26:26" type="uint"> + <value name="Flushed to Zero" value="0" /> + <value name="Retained" value="1" /> + </field> + <field name="Sampler Count" dword="3" bits="29:27" 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="Vector Mask Enable" dword="3" bits="30:30" type="uint"> + <value name="Dmask" value="0" /> + <value name="Vmask" value="1" /> + </field> + <field name="Single Program Flow" dword="3" bits="31:31" type="uint"> + <value name="Multiple" value="0" /> + <value name="Single" value="1" /> + </field> + <field name="Scratch Space Buffer" dword="4" bits="31:10" type="uint" /> + <field name="Position XY Offset Select" dword="6" bits="4:3" type="uint"> + <value name="POSOFFSET_NONE" value="0" /> + <value name="POSOFFSET_CENTROID" value="2" /> + <value name="POSOFFSET_SAMPLE" value="3" /> + </field> + <field name="Render Target Resolve Type" dword="6" bits="7:6" type="uint"> + <value name="RESOLVE_DISABLED" value="0" /> + </field> + <field name="Render Target Fast Clear Enable" dword="6" bits="8:8" type="bool" /> + <field name="Overlapping Subspans Enable" dword="6" bits="9:9" type="bool" /> + <field name="3D Scoreboard Address Size select" dword="6" bits="10:10" type="uint"> + <value name="2x2" value="0" /> + <value name="4x2" value="1" /> + </field> + <field name="Clear/Resolve BTI for Render Target" dword="6" bits="19:12" type="uint" /> + <field name="Pixel Scoreboard Disable" dword="6" bits="21:21" type="bool" /> + <field name="Maximum Number of Threads Per PSD" dword="6" bits="31:23" type="uint" /> + <field name="Dispatch GRF Start Register For Constant/Setup Data 1" dword="7" bits="15:8" type="uint" /> + <field name="Dispatch GRF Start Register For Constant/Setup Data 0" dword="7" bits="23:16" type="uint" /> + <field name="Kernel[0] : Poly Packing Policy" dword="7" bits="26:24" type="uint"> + <value name="POLY_PACK4_DYNAMIC" value="0" /> + <value name="POLY_PACK8_DYNAMIC" value="1" /> + <value name="POLY_PACK16_DYNAMIC" value="2" /> + <value name="POLY_PACK16_FIXED" value="3" /> + <value name="POLY_PACK8_FIXED" value="4" /> + </field> + <field name="Kernel[0] : Maximum Polys per Thread" dword="7" bits="29:27" type="uint" /> + <field name="Kernel 1 Selection Priority" dword="7" bits="31:31" type="uint"> + <value name="PRI_SIMD" value="0" /> + <value name="PRI_POLY" value="1" /> + </field> + <field name="Kernel 1 Enable" dword="8" bits="0:0" type="bool" /> + <field name="Kernel[1] : SIMD Width" dword="8" bits="1:1" type="uint" prefix="PS"> + <value name="SIMD16" value="0" /> + <value name="SIMD32" value="1" /> + </field> + <field name="Kernel Start Pointer 1" dword="8" bits="63:6" type="offset" /> + </instruction> + <instruction name="3DSTATE_PS_EXTRA" bias="2" length="2" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="0" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="79" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Input Coverage Mask State" dword="1" bits="1:0" 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> + <field name="Pixel Shader Has UAV" dword="1" bits="2:2" type="bool" /> + <field name="Pixel Shader Is Per Coarse Pixel" dword="1" bits="4:4" type="bool" /> + <field name="Pixel Shader Computes Stencil" dword="1" bits="5:5" type="bool" /> + <field name="Pixel Shader Is Per Sample" dword="1" bits="6:6" type="bool" /> + <field name="Pixel Shader Disables Alpha To Coverage" dword="1" bits="7:7" type="bool" /> + <field name="Simple PS Hint" dword="1" bits="9:9" type="bool" /> + <field name="Pixel Shader Requires Centroid Offsets" dword="1" bits="16:16" type="bool" /> + <field name="Enable PS Dependency On CPsize Change" dword="1" bits="17:17" type="bool" /> + <field name="Pixel Shader Requires Subpixel Sample Offsets" dword="1" bits="18:18" type="bool" /> + <field name="Pixel Shader Requires Non-Perspective Bary Plane Coefficients" dword="1" bits="19:19" type="bool" /> + <field name="Pixel Shader Requires Perspective Bary Plane Coefficients" dword="1" bits="20:20" type="bool" /> + <field name="Pixel Shader Requires Source Depth and/or W Plane Coefficients" dword="1" bits="21:21" type="bool" /> + <field name="Pixel Shader Requires Requested Coarse Pixel Shading Size" dword="1" bits="22:22" type="bool" /> + <field name="Pixel Shader Uses Source W" dword="1" bits="23:23" type="bool" /> + <field name="Pixel Shader Uses Source Depth" dword="1" bits="24:24" type="bool" /> + <field name="Force Computed Depth" dword="1" bits="25:25" type="bool" /> + <field name="Pixel Shader Computed Depth Mode" dword="1" bits="27:26" 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="Pixel Shader Kills Pixel" dword="1" bits="28:28" type="bool" /> + <field name="oMask Present to Render Target" dword="1" bits="29:29" type="bool" /> + <field name="Pixel Shader Does not write to RT" dword="1" bits="30:30" type="mbz" /> + <field name="Pixel Shader Valid" dword="1" bits="31:31" type="bool" /> + </instruction> + <instruction name="3DSTATE_RASTER" bias="2" length="5" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="3" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="80" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Viewport Z Near Clip Test Enable" dword="1" bits="0:0" type="bool" /> + <field name="Scissor Rectangle Enable" dword="1" bits="1:1" type="bool" /> + <field name="Antialiasing Enable" dword="1" bits="2:2" type="bool" /> + <field name="Back Face Fill Mode" dword="1" bits="4:3" type="uint" prefix="FILL_MODE"> + <value name="SOLID" value="0" /> + <value name="WIREFRAME" value="1" /> + <value name="POINT" value="2" /> + </field> + <field name="Front Face Fill Mode" dword="1" bits="6:5" type="uint" prefix="FILL_MODE"> + <value name="SOLID" value="0" /> + <value name="WIREFRAME" value="1" /> + <value name="POINT" value="2" /> + </field> + <field name="Global Depth Offset Enable Point" dword="1" bits="7:7" type="bool" /> + <field name="Global Depth Offset Enable Wireframe" dword="1" bits="8:8" type="bool" /> + <field name="Global Depth Offset Enable Solid" dword="1" bits="9:9" type="bool" /> + <field name="DX Multisample Rasterization Mode" dword="1" bits="11:10" 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="DX Multisample Rasterization Enable" dword="1" bits="12:12" type="bool" /> + <field name="Smooth Point Enable" dword="1" bits="13:13" type="bool" /> + <field name="Force Multisampling" dword="1" bits="14:14" type="uint" /> + <field name="Cull Mode" dword="1" bits="17:16" 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="Forced Sample Count" dword="1" bits="20:18" 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="Front Winding" dword="1" bits="21:21" type="uint"> + <value name="Clockwise" value="0" /> + <value name="Counter Clockwise" value="1" /> + </field> + <field name="API Mode" dword="1" bits="23:22" type="uint"> + <value name="DX9/OGL" value="0" /> + <value name="DX10.0" value="1" /> + <value name="DX10.1+" value="2" /> + </field> + <field name="Conservative Rasterization Enable" dword="1" bits="24:24" type="bool" /> + <field name="Viewport Z Far Clip Test Enable" dword="1" bits="26:26" type="bool" /> + <field name="Legacy Bary Assignment Disable=" dword="1" bits="27:27" type="bool" /> + <field name="Global Depth Offset Constant" dword="2" bits="31:0" type="float" /> + <field name="Global Depth Offset Scale" dword="3" bits="31:0" type="float" /> + <field name="Global Depth Offset Clamp" dword="4" bits="31:0" type="float" /> + </instruction> + <instruction name="3DSTATE_SBE" bias="2" length="6" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="4" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="31" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Primitive ID Override Attribute Select" dword="1" bits="4:0" type="uint" /> + <field name="Vertex URB Entry Read Offset" dword="1" bits="10:5" type="uint" /> + <field name="Vertex URB Entry Read Length" dword="1" bits="15:11" type="uint" /> + <field name="Primitive ID Override Component X" dword="1" bits="16:16" type="bool" /> + <field name="Primitive ID Override Component Y" dword="1" bits="17:17" type="bool" /> + <field name="Primitive ID Override Component Z" dword="1" bits="18:18" type="bool" /> + <field name="Primitive ID Override Component W" dword="1" bits="19:19" type="bool" /> + <field name="Point Sprite Texture Coordinate Origin" dword="1" bits="20:20" type="uint"> + <value name="UPPERLEFT" value="0" /> + <value name="LOWERLEFT" value="1" /> + </field> + <field name="Attribute Swizzle Enable" dword="1" bits="21:21" type="bool" /> + <field name="Number of SF Output Attributes" dword="1" bits="27:22" type="uint" /> + <field name="Force Vertex URB Entry Read Offset" dword="1" bits="28:28" type="bool" /> + <field name="Force Vertex URB Entry Read Length" dword="1" bits="29:29" type="bool" /> + <field name="Vertex Attributes Bypass" dword="1" bits="31:31" type="bool" /> + <field name="Point Sprite Texture Coordinate Enable" dword="2" bits="31:0" type="uint" /> + <field name="Constant Interpolation Enable" dword="3" bits="31:0" type="uint" /> + <group count="32" dword="4" size="2"> + <field name="Attribute Active Component Format" dword="0" bits="1:0" type="uint" prefix="ACTIVE_COMPONENT"> + <value name="DISABLED" value="0" /> + <value name="XY" value="1" /> + <value name="XYZ" value="2" /> + <value name="XYZW" value="3" /> + </field> + </group> + </instruction> + <instruction name="3DSTATE_SF" bias="2" length="4" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="2" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="19" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Viewport Transform Enable" dword="1" bits="1:1" type="bool" /> + <field name="Statistics Enable" dword="1" bits="10:10" type="bool" /> + <field name="Legacy Global Depth Bias Enable" dword="1" bits="11:11" type="bool" /> + <field name="Line Width" dword="1" bits="29:12" type="u11.7" /> + <field name="Line End Cap Antialiasing Region Width" dword="2" bits="17:16" 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="Deref Block Size" dword="2" bits="30:29" type="uint"> + <value name="Block Deref Size 32" value="0" /> + <value name="Per Poly Deref Mode" value="1" /> + <value name="Block Deref Size 8" value="2" /> + <value name="Mesh Shader EODB" value="3" /> + </field> + <field name="Point Width" dword="3" bits="10:0" type="u8.3" /> + <field name="Point Width Source" dword="3" bits="11:11" type="uint"> + <value name="Vertex" value="0" /> + <value name="State" value="1" /> + </field> + <field name="Vertex Sub Pixel Precision Select" dword="3" bits="12:12" type="uint"> + <value name="8 Bit" value="0" /> + <value name="4 Bit" value="1" /> + </field> + <field name="Smooth Point Enable" dword="3" bits="13:13" type="bool" /> + <field name="AA Line Distance Mode" dword="3" bits="14:14" type="uint"> + <value name="AALINEDISTANCE_TRUE" value="1" /> + </field> + <field name="Triangle Strip Odd Provoking Vertex Select" dword="3" bits="24:23" type="uint" /> + <field name="Triangle Fan Provoking Vertex Select" dword="3" bits="26:25" type="uint" /> + <field name="Line Strip/List Provoking Vertex Select" dword="3" bits="28:27" type="uint" /> + <field name="Triangle Strip/List Provoking Vertex Select" dword="3" bits="30:29" type="uint" /> + <field name="Last Pixel Enable" dword="3" bits="31:31" type="bool" /> + </instruction> + <instruction name="3DSTATE_STENCIL_BUFFER" bias="2" length="8" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="6" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="6" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Surface Pitch" dword="1" bits="16:0" type="uint" /> + <field name="Corner Texel Mode" dword="1" bits="23:23" type="bool" /> + <field name="Null Page Coherency Enable" dword="1" bits="27:27" type="bool" /> + <field name="Stencil Write Enable" dword="1" bits="28:28" type="bool" /> + <field name="Surface Type" dword="1" bits="31:29" type="uint"> + <value name="SURFTYPE_2D" value="1" /> + <value name="SURFTYPE_CUBE" value="3" /> + <value name="SURFTYPE_NULL" value="7" /> + </field> + <field name="Surface Base Address" dword="2" bits="63:0" type="address" /> + <field name="Width" dword="4" bits="14:1" type="uint" /> + <field name="Height" dword="4" bits="30:17" type="uint" /> + <field name="MOCS" dword="5" bits="6:0" type="uint" nonzero="true" /> + <field name="Minimum Array Element" dword="5" bits="18:8" type="uint" /> + <field name="Depth" dword="5" bits="30:20" type="uint" /> + <field name="Compression Format" dword="6" bits="3:0" type="UNIFIED_COMPRESSION_FORMAT" /> + <field name="Mip Tail Start LOD" dword="6" bits="29:26" type="uint" /> + <field name="Tiled Mode" dword="6" bits="31:30" type="uint"> + <value name="TILE64" value="1" /> + <value name="TILE4" value="3" /> + </field> + <field name="Surface QPitch" dword="7" bits="14:0" type="uint" /> + <field name="Surf LOD" dword="7" bits="19:16" type="uint" /> + <field name="Render Target View Extent" dword="7" bits="31:21" type="uint" /> + </instruction> + <instruction name="3DSTATE_TE" bias="2" length="5" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="3" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="28" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="TE Enable" dword="1" bits="0:0" type="bool" /> + <field name="TE Mode" dword="1" bits="2:1" type="uint"> + <value name="HW_TESS" value="0" /> + <value name="FORCE_MIN" value="3" /> + </field> + <field name="TE Domain" dword="1" bits="5:4" type="uint"> + <value name="QUAD" value="0" /> + <value name="TRI" value="1" /> + <value name="ISOLINE" value="2" /> + </field> + <field name="Output Topology" dword="1" bits="9:8" 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="Number Of Regions Per Patch" dword="1" bits="11:10" type="uint" /> + <field name="Partitioning" dword="1" bits="13:12" type="uint"> + <value name="INTEGER" value="0" /> + <value name="ODD_FRACTIONAL" value="1" /> + <value name="EVEN_FRACTIONAL" value="2" /> + <value name="POW2" value="3" /> + </field> + <field name="Tessellation Distribution Mode" dword="1" bits="15:14" type="uint"> + <value name="TEDMODE_OFF" value="0" /> + <value name="TEDMODE_RR_STRICT" value="1" /> + <value name="TEDMODE_RR_FREE" value="2" /> + </field> + <field name="Tessellation Distribution Level" dword="1" bits="18:17" type="uint"> + <value name="TEDLEVEL_PATCH" value="0" /> + <value name="TEDLEVEL_REGION" value="1" /> + </field> + <field name="Tessellation Scale Factor Enable" dword="1" bits="19:19" type="bool" /> + <field name="Tessellation Factor Format" dword="1" bits="20:20" type="uint"> + <value name="FLOAT32" value="0" /> + <value name="FLOAT16" value="1" /> + </field> + <field name="Patch Header Layout" dword="1" bits="23:22" type="uint"> + <value name="LEGACY" value="0" /> + <value name="REVERSED" value="2" /> + <value name="REVERSED_TRI_INSIDE_SEPARATE" value="3" /> + </field> + <field name="Small Patch Threshold" dword="1" bits="25:24" type="uint" prefix="SPT"> + <value name="8_TRIANGLES" value="0" /> + <value name="16_TRIANGLES" value="1" /> + <value name="32_TRIANGLES" value="2" /> + <value name="64_TRIANGLES" value="3" /> + </field> + <field name="Target Block Size" dword="1" bits="29:26" type="uint"> + <value name="64_TRIANGLES" value="0" /> + <value name="96_TRIANGLES" value="1" /> + <value name="128_TRIANGLES" value="2" /> + <value name="192_TRIANGLES" value="3" /> + <value name="256_TRIANGLES" value="4" /> + <value name="384_TRIANGLES" value="5" /> + <value name="512_TRIANGLES" value="6" /> + <value name="768_TRIANGLES" value="7" /> + <value name="1K_TRIANGLES" value="8" /> + <value name="1.5K_TRIANGLES" value="9" /> + <value name="2K_TRIANGLES" value="10" /> + <value name="3K_TRIANGLES" value="11" /> + <value name="4K_TRIANGLES" value="12" /> + <value name="6K_TRIANGLES" value="13" /> + <value name="8K_TRIANGLES" value="14" /> + <value name="12K_TRIANGLES" value="15" /> + </field> + <field name="Local BOP Accumulator Threshold" dword="1" bits="31:30" type="uint"> + <value name="MULTIPLIER_0" value="0" /> + <value name="MULTIPLIER_1" value="1" /> + <value name="MULTIPLIER_2" value="2" /> + <value name="MULTIPLIER_4" value="3" /> + </field> + <field name="Maximum Tessellation Factor Odd" dword="2" bits="31:0" type="float" /> + <field name="Maximum Tessellation Factor Not Odd" dword="3" bits="31:0" type="float" /> + <field name="Tessellation Scale Factor" dword="4" bits="31:0" type="float" /> + </instruction> + <instruction name="3DSTATE_VS" bias="2" length="9" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="7" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="16" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Kernel Start Pointer" dword="1" bits="63:6" type="offset" /> + <field name="Software Exception Enable" dword="3" bits="7:7" type="bool" /> + <field name="Accesses UAV" dword="3" bits="12:12" type="bool" /> + <field name="Illegal Opcode Exception Enable" dword="3" bits="13:13" type="bool" /> + <field name="Floating Point Mode" dword="3" bits="16:16" type="uint"> + <value name="IEEE-754" value="0" /> + <value name="Alternate" value="1" /> + </field> + <field name="Thread Dispatch Priority" dword="3" bits="17:17" type="uint"> + <value name="Normal" value="0" /> + <value name="High" value="1" /> + </field> + <field name="Binding Table Entry Count" dword="3" bits="25:18" type="uint" /> + <field name="Sampler Count" dword="3" bits="29:27" 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="Vector Mask Enable" dword="3" bits="30:30" type="uint"> + <value name="Dmask" value="0" /> + </field> + <field name="Scratch Space Buffer" dword="4" bits="31:10" type="uint" /> + <field name="Vertex URB Entry Read Offset" dword="6" bits="9:4" type="uint" /> + <field name="Vertex URB Entry Read Length" dword="6" bits="16:11" type="uint" /> + <field name="Dispatch GRF Start Register For URB Data" dword="6" bits="24:20" type="uint" /> + <field name="Enable" dword="7" bits="0:0" type="bool" /> + <field name="Vertex Cache Disable" dword="7" bits="1:1" type="bool" /> + <field name="SIMD8 Single Instance Dispatch Enable" dword="7" bits="9:9" type="bool" /> + <field name="Statistics Enable" dword="7" bits="10:10" type="bool" /> + <field name="Maximum Number of Threads" dword="7" bits="31:22" type="uint" /> + <field name="User Clip Distance Cull Test Enable Bitmask" dword="8" bits="7:0" type="uint" /> + <field name="User Clip Distance Clip Test Enable Bitmask" dword="8" bits="15:8" type="uint" /> + <field name="Vertex URB Entry Output Length" dword="8" bits="20:16" type="uint" /> + <field name="Vertex URB Entry Output Read Offset" dword="8" bits="26:21" type="uint" /> + </instruction> + <instruction name="3DSTATE_WM_HZ_OP" bias="2" length="6" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="4" /> + <field name="Predicate Enable" dword="0" bits="8:8" type="bool" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="82" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Depth Buffer Partial Resolve Enable" dword="1" bits="9:9" type="bool" /> + <field name="Number of Multisamples" dword="1" bits="15:13" type="uint" prefix="SAMPLES"> + <value name="1" value="0" /> + <value name="2" value="1" /> + <value name="4" value="2" /> + <value name="8" value="3" /> + <value name="16" value="4" /> + </field> + <field name="Stencil Clear Value" dword="1" bits="23:16" type="uint" /> + <field name="Stencil Buffer Resolve Enable" dword="1" bits="24:24" type="bool" /> + <field name="Full Surface Depth and Stencil Clear" dword="1" bits="25:25" type="bool" /> + <field name="Pixel Position Offset Enable" dword="1" bits="26:26" type="bool" /> + <field name="Hierarchical Depth Buffer Resolve Enable" dword="1" bits="27:27" type="bool" /> + <field name="Depth Buffer Resolve Enable" dword="1" bits="28:28" type="bool" /> + <field name="Scissor Rectangle Enable" dword="1" bits="29:29" type="bool" /> + <field name="Depth Buffer Clear Enable" dword="1" bits="30:30" type="bool" /> + <field name="Stencil Buffer Clear Enable" dword="1" bits="31:31" type="bool" /> + <field name="Clear Rectangle X Min" dword="2" bits="15:0" type="uint" /> + <field name="Clear Rectangle Y Min" dword="2" bits="31:16" type="uint" /> + <field name="Clear Rectangle X Max" dword="3" bits="15:0" type="uint" /> + <field name="Clear Rectangle Y Max" dword="3" bits="31:16" type="uint" /> + <field name="Sample Mask" dword="4" bits="15:0" type="uint" /> + <field name="Depth Clear Value" dword="5" bits="31:0" type="float" /> + </instruction> + <instruction name="AVP_FILM_GRAIN_STATE" bias="2" length="45" engine="video"> + <field name="DWord Length" dword="0" bits="11:0" type="uint" default="43" /> + <field name="SubOpcode" dword="0" bits="22:16" type="uint" default="52" /> + <field name="Media Command Opcode" dword="0" bits="26:23" type="uint" default="3" /> + <field name="Pipeline" dword="0" bits="28:27" type="uint" default="2" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Grain Random Seed" dword="1" bits="15:0" type="uint" /> + <field name="MC Identity Flag" dword="1" bits="16:16" type="bool" /> + <field name="Clip To Restricted Range Flag" dword="1" bits="17:17" type="bool" /> + <field name="Number of Luma Points" dword="1" bits="23:20" type="uint" /> + <field name="Number of Chroma Cb Points" dword="1" bits="27:24" type="uint" /> + <field name="Number of Chroma Cr Points" dword="1" bits="31:28" type="uint" /> + <field name="Grain Scaling Minus8" dword="2" bits="1:0" type="uint" /> + <field name="AR Coeff Lag" dword="2" bits="3:2" type="uint" /> + <field name="AR Coeff Shift Minus6" dword="2" bits="5:4" type="uint" /> + <field name="Grain Scale Shift" dword="2" bits="7:6" type="uint" /> + <field name="Grain Noise Overlap Flag" dword="2" bits="8:8" type="bool" /> + <field name="Chroma Scaling From Luma Flag" dword="2" bits="31:31" type="bool" /> + <group count="14" dword="3" size="8"> + <field name="Point Luma Value" dword="0" bits="7:0" type="uint" /> + </group> + <group count="14" dword="7" size="8"> + <field name="Point Luma Scaling" dword="0" bits="7:0" type="uint" /> + </group> + <group count="10" dword="11" size="8"> + <field name="Point CB Value" dword="0" bits="7:0" type="uint" /> + </group> + <group count="10" dword="14" size="8"> + <field name="Point CB Scaling" dword="0" bits="7:0" type="uint" /> + </group> + <group count="10" dword="17" size="8"> + <field name="Point CR Value" dword="0" bits="7:0" type="uint" /> + </group> + <group count="10" dword="20" size="8"> + <field name="Point CR Scaling" dword="0" bits="7:0" type="uint" /> + </group> + <group count="24" dword="23" size="8"> + <field name="AR Coeff Luma Plus128" dword="0" bits="7:0" type="uint" /> + </group> + <group count="25" dword="29" size="8"> + <field name="AR Coeff Chroma CB Plus128" dword="0" bits="7:0" type="uint" /> + </group> + <group count="25" dword="36" size="8"> + <field name="AR Coeff Chroma CR Plus128" dword="0" bits="7:0" type="uint" /> + </group> + <field name="CB Mult" dword="43" bits="7:0" type="uint" /> + <field name="CB Luma Mult" dword="43" bits="15:8" type="uint" /> + <field name="CB Offset" dword="43" bits="24:16" type="uint" /> + <field name="CR Mult" dword="44" bits="7:0" type="uint" /> + <field name="CR Luma Mult" dword="44" bits="15:8" type="uint" /> + <field name="CR Offset" dword="44" bits="24:16" type="uint" /> + </instruction> + <instruction name="AVP_PIC_STATE" bias="2" length="76" engine="video"> + <field name="DWord Length" dword="0" bits="11:0" type="uint" default="74" /> + <field name="SubOpcode" dword="0" bits="22:16" type="uint" default="48" /> + <field name="Media Command Opcode" dword="0" bits="26:23" type="uint" default="3" /> + <field name="Pipeline" dword="0" bits="28:27" type="uint" default="2" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Frame Width" dword="1" bits="13:0" type="uint" /> + <field name="Frame Height" dword="1" bits="29:16" type="uint" /> + <field name="Sequence Chroma SubSampling Format" dword="2" bits="1:0" type="uint" prefix="SS"> + <value name="Monochrome" value="0" /> + <value name="420" value="1" /> + <value name="422" value="2" /> + <value name="444" value="3" /> + </field> + <field name="Sequence Pixel Bit-Depth Idc" dword="2" bits="4:3" type="uint" prefix="SeqPix"> + <value name="8-bit" value="0" /> + <value name="10-bit" value="1" /> + <value name="12-bit" value="2" /> + </field> + <field name="Sequence Superblock Size Used" dword="2" bits="8:7" type="uint"> + <value name="64x64" value="0" /> + <value name="128x128" value="1" /> + </field> + <field name="Sequence Enable Order Hint Flag" dword="2" bits="9:9" type="bool" /> + <field name="Sequence Order Hint Bits Minus 1" dword="2" bits="12:10" type="uint" /> + <field name="Sequence Enable Filter Intra Flag" dword="2" bits="16:16" type="bool" /> + <field name="Sequence Enable Intra Edge Filter Flag" dword="2" bits="17:17" type="bool" /> + <field name="Sequence Enable Dual Filter Flag" dword="2" bits="18:18" type="bool" /> + <field name="Sequence Enable Inter Intra Compound Flag" dword="2" bits="19:19" type="bool" /> + <field name="Sequence Enable Masked Compound Flag" dword="2" bits="20:20" type="bool" /> + <field name="Sequence Enable Joint Compound Flag" dword="2" bits="21:21" type="bool" /> + <field name="Allow Screen Content Tools Flag" dword="3" bits="0:0" type="bool" /> + <field name="Force Integer MV Flag" dword="3" bits="1:1" type="bool" /> + <field name="Allow Warped Motion Flag" dword="3" bits="2:2" type="bool" /> + <field name="Use CDEF Filter Flag" dword="3" bits="4:4" type="bool" /> + <field name="Use Super-Res Flag" dword="3" bits="5:5" type="bool" /> + <field name="Frame Level Loop Restoration Filter Enable" dword="3" bits="6:6" type="bool" /> + <field name="Apply Film Grain Flag" dword="3" bits="7:7" type="bool" /> + <field name="Large Scale Tile Enable Flag" dword="3" bits="8:8" type="bool" /> + <field name="Post CDEF Filtered Recon Pixels Writeout En" dword="3" bits="14:14" type="bool" /> + <field name="Frame Type" dword="3" bits="17:16" type="uint" /> + <field name="Intra Only Flag" dword="3" bits="19:19" type="bool" /> + <field name="Error Resilient Mode Flag" dword="3" bits="22:22" type="bool" /> + <field name="Allow IntraBC Flag" dword="3" bits="23:23" type="bool" /> + <field name="Primary Reference Frame Idx" dword="3" bits="30:28" type="uint" /> + <field name="Segmentation Enable Flag" dword="4" bits="0:0" type="bool" /> + <field name="Segmentation Update Map Flag" dword="4" bits="1:1" type="bool" /> + <field name="Segmentation Temporal Update Flag" dword="4" bits="2:2" type="bool" /> + <field name="Pre Skip Segment ID Flag" dword="4" bits="3:3" type="bool" /> + <field name="Last Active Segment Segment ID" dword="4" bits="6:4" type="uint" /> + <field name="Delta Q Present Flag" dword="4" bits="7:7" type="bool" /> + <field name="Delta Q Res" dword="4" bits="9:8" type="uint" /> + <field name="Frame Coded Lossless Mode" dword="4" bits="10:10" type="bool" /> + <field name="Segment Map is Zero Flag" dword="4" bits="11:11" type="bool" /> + <field name="Segment ID Buffer Stream In Enable Flag" dword="4" bits="12:12" type="bool" /> + <field name="Segment ID Buffer Stream Out Enable Flag" dword="4" bits="13:13" type="bool" /> + <field name="Base Qindex" dword="4" bits="23:16" type="uint" /> + <field name="Y dc delta Q" dword="4" bits="30:24" type="int" /> + <field name="U dc delta Q" dword="5" bits="6:0" type="int" /> + <field name="U ac delta Q" dword="5" bits="14:8" type="int" /> + <field name="V dc delta Q" dword="5" bits="22:16" type="int" /> + <field name="V ac delta Q" dword="5" bits="30:24" type="int" /> + <field name="Allow High Precision MV" dword="6" bits="0:0" type="bool" /> + <field name="Frame Level Reference Mode Select" dword="6" bits="1:1" type="bool" /> + <field name="Mcomp Filter Type" dword="6" bits="4:2" type="uint"> + <value name="Eight Tap" value="0" /> + <value name="Eight Tap Smooth" value="1" /> + <value name="Eight Tap Sharp" value="2" /> + <value name="Bilinear" value="3" /> + <value name="Switchable" value="4" /> + </field> + <field name="Motion Mode Switchable Flag" dword="6" bits="6:6" type="bool" /> + <field name="Use Reference Frame MV Set Flag" dword="6" bits="7:7" type="bool" /> + <field name="Reference Frame Sign Bias" dword="6" bits="15:8" type="uint" /> + <field name="Current Frame Order Hint" dword="6" bits="23:16" type="uint" /> + <field name="Reduced Tx Set Used" dword="7" bits="0:0" type="bool" /> + <field name="Frame Transform Mode" dword="7" bits="2:1" type="uint" /> + <field name="Skip Mode Present Flag" dword="7" bits="4:4" type="bool" /> + <field name="Skip Mode Frame 0" dword="7" bits="7:5" type="uint" /> + <field name="Skip Mode Frame 1" dword="7" bits="11:9" type="uint" /> + <field name="Reference Frame Side" dword="7" bits="31:24" type="uint" /> + <field name="Global Motion Type 1" dword="8" bits="4:3" type="uint" /> + <field name="Global Motion Type 2" dword="8" bits="7:6" type="uint" /> + <field name="Global Motion Type 3" dword="8" bits="10:9" type="uint" /> + <field name="Global Motion Type 4" dword="8" bits="13:12" type="uint" /> + <field name="Global Motion Type 5" dword="8" bits="16:15" type="uint" /> + <field name="Global Motion Type 6" dword="8" bits="19:18" type="uint" /> + <field name="Global Motion Type 7" dword="8" bits="22:21" type="uint" /> + <field name="Frame Level Global Motion Invalid Flags" dword="8" bits="31:24" type="uint" /> + <group count="42" dword="9" size="16"> + <field name="Warp Parameters" dword="0" bits="15:0" type="uint" /> + </group> + <field name="Reference Frame Idx 0" dword="30" bits="2:0" type="uint" /> + <field name="Reference Frame Idx 1" dword="30" bits="6:4" type="uint" /> + <field name="Reference Frame Idx 2" dword="30" bits="10:8" type="uint" /> + <field name="Reference Frame Idx 3" dword="30" bits="14:12" type="uint" /> + <field name="Reference Frame Idx 4" dword="30" bits="18:16" type="uint" /> + <field name="Reference Frame Idx 5" dword="30" bits="22:20" type="uint" /> + <field name="Reference Frame Idx 6" dword="30" bits="26:24" type="uint" /> + <field name="Reference Frame Idx 7" dword="30" bits="30:28" type="uint" /> + <field name="Intra Frame Width in Pixel Minus 1" dword="31" bits="15:0" type="uint" /> + <field name="Intra Frame Height in Pixel Minus 1" dword="31" bits="31:16" type="uint" /> + <field name="Last Frame Width in Pixel Minus 1" dword="32" bits="15:0" type="uint" /> + <field name="Last Frame Height in Pixel Minus 1" dword="32" bits="31:16" type="uint" /> + <field name="Last2 Frame Width in Pixel Minus 1" dword="33" bits="15:0" type="uint" /> + <field name="Last2 Frame Height in Pixel Minus 1" dword="33" bits="31:16" type="uint" /> + <field name="Last3 Frame Width in Pixel Minus 1" dword="34" bits="15:0" type="uint" /> + <field name="Last3 Frame Height in Pixel Minus 1" dword="34" bits="31:16" type="uint" /> + <field name="Golden Frame Width in Pixel Minus 1" dword="35" bits="15:0" type="uint" /> + <field name="Golden Frame Height in Pixel Minus 1" dword="35" bits="31:16" type="uint" /> + <field name="BWDREF Frame Width in Pixel Minus 1" dword="36" bits="15:0" type="uint" /> + <field name="BWDREF Frame Height in Pixel Minus 1" dword="36" bits="31:16" type="uint" /> + <field name="ALTREF2 Frame Width in Pixel Minus 1" dword="37" bits="15:0" type="uint" /> + <field name="ALTREF2 Frame Height in Pixel Minus 1" dword="37" bits="31:16" type="uint" /> + <field name="ALTREF Frame Width in Pixel Minus 1" dword="38" bits="15:0" type="uint" /> + <field name="ALTREF Frame Height in Pixel Minus 1" dword="38" bits="31:16" type="uint" /> + <field name="Vertical Scale Factor For Intra" dword="39" bits="15:0" type="uint" /> + <field name="Horizontal Scale Factor For Intra" dword="39" bits="31:16" type="uint" /> + <field name="Vertical Scale Factor For Last" dword="40" bits="15:0" type="uint" /> + <field name="Horizontal Scale Factor For Last" dword="40" bits="31:16" type="uint" /> + <field name="Vertical Scale Factor For Last2" dword="41" bits="15:0" type="uint" /> + <field name="Horizontal Scale Factor For Last2" dword="41" bits="31:16" type="uint" /> + <field name="Vertical Scale Factor For Last3" dword="42" bits="15:0" type="uint" /> + <field name="Horizontal Scale Factor For Last3" dword="42" bits="31:16" type="uint" /> + <field name="Vertical Scale Factor For Golden" dword="43" bits="15:0" type="uint" /> + <field name="Horizontal Scale Factor For Golden" dword="43" bits="31:16" type="uint" /> + <field name="Vertical Scale Factor For BWDREF" dword="44" bits="15:0" type="uint" /> + <field name="Horizontal Scale Factor For BWDREF" dword="44" bits="31:16" type="uint" /> + <field name="Vertical Scale Factor For ALTREF2" dword="45" bits="15:0" type="uint" /> + <field name="Horizontal Scale Factor For ALTREF2" dword="45" bits="31:16" type="uint" /> + <field name="Vertical Scale Factor For ALTREF" dword="46" bits="15:0" type="uint" /> + <field name="Horizontal Scale Factor For ALTREF" dword="46" bits="31:16" type="uint" /> + <group count="8" dword="47" size="8"> + <field name="Reference Frame Order Hint" dword="0" bits="7:0" type="uint" /> + </group> + <field name="NonFirstPassFlag" dword="51" bits="16:16" type="bool" /> + <field name="VdencPakOnlyPass" dword="51" bits="17:17" type="bool" /> + <field name="FrameSzOverStatusEn - FrameBitRateMaxReportMask" dword="51" bits="25:25" type="bool" /> + <field name="FrameSzUnderStatusEn - FrameBitRateMinReportMask" dword="51" bits="26:26" type="bool" /> + <field name="FrameBitRateMax" dword="52" bits="13:0" type="uint" /> + <field name="FrameBitrateMaxUnit" dword="52" bits="31:31" type="FRAME_BITRATE_UNITS" /> + <field name="FrameBitRateMin" dword="53" bits="13:0" type="uint" /> + <field name="FrameBitrateMinUnit" dword="53" bits="31:31" type="FRAME_BITRATE_UNITS" /> + <field name="FrameDeltaQindexMax" dword="54" bits="63:0" type="uint" /> + <field name="FrameDeltaQindexMin" dword="56" bits="31:0" type="uint" /> + <field name="FrameDeltaLFMax" dword="57" bits="63:0" type="uint" /> + <field name="FrameDeltaLFMin" dword="59" bits="31:0" type="uint" /> + <field name="FrameDeltaQindexLFMaxRange" dword="60" bits="63:0" type="uint" /> + <field name="FrameDeltaQindexLFMinRange" dword="62" bits="31:0" type="uint" /> + <field name="MinFrameSize" dword="63" bits="15:0" type="uint" /> + <field name="MinFrameSizeUnits" dword="63" bits="31:30" type="uint"> + <value name="4K Byte Units" value="0" /> + <value name="16K Byte Units" value="1" /> + <value name="Compatibility Mode" value="2" /> + <value name="6 Byte Units" value="3" /> + </field> + <field name="VDAQM enable" dword="64" bits="0:0" type="bool" /> + <field name="Class0 SSE Threshold0" dword="65" bits="15:0" type="uint" /> + <field name="Class0 SSE Threshold1" dword="65" bits="31:16" type="uint" /> + <group count="8" dword="66" size="8"> + <field name="SSE Thresholds For Class" dword="0" bits="7:0" type="uint" /> + </group> + <field name="rdmult" dword="74" bits="31:0" type="uint" /> + </instruction> + <instruction name="AVP_PIPE_BUF_ADDR_STATE" bias="2" length="215" engine="video"> + <field name="DWord Length" dword="0" bits="11:0" type="uint" default="213" /> + <field name="SubOpcode" dword="0" bits="22:16" type="uint" default="2" /> + <field name="Media Command Opcode" dword="0" bits="26:23" type="uint" default="3" /> + <field name="Pipeline" dword="0" bits="28:27" type="uint" default="2" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <group count="8" dword="1" size="64"> + <field name="Reference Picture - Address" dword="0" bits="63:0" type="address" /> + </group> + <field name="Reference Picture - Attributes" dword="17" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Decoded Output Frame Buffer Address" dword="18" bits="63:0" type="address" /> + <field name="Decoded Output Frame Buffer Address - Attributes" dword="20" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Film Grain Injected Output Frame Buffer Address" dword="21" bits="63:0" type="address" /> + <field name="Film Grain Injected Output Frame Buffer Address - Attributes" dword="23" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="IntraBC Decoded Output Frame Buffer Address" dword="24" bits="63:0" type="address" /> + <field name="IntraBC Decoded Output Frame Buffer Address - Attributes" dword="26" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="CDF Tables Initialization Buffer Address" dword="27" bits="63:0" type="address" /> + <field name="CDF Tables Initialization Buffer Address - Attributes" dword="29" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="CDF Tables Backward Adaptation Buffer Address" dword="30" bits="63:0" type="address" /> + <field name="CDF Tables Backward Adaptation Buffer Address - Attributes" dword="32" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="AV1 Segment ID Read Buffer Address" dword="33" bits="63:0" type="address" /> + <field name="AV1 Segment ID Read Buffer Address - Attributes" dword="35" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="AV1 Segment ID Write Buffer Address" dword="36" bits="63:0" type="address" /> + <field name="AV1 Segment ID Write Buffer Address - Attributes" dword="38" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <group count="8" dword="39" size="64"> + <field name="Collocated MV Temporal Buffer - Address" dword="0" bits="63:0" type="address" /> + </group> + <field name="Collocated MV Temporal Buffer - Attributes" dword="55" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Current Frame MV Write Buffer Address" dword="56" bits="63:0" type="address" /> + <field name="Current Frame MV Write Buffer Address - Attributes" dword="58" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Film Grain Sample Template Address" dword="59" bits="63:0" type="address" /> + <field name="Film Grain Sample Template Address - Attributes" dword="61" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Bitstream Line Rowstore Buffer Address" dword="62" bits="63:0" type="address" /> + <field name="Bitstream Line Rowstore Buffer Address - Attributes" dword="64" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Bitstream Tile Line Rowstore Buffer Address" dword="65" bits="63:0" type="address" /> + <field name="Bitstream Tile Line Rowstore Buffer Address - Attributes" dword="67" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Intra Prediction Line Rowstore Buffer Address" dword="68" bits="63:0" type="address" /> + <field name="Intra Prediction Line Rowstore Buffer Address - Attributes" dword="70" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Intra Prediction Tile Line Rowstore Buffer Address" dword="71" bits="63:0" type="address" /> + <field name="Intra Prediction Tile Line Rowstore Buffer Address - Attributes" dword="73" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Spatial Motion Vector Line Buffer Address" dword="74" bits="63:0" type="address" /> + <field name="Spatial Motion Vector Line Buffer Address - Attributes" dword="76" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Spatial Motion Vector Tile Line Buffer Address" dword="77" bits="63:0" type="address" /> + <field name="Spatial Motion Vector Tile Line Buffer Address - Attributes" dword="79" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Loop Restoration Meta Tile Column Buffer Address" dword="80" bits="63:0" type="address" /> + <field name="Loop Restoration Meta Tile Column Buffer Address - Attributes" dword="82" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Loop Restoration Filter Tile Line Y Buffer Address" dword="83" bits="63:0" type="address" /> + <field name="Loop Restoration Filter Tile Line Y Buffer Address - Attributes" dword="85" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Loop Restoration Filter Tile Line U Buffer Address" dword="86" bits="63:0" type="address" /> + <field name="Loop Restoration Filter Tile Line U Buffer Address - Attributes" dword="88" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Loop Restoration Filter Tile Line V Buffer Address" dword="89" bits="63:0" type="address" /> + <field name="Loop Restoration Filter Tile Line V Buffer Address - Attributes" dword="91" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Deblocker Filter Line Y Buffer Address" dword="92" bits="63:0" type="address" /> + <field name="Deblocker Filter Line Y Buffer Address - Attributes" dword="94" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Deblocker Filter Line U Buffer Address" dword="95" bits="63:0" type="address" /> + <field name="Deblocker Filter Line U Buffer Address - Attributes" dword="97" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Deblocker Filter Line V Buffer Address" dword="98" bits="63:0" type="address" /> + <field name="Deblocker Filter Line V Buffer Address - Attributes" dword="100" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Deblocker Filter Tile Line Y Buffer Address" dword="101" bits="63:0" type="address" /> + <field name="Deblocker Filter Tile Line Y Buffer Address - Attributes" dword="103" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Deblocker Filter Tile Line U Buffer Address" dword="104" bits="63:0" type="address" /> + <field name="Deblocker Filter Tile Line U Buffer Address - Attributes" dword="106" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Deblocker Filter Tile Line V Buffer Address" dword="107" bits="63:0" type="address" /> + <field name="Deblocker Filter Tile Line V Buffer Address - Attributes" dword="109" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Deblocker Filter Tile Column Y Buffer Address" dword="110" bits="63:0" type="address" /> + <field name="Deblocker Filter Tile Column Y Buffer Address - Attributes" dword="112" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Deblocker Filter Tile Column U Buffer Address" dword="113" bits="63:0" type="address" /> + <field name="Deblocker Filter Tile Column U Buffer Address - Attributes" dword="115" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Deblocker Filter Tile Column V Buffer Address" dword="116" bits="63:0" type="address" /> + <field name="Deblocker Filter Tile Column V Buffer Address - Attributes" dword="118" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="CDEF Filter Line Buffer Address" dword="119" bits="63:0" type="address" /> + <field name="CDEF Filter Line Buffer Address - Attributes" dword="121" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="CDEF Filter Tile Line Buffer Address" dword="128" bits="63:0" type="address" /> + <field name="CDEF Filter Tile Line Buffer Address - Attributes" dword="130" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="CDEF Filter Tile Column Buffer Address" dword="137" bits="63:0" type="address" /> + <field name="CDEF Filter Tile Column Buffer Address - Attributes" dword="139" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="CDEF Filter Meta Tile Line Buffer Address" dword="140" bits="63:0" type="address" /> + <field name="CDEF Filter Meta Tile Line Buffer Address - Attributes" dword="142" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="CDEF Filter Meta Tile Column Buffer Address" dword="143" bits="63:0" type="address" /> + <field name="CDEF Filter Meta Tile Column Buffer Address - Attributes" dword="145" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="CDEF Filter Top Left Corner Buffer Address" dword="146" bits="63:0" type="address" /> + <field name="CDEF Filter Top Left Corner Buffer Address - Attributes" dword="148" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Super Res Tile Column Y Buffer Address" dword="149" bits="63:0" type="address" /> + <field name="Super Res Tile Column Y Buffer Address - Attributes" dword="151" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Super Res Tile Column U Buffer Address" dword="152" bits="63:0" type="address" /> + <field name="Super Res Tile Column U Buffer Address - Attributes" dword="154" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Super Res Tile Column V Buffer Address" dword="155" bits="63:0" type="address" /> + <field name="Super Res Tile Column V Buffer Address - Attributes" dword="157" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Loop Restoration Filter Tile Column Y Buffer Address" dword="158" bits="63:0" type="address" /> + <field name="Loop Restoration Filter Tile Column Y Buffer Address - Attributes" dword="160" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Loop Restoration Filter Tile Column U Buffer Address" dword="161" bits="63:0" type="address" /> + <field name="Loop Restoration Filter Tile Column U Buffer Address - Attributes" dword="163" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Loop Restoration Filter Tile Column V Buffer Address" dword="164" bits="63:0" type="address" /> + <field name="Loop Restoration Filter Tile Column V Buffer Address - Attributes" dword="166" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Loop Restoration Filter Tile Column Alignment Read Write Buffer Address" dword="170" bits="63:0" type="address" /> + <field name="Loop Restoration Filter Tile Column Alignment Read Write Buffer Address - Attributes" dword="172" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Film Grain Tile Column Data Read Write Buffer Address" dword="173" bits="63:0" type="address" /> + <field name="Film Grain Tile Column Data Read Write Buffer Address - Attributes" dword="175" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Decoded Frame Status Error Buffer Address" dword="176" bits="63:0" type="address" /> + <field name="Decoded Frame Status Error Buffer Address - Attributes" dword="178" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Decoded Block Data Streamout Buffer Address" dword="179" bits="63:0" type="address" /> + <field name="Decoded Block Data Streamout Buffer Address - Attributes" dword="181" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Original Uncompressed Picture Source Buffer Address" dword="188" bits="63:0" type="address" /> + <field name="Original Uncompressed Picture Source Buffer Address - Attributes" dword="190" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Downscaled Uncompressed Picture Source Buffer Address" dword="191" bits="63:0" type="address" /> + <field name="Downscaled Uncompressed Picture Source Buffer Address - Attributes" dword="193" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Tile Size Streamout Buffer Address" dword="194" bits="63:0" type="address" /> + <field name="Tile Size Streamout Buffer Address - Attributes" dword="196" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="Tile Statistics Streamout Buffer Address" dword="197" bits="63:0" type="address" /> + <field name="Tile Statistics Streamout Buffer Address - Attributes" dword="199" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="CU Streamout Buffer Address" dword="200" bits="63:0" type="address" /> + <field name="CU Streamout Buffer Address - Attributes" dword="202" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="SSE Line Read/Write Buffer Address" dword="203" bits="63:0" type="address" /> + <field name="SSE Line Read/Write Buffer Address - Attributes" dword="205" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="SSE Tile Line Read/Write Buffer Address" dword="206" bits="63:0" type="address" /> + <field name="SSE Tile Line Read/Write Buffer Address - Attributes" dword="208" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + <field name="PostCDEF Pixels Buffer Address" dword="209" bits="63:0" type="address" /> + <field name="PostCDEF Pixels Buffer Address - Attributes" dword="211" bits="31:0" type="MEMORYADDRESSATTRIBUTES" /> + </instruction> + <instruction name="AVP_PIPE_MODE_SELECT" bias="2" length="7" engine="video"> + <field name="DWord Length" dword="0" bits="11:0" type="uint" default="5" /> + <field name="SubOpcode" dword="0" bits="22:16" type="uint" default="0" /> + <field name="Media Command Opcode" dword="0" bits="26:23" type="uint" default="3" /> + <field name="Pipeline" dword="0" bits="28:27" type="uint" default="2" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Codec Select" dword="1" bits="0:0" type="bool"> + <value name="Decode" value="0" /> + <value name="Encode" value="1" /> + </field> + <field name="Pic Status/Error Report Enable" dword="1" bits="3:3" type="bool" /> + <field name="Frame Reconstruction Disable" dword="1" bits="4:4" type="bool" /> + <field name="Codec Standard Select" dword="1" bits="7:5" type="uint" default="2" /> + <field name="VDENC Mode" dword="1" bits="10:10" type="bool" /> + <field name="Tile Statistics Streamout Enable" dword="1" bits="12:12" type="bool" /> + <field name="Multi Engine Mode" dword="1" bits="14:13" type="uint"> + <value name="Single Engine Mode" value="0" /> + <value name="Left Engine Mode" value="1" /> + <value name="Right Engine Mode" value="2" /> + <value name="Middle Engine Mode" value="3" /> + </field> + <field name="Pipe Working Mode" dword="1" bits="16:15" type="uint"> + <value name="Legacy Single Pipe" value="0" /> + <value name="Encode Mode" value="2" /> + <value name="Decode Scalable Mode" value="3" /> + </field> + <field name="Tile Based Engine" dword="1" bits="17:17" type="bool" /> + <field name="Motion Comp Memory Tracker Counter Enable" dword="1" bits="23:23" type="bool" /> + <field name="Pic Status/Error Report ID" dword="3" bits="31:0" type="uint" /> + <field name="AlcChickenbitRestrictSingleTileGroupInAFrame" dword="4" bits="4:4" type="bool" /> + <field name="Phase Indicator" dword="5" bits="1:0" type="uint"> + <value name="First Phase" value="0" /> + <value name="Middle Phase" value="1" /> + <value name="Last Phase" value="2" /> + </field> + <field name="Downscaled Source Pixel Prefetch Length" dword="6" bits="4:2" type="uint" /> + <field name="Downscaled Source Pixel Prefetch Enable" dword="6" bits="5:5" type="bool" /> + <field name="Original Source Pixel Prefetch Length" dword="6" bits="9:7" type="uint" /> + <field name="Original Source Pixel Prefetch Enable" dword="6" bits="10:10" type="bool" /> + </instruction> + <instruction name="AVP_TILE_CODING" bias="2" length="7" engine="video"> + <field name="DWord Length" dword="0" bits="11:0" type="uint" default="5" /> + <field name="SubOpcode" dword="0" bits="22:16" type="uint" default="21" /> + <field name="Media Command Opcode" dword="0" bits="26:23" type="uint" default="3" /> + <field name="Pipeline" dword="0" bits="28:27" type="uint" default="2" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Frame Tile ID" dword="1" bits="11:0" type="uint" /> + <field name="TG Tile Num" dword="1" bits="23:12" type="uint" /> + <field name="Tile Group ID" dword="1" bits="31:24" type="uint" /> + <field name="Tile Column Position in SB Unit" dword="2" bits="9:0" type="uint" /> + <field name="Tile Row Position in SB Unit" dword="2" bits="25:16" type="uint" /> + <field name="Tile Width in SB Minus 1" dword="3" bits="5:0" type="uint" /> + <field name="Tile Height in SB Minus 1" dword="3" bits="25:16" type="uint" /> + <field name="First Phase on Scalability Mode" dword="4" bits="0:0" type="bool" /> + <field name="Last Phase on Scalability Mode" dword="4" bits="1:1" type="bool" /> + <field name="AVP CRC Enable" dword="4" bits="2:2" type="bool" /> + <field name="First Tile in a Frame" dword="4" bits="23:23" type="bool" /> + <field name="Is Last Tile of Column Flag" dword="4" bits="25:25" type="bool" /> + <field name="Is Last Tile of Row Flag" dword="4" bits="26:26" type="bool" /> + <field name="Is Start Tile of Tile Group Flag" dword="4" bits="27:27" type="bool" /> + <field name="Is End Tile of Tile Group Flag" dword="4" bits="28:28" type="bool" /> + <field name="Is Last Tile of Frame Flag" dword="4" bits="29:29" type="bool" /> + <field name="Disable CDF Update Flag" dword="4" bits="30:30" type="bool" /> + <field name="Disable Frame Context Update Flag" dword="4" bits="31:31" type="bool" /> + <field name="Number of Active BE Pipes" dword="5" bits="7:0" type="uint" /> + <field name="Num of Tile Columns in Frame Minus 1" dword="5" bits="21:12" type="uint" /> + <field name="Num of Tile Rows in Frame Minus 1" dword="5" bits="31:22" type="uint" /> + <field name="Output Decoded Tile Column Position in SB Unit" dword="6" bits="9:0" type="uint" /> + <field name="Output Decoded Tile Row Position in SB Unit" dword="6" bits="25:16" type="uint" /> + </instruction> + <instruction name="CFE_STATE" bias="2" length="6" engine="render|compute"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="4" /> + <field name="CFE SubOpcode Variant" dword="0" bits="17:16" type="uint" default="0" /> + <field name="CFE SubOpcode" dword="0" bits="23:18" type="uint" default="0" /> + <field name="Compute Command Opcode" dword="0" bits="26:24" type="uint" default="2" /> + <field name="Pipeline" dword="0" bits="28:27" type="uint" default="2" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Scratch Space Buffer" dword="1" bits="31:10" type="uint" /> + <field name="Stack ID Control" dword="3" bits="1:0" type="uint"> + <value name="StackIDs 2048" value="0" /> + <value name="StackIDs 1024" value="1" /> + <value name="StackIDs 512" value="2" /> + <value name="StackIDs 256" value="3" /> + </field> + <field name="Compute Dispatch All walker Enable" dword="3" bits="12:12" type="bool" /> + <field name="Single Slice Dispatch CCS Mode" dword="3" bits="13:13" type="bool" /> + <field name="Over Dispatch Control" dword="3" bits="15:14" type="uint"> + <value name="Over Dispatch None" value="0" /> + <value name="Over Dispatch Low" value="1" /> + <value name="Over Dispatch Normal" value="2" /> + <value name="Over Dispatch High" value="3" /> + </field> + <field name="Maximum Number of Threads" dword="3" bits="31:16" type="uint" /> + </instruction> + <instruction name="COMPUTE_WALKER" bias="2" length="40" engine="render|compute"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="38" /> + <field name="Predicate Enable" dword="0" bits="8:8" type="bool" /> + <field name="Workload Partition Enable" dword="0" bits="9:9" type="bool" /> + <field name="Indirect Parameter Enable" dword="0" bits="10:10" type="bool" /> + <field name="Systolic Mode Enable" dword="0" bits="14:14" type="bool" /> + <field name="CFE SubOpcode Variant" dword="0" bits="17:15" type="uint" default="0" /> + <field name="CFE SubOpcode" dword="0" bits="23:18" type="uint" default="2" /> + <field name="Compute Command Opcode" dword="0" bits="26:24" type="uint" default="2" /> + <field name="Pipeline" dword="0" bits="28:27" type="uint" default="2" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="body" dword="1" bits="1248:0" type="COMPUTE_WALKER_BODY" /> + </instruction> + <instruction name="EXECUTE_INDIRECT_DISPATCH" bias="2" length="45" engine="render|compute"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="43" /> + <field name="Predicate Enable" dword="0" bits="8:8" type="bool" /> + <field name="MOCS" dword="0" bits="15:12" type="uint" nonzero="true" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="1" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="4" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Max Count" dword="1" bits="31:0" type="uint" /> + <field name="Count Buffer Indirect Enable" dword="2" bits="0:0" type="bool" /> + <field name="Count Buffer Address" dword="2" bits="63:2" type="address" /> + <field name="Argument Buffer Start Address" dword="4" bits="63:2" type="address" /> + <field name="body" dword="6" bits="1247:0" type="COMPUTE_WALKER_BODY" /> + </instruction> + <instruction name="MI_MEM_FENCE" bias="1" length="1"> + <field name="Fence Type" dword="0" bits="1:0" type="uint" prefix="FENCE_TYPE"> + <value name="RELEASE" value="0" /> + <value name="ACQUIRE" value="1" /> + <value name="MI_WRITE" value="3" /> + </field> + <field name="MI Command Sub Opcode" dword="0" bits="22:17" type="uint" default="0" /> + <field name="MI Command Opcode" dword="0" bits="28:23" type="uint" default="9" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="0" /> + </instruction> + <instruction name="MI_SEMAPHORE_WAIT" bias="2" length="5"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="3" /> + <field name="Compare Operation" dword="0" bits="14:12" 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="Wait Mode" dword="0" bits="15:15" type="uint"> + <value name="Polling Mode" value="1" /> + <value name="Signal Mode" value="0" /> + </field> + <field name="Register Poll Mode" dword="0" bits="16:16" type="bool" /> + <field name="Indirect Semaphore Data Dword" dword="0" bits="17:17" type="bool" /> + <field name="Workload Partition ID Offset Enable" dword="0" bits="18:18" type="bool" /> + <field name="Memory Type" dword="0" bits="22:22" type="uint"> + <value name="Per Process Graphics Address" value="0" /> + <value name="Global Graphics Address" value="1" /> + </field> + <field name="MI Command Opcode" dword="0" bits="28:23" type="uint" default="28" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="0" /> + <field name="Semaphore Data Dword" dword="1" bits="31:0" type="uint" /> + <field name="Semaphore Address" dword="2" bits="63:2" type="address" /> + <field name="Wait Token Number" dword="4" bits="9:2" type="uint" /> + </instruction> + <instruction name="PIPELINE_SELECT" bias="1" length="1" engine="render"> + <field name="Pipeline Selection" dword="0" bits="1:0" type="uint"> + <value name="3D" value="0" /> + <value name="Media" value="1" /> + <value name="GPGPU" value="2" /> + </field> + <field name="Mask Bits" dword="0" bits="15:8" type="uint" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="4" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="1" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="1" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + </instruction> + <instruction name="PIPE_CONTROL" bias="2" length="6" engine="render|compute"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="4" /> + <field name="HDC Pipeline Flush Enable" dword="0" bits="9:9" type="bool" /> + <field name="L3 Read Only Cache Invalidation Enable" dword="0" bits="10:10" type="bool" /> + <field name="Untyped Data Port Cache Flush Enable" dword="0" bits="11:11" type="bool" /> + <field name="CCS Flush Enable" dword="0" bits="13:13" type="bool" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="0" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="2" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Depth Cache Flush Enable" dword="1" bits="0:0" type="bool" /> + <field name="Stall At Pixel Scoreboard" dword="1" bits="1:1" type="bool" /> + <field name="State Cache Invalidation Enable" dword="1" bits="2:2" type="bool" /> + <field name="Constant Cache Invalidation Enable" dword="1" bits="3:3" type="bool" /> + <field name="VF Cache Invalidation Enable" dword="1" bits="4:4" type="bool" /> + <field name="Force Device Coherency" dword="1" bits="5:5" type="bool" /> + <field name="Pipe Control Flush Enable" dword="1" bits="7:7" type="bool" /> + <field name="Notify Enable" dword="1" bits="8:8" type="bool" /> + <field name="Indirect State Pointers Disable" dword="1" bits="9:9" type="bool" /> + <field name="Texture Cache Invalidation Enable" dword="1" bits="10:10" type="bool" /> + <field name="Instruction Cache Invalidate Enable" dword="1" bits="11:11" type="bool" /> + <field name="Render Target Cache Flush Enable" dword="1" bits="12:12" type="bool" /> + <field name="Depth Stall Enable" dword="1" bits="13:13" type="bool" /> + <field name="Post Sync Operation" dword="1" bits="15:14" 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="PSS Stall Sync Enable" dword="1" bits="17:17" type="bool" /> + <field name="TLB Invalidate" dword="1" bits="18:18" type="bool" /> + <field name="Depth Stall Sync Enable" dword="1" bits="19:19" type="bool" /> + <field name="Command Streamer Stall Enable" dword="1" bits="20:20" type="bool" /> + <field name="Store Data Index" dword="1" bits="21:21" type="uint" /> + <field name="Protected Memory Enable" dword="1" bits="22:22" type="bool" /> + <field name="LRI Post Sync Operation" dword="1" bits="23:23" type="uint"> + <value name="No LRI Operation" value="0" /> + <value name="MMIO Write Immediate Data" value="1" /> + </field> + <field name="Destination Address Type" dword="1" bits="24:24" type="uint" prefix="DAT"> + <value name="PPGTT" value="0" /> + <value name="GGTT" value="1" /> + </field> + <field name="Flush LLC" dword="1" bits="26:26" type="bool" /> + <field name="Protected Memory Disable" dword="1" bits="27:27" type="bool" /> + <field name="Command Cache Invalidate Enable" dword="1" bits="29:29" type="bool" /> + <field name="Address" dword="2" bits="47:2" type="address" /> + <field name="Immediate Data" dword="4" bits="63:0" type="uint" /> + </instruction> + <instruction name="RESOURCE_BARRIER" bias="2" length="5" engine="render|compute"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="3" /> + <field name="Predicate Enable" dword="0" bits="24:24" type="bool" /> + <field name="Opcode" dword="0" bits="28:26" type="uint" default="3"> + <value name="RESOURCE_BARRIER" value="3" /> + </field> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="5" /> + <field name="Resource Barrier Body" dword="1" bits="127:0" type="RESOURCE_BARRIER_BODY" /> + </instruction> + <instruction name="STATE_BYTE_STRIDE" bias="2" length="2" engine="render|compute"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="0" /> + <field name="Byte Stride Enable" dword="0" bits="8:8" type="bool" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="5" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="0" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Byte Stride" dword="1" bits="31:2" type="uint" /> + </instruction> + <instruction name="STATE_COMPUTE_MODE" bias="2" length="3" engine="render|compute"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="1" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="5" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="1" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="0" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Z Pass Async Compute Thread Limit" dword="1" bits="2:0" type="uint" prefix="ZPACTL"> + <value name="Max 60" value="0" /> + <value name="Max 64" value="1" /> + <value name="Max 56" value="2" /> + <value name="Max 48" value="3" /> + <value name="Max 40" value="4" /> + <value name="Max 32" value="5" /> + </field> + <field name="Z Async Throttle settings" dword="1" bits="4:3" type="uint" prefix="ZATS"> + <value name="Defer to Async Compute Thread Limit" value="0" /> + <value name="Max 32" value="1" /> + <value name="Max 40" value="2" /> + <value name="Max 48" value="3" /> + </field> + <field name="Async Compute Thread Limit" dword="1" bits="9:7" type="uint" prefix="ACTL"> + <value name="Disabled" value="0" /> + <value name="Max 2" value="1" /> + <value name="Max 8" value="2" /> + <value name="Max 16" value="3" /> + <value name="Max 24" value="4" /> + <value name="Max 32" value="5" /> + <value name="Max 40" value="6" /> + <value name="Max 48" value="7" /> + </field> + <field name="EU Thread Scheduling Mode Override" dword="1" bits="14:13" type="uint" /> + <field name="Large GRF Mode" dword="1" bits="15:15" type="bool" /> + <field name="Z Pass Async Compute Thread Limit Mask" dword="1" bits="18:16" type="uint" /> + <field name="Mask1" dword="1" bits="31:16" type="uint" /> + <field name="Z Async Throttle settings Mask" dword="1" bits="20:19" type="uint" /> + <field name="Async Compute Thread Limit Mask" dword="1" bits="25:23" type="uint" /> + <field name="EU Thread Scheduling Mode Override Mask" dword="1" bits="30:29" type="uint" /> + <field name="Large GRF Mode Mask" dword="1" bits="31:31" type="bool" /> + <field name="Midthread Preemption Delay Timer" dword="2" bits="2:0" type="uint"> + <value name="MTP_TIMER_VAL_0" value="0" /> + <value name="MTP_TIMER_VAL_50" value="1" /> + <value name="MTP_TIMER_VAL_100" value="2" /> + <value name="MTP_TIMER_VAL_150" value="3" /> + </field> + <field name="Midthread Preemption Overdispatch Thread group count" dword="2" bits="4:3" type="uint"> + <value name="OD_TG_M2" value="0" /> + <value name="OD_TG_M4" value="1" /> + <value name="OD_TG_M8" value="2" /> + <value name="OD_TG_M16" value="3" /> + </field> + <field name="Midthread Preemption Overdispatch Test mode" dword="2" bits="5:5" type="uint"> + <value name="Regular" value="0" /> + <value name="Test mode" value="1" /> + </field> + <field name="UAV Coherency Mode" dword="2" bits="6:6" type="uint"> + <value name="Drain DataPort Mode" value="0" /> + <value name="Flush Dataport L1" value="1" /> + </field> + <field name="Memory allocation for Scratch and Midthread Preemption buffers" dword="2" bits="11:11" type="uint"> + <value name="Full" value="0" /> + <value name="Min" value="1" /> + </field> + <field name="Midthread Preemption Delay Timer Mask" dword="2" bits="18:16" type="uint" /> + <field name="Mask2" dword="2" bits="31:16" type="uint" /> + <field name="Midthread Preemption Overdispatch Thread group count Mask" dword="2" bits="20:19" type="uint" /> + <field name="Midthread Preemption Overdispatch Test mode Mask" dword="2" bits="21:21" type="uint" /> + <field name="UAV Coherency Mode Mask" dword="2" bits="22:22" type="uint" /> + <field name="Memory allocation for Scratch and Midthread Preemption buffers Mask" dword="2" bits="27:27" type="uint" /> + </instruction> + <instruction name="STATE_SYSTEM_MEM_FENCE_ADDRESS" bias="2" length="3"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="1" /> + <field name="Context Restore Invalid" dword="0" bits="15:15" type="bool" default="0" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="9" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="1" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="0" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="System Memory Fence Address" dword="1" bits="63:12" type="address" /> + </instruction> + <instruction name="XY_BLOCK_COPY_BLT" bias="2" length="22" engine="blitter"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="20" /> + <field name="Special Mode of Operation" dword="0" bits="13:12" type="uint"> + <value name="NONE" value="0" /> + <value name="FULL_RESOLVE" value="1" /> + <value name="PARTIAL_RESOLVE" value="2" /> + </field> + <field name="Color Depth" dword="0" bits="21:19" type="uint" prefix="XY_BPP"> + <value name="8_BIT" value="0" /> + <value name="16_BIT" value="1" /> + <value name="32_BIT" value="2" /> + <value name="64_BIT" value="3" /> + <value name="96_BIT" value="4" /> + <value name="128_BIT" value="5" /> + </field> + <field name="Opcode" dword="0" bits="28:22" type="uint" default="0x41" /> + <field name="Client" dword="0" bits="31:29" type="uint" default="2" /> + <field name="Destination Pitch" dword="1" bits="17:0" type="uint" /> + <field name="Destination Encrypt En" dword="1" bits="21:21" type="uint" /> + <field name="Destination MOCS index" dword="1" bits="27:24" type="uint" nonzero="true" /> + <field name="Destination Tiling" dword="1" bits="31:30" type="uint" prefix="XY_TILE"> + <value name="LINEAR" value="0" /> + <value name="X" value="1" /> + <value name="4" value="2" /> + <value name="64" value="3" /> + </field> + <field name="Destination X1" dword="2" bits="15:0" type="int" /> + <field name="Destination Y1" dword="2" bits="31:16" type="int" /> + <field name="Destination X2" dword="3" bits="15:0" type="int" /> + <field name="Destination Y2" dword="3" bits="31:16" type="int" /> + <field name="Destination Base Address" dword="4" bits="63:0" type="address" /> + <field name="Destination X Offset" dword="6" bits="13:0" type="uint" /> + <field name="Destination Y Offset" dword="6" bits="29:16" type="uint" /> + <field name="Destination Target Memory" dword="6" bits="31:31" type="uint" prefix="XY_MEM"> + <value name="LOCAL" value="0" /> + <value name="SYSTEM" value="1" /> + </field> + <field name="Source X1" dword="7" bits="15:0" type="int" /> + <field name="Source Y1" dword="7" bits="31:16" type="int" /> + <field name="Source Pitch" dword="8" bits="17:0" type="uint" /> + <field name="Source Encrypt En" dword="8" bits="21:21" type="bool" /> + <field name="Source MOCS index" dword="8" bits="27:24" type="uint" /> + <field name="Source Tiling" dword="8" bits="31:30" type="uint" prefix="XY_TILE"> + <value name="LINEAR" value="0" /> + <value name="X" value="1" /> + <value name="4" value="2" /> + <value name="64" value="3" /> + </field> + <field name="Source Base Address" dword="9" bits="63:0" type="address" /> + <field name="Source X Offset" dword="11" bits="13:0" type="uint" /> + <field name="Source Y Offset" dword="11" bits="29:16" type="uint" /> + <field name="Source Target Memory" dword="11" bits="31:31" type="uint" prefix="XY_MEM"> + <value name="LOCAL" value="0" /> + <value name="SYSTEM" value="1" /> + </field> + <field name="Source Compression Format" dword="12" bits="4:0" type="uint" /> + <field name="Source Clear Value Enable" dword="12" bits="5:5" type="bool" /> + <field name="Source Clear Address" dword="12" bits="47:6" type="address" /> + <field name="Destination Compression Format" dword="14" bits="4:0" type="uint" /> + <field name="Destination Clear Value Enable" dword="14" bits="5:5" type="bool" /> + <field name="Destination Clear Address" dword="14" bits="47:6" type="address" /> + <field name="Destination Surface Height" dword="16" bits="13:0" type="uint" /> + <field name="Destination Surface Width" dword="16" bits="27:14" type="uint" /> + <field name="Destination Surface Type" dword="16" bits="31:29" type="uint" prefix="XY_SURFTYPE"> + <value name="1D" value="0" /> + <value name="2D" value="1" /> + <value name="3D" value="2" /> + <value name="CUBE" value="3" /> + </field> + <field name="Destination LOD" dword="17" bits="3:0" type="uint" /> + <field name="Destination Surface QPitch" dword="17" bits="18:4" type="uint" /> + <field name="Destination Surface Depth" dword="17" bits="31:21" type="uint" /> + <field name="Destination Horizontal Align" dword="18" bits="1:0" type="uint"> + <value name="HALIGN_16" value="0" /> + <value name="HALIGN_32" value="1" /> + <value name="HALIGN_64" value="2" /> + <value name="HALIGN_128" value="3" /> + </field> + <field name="Destination Vertical Align" dword="18" bits="4:3" type="uint"> + <value name="VALIGN_4" value="1" /> + <value name="VALIGN_8" value="2" /> + <value name="VALIGN_16" value="3" /> + </field> + <field name="Destination Mip Tail Start LOD" dword="18" bits="11:8" type="uint" /> + <field name="Destination Array Index" dword="18" bits="31:21" type="uint" /> + <field name="Source Surface Height" dword="19" bits="13:0" type="uint" /> + <field name="Source Surface Width" dword="19" bits="27:14" type="uint" /> + <field name="Source Surface Type" dword="19" bits="31:29" type="uint" prefix="XY_SURFTYPE"> + <value name="1D" value="0" /> + <value name="2D" value="1" /> + <value name="3D" value="2" /> + <value name="CUBE" value="3" /> + </field> + <field name="Source LOD" dword="20" bits="3:0" type="uint" /> + <field name="Source Surface QPitch" dword="20" bits="18:4" type="uint" /> + <field name="Source Surface Depth" dword="20" bits="31:21" type="uint" /> + <field name="Source Horizontal Align" dword="21" bits="1:0" type="uint"> + <value name="HALIGN_16" value="0" /> + <value name="HALIGN_32" value="1" /> + <value name="HALIGN_64" value="2" /> + <value name="HALIGN_128" value="3" /> + </field> + <field name="Source Vertical Align" dword="21" bits="4:3" type="uint"> + <value name="VALIGN_4" value="1" /> + <value name="VALIGN_8" value="2" /> + <value name="VALIGN_16" value="3" /> + </field> + <field name="Source Mip Tail Start LOD" dword="21" bits="11:8" type="uint" /> + <field name="Source Array Index" dword="21" bits="31:21" type="uint" /> + </instruction> + <instruction name="XY_FAST_COLOR_BLT" bias="2" length="16" engine="blitter"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="14" /> + <field name="Number of Multisamples" dword="0" bits="11:9" 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="Special Mode of Operation" dword="0" bits="13:12" type="uint"> + <value name="NONE" value="0" /> + <value name="USE_AUX_SPECIAL_OPERATIONS_MODE" value="1" /> + </field> + <field name="Color Depth" dword="0" bits="21:19" type="uint" prefix="XY_BPP"> + <value name="8_BIT" value="0" /> + <value name="16_BIT" value="1" /> + <value name="32_BIT" value="2" /> + <value name="64_BIT" value="3" /> + <value name="96_BIT" value="4" /> + <value name="128_BIT" value="5" /> + </field> + <field name="Instruction Target(Opcode)" dword="0" bits="28:22" type="uint" default="68"> + <value name="XY_FAST_COLOR_BLT" value="68" /> + </field> + <field name="Client" dword="0" bits="31:29" type="uint" default="2"> + <value name="2D Processor" value="2" /> + </field> + <field name="Destination Pitch" dword="1" bits="17:0" type="uint" /> + <field name="Destination Encrypt En" dword="1" bits="21:21" type="bool" /> + <field name="Destination MOCS index" dword="1" bits="27:24" type="uint" /> + <field name="Destination Tiling" dword="1" bits="31:30" type="uint" prefix="XY_TILE"> + <value name="LINEAR" value="0" /> + <value name="X" value="1" /> + <value name="4" value="2" /> + <value name="64" value="3" /> + </field> + <field name="Destination X1" dword="2" bits="15:0" type="int" /> + <field name="Destination Y1" dword="2" bits="31:16" type="int" /> + <field name="Destination X2" dword="3" bits="15:0" type="int" /> + <field name="Destination Y2" dword="3" bits="31:16" type="int" /> + <field name="Destination Base Address" dword="4" bits="63:0" type="address" /> + <field name="Destination X Offset" dword="6" bits="13:0" type="uint" /> + <field name="Destination Y Offset" dword="6" bits="29:16" type="uint" /> + <field name="Destination Target Memory" dword="6" bits="31:31" type="uint"> + <value name="LOCAL_MEM" value="0" /> + <value name="SYSTEM_MEM" value="1" /> + </field> + <group count="4" dword="7" size="32"> + <field name="Fill Color" dword="0" bits="31:0" type="uint" /> + </group> + <field name="Destination Compression Format" dword="11" bits="3:0" type="uint" /> + <field name="Surface Format" dword="12" bits="8:0" type="uint" /> + <field name="AUX_SPECIAL_OPERATIONS_MODE" dword="12" bits="31:29" type="uint"> + <value name="FAST_CLEAR_HW_FORMAT_CONVERSION" value="0" /> + <value name="FAST_CLEAR_BYPASS_HW_FORMAT_CONVERSION" value="1" /> + <value name="FORCE_UNCOMPRESS" value="2" /> + </field> + <field name="Destination Surface Height" dword="13" bits="13:0" type="uint" /> + <field name="Destination Surface Width" dword="13" bits="27:14" type="uint" /> + <field name="Destination Surface Type" dword="13" bits="31:29" type="uint" prefix="XY_SURFTYPE"> + <value name="1D" value="0" /> + <value name="2D" value="1" /> + <value name="3D" value="2" /> + <value name="CUBE" value="3" /> + </field> + <field name="Destination LOD" dword="14" bits="3:0" type="uint" /> + <field name="Destination Surface QPitch" dword="14" bits="18:4" type="uint" /> + <field name="Destination Surface Depth" dword="14" bits="31:21" type="uint" /> + <field name="Destination Horizontal Align" dword="15" bits="1:0" type="uint"> + <value name="HALIGN_16" value="0" /> + <value name="HALIGN_32" value="1" /> + <value name="HALIGN_64" value="2" /> + <value name="HALIGN_128" value="3" /> + </field> + <field name="Destination Vertical Align" dword="15" bits="4:3" type="uint"> + <value name="VALIGN_4" value="1" /> + <value name="VALIGN_8" value="2" /> + <value name="VALIGN_16" value="3" /> + </field> + <field name="Destination Mip Tail Start LOD" dword="15" bits="11:8" type="uint" /> + <field name="Destination Depth/Stencil Resource" dword="15" bits="18:18" type="bool" /> + <field name="Destination Array Index" dword="15" bits="31:21" type="uint" /> + </instruction> + <register name="BLT_TRTT_VA_RANGE" length="1" num="0x4484"> + <field name="TR-VA Base" dword="0" bits="12:0" type="uint" /> + </register> + <register name="CACHE_MODE_0" length="1" num="0x7000"> + <field name="Hierarchical Z RAW Stall Optimization Disable" dword="0" bits="2:2" type="bool" /> + <field name="Hierarchical Z Disable" dword="0" bits="3:3" type="bool" /> + <field name="Late Z Alloc Disable" dword="0" bits="4:4" type="bool" /> + <field name="Msaa Fast Clear Enabled" dword="0" bits="5:5" type="bool" /> + <field name="Depth Related Cache Pipelined Flush Disable" dword="0" bits="8:8" type="bool" /> + <field name="Sampler L2 TLB Prefetch Enable" dword="0" bits="9:9" type="bool" /> + <field name="RCZ PMA Not-Promoted Allocation stall optimization Disable due to change in depth parameters" dword="0" bits="10:10" type="uint" /> + <field name="Disable Repacking for Compression" dword="0" bits="15:15" type="bool" /> + <field name="Hierarchical Z RAW Stall Optimization Disable Mask" dword="0" bits="18:18" type="bool" /> + <field name="Hierarchical Z Disable Mask" dword="0" bits="19:19" type="bool" /> + <field name="Late Z Alloc Disable Mask" dword="0" bits="20:20" type="bool" /> + <field name="Msaa Fast Clear Enabled Mask" dword="0" bits="21:21" type="bool" /> + <field name="Depth Related Cache Pipelined Flush Disable Mask" dword="0" bits="24:24" type="bool" /> + <field name="Sampler L2 TLB Prefetch Enable Mask" dword="0" bits="25:25" type="bool" /> + <field name="RCZ PMA Not-Promoted Allocation stall optimization Disable due to change in depth parameters Mask" dword="0" bits="26:26" type="bool" /> + <field name="Disable Repacking for Compression Mask" dword="0" bits="31:31" type="bool" /> + </register> + <register name="COMP_CTX0_TRTT_VA_RANGE" length="1" num="0x4584"> + <field name="TR-VA Base" dword="0" bits="12:0" type="uint" /> + </register> + <register name="CS_CHICKEN1" length="1" num="0x2580"> + <field name="Media And GPGPU Pre-emption Control" dword="0" bits="2:1" type="uint"> + <value name="Mid-thread Pre-emption" value="0" /> + <value name="Thread Group Pre-emption" value="1" /> + <value name="Command Level Pre-emption" value="2" /> + </field> + <field name="Disable Preemption and High Priority Pausing due to 3DPRIMITIVE Command" dword="0" bits="10:10" type="bool" /> + <field name="Media And GPGPU Pre-emption Control Mask" dword="0" bits="18:17" type="uint" /> + <field name="Disable Preemption and High Priority Pausing due to 3DPRIMITIVE Command Mask" dword="0" bits="26:26" type="bool" /> + </register> + <register name="FF_MODE" length="1" num="0x6210"> + <field name="Mesh Shader Autostrip Disable" dword="0" bits="15:15" type="bool" /> + <field name="Mesh Shader Partial Autostrip Disable" dword="0" bits="16:16" type="bool" /> + <field name="TE Autostrip Disable" dword="0" bits="31:31" type="bool" /> + </register> + <register name="GFX_TRTT_VA_RANGE" length="1" num="0x4404"> + <field name="TR-VA Base" dword="0" bits="12:0" type="uint" /> + </register> + <register name="VFL_SCRATCH_PAD" length="1" num="0x62a8"> + <field name="Autostrip Disable" dword="0" bits="6:6" type="uint" /> + <field name="Partial Autostrip Disable" dword="0" bits="9:9" type="uint" /> + <field name="Autostrip Disable Mask" dword="0" bits="22:22" type="bool" /> + <field name="Partial Autostrip Disable Mask" dword="0" bits="25:25" type="bool" /> + </register> +</genxml>lib/intel/genxml/xe3.xml new file +816
-0@@ -0,0 +1,816 @@ +<?xml version='1.0' encoding='utf-8'?> +<genxml name="XE3" gen="30"> + <import name="xe2.xml"> + <exclude name="CPS_STATE" /> + <exclude name="3DSTATE_CPS_POINTERS" /> + </import> + <enum name="STATE_CPS_COMBINER_OPCODE" prefix="CPS_COMB_OP"> + <value name="PASSTHROUGH" value="0" /> + <value name="OVERRIDE" value="1" /> + <value name="HIGH_QUALITY" value="2" /> + <value name="LOW_QUALITY" value="3" /> + <value name="RELATIVE" value="4" /> + </enum> + <enum name="STATE_CPS_SIZE"> + <value name="CPSIZE_1" value="0" /> + <value name="CPSIZE_2" value="1" /> + <value name="CPSIZE_4" value="2" /> + </enum> + <struct name="BLEND_STATE_ENTRY" length="2"> + <field name="Write Disable Blue" dword="0" bits="0:0" type="bool" /> + <field name="Write Disable Green" dword="0" bits="1:1" type="bool" /> + <field name="Write Disable Red" dword="0" bits="2:2" type="bool" /> + <field name="Write Disable Alpha" dword="0" bits="3:3" type="bool" /> + <field name="Alpha Blend Function" dword="0" bits="7:5" type="3D_Color_Buffer_Blend_Function" /> + <field name="Destination Alpha Blend Factor" dword="0" bits="12:8" type="3D_Color_Buffer_Blend_Factor" /> + <field name="Source Alpha Blend Factor" dword="0" bits="17:13" type="3D_Color_Buffer_Blend_Factor" /> + <field name="Color Blend Function" dword="0" bits="20:18" type="3D_Color_Buffer_Blend_Function" /> + <field name="Destination Blend Factor" dword="0" bits="25:21" type="3D_Color_Buffer_Blend_Factor" /> + <field name="Source Blend Factor" dword="0" bits="30:26" type="3D_Color_Buffer_Blend_Factor" /> + <field name="Color Buffer Blend Enable" dword="0" bits="31:31" type="bool" /> + <field name="Post-Blend Color Clamp Enable" dword="1" bits="0:0" type="bool" /> + <field name="Pre-Blend Color Clamp Enable" dword="1" bits="1:1" type="bool" /> + <field name="Color Clamp Range" dword="1" bits="3:2" 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 Source Only Clamp Enable" dword="1" bits="4:4" type="bool" /> + <field name="Simple Float Blend Enable" dword="1" bits="5:5" type="bool" /> + <field name="Logic Op Function" dword="1" bits="30:27" type="3D_Logic_Op_Function" /> + <field name="Logic Op Enable" dword="1" bits="31:31" type="bool" /> + </struct> + <struct name="INTERFACE_DESCRIPTOR_DATA" length="8"> + <field name="Kernel Start Pointer" dword="0" bits="31:6" type="offset" /> + <field name="Software Exception Enable" dword="2" bits="7:7" type="bool" /> + <field name="Illegal Opcode Exception Enable" dword="2" bits="13:13" type="bool" /> + <field name="Floating Point Mode" dword="2" bits="16:16" type="uint"> + <value name="IEEE-754" value="0" /> + <value name="Alternate" value="1" /> + </field> + <field name="Single Program Flow" dword="2" bits="18:18" type="bool" /> + <field name="Denorm Mode" dword="2" bits="19:19" type="uint"> + <value name="Ftz" value="0" /> + <value name="SetByKernel" value="1" /> + </field> + <field name="Thread Preemption" dword="2" bits="20:20" type="bool" default="1" /> + <field name="Registers Per Thread" dword="2" bits="30:26" type="uint" /> + <field name="Sampler Count" dword="3" bits="4:2" 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="Sampler State Pointer" dword="3" bits="31:5" type="offset" /> + <field name="Binding Table Entry Count" dword="4" bits="4:0" type="uint" /> + <field name="Binding Table Pointer" dword="4" bits="20:5" type="offset" /> + <field name="Number of Threads in GPGPU Thread Group" dword="5" bits="9:0" type="uint" /> + <field name="Thread group forward progress guarantee" dword="5" bits="13:13" type="bool" /> + <field name="Shared Local Memory Size" dword="5" bits="20:16" 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" /> + <value name="Encodes 96K" value="10" /> + <value name="Encodes 128K" value="11" /> + <value name="Encodes 192K" value="12" /> + <value name="Encodes 256K" value="13" /> + <value name="Encodes 384K" value="14" /> + </field> + <field name="Rounding Mode" dword="5" bits="23:22" 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="Thread Group Dispatch Size" dword="5" bits="27:26" type="uint"> + <value name="TG size 8" value="0" /> + <value name="TG size 4" value="1" /> + <value name="TG size 2" value="2" /> + <value name="TG size 1" value="3" /> + </field> + <field name="Number Of Barriers" dword="5" bits="30:28" type="uint" prefix="BARRIER_SIZE"> + <value name="NONE" value="0" /> + <value name="B1" value="1" /> + <value name="B2" value="2" /> + <value name="B4" value="3" /> + <value name="B8" value="4" /> + <value name="B16" value="5" /> + <value name="B24" value="6" /> + <value name="B32" value="7" /> + </field> + <field name="BTD Mode" dword="5" bits="31:31" type="uint" /> + <field name="Preferred SLM Allocation Size" dword="7" bits="3:0" type="PREF_SLM_ALLOCATION_SIZE" /> + </struct> + <struct name="COMPUTE_WALKER_BODY" length="39"> + <field name="Indirect Data Length" dword="1" bits="16:0" type="uint" /> + <field name="L3 prefetch disable" dword="1" bits="17:17" type="bool" /> + <field name="Partition Dispatch Parameter" dword="1" bits="29:18" type="uint" /> + <field name="Partition Type" dword="1" bits="31:30" type="uint"> + <value name="PartitionX" value="1" /> + <value name="PartitionY" value="2" /> + <value name="PartitionZ" value="3" /> + </field> + <field name="Indirect Data Start Address" dword="2" bits="31:6" type="offset" /> + <field name="Compute Dispatch All walker Enable" dword="3" bits="0:0" type="uint"> + <value name="Disabled" value="0" /> + <value name="Enabled" value="1" /> + </field> + <field name="Thread Group Batch Size" dword="3" bits="4:3" type="uint"> + <value name="TG_BATCH_1" value="0" /> + <value name="TG_BATCH_2" value="1" /> + <value name="TG_BATCH_4" value="2" /> + <value name="TG_BATCH_8" value="3" /> + </field> + <field name="Dispatch Walk Order" dword="3" bits="6:5" type="uint"> + <value name="Linear Walk" value="0" /> + <value name="Y order walk" value="1" /> + <value name="Morton Walk" value="2" /> + </field> + <field name="Message SIMD" dword="3" bits="18:17" type="uint"> + <value name="SIMT16" value="1" /> + <value name="SIMT32" value="2" /> + </field> + <field name="Tile Layout" dword="3" bits="21:19" type="uint"> + <value name="Linear" value="0" /> + <value name="TileY 32bpe" value="1" /> + <value name="TileY 64bpe" value="2" /> + <value name="TileY 128bpe" value="3" /> + </field> + <field name="Walk Order" dword="3" bits="24:22" type="uint"> + <value name="Walk 012" value="0" /> + <value name="Walk 021" value="1" /> + <value name="Walk 102" value="2" /> + <value name="Walk 120" value="3" /> + <value name="Walk 201" value="4" /> + <value name="Walk 210" value="5" /> + </field> + <field name="Emit Inline Parameter" dword="3" bits="25:25" type="bool" /> + <field name="Emit Local" dword="3" bits="28:26" type="uint"> + <value name="Emit None" value="0" /> + <value name="Emit X" value="1" /> + <value name="Emit XY" value="3" /> + <value name="Emit XYZ" value="7" /> + </field> + <field name="Generate Local ID" dword="3" bits="29:29" type="bool" /> + <field name="SIMD Size" dword="3" bits="31:30" type="uint"> + <value name="SIMT16" value="1" /> + <value name="SIMT32" value="2" /> + </field> + <field name="Execution Mask" dword="4" bits="31:0" type="uint" /> + <field name="Local X Maximum" dword="5" bits="9:0" type="uint" /> + <field name="Local Y Maximum" dword="5" bits="19:10" type="uint" /> + <field name="Local Z Maximum" dword="5" bits="29:20" type="uint" /> + <field name="Thread Group ID X Dimension" dword="6" bits="31:0" type="uint" /> + <field name="Thread Group ID Y Dimension" dword="7" bits="31:0" type="uint" /> + <field name="Thread Group ID Z Dimension" dword="8" bits="31:0" type="uint" /> + <field name="Thread Group ID Starting X" dword="9" bits="31:0" type="uint" /> + <field name="Thread Group ID Starting Y" dword="10" bits="31:0" type="uint" /> + <field name="Thread Group ID Starting Z" dword="11" bits="31:0" type="uint" /> + <field name="Partition ID" dword="12" bits="31:0" type="uint" /> + <field name="Partition Size" dword="13" bits="31:0" type="uint" /> + <field name="Preempt X" dword="14" bits="31:0" type="uint" /> + <field name="Preempt Y" dword="15" bits="31:0" type="uint" /> + <field name="Preempt Z" dword="16" bits="31:0" type="uint" /> + <field name="Walker ID" dword="17" bits="3:0" type="uint" /> + <field name="Over dispatch TG count" dword="17" bits="23:8" type="uint" /> + <field name="Interface Descriptor" dword="18" bits="255:0" type="INTERFACE_DESCRIPTOR_DATA" /> + <field name="Post Sync" dword="26" bits="159:0" type="POSTSYNC_DATA" /> + <group count="8" dword="31" size="32"> + <field name="Inline Data" dword="0" bits="31:0" type="uint" /> + </group> + </struct> + <struct name="SAMPLER_STATE" length="4"> + <field name="Anisotropic Algorithm" dword="0" bits="0:0" type="uint"> + <value name="LEGACY" value="0" /> + <value name="EWA Approximation" value="1" /> + </field> + <field name="Texture LOD Bias" dword="0" bits="13:1" type="s4.8" /> + <field name="Min Mode Filter" dword="0" bits="16:14" type="uint" prefix="MAPFILTER"> + <value name="NEAREST" value="0" /> + <value name="LINEAR" value="1" /> + <value name="ANISOTROPIC" value="2" /> + <value name="ANISOTROPIC_FAST" value="3" /> + <value name="MONO" value="6" /> + </field> + <field name="Mag Mode Filter" dword="0" bits="19:17" type="uint" prefix="MAPFILTER"> + <value name="NEAREST" value="0" /> + <value name="LINEAR" value="1" /> + <value name="ANISOTROPIC" value="2" /> + <value name="ANISOTROPIC_FAST" value="3" /> + <value name="MONO" value="6" /> + </field> + <field name="Mip Mode Filter" dword="0" bits="21:20" type="uint" prefix="MIPFILTER"> + <value name="NONE" value="0" /> + <value name="NEAREST" value="1" /> + <value name="LINEAR" value="3" /> + </field> + <field name="Coarse LOD Quality Mode" dword="0" bits="26:22" type="uint" /> + <field name="LOD PreClamp Mode" dword="0" bits="28:27" type="uint" prefix="CLAMP_MODE"> + <value name="NONE" value="0" /> + <value name="OGL" value="2" /> + </field> + <field name="Texture Border Color Mode" dword="0" bits="29:29" type="uint"> + <value name="DX10/OGL" value="0" /> + <value name="DX9" value="1" /> + </field> + <field name="CPS LOD Compensation Enable" dword="0" bits="30:30" type="bool" /> + <field name="Sampler Disable" dword="0" bits="31:31" type="bool" /> + <field name="Cube Surface Control Mode" dword="1" bits="0:0" type="uint"> + <value name="PROGRAMMED" value="0" /> + <value name="OVERRIDE" value="1" /> + </field> + <field name="Shadow Function" dword="1" bits="3:1" type="uint" prefix="PREFILTEROP"> + <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" /> + </field> + <field name="ChromaKey Mode" dword="1" bits="4:4" type="uint"> + <value name="KEYFILTER_KILL_ON_ANY_MATCH" value="0" /> + <value name="KEYFILTER_REPLACE_BLACK" value="1" /> + </field> + <field name="ChromaKey Index" dword="1" bits="6:5" type="uint" /> + <field name="ChromaKey Enable" dword="1" bits="7:7" type="bool" /> + <field name="Max LOD" dword="1" bits="19:8" type="u4.8" /> + <field name="Min LOD" dword="1" bits="31:20" type="u4.8" /> + <field name="LOD Clamp Magnification Mode" dword="2" bits="0:0" type="uint"> + <value name="MIPNONE" value="0" /> + <value name="MIPFILTER" value="1" /> + </field> + <field name="SRGB DECODE" dword="2" bits="1:1" type="uint"> + <value name="DECODE_EXT" value="0" /> + <value name="SKIP_DECODE_EXT" value="1" /> + </field> + <field name="Return Filter Weight for Null Texels" dword="2" bits="2:2" type="uint" /> + <field name="Return Filter Weight for Border Texels" dword="2" bits="3:3" type="uint" /> + <field name="Force gather4 Behavior" dword="2" bits="5:5" type="bool" /> + <field name="Border Color Pointer" dword="2" bits="31:6" type="offset" /> + <field name="TCZ Address Control Mode" dword="3" bits="2:0" type="Texture Coordinate Mode" /> + <field name="TCY Address Control Mode" dword="3" bits="5:3" type="Texture Coordinate Mode" /> + <field name="TCX Address Control Mode" dword="3" bits="8:6" type="Texture Coordinate Mode" /> + <field name="Reduction Type Enable" dword="3" bits="9:9" type="bool" /> + <field name="Non-normalized Coordinate Enable" dword="3" bits="10:10" type="bool" /> + <field name="Trilinear Filter Quality" dword="3" bits="12:11" 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="R Address Min Filter Rounding Enable" dword="3" bits="13:13" type="bool" /> + <field name="R Address Mag Filter Rounding Enable" dword="3" bits="14:14" type="bool" /> + <field name="V Address Min Filter Rounding Enable" dword="3" bits="15:15" type="bool" /> + <field name="V Address Mag Filter Rounding Enable" dword="3" bits="16:16" type="bool" /> + <field name="U Address Min Filter Rounding Enable" dword="3" bits="17:17" type="bool" /> + <field name="U Address Mag Filter Rounding Enable" dword="3" bits="18:18" type="bool" /> + <field name="Maximum Anisotropy" dword="3" bits="21:19" 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="Reduction Type" dword="3" bits="23:22" 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="Allow Low Quality LOD Calculation" dword="3" bits="24:24" type="bool" /> + <field name="Low Quality Filter" dword="3" bits="26:26" type="bool" /> + </struct> + <instruction name="3DSTATE_BTD" bias="2" length="6" engine="render|compute"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="4" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="6" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="1" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="0" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Dispatch Timeout Counter" dword="1" bits="2:0" type="uint"> + <value name="64 clocks" value="0" /> + <value name="128 clocks" value="1" /> + <value name="192 clocks" value="2" /> + <value name="256 clocks" value="3" /> + <value name="512 clocks" value="4" /> + <value name="1024 clocks" value="5" /> + <value name="2048 clocks" value="6" /> + <value name="4096 clocks" value="7" /> + </field> + <field name="Controls the maximum number of outstanding Ray Queries per SS" dword="1" bits="8:7" type="uint" prefix="RAYS_QUERIES_OUTSTANDING"> + <value name="128" value="0" /> + <value name="256" value="1" /> + <value name="512" value="2" /> + <value name="1024" value="3" /> + </field> + <field name="RT Mem Structures 64b Mode Enable" dword="1" bits="30:30" type="bool" /> + <field name="BTD Mid thread preemption" dword="1" bits="31:31" type="bool" /> + <field name="Per DSS Memory Backed Buffer Size" dword="2" bits="2:0" type="uint" default="6"> + <value name="2KB" value="0" /> + <value name="4KB" value="1" /> + <value name="8KB" value="2" /> + <value name="16KB" value="3" /> + <value name="32KB" value="4" /> + <value name="64KB" value="5" /> + <value name="128KB" value="6" /> + </field> + <field name="Memory Backed Buffer Base Pointer" dword="2" bits="63:10" type="address" /> + <field name="Scratch Space Buffer" dword="4" bits="31:10" type="uint" /> + </instruction> + <instruction name="3DSTATE_COARSE_PIXEL" bias="2" length="2" engine="render"> + <field name="DWord Length" dword="0" bits="15:0" type="uint" default="0" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="137" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="CPSizeX" dword="1" bits="1:0" type="STATE_CPS_SIZE" /> + <field name="CPSizeY" dword="1" bits="3:2" type="STATE_CPS_SIZE" /> + <field name="CPSizeCombiner1Opcode" dword="1" bits="6:4" type="STATE_CPS_COMBINER_OPCODE" /> + <field name="CPSizeCombiner0Opcode" dword="1" bits="9:7" type="STATE_CPS_COMBINER_OPCODE" /> + <field name="Disable CPS Pointers" dword="1" bits="31:31" type="bool" /> + </instruction> + <instruction name="3DSTATE_DS" bias="2" length="11" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="9" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="29" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Kernel Start Pointer" dword="1" bits="63:6" type="offset" /> + <field name="Registers Per Thread" dword="3" bits="5:0" type="uint" /> + <field name="Software Exception Enable" dword="3" bits="7:7" type="bool" /> + <field name="Illegal Opcode Exception Enable" dword="3" bits="13:13" type="bool" /> + <field name="Accesses UAV" dword="3" bits="14:14" type="bool" /> + <field name="Floating Point Mode" dword="3" bits="16:16" type="uint"> + <value name="IEEE-754" value="0" /> + <value name="Alternate" value="1" /> + </field> + <field name="Thread Dispatch Priority" dword="3" bits="17:17" type="uint"> + <value name="High" value="1" /> + </field> + <field name="Binding Table Entry Count" dword="3" bits="25:18" type="uint" /> + <field name="Sampler Count" dword="3" bits="29:27" 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="Vector Mask Enable" dword="3" bits="30:30" type="bool" /> + <field name="Scratch Space Buffer" dword="4" bits="31:10" type="uint" /> + <field name="Patch URB Entry Read Offset" dword="6" bits="9:4" type="uint" /> + <field name="Patch URB Entry Read Length" dword="6" bits="17:11" type="uint" /> + <field name="Dispatch GRF Start Register For URB Data" dword="6" bits="24:20" type="uint" /> + <field name="Enable" dword="7" bits="0:0" type="bool" /> + <field name="Cache Disable" dword="7" bits="1:1" type="bool" /> + <field name="Compute W Coordinate Enable" dword="7" bits="2:2" type="bool" /> + <field name="Dispatch Mode" dword="7" bits="4:3" type="uint" prefix="DISPATCH_MODE"> + <value name="SIMD8_SINGLE_PATCH" value="1" /> + <value name="SIMD8_SINGLE_OR_DUAL_PATCH" value="2" /> + </field> + <field name="Primitive ID Not Required" dword="7" bits="9:9" type="bool" /> + <field name="Statistics Enable" dword="7" bits="10:10" type="bool" /> + <field name="Maximum Number of Threads" dword="7" bits="30:21" type="uint" /> + <field name="User Clip Distance Cull Test Enable Bitmask" dword="8" bits="7:0" type="uint" /> + <field name="User Clip Distance Clip Test Enable Bitmask" dword="8" bits="15:8" type="uint" /> + <field name="Vertex URB Entry Output Length" dword="8" bits="20:16" type="uint" /> + <field name="Vertex URB Entry Output Read Offset" dword="8" bits="26:21" type="uint" /> + <field name="QUAD_PATCH Kernel Start Pointer" dword="9" bits="63:6" type="offset" /> + </instruction> + <instruction name="3DSTATE_GS" bias="2" length="10" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="8" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="17" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Kernel Start Pointer" dword="1" bits="63:6" type="offset" /> + <field name="Expected Vertex Count" dword="3" bits="5:0" type="uint" /> + <field name="Software Exception Enable" dword="3" bits="7:7" type="bool" /> + <field name="Mask Stack Exception Enable" dword="3" bits="11:11" type="bool" /> + <field name="Accesses UAV" dword="3" bits="12:12" type="bool" /> + <field name="Illegal Opcode Exception Enable" dword="3" bits="13:13" type="bool" /> + <field name="Floating Point Mode" dword="3" bits="16:16" type="uint"> + <value name="IEEE-754" value="0" /> + <value name="Alternate" value="1" /> + </field> + <field name="Thread Dispatch Priority" dword="3" bits="17:17" type="uint"> + <value name="Normal" value="0" /> + <value name="High" value="1" /> + </field> + <field name="Binding Table Entry Count" dword="3" bits="25:18" type="uint" /> + <field name="Sampler Count" dword="3" bits="29:27" 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="Vector Mask Enable" dword="3" bits="30:30" type="uint"> + <value name="Dmask" value="0" /> + </field> + <field name="Single Program Flow" dword="3" bits="31:31" type="bool" /> + <field name="Scratch Space Buffer" dword="4" bits="31:10" type="uint" /> + <field name="Dispatch GRF Start Register For URB Data" dword="6" bits="3:0" type="uint" /> + <field name="Vertex URB Entry Read Offset" dword="6" bits="9:4" type="uint" /> + <field name="Include Vertex Handles" dword="6" bits="10:10" type="bool" /> + <field name="Vertex URB Entry Read Length" dword="6" bits="16:11" type="uint" /> + <field name="Output Topology" dword="6" bits="22:17" type="3D_Prim_Topo_Type" /> + <field name="Output Vertex Size" dword="6" bits="28:23" type="uint" /> + <field name="Dispatch GRF Start Register For URB Data [5:4]" dword="6" bits="30:29" type="uint" /> + <field name="Enable" dword="7" bits="0:0" type="bool" /> + <field name="Discard Adjacency" dword="7" bits="1:1" type="bool" /> + <field name="Reorder Mode" dword="7" bits="2:2" type="uint"> + <value name="LEADING" value="0" /> + <value name="TRAILING" value="1" /> + </field> + <field name="Hint" dword="7" bits="3:3" type="bool" /> + <field name="Include Primitive ID" dword="7" bits="4:4" type="bool" /> + <field name="Invocations Increment Value" dword="7" bits="9:5" type="uint" /> + <field name="Statistics Enable" dword="7" bits="10:10" type="bool" /> + <field name="Default Stream Id" dword="7" bits="14:13" type="uint" /> + <field name="Instance Control" dword="7" bits="19:15" type="uint" /> + <field name="Control Data Header Size" dword="7" bits="23:20" type="uint" /> + <field name="Registers Per Thread" dword="7" bits="31:26" type="uint" /> + <field name="Maximum Number of Threads" dword="8" bits="8:0" type="uint" /> + <field name="Static Output Vertex Count" dword="8" bits="26:16" type="uint" /> + <field name="Static Output" dword="8" bits="30:30" type="bool" /> + <field name="Control Data Format" dword="8" bits="31:31" type="uint"> + <value name="CUT" value="0" /> + <value name="SID" value="1" /> + </field> + <field name="User Clip Distance Cull Test Enable Bitmask" dword="9" bits="7:0" type="uint" /> + <field name="User Clip Distance Clip Test Enable Bitmask" dword="9" bits="15:8" type="uint" /> + <field name="Vertex URB Entry Output Length" dword="9" bits="20:16" type="uint" /> + <field name="Vertex URB Entry Output Read Offset" dword="9" bits="26:21" type="uint" /> + </instruction> + <instruction name="3DSTATE_HS" bias="2" length="8" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="6" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="27" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Patch Count Threshold" dword="1" bits="3:0" type="uint" /> + <field name="Registers Per Thread" dword="1" bits="9:4" type="uint" /> + <field name="Software Exception Enable" dword="1" bits="12:12" type="bool" /> + <field name="Illegal Opcode Exception Enable" dword="1" bits="13:13" type="bool" /> + <field name="Floating Point Mode" dword="1" bits="16:16" type="uint"> + <value name="IEEE-754" value="0" /> + <value name="alternate" value="1" /> + </field> + <field name="Thread Dispatch Priority" dword="1" bits="17:17" type="uint"> + <value name="Normal" value="0" /> + <value name="High" value="1" /> + </field> + <field name="Binding Table Entry Count" dword="1" bits="25:18" type="uint" /> + <field name="Sampler Count" dword="1" bits="29:27" 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="Instance Count" dword="2" bits="4:0" type="uint" /> + <field name="Maximum Number of Threads" dword="2" bits="16:8" type="uint" /> + <field name="Statistics Enable" dword="2" bits="29:29" type="bool" /> + <field name="Enable" dword="2" bits="31:31" type="bool" /> + <field name="Kernel Start Pointer" dword="3" bits="63:6" type="offset" /> + <field name="Scratch Space Buffer" dword="5" bits="31:10" type="uint" /> + <field name="Include Primitive ID" dword="7" bits="0:0" type="bool" /> + <field name="Vertex URB Entry Read Offset" dword="7" bits="9:4" type="uint" /> + <field name="Vertex URB Entry Read Length" dword="7" bits="16:11" type="uint" /> + <field name="Dispatch GRF Start Register For URB Data" dword="7" bits="23:19" type="uint" /> + <field name="Include Vertex Handles" dword="7" bits="24:24" type="bool" /> + <field name="Accesses UAV" dword="7" bits="25:25" type="bool" /> + <field name="Vector Mask Enable" dword="7" bits="26:26" type="uint"> + <value name="Dmask" value="0" /> + </field> + <field name="Single Program Flow" dword="7" bits="27:27" type="bool" /> + <field name="Dispatch GRF Start Register For URB Data [5]" dword="7" bits="28:28" type="uint" /> + </instruction> + <instruction name="3DSTATE_MESH_SHADER" bias="2" length="8" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="6" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="122" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Kernel Start Pointer" dword="1" bits="63:6" type="offset" /> + <field name="Local X Maximum" dword="3" bits="9:0" type="uint" /> + <field name="Software Exception Enable" dword="3" bits="10:10" type="bool" /> + <field name="Mask Stack Exception Enable" dword="3" bits="11:11" type="bool" /> + <field name="Illegal Opcode Exception Enable" dword="3" bits="13:13" type="bool" /> + <field name="Floating Point Mode" dword="3" bits="16:16" type="uint"> + <value name="IEEE-754" value="0" /> + <value name="Alternate" value="1" /> + </field> + <field name="Single Program Flow" dword="3" bits="18:18" type="uint" /> + <field name="Denorm Mode" dword="3" bits="19:19" type="uint"> + <value name="Ftz" value="0" /> + <value name="SetByKernel" value="1" /> + </field> + <field name="Registers Per Thread" dword="3" bits="25:20" type="uint" /> + <field name="Number of Threads in GPGPU Thread Group" dword="4" bits="9:0" type="uint" /> + <field name="Shared Local Memory Size" dword="4" bits="20:16" type="uint" /> + <field name="Rounding Mode" dword="4" bits="23:22" 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="Preferred SLM Allocation Size" dword="4" bits="27:24" type="PREF_SLM_ALLOCATION_SIZE" /> + <field name="Number of Barriers" dword="4" bits="30:28" type="uint" /> + <field name="Indirect Data Length" dword="5" bits="16:0" type="uint" /> + <field name="L3 Prefetch Disable" dword="5" bits="17:17" type="bool" /> + <field name="Emit Local ID X" dword="5" bits="18:18" type="bool" /> + <field name="Emit Inline Parameter" dword="5" bits="19:19" type="bool" /> + <field name="Systolic Mode Enable" dword="5" bits="20:20" type="bool" /> + <field name="Accesses UAV" dword="5" bits="21:21" type="bool" /> + <field name="XP0 Required" dword="5" bits="22:22" type="uint" /> + <field name="Message SIMD" dword="5" bits="29:28" type="uint"> + <value name="SIMD16" value="1" /> + <value name="SIMD32" value="2" /> + </field> + <field name="SIMD Size" dword="5" bits="31:30" type="uint"> + <value name="SIMD16" value="1" /> + <value name="SIMD32" value="2" /> + </field> + <field name="Execution Mask" dword="6" bits="31:0" type="uint" /> + <field name="Maximum Primitive Count" dword="7" bits="9:0" type="uint" /> + <field name="Per-Primitive Data Pitch" dword="7" bits="16:12" type="uint" /> + <field name="Per-Vertex Data Pitch" dword="7" bits="24:20" type="uint" /> + <field name="Index Format" dword="7" bits="27:25" type="uint" prefix="INDEX"> + <value name="U888X" value="0" /> + <value name="U101010X" value="1" /> + <value name="U8" value="4" /> + <value name="U16" value="5" /> + <value name="U32" value="3" /> + </field> + <field name="Output Topology" dword="7" bits="29:28" type="uint" prefix="OUTPUT"> + <value name="POINT" value="0" /> + <value name="LINE" value="1" /> + <value name="TRI" value="2" /> + </field> + <field name="Per-Primitive Data Present" dword="7" bits="31:31" type="uint" /> + </instruction> + <instruction name="3DSTATE_PS" bias="2" length="12" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="10" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="32" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Kernel 0 Enable" dword="1" bits="0:0" type="bool" /> + <field name="Kernel[0] : SIMD Width" dword="1" bits="1:1" type="uint" prefix="PS"> + <value name="SIMD16" value="0" /> + <value name="SIMD32" value="1" /> + </field> + <field name="Kernel Start Pointer 0" dword="1" bits="63:6" type="offset" /> + <field name="Registers Per Thread" dword="3" bits="5:0" type="uint" /> + <field name="Software Exception Enable" dword="3" bits="7:7" type="bool" /> + <field name="Mask Stack Exception Enable" dword="3" bits="11:11" type="bool" /> + <field name="Illegal Opcode Exception Enable" dword="3" bits="13:13" type="bool" /> + <field name="Rounding Mode" dword="3" bits="15:14" 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="Floating Point Mode" dword="3" bits="16:16" type="uint"> + <value name="IEEE-754" value="0" /> + <value name="Alternate" value="1" /> + </field> + <field name="Thread Dispatch Priority" dword="3" bits="17:17" type="uint"> + <value name="Normal" value="0" /> + <value name="High" value="1" /> + </field> + <field name="Binding Table Entry Count" dword="3" bits="25:18" type="uint" /> + <field name="Single Precision Denormal Mode" dword="3" bits="26:26" type="uint"> + <value name="Flushed to Zero" value="0" /> + <value name="Retained" value="1" /> + </field> + <field name="Sampler Count" dword="3" bits="29:27" 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="Vector Mask Enable" dword="3" bits="30:30" type="uint"> + <value name="Dmask" value="0" /> + <value name="Vmask" value="1" /> + </field> + <field name="Single Program Flow" dword="3" bits="31:31" type="uint"> + <value name="Multiple" value="0" /> + <value name="Single" value="1" /> + </field> + <field name="Scratch Space Buffer" dword="4" bits="31:10" type="uint" /> + <field name="Position XY Offset Select" dword="6" bits="4:3" type="uint"> + <value name="POSOFFSET_NONE" value="0" /> + <value name="POSOFFSET_CENTROID" value="2" /> + <value name="POSOFFSET_SAMPLE" value="3" /> + </field> + <field name="Render Target Resolve Type" dword="6" bits="7:6" type="uint"> + <value name="RESOLVE_DISABLED" value="0" /> + </field> + <field name="Render Target Fast Clear Enable" dword="6" bits="8:8" type="bool" /> + <field name="Overlapping Subspans Enable" dword="6" bits="9:9" type="bool" /> + <field name="3D Scoreboard Address Size select" dword="6" bits="10:10" type="uint"> + <value name="2x2" value="0" /> + <value name="4x2" value="1" /> + </field> + <field name="Clear/Resolve BTI for Render Target" dword="6" bits="19:12" type="uint" /> + <field name="Pixel Scoreboard Disable" dword="6" bits="21:21" type="bool" /> + <field name="Maximum Number of Threads Per PSD" dword="6" bits="31:23" type="uint" /> + <field name="Dispatch GRF Start Register For Constant/Setup Data 1" dword="7" bits="15:8" type="uint" /> + <field name="Dispatch GRF Start Register For Constant/Setup Data 0" dword="7" bits="23:16" type="uint" /> + <field name="Kernel[0] : Poly Packing Policy" dword="7" bits="26:24" type="uint"> + <value name="POLY_PACK4_DYNAMIC" value="0" /> + <value name="POLY_PACK8_DYNAMIC" value="1" /> + <value name="POLY_PACK16_DYNAMIC" value="2" /> + <value name="POLY_PACK16_FIXED" value="3" /> + <value name="POLY_PACK8_FIXED" value="4" /> + </field> + <field name="Kernel[0] : Maximum Polys per Thread" dword="7" bits="29:27" type="uint" /> + <field name="Kernel 1 Selection Priority" dword="7" bits="31:31" type="uint"> + <value name="PRI_SIMD" value="0" /> + <value name="PRI_POLY" value="1" /> + </field> + <field name="Kernel 1 Enable" dword="8" bits="0:0" type="bool" /> + <field name="Kernel[1] : SIMD Width" dword="8" bits="1:1" type="uint" prefix="PS"> + <value name="SIMD16" value="0" /> + <value name="SIMD32" value="1" /> + </field> + <field name="Kernel Start Pointer 1" dword="8" bits="63:6" type="offset" /> + </instruction> + <instruction name="3DSTATE_TASK_SHADER" bias="2" length="7" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="5" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="125" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Kernel Start Pointer" dword="1" bits="63:6" type="offset" /> + <field name="Local X Maximum" dword="3" bits="9:0" type="uint" /> + <field name="Software Exception Enable" dword="3" bits="10:10" type="bool" /> + <field name="Mask Stack Exception Enable" dword="3" bits="11:11" type="bool" /> + <field name="Illegal Opcode Exception Enable" dword="3" bits="13:13" type="bool" /> + <field name="Floating Point Mode" dword="3" bits="16:16" type="uint"> + <value name="IEEE-754" value="0" /> + <value name="Alternate" value="1" /> + </field> + <field name="Single Program Flow" dword="3" bits="18:18" type="uint" /> + <field name="Denorm Mode" dword="3" bits="19:19" type="uint"> + <value name="Ftz" value="0" /> + <value name="SetByKernel" value="1" /> + </field> + <field name="Registers Per Thread" dword="3" bits="25:20" type="uint" /> + <field name="Number of Threads in GPGPU Thread Group" dword="4" bits="9:0" type="uint" /> + <field name="Shared Local Memory Size" dword="4" bits="20:16" type="uint" /> + <field name="Barrier Enable" dword="4" bits="21:21" type="bool" /> + <field name="Rounding Mode" dword="4" bits="23:22" 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="Preferred SLM Allocation Size" dword="4" bits="27:24" type="uint" /> + <field name="Number of Barriers" dword="4" bits="30:28" type="uint" /> + <field name="Indirect Data Length" dword="5" bits="16:0" type="uint" /> + <field name="L3 Prefetch Disable" dword="5" bits="17:17" type="bool" /> + <field name="Emit Local ID X" dword="5" bits="18:18" type="bool" /> + <field name="Emit Inline Parameter" dword="5" bits="19:19" type="bool" /> + <field name="Systolic Mode Enable" dword="5" bits="20:20" type="bool" /> + <field name="Accesses UAV" dword="5" bits="21:21" type="bool" /> + <field name="XP0 Required" dword="5" bits="22:22" type="uint" /> + <field name="Message SIMD" dword="5" bits="29:28" type="uint"> + <value name="SIMD16" value="1" /> + <value name="SIMD32" value="2" /> + </field> + <field name="SIMD Size" dword="5" bits="31:30" type="uint"> + <value name="SIMD16" value="1" /> + <value name="SIMD32" value="2" /> + </field> + <field name="Execution Mask" dword="6" bits="31:0" type="uint" /> + </instruction> + <instruction name="3DSTATE_VS" bias="2" length="9" engine="render"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="7" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="16" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="0" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="3" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Kernel Start Pointer" dword="1" bits="63:6" type="offset" /> + <field name="Registers Per Thread" dword="3" bits="5:0" type="uint" /> + <field name="Software Exception Enable" dword="3" bits="7:7" type="bool" /> + <field name="Accesses UAV" dword="3" bits="12:12" type="bool" /> + <field name="Illegal Opcode Exception Enable" dword="3" bits="13:13" type="bool" /> + <field name="Floating Point Mode" dword="3" bits="16:16" type="uint"> + <value name="IEEE-754" value="0" /> + <value name="Alternate" value="1" /> + </field> + <field name="Thread Dispatch Priority" dword="3" bits="17:17" type="uint"> + <value name="Normal" value="0" /> + <value name="High" value="1" /> + </field> + <field name="Binding Table Entry Count" dword="3" bits="25:18" type="uint" /> + <field name="Sampler Count" dword="3" bits="29:27" 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="Vector Mask Enable" dword="3" bits="30:30" type="uint"> + <value name="Dmask" value="0" /> + </field> + <field name="Scratch Space Buffer" dword="4" bits="31:10" type="uint" /> + <field name="Vertex URB Entry Read Offset" dword="6" bits="9:4" type="uint" /> + <field name="Vertex URB Entry Read Length" dword="6" bits="16:11" type="uint" /> + <field name="Dispatch GRF Start Register For URB Data" dword="6" bits="24:20" type="uint" /> + <field name="Enable" dword="7" bits="0:0" type="bool" /> + <field name="Vertex Cache Disable" dword="7" bits="1:1" type="bool" /> + <field name="Single Instance Dispatch Enable" dword="7" bits="9:9" type="bool" /> + <field name="Statistics Enable" dword="7" bits="10:10" type="bool" /> + <field name="Maximum Number of Threads" dword="7" bits="31:22" type="uint" /> + <field name="User Clip Distance Cull Test Enable Bitmask" dword="8" bits="7:0" type="uint" /> + <field name="User Clip Distance Clip Test Enable Bitmask" dword="8" bits="15:8" type="uint" /> + <field name="Vertex URB Entry Output Length" dword="8" bits="20:16" type="uint" /> + <field name="Vertex URB Entry Output Read Offset" dword="8" bits="26:21" type="uint" /> + </instruction> + <instruction name="STATE_COMPUTE_MODE" bias="2" length="3" engine="render|compute"> + <field name="DWord Length" dword="0" bits="7:0" type="uint" default="1" /> + <field name="3D Command Sub Opcode" dword="0" bits="23:16" type="uint" default="5" /> + <field name="3D Command Opcode" dword="0" bits="26:24" type="uint" default="1" /> + <field name="Command SubType" dword="0" bits="28:27" type="uint" default="0" /> + <field name="Command Type" dword="0" bits="31:29" type="uint" default="3" /> + <field name="Z Pass Async Compute Thread Limit" dword="1" bits="2:0" type="uint" prefix="ZPACTL"> + <value name="Max 60" value="0" /> + <value name="Max 64" value="1" /> + <value name="Max 56" value="2" /> + <value name="Max 48" value="3" /> + <value name="Max 40" value="4" /> + <value name="Max 32" value="5" /> + </field> + <field name="Z Async Throttle settings" dword="1" bits="4:3" type="uint" prefix="ZATS"> + <value name="Defer to Async Compute Thread Limit" value="0" /> + <value name="Max 32" value="1" /> + <value name="Max 40" value="2" /> + <value name="Max 48" value="3" /> + </field> + <field name="Async Compute Thread Limit" dword="1" bits="9:7" type="uint" prefix="ACTL"> + <value name="Disabled" value="0" /> + <value name="Max 2" value="1" /> + <value name="Max 8" value="2" /> + <value name="Max 16" value="3" /> + <value name="Max 24" value="4" /> + <value name="Max 32" value="5" /> + <value name="Max 40" value="6" /> + <value name="Max 48" value="7" /> + </field> + <field name="Enable Variable Register Size Allocation" dword="1" bits="10:10" type="bool" /> + <field name="EU Thread Scheduling Mode Override" dword="1" bits="14:13" type="uint" /> + <field name="Large GRF Mode" dword="1" bits="15:15" type="bool" /> + <field name="Z Pass Async Compute Thread Limit Mask" dword="1" bits="18:16" type="uint" /> + <field name="Mask1" dword="1" bits="31:16" type="uint" /> + <field name="Z Async Throttle settings Mask" dword="1" bits="20:19" type="uint" /> + <field name="Async Compute Thread Limit Mask" dword="1" bits="25:23" type="uint" /> + <field name="Enable Variable Register Size Allocation Mask" dword="1" bits="26:26" type="uint" /> + <field name="EU Thread Scheduling Mode Override Mask" dword="1" bits="30:29" type="uint" /> + <field name="Large GRF Mode Mask" dword="1" bits="31:31" type="bool" /> + <field name="Midthread Preemption Delay Timer" dword="2" bits="2:0" type="uint"> + <value name="MTP_TIMER_VAL_0" value="0" /> + <value name="MTP_TIMER_VAL_50" value="1" /> + <value name="MTP_TIMER_VAL_100" value="2" /> + <value name="MTP_TIMER_VAL_150" value="3" /> + </field> + <field name="Midthread Preemption Overdispatch Thread group count" dword="2" bits="4:3" type="uint"> + <value name="OD_TG_M2" value="0" /> + <value name="OD_TG_M4" value="1" /> + <value name="OD_TG_M8" value="2" /> + <value name="OD_TG_M16" value="3" /> + </field> + <field name="Midthread Preemption Overdispatch Test mode" dword="2" bits="5:5" type="uint"> + <value name="Regular" value="0" /> + <value name="Test mode" value="1" /> + </field> + <field name="UAV Coherency Mode" dword="2" bits="6:6" type="uint"> + <value name="Drain DataPort Mode" value="0" /> + <value name="Flush Dataport L1" value="1" /> + </field> + <field name="Midthread Preemption Delay Timer Mask" dword="2" bits="18:16" type="uint" /> + <field name="Mask2" dword="2" bits="31:16" type="uint" /> + <field name="Midthread Preemption Overdispatch Thread group count Mask" dword="2" bits="20:19" type="uint" /> + <field name="Midthread Preemption Overdispatch Test mode Mask" dword="2" bits="21:21" type="uint" /> + <field name="UAV Coherency Mode Mask" dword="2" bits="22:22" type="uint" /> + <field name="Memory allocation for Scratch and Midthread Preemption buffers Mask" dword="2" bits="27:27" type="uint" /> + </instruction> + <register name="CHICKEN_RASTER_2" length="1" num="0x6208"> + <field name="Disable Any MCTR response fix" dword="0" bits="5:5" type="bool" /> + <field name="Disable Any MCTR response fix Mask" dword="0" bits="21:21" type="bool" /> + </register> +</genxml>lib/intel/genxml/xe3p.xml new file +4
-0@@ -0,0 +1,4 @@ +<?xml version='1.0' encoding='utf-8'?> +<genxml name="XE3P" gen="35"> + <import name="xe3.xml" /> +</genxml>lib/meson.build +4
-1@@ -307,6 +307,9 @@ genxml_gen_deps = files( 'intel/genxml/gen110.xml', 'intel/genxml/gen120.xml', 'intel/genxml/gen125.xml', + 'intel/genxml/xe2.xml', + 'intel/genxml/xe3.xml', + 'intel/genxml/xe3p.xml', ) # Ordered list of all gens, oldest first. Each gen's baselines are all@@ -314,7 +317,7 @@ genxml_gen_deps = files( # omitted from the generated header; the comment points directly to the # oldest gen that defined that layout so that a developer can find the # real struct in one grep. -genxml_gens = ['gen90', 'gen110', 'gen120', 'gen125'] +genxml_gens = ['gen90', 'gen110', 'gen120', 'gen125', 'xe2', 'xe3', 'xe3p'] genxml_pack_headers = [] genxml_decode_headers = []Signature · 1 line
2.34.1
PATCH 5/10 lib/mocs: Add intel_get_wb_mocs() and intel_buf_mocs() for genxml MOCS fields
In reply to Jan Maslakgenxml-generated pack headers represent MOCS as a single 7-bit field encoding both the 6-bit MOCS table index (bits 6:1) and the PXP protected-content bit (bit 0). The existing intel_get_wb_mocs_index() returns only the 6-bit index; assigning it directly to a genxml .MOCS field places the index in the wrong bit position.
Add two helpers that return the full 7-bit value ready for direct assignment to a genxml .MOCS field:
- intel_get_wb_mocs(fd): write-back policy, PXP clear. Equivalent to intel_get_wb_mocs_index(fd) << 1.
- intel_buf_mocs(buf): encodes the buffer's mocs_index together with its PXP flag: (buf->mocs_index << 1) | intel_buf_pxp(buf). Use this wherever a surface-state or sampler-state MOCS field is set for a specific intel_buf.
The old intel_get_wb_mocs_index() and related _index() functions remain for callers that use hand-crafted bitfield structs with the index occupying a separate bitfield.
--- lib/intel_bufops.h | 13 +++++++++++++ lib/intel_mocs.c | 14 ++++++++++++++ lib/intel_mocs.h | 1 + 3 files changed, 28 insertions(+)
lib/intel_bufops.h +13 -0
@@ -210,6 +210,19 @@ static inline bool intel_buf_pxp(const struct intel_buf *buf)return buf->is_protected; } +/** +* intel_buf_mocs: +* @buf: the intel_buf +* +* Returns the full 7-bit MOCS field value for @buf, encoding the 6-bit +* table index at bits 6:1 and the PXP protected-content bit at bit 0. +* Use this when assigning to a genxml-generated MOCS field. +*/ +static inline uint8_t intel_buf_mocs (const struct intel_buf *buf) +{ +return (buf->mocs_index <<1 ) | (intel_buf_pxp (buf) ?1 :0 ); +} +void *intel_buf_cpu_map (struct intel_buf *buf,bool write);void *intel_buf_device_map (struct intel_buf *buf,bool write);void intel_buf_unmap (struct intel_buf *buf);
lib/intel_mocs.c +14 -0
@@ -81,6 +81,20 @@ uint8_t intel_get_wb_mocs_index(int fd)return mocs.wb_index; } +/** +* intel_get_wb_mocs: +* @fd: the DRM file descriptor +* +* Returns: The full 7-bit MOCS field value for write-back caching, with the +* 6-bit table index shifted to bits 6:1 and the PXP bit (bit 0) cleared. +* Use this when assigning to a genxml-generated MOCS field, which encodes +* both the index and PXP bit in a single 7-bit value. +*/ +uint8_t intel_get_wb_mocs (int fd) +{ +return intel_get_wb_mocs_index (fd) <<1 ; +} +/** * intel_get_uc_mocs_index: * @fd: the DRM file descriptor
lib/intel_mocs.h +1 -0
@@ -12,6 +12,7 @@#define DISPLAYABLE_MOCS_INDEX ((uint8_t)-2)uint8_t intel_get_wb_mocs_index (int fd); +uint8_t intel_get_wb_mocs (int fd);uint8_t intel_get_uc_mocs_index (int fd);uint8_t intel_get_displayable_mocs_index (int fd);uint8_t intel_get_defer_to_pat_mocs_index (int fd);
Signature · 1 line
2.34.1
Re: [PATCH 05/10] lib/mocs: Add intel_get_wb_mocs() and intel_buf_mocs() for genxml MOCS fields
Quoted 11 lines · Jan Maslak
genxml-generated pack headers represent MOCS as a single 7-bit field encoding both the 6-bit MOCS table index (bits 6:1) and the PXP protected-content bit (bit 0). The existing
intel_get_wb_mocs_index()returns only the 6-bit index; assigning it directly to a genxml .MOCS field places the index in the wrong bit position.Add two helpers that return the full 7-bit value ready for direct assignment to a genxml .MOCS field:
-
intel_get_wb_mocs(fd): write-back policy, PXP clear. Equivalent tointel_get_wb_mocs_index(fd)<< 1.
How this corresponds to xe2.xml, XY_BLOCK_COPY_BLT, dword[1], mocs field? To be honest I'm surprised the change in these bits, I didn't notice this before.
--
Zbigniew
Quoted 81 lines
-
intel_buf_mocs(buf): encodes the buffer'smocs_indextogether with its PXP flag: (buf->mocs_index<< 1) |intel_buf_pxp(buf). Use this wherever a surface-state or sampler-state MOCS field is set for a specificintel_buf.The old
intel_get_wb_mocs_index()and related_index()functions remain for callers that use hand-crafted bitfield structs with the index occupying a separate bitfield.Signed-off-by Jan Maslak <[email protected]>--- lib/intel_bufops.h | 13 +++++++++++++ lib/intel_mocs.c | 14 ++++++++++++++ lib/intel_mocs.h | 1 + 3 files changed, 28 insertions(+)lib/intel_bufops.h +13
-0@@ -210,6 +210,19 @@ static inline bool intel_buf_pxp(const struct intel_buf *buf)return buf->is_protected; } +/** +* intel_buf_mocs: +* @buf: the intel_buf +* +* Returns the full 7-bit MOCS field value for @buf, encoding the 6-bit +* table index at bits 6:1 and the PXP protected-content bit at bit 0. +* Use this when assigning to a genxml-generated MOCS field. +*/ +static inline uint8_t intel_buf_mocs (const struct intel_buf *buf) +{ +return (buf->mocs_index <<1 ) | (intel_buf_pxp (buf) ?1 :0 ); +} +void *intel_buf_cpu_map (struct intel_buf *buf,bool write);void *intel_buf_device_map (struct intel_buf *buf,bool write);void intel_buf_unmap (struct intel_buf *buf);lib/intel_mocs.c +14
-0@@ -81,6 +81,20 @@ uint8_t intel_get_wb_mocs_index(int fd)return mocs.wb_index; } +/** +* intel_get_wb_mocs: +* @fd: the DRM file descriptor +* +* Returns: The full 7-bit MOCS field value for write-back caching, with the +* 6-bit table index shifted to bits 6:1 and the PXP bit (bit 0) cleared. +* Use this when assigning to a genxml-generated MOCS field, which encodes +* both the index and PXP bit in a single 7-bit value. +*/ +uint8_t intel_get_wb_mocs (int fd) +{ +return intel_get_wb_mocs_index (fd) <<1 ; +} +/** * intel_get_uc_mocs_index: * @fd: the DRM file descriptor lib/intel_mocs.h +1
-0@@ -12,6 +12,7 @@#define DISPLAYABLE_MOCS_INDEX ((uint8_t)-2)uint8_t intel_get_wb_mocs_index (int fd); +uint8_t intel_get_wb_mocs (int fd);uint8_t intel_get_uc_mocs_index (int fd);uint8_t intel_get_displayable_mocs_index (int fd);uint8_t intel_get_defer_to_pat_mocs_index (int fd);Signature · 1 line
2.34.1
PATCH 6/10 lib/rendercopy: Convert surface state and sampler setup to genxml
In reply to Jan MaslakReplace intel_bb_out() calls in gen9_bind_buf(), gen8_bind_surfaces(), and gen8_create_sampler() with igt_genxml_pack_state macros backed by the genxml pack headers.
--- lib/rendercopy_gen9.c | 284 +++++++++++++++++++++++------------------- 1 file changed, 158 insertions(+), 126 deletions(-)
lib/rendercopy_gen9.c +158 -126
@@ -21,11 +21,17 @@#include "intel_io.h" #include "intel_mocs.h" #include "rendercopy.h" -#include "gen9_render.h" +#include "surfaceformat.h" #include "xe2_render.h" #include "intel_reg.h" #include "igt_aux.h" #include "intel_chipset.h" +#include "intel/genxml/igt_genxml.h" +#include "gen90_pack.h" +#include "gen110_pack.h" +#include "gen120_pack.h" +#include "gen125_pack.h" +#include "xe2_pack.h" #define VERTEX_SIZE (3*4)
@@ -187,13 +193,60 @@ static uint32_t dg2_compression_format(const struct intel_buf *buf) } } -/* Mostly copy+paste from gen6, except height, width, pitch moved */ +/* +* IGT_RSS_COMMON - set RENDER_SURFACE_STATE fields shared across all gens. +* Works via C preprocessor structural typing: all gen-specific structs +* have identical field names for these members. +*/ +#define IGT_RSS_COMMON (ss, buf, mocs_val, rd, wd) \ + do { \ + ss.SurfaceType = GFX9_SURFTYPE_2D; \ + ss.SurfaceFormat = gen4_surface_format((buf)->bpp, \ + (buf)->depth); \ + ss.SurfaceVerticalAlignment = GFX9_VALIGN_4; \ + ss.MOCS = (mocs_val); \ + ss.Width = intel_buf_width(buf) - 1; \ + ss.Height = intel_buf_height(buf) - 1; \ + ss.SurfacePitch = (buf)->surface[0].stride - 1; \ + ss.ShaderChannelSelectRed = (int)GFX9_SCS_RED; \ + ss.ShaderChannelSelectGreen = (int)GFX9_SCS_GREEN; \ + ss.ShaderChannelSelectBlue = (int)GFX9_SCS_BLUE; \ + ss.ShaderChannelSelectAlpha = (int)GFX9_SCS_ALPHA; \ + ss.SurfaceBaseAddress = \ + igt_address_of((buf), (buf)->surface[0].offset, \ + (rd), (wd)); \ + } while (0) + +/* +* IGT_RSS_TILING - set TileMode from buf->tiling. The numeric encoding is +* identical across gen9/gen12/gen12.5/xe2, but the enum names differ per gen. +* We use xe2 (GFX20) names as they best reflect the modern tile semantics; +* (int) casts suppress -Wenum-conversion when used with older-gen structs. +*/ +#define IGT_RSS_TILING (ss, buf) \ + do { \ + switch ((buf)->tiling) { \ + case I915_TILING_NONE: \ + ss.TileMode = (int)GFX20_LINEAR; \ + break; \ + case I915_TILING_X: \ + ss.TileMode = (int)GFX20_XMAJOR; \ + break; \ + case I915_TILING_64: \ + ss.TileMode = (int)GFX20_TILE64; \ + ss.MipTailStartLOD = 0xf; \ + break; \ + default: \ + ss.TileMode = (int)GFX20_TILE4; \ + } \ + } while (0) +static uint32_t -gen9_bind_buf (struct intel_bb *ibb,const struct intel_buf *buf,int is_dst, -bool fast_clear) { -struct gen9_surface_state *ss; +gen9_bind_buf (struct intel_bb *ibb,const struct intel_buf *buf,int is_dst) {uint32_t write_domain, read_domain; -uint64_t address; +unsigned int gen =intel_gen (ibb->devid); +uint32_t mocs; +void *ss_ptr;igt_assert_lte (buf->surface[0 ].stride,256 *1024 );igt_assert_lte (intel_buf_width (buf),16384 );
@@ -206,120 +259,103 @@ gen9_bind_buf(struct intel_bb *ibb, const struct intel_buf *buf, int is_dst, read_domain =I915_GEM_DOMAIN_SAMPLER ; } - ss =intel_bb_ptr_align (ibb,64 ); - - ss->ss0.surface_type =SURFACE_2D ; - ss->ss0.surface_format =gen4_surface_format (buf->bpp, buf->depth); - ss->ss0.vertical_alignment =1 ;/* align 4 */ - ss->ss0.horizontal_alignment =1 ;/* align 4 or HALIGN_32 on display ver >= 13*/ + mocs =intel_buf_mocs (buf); - ss->ss1.mocs_index = buf->mocs_index; - -if (HAS_4TILE (ibb->devid)) { - ss->ss5.mip_tail_start_lod =0 ; - }else { - ss->ss0.render_cache_read_write =1 ; - ss->ss5.mip_tail_start_lod =1 ;/* needed with trmode */ - } + ss_ptr =intel_bb_ptr_align (ibb,64 ); -switch (buf->tiling) { -case I915_TILING_NONE : - ss->ss0.tiled_mode =0 ; -break ; -case I915_TILING_X : - ss->ss0.tiled_mode =2 ; -break ; -case I915_TILING_64 : - ss->ss0.tiled_mode =1 ; - ss->ss5.mip_tail_start_lod =0xf ; -break ; -default : - ss->ss0.tiled_mode =3 ; -if (buf->tiling == I915_TILING_Yf) - ss->ss5.trmode =1 ; -else if (buf->tiling == I915_TILING_Ys) - ss->ss5.trmode =2 ; -break ; - } +if (gen >=20 ) { +/* -- Xe2 (LNL+) -- */ + igt_genxml_pack_state(ibb, GFX20_RENDER_SURFACE_STATE, ss_ptr, ss) { +IGT_RSS_COMMON (ss, buf, mocs, read_domain, write_domain); +IGT_RSS_TILING (ss, buf); + ss.SurfaceHorizontalAlignment =GFX20_HALIGN_32 ; -if (intel_buf_pxp (buf)) - ss->ss1.pxp =1 ; - - address =intel_bb_offset_reloc_with_delta (ibb, buf->handle, - read_domain, write_domain, - buf->surface[0 ].offset, -intel_bb_offset (ibb) +4 *8 , - buf->addr.offset); - ss->ss8.base_addr = (address + buf->surface[0 ].offset); - ss->ss9.base_addr_hi = (address + buf->surface[0 ].offset) >>32 ; - - ss->ss2.height =intel_buf_height (buf) -1 ; - ss->ss2.width =intel_buf_width (buf) -1 ; - ss->ss3.pitch = buf->surface[0 ].stride -1 ; - - ss->ss7.skl.shader_chanel_select_r =4 ; - ss->ss7.skl.shader_chanel_select_g =5 ; - ss->ss7.skl.shader_chanel_select_b =6 ; - ss->ss7.skl.shader_chanel_select_a =7 ; - -if (buf->compression ==I915_COMPRESSION_MEDIA ) - ss->ss7.tgl.media_compression =1 ; -else if (buf->compression ==I915_COMPRESSION_RENDER ) { -if (intel_gen (ibb->devid) >=20 ) - ss->ss6.aux_mode =0x0 ;/* AUX_NONE, unified compression */ -else - ss->ss6.aux_mode =0x5 ;/* AUX_CCS_E */ - -if (intel_gen (ibb->devid) <12 && buf->ccs[0 ].stride) { - ss->ss6.aux_pitch = (buf->ccs[0 ].stride /128 ) -1 ; - - address =intel_bb_offset_reloc_with_delta (ibb, buf->handle, - read_domain, write_domain, - (buf->cc.offset ? (1 <<10 ) :0 ) - | buf->ccs[0 ].offset, -intel_bb_offset (ibb) +4 *10 , - buf->addr.offset); - ss->ss10.aux_base_addr = (address + buf->ccs[0 ].offset) >>12 ; - ss->ss11.aux_base_addr_hi = (address + buf->ccs[0 ].offset) >>32 ; +if (buf->compression ==I915_COMPRESSION_RENDER ) { + ss.AuxiliarySurfaceMode =GFX20_AUX_NONE ; + ss.CompressionFormat =lnl_compression_format (buf); + } } -if (buf->cc.offset) { -igt_assert (buf->compression ==I915_COMPRESSION_RENDER ); - - ss->ss10.clearvalue_addr_enable =1 ; - - address =intel_bb_offset_reloc_with_delta (ibb, buf->handle, - read_domain, write_domain, - buf->cc.offset, -intel_bb_offset (ibb) +4 *12 , - buf->addr.offset); - -/* -* If this assert doesn't hold below clear address will be -* written wrong. -*/ - -igt_assert (__builtin_ctzl (address + buf->cc.offset) >=6 && - (__builtin_clzl (address + buf->cc.offset) >=16 )); - - ss->ss12.dg2.clear_address = (address + buf->cc.offset) >>6 ; - ss->ss13.clear_address_hi = (address + buf->cc.offset) >>32 ; + }else if (HAS_4TILE (ibb->devid)) { +/* -- Gen12.5 / DG2 -- */ + igt_genxml_pack_state(ibb, GFX125_RENDER_SURFACE_STATE, ss_ptr, ss) { +IGT_RSS_COMMON (ss, buf, mocs, read_domain, write_domain); +IGT_RSS_TILING (ss, buf); + ss.SurfaceHorizontalAlignment =GFX125_HALIGN_32 ; + +if (buf->compression ==I915_COMPRESSION_MEDIA ) { + ss.MemoryCompressionEnable = true; + ss.MemoryCompressionMode =GFX125_MEDIACOMPRESSION ; + }else if (buf->compression ==I915_COMPRESSION_RENDER ) { + ss.AuxiliarySurfaceMode =GFX125_AUX_CCS_E ; + ss.CompressionFormat =dg2_compression_format (buf); + +if (buf->cc.offset) { + ss.ClearValueAddressEnable = true; + ss.ClearValueAddress = +igt_address_of (buf, buf->cc.offset, + read_domain, write_domain); + } + } } -if (HAS_4TILE (ibb->devid)) { - ss->ss7.dg2.memory_compression_type =0 ; - ss->ss7.dg2.memory_compression_enable =0 ; - ss->ss7.dg2.disable_support_for_multi_gpu_partial_writes =1 ; - ss->ss7.dg2.disable_support_for_multi_gpu_atomics =1 ; + }else if (gen >=12 ) { +/* -- Gen12 / TGL -- */ + igt_genxml_pack_state(ibb, GFX12_RENDER_SURFACE_STATE, ss_ptr, ss) { +IGT_RSS_COMMON (ss, buf, mocs, read_domain, write_domain); +IGT_RSS_TILING (ss, buf); + ss.SurfaceHorizontalAlignment =GFX12_HALIGN_4 ; + ss.RenderCacheReadWriteMode =GFX12_READWRITECACHE ; + ss.MipTailStartLOD =1 ; + +if (buf->compression ==I915_COMPRESSION_MEDIA ) { + ss.MemoryCompressionEnable = true; + ss.MemoryCompressionMode =GFX12_HORIZONTAL ; + }else if (buf->compression ==I915_COMPRESSION_RENDER ) { + ss.AuxiliarySurfaceMode =GFX12_AUX_CCS_E ; + +if (buf->cc.offset) { + ss.ClearValueAddressEnable = true; + ss.ClearValueAddress = +igt_address_of (buf, buf->cc.offset, + read_domain, write_domain); + } + } + } -if (intel_gen (ibb->devid) >=20 ) - ss->ss12.lnl.compression_format =lnl_compression_format (buf); -else - ss->ss12.dg2.compression_format =dg2_compression_format (buf); + }else { +/* -- Gen9 / Gen11 -- */ + igt_genxml_pack_state(ibb, GFX9_RENDER_SURFACE_STATE, ss_ptr, ss) { +IGT_RSS_COMMON (ss, buf, mocs, read_domain, write_domain); +IGT_RSS_TILING (ss, buf); + ss.SurfaceHorizontalAlignment =GFX9_HALIGN_4 ; + ss.RenderCacheReadWriteMode =GFX9_READWRITECACHE ; + ss.MipTailStartLOD =1 ; + +if (buf->tiling == I915_TILING_Yf) + ss.TiledResourceMode =GFX9_TILEYF ; +else if (buf->tiling == I915_TILING_Ys) + ss.TiledResourceMode =GFX9_TILEYS ; + +if (buf->compression ==I915_COMPRESSION_MEDIA ) { + ss.MemoryCompressionEnable = true; + ss.MemoryCompressionMode =GFX9_HORIZONTAL ; + }else if (buf->compression ==I915_COMPRESSION_RENDER ) { + ss.AuxiliarySurfaceMode =GFX9_AUX_CCS_E ; + +if (buf->ccs[0 ].stride) { + ss.AuxiliarySurfacePitch = + (buf->ccs[0 ].stride /128 ) -1 ; + ss.AuxiliarySurfaceBaseAddress = +igt_address_of (buf, buf->ccs[0 ].offset, + read_domain, write_domain); + } + } } } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*ss)); +return intel_bb_ptr_add_return_prev_offset (ibb, + GFX9_RENDER_SURFACE_STATE_length *4 ); } static uint32_t
@@ -328,15 +364,14 @@ gen8_bind_surfaces(struct intel_bb *ibb, const struct intel_buf *dst) {uint32_t *binding_table, binding_table_offset; -bool fast_clear = !src; binding_table =intel_bb_ptr_align (ibb,32 ); binding_table_offset =intel_bb_ptr_add_return_prev_offset (ibb,32 ); - binding_table[0 ] =gen9_bind_buf (ibb, dst,1 , fast_clear); + binding_table[0 ] =gen9_bind_buf (ibb, dst,1 );if (src !=NULL ) - binding_table[1 ] =gen9_bind_buf (ibb, src,0 , false); + binding_table[1 ] =gen9_bind_buf (ibb, src,0 );return binding_table_offset; }
@@ -344,21 +379,18 @@ gen8_bind_surfaces(struct intel_bb *ibb,/* Mostly copy+paste from gen6, except wrap modes moved */ static uint32_t gen8_create_sampler (struct intel_bb *ibb) { -struct gen8_sampler_state *ss; - - ss =intel_bb_ptr_align (ibb,64 ); - - ss->ss0.min_filter =GEN4_MAPFILTER_NEAREST ; - ss->ss0.mag_filter =GEN4_MAPFILTER_NEAREST ; - ss->ss3.r_wrap_mode =GEN4_TEXCOORDMODE_CLAMP ; - ss->ss3.s_wrap_mode =GEN4_TEXCOORDMODE_CLAMP ; - ss->ss3.t_wrap_mode =GEN4_TEXCOORDMODE_CLAMP ; - -/* I've experimented with non-normalized coordinates and using the LD -* sampler fetch, but couldn't make it work. */ - ss->ss3.non_normalized_coord =0 ; +void *ptr =intel_bb_ptr_align (ibb,64 ); + + igt_genxml_pack_state(ibb, GFX9_SAMPLER_STATE, ptr, ss) { + ss.MinModeFilter =GFX9_MAPFILTER_NEAREST ; + ss.MagModeFilter =GFX9_MAPFILTER_NEAREST ; + ss.TCZAddressControlMode =GFX9_TCM_CLAMP ; + ss.TCYAddressControlMode =GFX9_TCM_CLAMP ; + ss.TCXAddressControlMode =GFX9_TCM_CLAMP ; + } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*ss)); +return intel_bb_ptr_add_return_prev_offset (ibb, + GFX9_SAMPLER_STATE_length *4 ); } static uint32_t
Signature · 1 line
2.34.1
Re: [PATCH 06/10] lib/rendercopy: Convert surface state and sampler setup to genxml
Quoted 80 lines · Jan Maslak
Replace
intel_bb_out()calls ingen9_bind_buf(),gen8_bind_surfaces(), andgen8_create_sampler()withigt_genxml_pack_statemacros backed by the genxml pack headers.Signed-off-by Jan Maslak <[email protected]>--- lib/rendercopy_gen9.c | 284 +++++++++++++++++++++++------------------- 1 file changed, 158 insertions(+), 126 deletions(-)lib/rendercopy_gen9.c +50
-2@@ -21,11 +21,17 @@#include "intel_io.h" #include "intel_mocs.h" #include "rendercopy.h" -#include "gen9_render.h" +#include "surfaceformat.h" #include "xe2_render.h" #include "intel_reg.h" #include "igt_aux.h" #include "intel_chipset.h" +#include "intel/genxml/igt_genxml.h" +#include "gen90_pack.h" +#include "gen110_pack.h" +#include "gen120_pack.h" +#include "gen125_pack.h" +#include "xe2_pack.h" #define VERTEX_SIZE (3*4)@@ -187,13 +193,60 @@ static uint32_t dg2_compression_format(const struct intel_buf *buf) } } -/* Mostly copy+paste from gen6, except height, width, pitch moved */ +/* +* IGT_RSS_COMMON - set RENDER_SURFACE_STATE fields shared across all gens. +* Works via C preprocessor structural typing: all gen-specific structs +* have identical field names for these members. +*/ +#define IGT_RSS_COMMON (ss, buf, mocs_val, rd, wd) \ + do { \ + ss.SurfaceType = GFX9_SURFTYPE_2D; \ + ss.SurfaceFormat = gen4_surface_format((buf)->bpp, \ + (buf)->depth); \ + ss.SurfaceVerticalAlignment = GFX9_VALIGN_4; \ + ss.MOCS = (mocs_val); \ + ss.Width = intel_buf_width(buf) - 1; \ + ss.Height = intel_buf_height(buf) - 1; \ + ss.SurfacePitch = (buf)->surface[0].stride - 1; \ + ss.ShaderChannelSelectRed = (int)GFX9_SCS_RED; \ + ss.ShaderChannelSelectGreen = (int)GFX9_SCS_GREEN; \ + ss.ShaderChannelSelectBlue = (int)GFX9_SCS_BLUE; \ + ss.ShaderChannelSelectAlpha = (int)GFX9_SCS_ALPHA; \ + ss.SurfaceBaseAddress = \ + igt_address_of((buf), (buf)->surface[0].offset, \ + (rd), (wd)); \ + } while (0) + +/* +* IGT_RSS_TILING - set TileMode from buf->tiling. The numeric encoding is +* identical across gen9/gen12/gen12.5/xe2, but the enum names differ per gen. +* We use xe2 (GFX20) names as they best reflect the modern tile semantics; +* (int) casts suppress -Wenum-conversion when used with older-gen structs. +*/ +#define IGT_RSS_TILING (ss, buf) \ + do { \ + switch ((buf)->tiling) { \ + case I915_TILING_NONE: \ + ss.TileMode = (int)GFX20_LINEAR; \ + break; \ + case I915_TILING_X: \ + ss.TileMode = (int)GFX20_XMAJOR; \ + break; \ + case I915_TILING_64: \ + ss.TileMode = (int)GFX20_TILE64; \ + ss.MipTailStartLOD = 0xf; \ + break; \
lib/rendercopy_gen9.c static uint32_t dg2_compression_format(const struct intel_buf *buf) · line 245
Quoted 10 lines
lib/rendercopy_gen9.c +6
-3+default : \ + ss.TileMode = (int )GFX20_TILE4 ; \ + } \ + }while (0 ) + static uint32_t -gen9_bind_buf (struct intel_bb *ibb,const struct intel_buf *buf,int is_dst, -bool fast_clear) { -struct gen9_surface_state *ss; +gen9_bind_buf (struct intel_bb *ibb,const struct intel_buf *buf,int is_dst) {
I see fast_clear was unused here.
IMO code is correct, but there're a lot of conditionals so I would like to see CI result in a case I missed sth.
--
Zbigniew
Quoted 269 lines
lib/rendercopy_gen9.c +102
-121uint32_t write_domain, read_domain; -uint64_t address; +unsigned int gen =intel_gen (ibb->devid); +uint32_t mocs; +void *ss_ptr;igt_assert_lte (buf->surface[0 ].stride,256 *1024 );igt_assert_lte (intel_buf_width (buf),16384 );@@ -206,120 +259,103 @@ gen9_bind_buf(struct intel_bb *ibb, const struct intel_buf *buf, int is_dst, read_domain =I915_GEM_DOMAIN_SAMPLER ; } - ss =intel_bb_ptr_align (ibb,64 ); - - ss->ss0.surface_type =SURFACE_2D ; - ss->ss0.surface_format =gen4_surface_format (buf->bpp, buf->depth); - ss->ss0.vertical_alignment =1 ;/* align 4 */ - ss->ss0.horizontal_alignment =1 ;/* align 4 or HALIGN_32 on display ver >= 13*/ + mocs =intel_buf_mocs (buf); - ss->ss1.mocs_index = buf->mocs_index; - -if (HAS_4TILE (ibb->devid)) { - ss->ss5.mip_tail_start_lod =0 ; - }else { - ss->ss0.render_cache_read_write =1 ; - ss->ss5.mip_tail_start_lod =1 ;/* needed with trmode */ - } + ss_ptr =intel_bb_ptr_align (ibb,64 ); -switch (buf->tiling) { -case I915_TILING_NONE : - ss->ss0.tiled_mode =0 ; -break ; -case I915_TILING_X : - ss->ss0.tiled_mode =2 ; -break ; -case I915_TILING_64 : - ss->ss0.tiled_mode =1 ; - ss->ss5.mip_tail_start_lod =0xf ; -break ; -default : - ss->ss0.tiled_mode =3 ; -if (buf->tiling == I915_TILING_Yf) - ss->ss5.trmode =1 ; -else if (buf->tiling == I915_TILING_Ys) - ss->ss5.trmode =2 ; -break ; - } +if (gen >=20 ) { +/* -- Xe2 (LNL+) -- */ + igt_genxml_pack_state(ibb, GFX20_RENDER_SURFACE_STATE, ss_ptr, ss) { +IGT_RSS_COMMON (ss, buf, mocs, read_domain, write_domain); +IGT_RSS_TILING (ss, buf); + ss.SurfaceHorizontalAlignment =GFX20_HALIGN_32 ; -if (intel_buf_pxp (buf)) - ss->ss1.pxp =1 ; - - address =intel_bb_offset_reloc_with_delta (ibb, buf->handle, - read_domain, write_domain, - buf->surface[0 ].offset, -intel_bb_offset (ibb) +4 *8 , - buf->addr.offset); - ss->ss8.base_addr = (address + buf->surface[0 ].offset); - ss->ss9.base_addr_hi = (address + buf->surface[0 ].offset) >>32 ; - - ss->ss2.height =intel_buf_height (buf) -1 ; - ss->ss2.width =intel_buf_width (buf) -1 ; - ss->ss3.pitch = buf->surface[0 ].stride -1 ; - - ss->ss7.skl.shader_chanel_select_r =4 ; - ss->ss7.skl.shader_chanel_select_g =5 ; - ss->ss7.skl.shader_chanel_select_b =6 ; - ss->ss7.skl.shader_chanel_select_a =7 ; - -if (buf->compression ==I915_COMPRESSION_MEDIA ) - ss->ss7.tgl.media_compression =1 ; -else if (buf->compression ==I915_COMPRESSION_RENDER ) { -if (intel_gen (ibb->devid) >=20 ) - ss->ss6.aux_mode =0x0 ;/* AUX_NONE, unified compression */ -else - ss->ss6.aux_mode =0x5 ;/* AUX_CCS_E */ - -if (intel_gen (ibb->devid) <12 && buf->ccs[0 ].stride) { - ss->ss6.aux_pitch = (buf->ccs[0 ].stride /128 ) -1 ; - - address =intel_bb_offset_reloc_with_delta (ibb, buf->handle, - read_domain, write_domain, - (buf->cc.offset ? (1 <<10 ) :0 ) - | buf->ccs[0 ].offset, -intel_bb_offset (ibb) +4 *10 , - buf->addr.offset); - ss->ss10.aux_base_addr = (address + buf->ccs[0 ].offset) >>12 ; - ss->ss11.aux_base_addr_hi = (address + buf->ccs[0 ].offset) >>32 ; +if (buf->compression ==I915_COMPRESSION_RENDER ) { + ss.AuxiliarySurfaceMode =GFX20_AUX_NONE ; + ss.CompressionFormat =lnl_compression_format (buf); + } } -if (buf->cc.offset) { -igt_assert (buf->compression ==I915_COMPRESSION_RENDER ); - - ss->ss10.clearvalue_addr_enable =1 ; - - address =intel_bb_offset_reloc_with_delta (ibb, buf->handle, - read_domain, write_domain, - buf->cc.offset, -intel_bb_offset (ibb) +4 *12 , - buf->addr.offset); - -/* -* If this assert doesn't hold below clear address will be -* written wrong. -*/ - -igt_assert (__builtin_ctzl (address + buf->cc.offset) >=6 && - (__builtin_clzl (address + buf->cc.offset) >=16 )); - - ss->ss12.dg2.clear_address = (address + buf->cc.offset) >>6 ; - ss->ss13.clear_address_hi = (address + buf->cc.offset) >>32 ; + }else if (HAS_4TILE (ibb->devid)) { +/* -- Gen12.5 / DG2 -- */ + igt_genxml_pack_state(ibb, GFX125_RENDER_SURFACE_STATE, ss_ptr, ss) { +IGT_RSS_COMMON (ss, buf, mocs, read_domain, write_domain); +IGT_RSS_TILING (ss, buf); + ss.SurfaceHorizontalAlignment =GFX125_HALIGN_32 ; + +if (buf->compression ==I915_COMPRESSION_MEDIA ) { + ss.MemoryCompressionEnable = true; + ss.MemoryCompressionMode =GFX125_MEDIACOMPRESSION ; + }else if (buf->compression ==I915_COMPRESSION_RENDER ) { + ss.AuxiliarySurfaceMode =GFX125_AUX_CCS_E ; + ss.CompressionFormat =dg2_compression_format (buf); + +if (buf->cc.offset) { + ss.ClearValueAddressEnable = true; + ss.ClearValueAddress = +igt_address_of (buf, buf->cc.offset, + read_domain, write_domain); + } + } } -if (HAS_4TILE (ibb->devid)) { - ss->ss7.dg2.memory_compression_type =0 ; - ss->ss7.dg2.memory_compression_enable =0 ; - ss->ss7.dg2.disable_support_for_multi_gpu_partial_writes =1 ; - ss->ss7.dg2.disable_support_for_multi_gpu_atomics =1 ; + }else if (gen >=12 ) { +/* -- Gen12 / TGL -- */ + igt_genxml_pack_state(ibb, GFX12_RENDER_SURFACE_STATE, ss_ptr, ss) { +IGT_RSS_COMMON (ss, buf, mocs, read_domain, write_domain); +IGT_RSS_TILING (ss, buf); + ss.SurfaceHorizontalAlignment =GFX12_HALIGN_4 ; + ss.RenderCacheReadWriteMode =GFX12_READWRITECACHE ; + ss.MipTailStartLOD =1 ; + +if (buf->compression ==I915_COMPRESSION_MEDIA ) { + ss.MemoryCompressionEnable = true; + ss.MemoryCompressionMode =GFX12_HORIZONTAL ; + }else if (buf->compression ==I915_COMPRESSION_RENDER ) { + ss.AuxiliarySurfaceMode =GFX12_AUX_CCS_E ; + +if (buf->cc.offset) { + ss.ClearValueAddressEnable = true; + ss.ClearValueAddress = +igt_address_of (buf, buf->cc.offset, + read_domain, write_domain); + } + } + } -if (intel_gen (ibb->devid) >=20 ) - ss->ss12.lnl.compression_format =lnl_compression_format (buf); -else - ss->ss12.dg2.compression_format =dg2_compression_format (buf); + }else { +/* -- Gen9 / Gen11 -- */ + igt_genxml_pack_state(ibb, GFX9_RENDER_SURFACE_STATE, ss_ptr, ss) { +IGT_RSS_COMMON (ss, buf, mocs, read_domain, write_domain); +IGT_RSS_TILING (ss, buf); + ss.SurfaceHorizontalAlignment =GFX9_HALIGN_4 ; + ss.RenderCacheReadWriteMode =GFX9_READWRITECACHE ; + ss.MipTailStartLOD =1 ; + +if (buf->tiling == I915_TILING_Yf) + ss.TiledResourceMode =GFX9_TILEYF ; +else if (buf->tiling == I915_TILING_Ys) + ss.TiledResourceMode =GFX9_TILEYS ; + +if (buf->compression ==I915_COMPRESSION_MEDIA ) { + ss.MemoryCompressionEnable = true; + ss.MemoryCompressionMode =GFX9_HORIZONTAL ; + }else if (buf->compression ==I915_COMPRESSION_RENDER ) { + ss.AuxiliarySurfaceMode =GFX9_AUX_CCS_E ; + +if (buf->ccs[0 ].stride) { + ss.AuxiliarySurfacePitch = + (buf->ccs[0 ].stride /128 ) -1 ; + ss.AuxiliarySurfaceBaseAddress = +igt_address_of (buf, buf->ccs[0 ].offset, + read_domain, write_domain); + } + } } } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*ss)); +return intel_bb_ptr_add_return_prev_offset (ibb, + GFX9_RENDER_SURFACE_STATE_length *4 ); } static uint32_t@@ -328,15 +364,14 @@ gen8_bind_surfaces(struct intel_bb *ibb, const struct intel_buf *dst) {uint32_t *binding_table, binding_table_offset; -bool fast_clear = !src; binding_table =intel_bb_ptr_align (ibb,32 ); binding_table_offset =intel_bb_ptr_add_return_prev_offset (ibb,32 ); - binding_table[0 ] =gen9_bind_buf (ibb, dst,1 , fast_clear); + binding_table[0 ] =gen9_bind_buf (ibb, dst,1 );if (src !=NULL ) - binding_table[1 ] =gen9_bind_buf (ibb, src,0 , false); + binding_table[1 ] =gen9_bind_buf (ibb, src,0 );return binding_table_offset; }@@ -344,21 +379,18 @@ gen8_bind_surfaces(struct intel_bb *ibb,/* Mostly copy+paste from gen6, except wrap modes moved */ static uint32_t gen8_create_sampler (struct intel_bb *ibb) { -struct gen8_sampler_state *ss; - - ss =intel_bb_ptr_align (ibb,64 ); - - ss->ss0.min_filter =GEN4_MAPFILTER_NEAREST ; - ss->ss0.mag_filter =GEN4_MAPFILTER_NEAREST ; - ss->ss3.r_wrap_mode =GEN4_TEXCOORDMODE_CLAMP ; - ss->ss3.s_wrap_mode =GEN4_TEXCOORDMODE_CLAMP ; - ss->ss3.t_wrap_mode =GEN4_TEXCOORDMODE_CLAMP ; - -/* I've experimented with non-normalized coordinates and using the LD -* sampler fetch, but couldn't make it work. */ - ss->ss3.non_normalized_coord =0 ; +void *ptr =intel_bb_ptr_align (ibb,64 ); + + igt_genxml_pack_state(ibb, GFX9_SAMPLER_STATE, ptr, ss) { + ss.MinModeFilter =GFX9_MAPFILTER_NEAREST ; + ss.MagModeFilter =GFX9_MAPFILTER_NEAREST ; + ss.TCZAddressControlMode =GFX9_TCM_CLAMP ; + ss.TCYAddressControlMode =GFX9_TCM_CLAMP ; + ss.TCXAddressControlMode =GFX9_TCM_CLAMP ; + } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*ss)); +return intel_bb_ptr_add_return_prev_offset (ibb, + GFX9_SAMPLER_STATE_length *4 ); } static uint32_tSignature · 1 line
2.34.1
PATCH 7/10 lib/rendercopy: Convert vertex data and CC state to genxml
In reply to Jan MaslakReplace intel_bb_out() calls in vertex buffer, vertex element, and color-calc state functions with igt_genxml_pack_state macros backed by the genxml pack headers.
--- lib/rendercopy_gen9.c | 193 +++++++++++++++++++++++++----------------- 1 file changed, 115 insertions(+), 78 deletions(-)
lib/rendercopy_gen9.c +115 -78
@@ -563,50 +563,62 @@ gen7_fill_vertex_buffer_data(struct intel_bb *ibb,*/ static void gen6_emit_vertex_elements (struct intel_bb *ibb) { +void *ve_ptr; +/* * The VUE layout * dword 0-3: pad (0, 0, 0. 0) * dword 4-7: position (x, y, 0, 1.0), * dword 8-11: texture coordinate 0 (u0, v0, 0, 1.0) */ -intel_bb_out (ibb,GEN4_3DSTATE_VERTEX_ELEMENTS | (3 *2 +1 -2 )); + { +struct GFX9_3DSTATE_VERTEX_ELEMENTS ves = { GFX9_3DSTATE_VERTEX_ELEMENTS_header }; + ves.DWordLength =3 * GFX9_VERTEX_ELEMENT_STATE_length -1 ; +GFX9_3DSTATE_VERTEX_ELEMENTS_pack (ibb,intel_bb_ptr (ibb), &ves); +intel_bb_ptr_add (ibb,4 ); + } -/* Element state 0. These are 4 dwords of 0 required for the VUE format. -* We don't really know or care what they do. -*/ -intel_bb_out (ibb,0 <<GEN6_VE0_VERTEX_BUFFER_INDEX_SHIFT |GEN6_VE0_VALID | -SURFACEFORMAT_R32G32B32A32_FLOAT <<VE0_FORMAT_SHIFT | -0 <<VE0_OFFSET_SHIFT );/* we specify 0, but it's really does not exist */ -intel_bb_out (ibb,GEN4_VFCOMPONENT_STORE_0 <<VE1_VFCOMPONENT_0_SHIFT | -GEN4_VFCOMPONENT_STORE_0 <<VE1_VFCOMPONENT_1_SHIFT | -GEN4_VFCOMPONENT_STORE_0 <<VE1_VFCOMPONENT_2_SHIFT | -GEN4_VFCOMPONENT_STORE_0 <<VE1_VFCOMPONENT_3_SHIFT ); - -/* Element state 1 - Our "destination" vertices. These are passed down -* through the pipeline, and eventually make it to the pixel shader as -* the offsets in the destination surface. It's packed as the 16 -* signed/scaled because of gen6 rendercopy. I see no particular reason -* for doing this though. -*/ -intel_bb_out (ibb,0 <<GEN6_VE0_VERTEX_BUFFER_INDEX_SHIFT |GEN6_VE0_VALID | -SURFACEFORMAT_R16G16_SSCALED <<VE0_FORMAT_SHIFT | -0 <<VE0_OFFSET_SHIFT );/* offsets vb in bytes */ -intel_bb_out (ibb,GEN4_VFCOMPONENT_STORE_SRC <<VE1_VFCOMPONENT_0_SHIFT | -GEN4_VFCOMPONENT_STORE_SRC <<VE1_VFCOMPONENT_1_SHIFT | -GEN4_VFCOMPONENT_STORE_0 <<VE1_VFCOMPONENT_2_SHIFT | -GEN4_VFCOMPONENT_STORE_1_FLT <<VE1_VFCOMPONENT_3_SHIFT ); - -/* Element state 2. Last but not least we store the U,V components as -* normalized floats. These will be used in the pixel shader to sample -* from the source buffer. -*/ -intel_bb_out (ibb,0 <<GEN6_VE0_VERTEX_BUFFER_INDEX_SHIFT |GEN6_VE0_VALID | -SURFACEFORMAT_R32G32_FLOAT <<VE0_FORMAT_SHIFT | -4 <<VE0_OFFSET_SHIFT );/* offset vb in bytes */ -intel_bb_out (ibb,GEN4_VFCOMPONENT_STORE_SRC <<VE1_VFCOMPONENT_0_SHIFT | -GEN4_VFCOMPONENT_STORE_SRC <<VE1_VFCOMPONENT_1_SHIFT | -GEN4_VFCOMPONENT_STORE_0 <<VE1_VFCOMPONENT_2_SHIFT | -GEN4_VFCOMPONENT_STORE_1_FLT <<VE1_VFCOMPONENT_3_SHIFT ); +/* Element state 0. These are 4 dwords of 0 required for the VUE format. */ + ve_ptr =intel_bb_ptr (ibb); + igt_genxml_pack_state(ibb, GFX9_VERTEX_ELEMENT_STATE, ve_ptr, ve0) { + ve0.VertexBufferIndex =0 ; + ve0.Valid = true; + ve0.SourceElementFormat =SURFACEFORMAT_R32G32B32A32_FLOAT ; + ve0.SourceElementOffset =0 ; + ve0.Component0Control =GFX9_VFCOMP_STORE_0 ; + ve0.Component1Control =GFX9_VFCOMP_STORE_0 ; + ve0.Component2Control =GFX9_VFCOMP_STORE_0 ; + ve0.Component3Control =GFX9_VFCOMP_STORE_0 ; + } +intel_bb_ptr_add (ibb, GFX9_VERTEX_ELEMENT_STATE_length *4 ); + +/* Element state 1 - destination vertices (16-bit signed/scaled). */ + ve_ptr =intel_bb_ptr (ibb); + igt_genxml_pack_state(ibb, GFX9_VERTEX_ELEMENT_STATE, ve_ptr, ve1) { + ve1.VertexBufferIndex =0 ; + ve1.Valid = true; + ve1.SourceElementFormat =SURFACEFORMAT_R16G16_SSCALED ; + ve1.SourceElementOffset =0 ; + ve1.Component0Control =GFX9_VFCOMP_STORE_SRC ; + ve1.Component1Control =GFX9_VFCOMP_STORE_SRC ; + ve1.Component2Control =GFX9_VFCOMP_STORE_0 ; + ve1.Component3Control =GFX9_VFCOMP_STORE_1_FP ; + } +intel_bb_ptr_add (ibb, GFX9_VERTEX_ELEMENT_STATE_length *4 ); + +/* Element state 2 - texture coordinates (normalized floats). */ + ve_ptr =intel_bb_ptr (ibb); + igt_genxml_pack_state(ibb, GFX9_VERTEX_ELEMENT_STATE, ve_ptr, ve2) { + ve2.VertexBufferIndex =0 ; + ve2.Valid = true; + ve2.SourceElementFormat =SURFACEFORMAT_R32G32_FLOAT ; + ve2.SourceElementOffset =4 ; + ve2.Component0Control =GFX9_VFCOMP_STORE_SRC ; + ve2.Component1Control =GFX9_VFCOMP_STORE_SRC ; + ve2.Component2Control =GFX9_VFCOMP_STORE_0 ; + ve2.Component3Control =GFX9_VFCOMP_STORE_1_FP ; + } +intel_bb_ptr_add (ibb, GFX9_VERTEX_ELEMENT_STATE_length *4 ); }/*
@@ -617,82 +629,107 @@ gen6_emit_vertex_elements(struct intel_bb *ibb) {*/ static void gen7_emit_vertex_buffer (struct intel_bb *ibb,uint32_t offset) { -intel_bb_out (ibb,GEN4_3DSTATE_VERTEX_BUFFERS | (1 + (4 *1 ) -2 )); -intel_bb_out (ibb,0 <<GEN6_VB0_BUFFER_INDEX_SHIFT |/* VB 0th index */ -GEN8_VB0_BUFFER_ADDR_MOD_EN |/* Address Modify Enable */ -VERTEX_SIZE <<VB0_BUFFER_PITCH_SHIFT ); -intel_bb_emit_reloc (ibb, ibb->handle, -I915_GEM_DOMAIN_VERTEX ,0 , - offset, ibb->batch_offset); -intel_bb_out (ibb,3 *VERTEX_SIZE ); +void *vb_ptr; + +/* Variable-length: 1 header dword + VERTEX_BUFFER_STATE element */ + { +struct GFX9_3DSTATE_VERTEX_BUFFERS vbs = { GFX9_3DSTATE_VERTEX_BUFFERS_header }; +/* Default DWordLength=3 is correct for 1 element (1 + 4 - 2 = 3) */ +GFX9_3DSTATE_VERTEX_BUFFERS_pack (ibb,intel_bb_ptr (ibb), &vbs); +intel_bb_ptr_add (ibb,4 ); + } + + vb_ptr =intel_bb_ptr (ibb); + igt_genxml_pack_state(ibb, GFX9_VERTEX_BUFFER_STATE, vb_ptr, vb) { + vb.VertexBufferIndex =0 ; + vb.AddressModifyEnable = true; + vb.MOCS =intel_get_wb_mocs (ibb->fd); + vb.BufferPitch =VERTEX_SIZE ; + vb.BufferStartingAddress = (struct igt_address ){ + .offset = ibb->batch_offset + offset, + .handle = ibb->handle, + .read_domains =I915_GEM_DOMAIN_VERTEX , + .write_domain =0 , + .presumed_offset = ibb->batch_offset, + }; + vb.BufferSize =3 *VERTEX_SIZE ; + } +intel_bb_ptr_add (ibb, GFX9_VERTEX_BUFFER_STATE_length *4 ); }static uint32_t gen6_create_cc_state (struct intel_bb *ibb) { -struct gen6_color_calc_state *cc_state; +void *ptr =intel_bb_ptr_align (ibb,64 ); - cc_state =intel_bb_ptr_align (ibb,64 ); + igt_genxml_pack_state(ibb, GFX9_COLOR_CALC_STATE, ptr, cc_state) { } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*cc_state)); +return intel_bb_ptr_add_return_prev_offset (ibb, + GFX9_COLOR_CALC_STATE_length *4 ); }static uint32_t gen8_create_blend_state (struct intel_bb *ibb) { -struct gen8_blend_state *blend; -int i; - - blend =intel_bb_ptr_align (ibb,64 ); +void *ptr =intel_bb_ptr_align (ibb,64 ); -for (i =0 ; i <16 ; i++) { - blend->bs[i].dest_blend_factor =GEN6_BLENDFACTOR_ZERO ; - blend->bs[i].source_blend_factor =GEN6_BLENDFACTOR_ONE ; - blend->bs[i].color_blend_func =GEN6_BLENDFUNCTION_ADD ; - blend->bs[i].pre_blend_color_clamp =1 ; - blend->bs[i].color_buffer_blend =0 ; +/* Blend state header (1 dword) - all defaults (zeros) */ + igt_genxml_pack_state(ibb, GFX9_BLEND_STATE, ptr, bs) { } + ptr += GFX9_BLEND_STATE_length *4 ; + +/* 16 per-RT blend state entries */ +for (int i =0 ; i <16 ; i++) { + igt_genxml_pack_state(ibb, GFX9_BLEND_STATE_ENTRY, ptr, entry) { + entry.DestinationBlendFactor =GFX9_BLENDFACTOR_ZERO ; + entry.SourceBlendFactor =GFX9_BLENDFACTOR_ONE ; + entry.ColorBlendFunction =GFX9_BLENDFUNCTION_ADD ; + entry.PreBlendColorClampEnable = true; + } + ptr += GFX9_BLEND_STATE_ENTRY_length *4 ; } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*blend)); +return intel_bb_ptr_add_return_prev_offset (ibb, + (GFX9_BLEND_STATE_length +16 * GFX9_BLEND_STATE_ENTRY_length) *4 ); }static uint32_t gen6_create_cc_viewport (struct intel_bb *ibb) { -struct gen4_cc_viewport *vp; - - vp =intel_bb_ptr_align (ibb,32 ); +void *ptr =intel_bb_ptr_align (ibb,32 ); -/* XXX I don't understand this */ - vp->min_depth =-1.e35 ; - vp->max_depth =1.e35 ; + igt_genxml_pack_state(ibb, GFX9_CC_VIEWPORT, ptr, vp) { + vp.MinimumDepth =-1.e35 ; + vp.MaximumDepth =1.e35 ; + } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*vp)); +return intel_bb_ptr_add_return_prev_offset (ibb, + GFX9_CC_VIEWPORT_length *4 ); }static uint32_t gen7_create_sf_clip_viewport (struct intel_bb *ibb) { -/* XXX these are likely not needed */ -struct gen7_sf_clip_viewport *scv_state; - - scv_state =intel_bb_ptr_align (ibb,64 ); +void *ptr =intel_bb_ptr_align (ibb,64 ); - scv_state->guardband.xmin =0 ; - scv_state->guardband.xmax =1.0f ; - scv_state->guardband.ymin =0 ; - scv_state->guardband.ymax =1.0f ; + igt_genxml_pack_state(ibb, GFX9_SF_CLIP_VIEWPORT, ptr, scv) { + scv.XMinClipGuardband =0 ; + scv.XMaxClipGuardband =1.0f ; + scv.YMinClipGuardband =0 ; + scv.YMaxClipGuardband =1.0f ; + } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*scv_state)); +return intel_bb_ptr_add_return_prev_offset (ibb, + GFX9_SF_CLIP_VIEWPORT_length *4 ); }static uint32_t gen6_create_scissor_rect (struct intel_bb *ibb) { -struct gen6_scissor_rect *scissor; +void *ptr =intel_bb_ptr_align (ibb,64 ); - scissor =intel_bb_ptr_align (ibb,64 ); + igt_genxml_pack_state(ibb, GFX9_SCISSOR_RECT, ptr, sr) { } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*scissor)); +return intel_bb_ptr_add_return_prev_offset (ibb, + GFX9_SCISSOR_RECT_length *4 ); } static void
Signature · 1 line
2.34.1
Re: [PATCH 07/10] lib/rendercopy: Convert vertex data and CC state to genxml
Quoted 130 lines · Jan Maslak
Replace
intel_bb_out()calls in vertex buffer, vertex element, and color-calc state functions withigt_genxml_pack_statemacros backed by the genxml pack headers.Signed-off-by Jan Maslak <[email protected]>--- lib/rendercopy_gen9.c | 193 +++++++++++++++++++++++++----------------- 1 file changed, 115 insertions(+), 78 deletions(-)lib/rendercopy_gen9.c +54
-45@@ -563,50 +563,62 @@ gen7_fill_vertex_buffer_data(struct intel_bb *ibb,*/ static void gen6_emit_vertex_elements (struct intel_bb *ibb) { +void *ve_ptr; +/* * The VUE layout * dword 0-3: pad (0, 0, 0. 0) * dword 4-7: position (x, y, 0, 1.0), * dword 8-11: texture coordinate 0 (u0, v0, 0, 1.0) */ -intel_bb_out (ibb,GEN4_3DSTATE_VERTEX_ELEMENTS | (3 *2 +1 -2 )); + { +struct GFX9_3DSTATE_VERTEX_ELEMENTS ves = { GFX9_3DSTATE_VERTEX_ELEMENTS_header }; + ves.DWordLength =3 * GFX9_VERTEX_ELEMENT_STATE_length -1 ; +GFX9_3DSTATE_VERTEX_ELEMENTS_pack (ibb,intel_bb_ptr (ibb), &ves); +intel_bb_ptr_add (ibb,4 ); + } -/* Element state 0. These are 4 dwords of 0 required for the VUE format. -* We don't really know or care what they do. -*/ -intel_bb_out (ibb,0 <<GEN6_VE0_VERTEX_BUFFER_INDEX_SHIFT |GEN6_VE0_VALID | -SURFACEFORMAT_R32G32B32A32_FLOAT <<VE0_FORMAT_SHIFT | -0 <<VE0_OFFSET_SHIFT );/* we specify 0, but it's really does not exist */ -intel_bb_out (ibb,GEN4_VFCOMPONENT_STORE_0 <<VE1_VFCOMPONENT_0_SHIFT | -GEN4_VFCOMPONENT_STORE_0 <<VE1_VFCOMPONENT_1_SHIFT | -GEN4_VFCOMPONENT_STORE_0 <<VE1_VFCOMPONENT_2_SHIFT | -GEN4_VFCOMPONENT_STORE_0 <<VE1_VFCOMPONENT_3_SHIFT ); - -/* Element state 1 - Our "destination" vertices. These are passed down -* through the pipeline, and eventually make it to the pixel shader as -* the offsets in the destination surface. It's packed as the 16 -* signed/scaled because of gen6 rendercopy. I see no particular reason -* for doing this though. -*/ -intel_bb_out (ibb,0 <<GEN6_VE0_VERTEX_BUFFER_INDEX_SHIFT |GEN6_VE0_VALID | -SURFACEFORMAT_R16G16_SSCALED <<VE0_FORMAT_SHIFT | -0 <<VE0_OFFSET_SHIFT );/* offsets vb in bytes */ -intel_bb_out (ibb,GEN4_VFCOMPONENT_STORE_SRC <<VE1_VFCOMPONENT_0_SHIFT | -GEN4_VFCOMPONENT_STORE_SRC <<VE1_VFCOMPONENT_1_SHIFT | -GEN4_VFCOMPONENT_STORE_0 <<VE1_VFCOMPONENT_2_SHIFT | -GEN4_VFCOMPONENT_STORE_1_FLT <<VE1_VFCOMPONENT_3_SHIFT ); - -/* Element state 2. Last but not least we store the U,V components as -* normalized floats. These will be used in the pixel shader to sample -* from the source buffer. -*/ -intel_bb_out (ibb,0 <<GEN6_VE0_VERTEX_BUFFER_INDEX_SHIFT |GEN6_VE0_VALID | -SURFACEFORMAT_R32G32_FLOAT <<VE0_FORMAT_SHIFT | -4 <<VE0_OFFSET_SHIFT );/* offset vb in bytes */ -intel_bb_out (ibb,GEN4_VFCOMPONENT_STORE_SRC <<VE1_VFCOMPONENT_0_SHIFT | -GEN4_VFCOMPONENT_STORE_SRC <<VE1_VFCOMPONENT_1_SHIFT | -GEN4_VFCOMPONENT_STORE_0 <<VE1_VFCOMPONENT_2_SHIFT | -GEN4_VFCOMPONENT_STORE_1_FLT <<VE1_VFCOMPONENT_3_SHIFT ); +/* Element state 0. These are 4 dwords of 0 required for the VUE format. */ + ve_ptr =intel_bb_ptr (ibb); + igt_genxml_pack_state(ibb, GFX9_VERTEX_ELEMENT_STATE, ve_ptr, ve0) { + ve0.VertexBufferIndex =0 ; + ve0.Valid = true; + ve0.SourceElementFormat =SURFACEFORMAT_R32G32B32A32_FLOAT ; + ve0.SourceElementOffset =0 ; + ve0.Component0Control =GFX9_VFCOMP_STORE_0 ; + ve0.Component1Control =GFX9_VFCOMP_STORE_0 ; + ve0.Component2Control =GFX9_VFCOMP_STORE_0 ; + ve0.Component3Control =GFX9_VFCOMP_STORE_0 ; + } +intel_bb_ptr_add (ibb, GFX9_VERTEX_ELEMENT_STATE_length *4 ); + +/* Element state 1 - destination vertices (16-bit signed/scaled). */ + ve_ptr =intel_bb_ptr (ibb); + igt_genxml_pack_state(ibb, GFX9_VERTEX_ELEMENT_STATE, ve_ptr, ve1) { + ve1.VertexBufferIndex =0 ; + ve1.Valid = true; + ve1.SourceElementFormat =SURFACEFORMAT_R16G16_SSCALED ; + ve1.SourceElementOffset =0 ; + ve1.Component0Control =GFX9_VFCOMP_STORE_SRC ; + ve1.Component1Control =GFX9_VFCOMP_STORE_SRC ; + ve1.Component2Control =GFX9_VFCOMP_STORE_0 ; + ve1.Component3Control =GFX9_VFCOMP_STORE_1_FP ; + } +intel_bb_ptr_add (ibb, GFX9_VERTEX_ELEMENT_STATE_length *4 ); + +/* Element state 2 - texture coordinates (normalized floats). */ + ve_ptr =intel_bb_ptr (ibb); + igt_genxml_pack_state(ibb, GFX9_VERTEX_ELEMENT_STATE, ve_ptr, ve2) { + ve2.VertexBufferIndex =0 ; + ve2.Valid = true; + ve2.SourceElementFormat =SURFACEFORMAT_R32G32_FLOAT ; + ve2.SourceElementOffset =4 ; + ve2.Component0Control =GFX9_VFCOMP_STORE_SRC ; + ve2.Component1Control =GFX9_VFCOMP_STORE_SRC ; + ve2.Component2Control =GFX9_VFCOMP_STORE_0 ; + ve2.Component3Control =GFX9_VFCOMP_STORE_1_FP ; + } +intel_bb_ptr_add (ibb, GFX9_VERTEX_ELEMENT_STATE_length *4 ); }/* @@ -617,82 +629,107 @@ gen6_emit_vertex_elements(struct intel_bb *ibb) {*/ static void gen7_emit_vertex_buffer (struct intel_bb *ibb,uint32_t offset) { -intel_bb_out (ibb,GEN4_3DSTATE_VERTEX_BUFFERS | (1 + (4 *1 ) -2 )); -intel_bb_out (ibb,0 <<GEN6_VB0_BUFFER_INDEX_SHIFT |/* VB 0th index */ -GEN8_VB0_BUFFER_ADDR_MOD_EN |/* Address Modify Enable */ -VERTEX_SIZE <<VB0_BUFFER_PITCH_SHIFT ); -intel_bb_emit_reloc (ibb, ibb->handle, -I915_GEM_DOMAIN_VERTEX ,0 , - offset, ibb->batch_offset); -intel_bb_out (ibb,3 *VERTEX_SIZE ); +void *vb_ptr; + +/* Variable-length: 1 header dword + VERTEX_BUFFER_STATE element */ + { +struct GFX9_3DSTATE_VERTEX_BUFFERS vbs = { GFX9_3DSTATE_VERTEX_BUFFERS_header };
lib/rendercopy_gen9.c gen6_emit_vertex_elements(struct intel_bb *ibb) { · line 646
Quoted 10 lines
lib/rendercopy_gen9.c +10
-0+/* Default DWordLength=3 is correct for 1 element (1 + 4 - 2 = 3) */ +GFX9_3DSTATE_VERTEX_BUFFERS_pack (ibb,intel_bb_ptr (ibb), &vbs); +intel_bb_ptr_add (ibb,4 ); + } + + vb_ptr =intel_bb_ptr (ibb); + igt_genxml_pack_state(ibb, GFX9_VERTEX_BUFFER_STATE, vb_ptr, vb) { + vb.VertexBufferIndex =0 ; + vb.AddressModifyEnable = true; + vb.MOCS =intel_get_wb_mocs (ibb->fd);
I did some historical research and starting at gen9 (Skylake and beyond) MOCS are represent 6-bit (index) + 1-bit (encrypt). So above will work here for SKL+. But this is not a problem with this code and intel_get_wb_mocs() may be adjust to handle MOCS with different bit layout - you're passing fd so followup changes for older platforms will work.
For this patch:
--
Zbigniew
Quoted 125 lines
lib/rendercopy_gen9.c +51
-33+ vb.BufferPitch =VERTEX_SIZE ; + vb.BufferStartingAddress = (struct igt_address ){ + .offset = ibb->batch_offset + offset, + .handle = ibb->handle, + .read_domains =I915_GEM_DOMAIN_VERTEX , + .write_domain =0 , + .presumed_offset = ibb->batch_offset, + }; + vb.BufferSize =3 *VERTEX_SIZE ; + } +intel_bb_ptr_add (ibb, GFX9_VERTEX_BUFFER_STATE_length *4 ); }static uint32_t gen6_create_cc_state (struct intel_bb *ibb) { -struct gen6_color_calc_state *cc_state; +void *ptr =intel_bb_ptr_align (ibb,64 ); - cc_state =intel_bb_ptr_align (ibb,64 ); + igt_genxml_pack_state(ibb, GFX9_COLOR_CALC_STATE, ptr, cc_state) { } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*cc_state)); +return intel_bb_ptr_add_return_prev_offset (ibb, + GFX9_COLOR_CALC_STATE_length *4 ); }static uint32_t gen8_create_blend_state (struct intel_bb *ibb) { -struct gen8_blend_state *blend; -int i; - - blend =intel_bb_ptr_align (ibb,64 ); +void *ptr =intel_bb_ptr_align (ibb,64 ); -for (i =0 ; i <16 ; i++) { - blend->bs[i].dest_blend_factor =GEN6_BLENDFACTOR_ZERO ; - blend->bs[i].source_blend_factor =GEN6_BLENDFACTOR_ONE ; - blend->bs[i].color_blend_func =GEN6_BLENDFUNCTION_ADD ; - blend->bs[i].pre_blend_color_clamp =1 ; - blend->bs[i].color_buffer_blend =0 ; +/* Blend state header (1 dword) - all defaults (zeros) */ + igt_genxml_pack_state(ibb, GFX9_BLEND_STATE, ptr, bs) { } + ptr += GFX9_BLEND_STATE_length *4 ; + +/* 16 per-RT blend state entries */ +for (int i =0 ; i <16 ; i++) { + igt_genxml_pack_state(ibb, GFX9_BLEND_STATE_ENTRY, ptr, entry) { + entry.DestinationBlendFactor =GFX9_BLENDFACTOR_ZERO ; + entry.SourceBlendFactor =GFX9_BLENDFACTOR_ONE ; + entry.ColorBlendFunction =GFX9_BLENDFUNCTION_ADD ; + entry.PreBlendColorClampEnable = true; + } + ptr += GFX9_BLEND_STATE_ENTRY_length *4 ; } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*blend)); +return intel_bb_ptr_add_return_prev_offset (ibb, + (GFX9_BLEND_STATE_length +16 * GFX9_BLEND_STATE_ENTRY_length) *4 ); }static uint32_t gen6_create_cc_viewport (struct intel_bb *ibb) { -struct gen4_cc_viewport *vp; - - vp =intel_bb_ptr_align (ibb,32 ); +void *ptr =intel_bb_ptr_align (ibb,32 ); -/* XXX I don't understand this */ - vp->min_depth =-1.e35 ; - vp->max_depth =1.e35 ; + igt_genxml_pack_state(ibb, GFX9_CC_VIEWPORT, ptr, vp) { + vp.MinimumDepth =-1.e35 ; + vp.MaximumDepth =1.e35 ; + } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*vp)); +return intel_bb_ptr_add_return_prev_offset (ibb, + GFX9_CC_VIEWPORT_length *4 ); }static uint32_t gen7_create_sf_clip_viewport (struct intel_bb *ibb) { -/* XXX these are likely not needed */ -struct gen7_sf_clip_viewport *scv_state; - - scv_state =intel_bb_ptr_align (ibb,64 ); +void *ptr =intel_bb_ptr_align (ibb,64 ); - scv_state->guardband.xmin =0 ; - scv_state->guardband.xmax =1.0f ; - scv_state->guardband.ymin =0 ; - scv_state->guardband.ymax =1.0f ; + igt_genxml_pack_state(ibb, GFX9_SF_CLIP_VIEWPORT, ptr, scv) { + scv.XMinClipGuardband =0 ; + scv.XMaxClipGuardband =1.0f ; + scv.YMinClipGuardband =0 ; + scv.YMaxClipGuardband =1.0f ; + } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*scv_state)); +return intel_bb_ptr_add_return_prev_offset (ibb, + GFX9_SF_CLIP_VIEWPORT_length *4 ); }static uint32_t gen6_create_scissor_rect (struct intel_bb *ibb) { -struct gen6_scissor_rect *scissor; +void *ptr =intel_bb_ptr_align (ibb,64 ); - scissor =intel_bb_ptr_align (ibb,64 ); + igt_genxml_pack_state(ibb, GFX9_SCISSOR_RECT, ptr, sr) { } -return intel_bb_ptr_add_return_prev_offset (ibb,sizeof (*scissor)); +return intel_bb_ptr_add_return_prev_offset (ibb, + GFX9_SCISSOR_RECT_length *4 ); } static voidSignature · 1 line
2.34.1
PATCH 8/10 lib/rendercopy: Convert pipeline emit commands to genxml
In reply to Jan MaslakReplace intel_bb_out() calls in state-base-address, URB, shader stage, and draw-state emit functions with igt_genxml_emit macros backed by the genxml pack headers.
--- lib/rendercopy_gen9.c | 541 +++++++++++++++++------------------------- 1 file changed, 223 insertions(+), 318 deletions(-)
lib/rendercopy_gen9.c +223 -318
@@ -734,81 +734,80 @@ gen6_create_scissor_rect(struct intel_bb *ibb)static void gen8_emit_sip (struct intel_bb *ibb) { -intel_bb_out (ibb,GEN4_STATE_SIP | (3 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_STATE_SIP, sip) { +/* SystemInstructionPointer left as zero */ + } }static void gen7_emit_push_constants (struct intel_bb *ibb) { -intel_bb_out (ibb,GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_VS ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_HS ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_DS ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,GEN8_3DSTATE_PUSH_CONSTANT_ALLOC_GS ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,GEN7_3DSTATE_PUSH_CONSTANT_ALLOC_PS ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_PUSH_CONSTANT_ALLOC_VS, vs) { } + igt_genxml_emit(ibb, GFX9_3DSTATE_PUSH_CONSTANT_ALLOC_HS, hs) { } + igt_genxml_emit(ibb, GFX9_3DSTATE_PUSH_CONSTANT_ALLOC_DS, ds) { } + igt_genxml_emit(ibb, GFX9_3DSTATE_PUSH_CONSTANT_ALLOC_GS, gs) { } + igt_genxml_emit(ibb, GFX9_3DSTATE_PUSH_CONSTANT_ALLOC_PS, ps) { } } +/* +* IGT_SBA_COMMON - shared STATE_BASE_ADDRESS fields across gen9/gen11/gen125. +* All three variants have identical field names for the fields we set. +*/ +#define IGT_SBA_COMMON (sba, mocs_val, surf, dyn, inst) \ + do { \ + sba.GeneralStateBaseAddressModifyEnable = true; \ + sba.GeneralStateMOCS = (mocs_val); \ + sba.StatelessDataPortAccessMOCS = (mocs_val); \ + sba.SurfaceStateBaseAddressModifyEnable = true; \ + sba.SurfaceStateMOCS = (mocs_val); \ + sba.SurfaceStateBaseAddress = (surf); \ + sba.DynamicStateBaseAddressModifyEnable = true; \ + sba.DynamicStateMOCS = (mocs_val); \ + sba.DynamicStateBaseAddress = (dyn); \ + sba.IndirectObjectMOCS = (mocs_val); \ + sba.InstructionBaseAddressModifyEnable = true; \ + sba.InstructionMOCS = (mocs_val); \ + sba.InstructionBaseAddress = (inst); \ + sba.GeneralStateBufferSizeModifyEnable = true; \ + sba.GeneralStateBufferSize = 0xfffff; \ + sba.DynamicStateBufferSizeModifyEnable = true; \ + sba.DynamicStateBufferSize = 1; \ + sba.IndirectObjectBufferSizeModifyEnable = true; \ + sba.IndirectObjectBufferSize = 0xfffff; \ + sba.InstructionBuffersizeModifyEnable = true; \ + sba.InstructionBufferSize = 1; \ + sba.BindlessSurfaceStateMOCS = (mocs_val); \ + } while (0) +static void gen9_emit_state_base_address (struct intel_bb *ibb) { +uint8_t mocs =intel_get_wb_mocs (ibb->fd); -/* WaBindlessSurfaceStateModifyEnable:skl,bxt */ -/* The length has to be one less if we dont modify -bindless state */ -if (intel_gen (intel_get_drm_devid (ibb->fd)) >=20 ) -intel_bb_out (ibb,GEN4_STATE_BASE_ADDRESS |20 ); -else -intel_bb_out (ibb,GEN4_STATE_BASE_ADDRESS | (19 -1 -2 )); - -/* general */ -intel_bb_out (ibb,0 |BASE_ADDRESS_MODIFY ); -intel_bb_out (ibb,0 ); - -/* stateless data port */ -intel_bb_out (ibb,0 |BASE_ADDRESS_MODIFY ); - -/* surface */ -intel_bb_emit_reloc (ibb, ibb->handle, -I915_GEM_DOMAIN_SAMPLER ,0 , -BASE_ADDRESS_MODIFY , ibb->batch_offset); - -/* dynamic */ -intel_bb_emit_reloc (ibb, ibb->handle, -I915_GEM_DOMAIN_RENDER |I915_GEM_DOMAIN_INSTRUCTION ,0 , -BASE_ADDRESS_MODIFY , ibb->batch_offset); - -/* indirect */ -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); +struct igt_address surf_base = +igt_address_of_batch (ibb,I915_GEM_DOMAIN_SAMPLER ,0 ); +struct igt_address dyn_base = +igt_address_of_batch (ibb, +I915_GEM_DOMAIN_RENDER |I915_GEM_DOMAIN_INSTRUCTION ,0 ); +struct igt_address inst_base = +igt_address_of_batch (ibb,I915_GEM_DOMAIN_INSTRUCTION ,0 ); -/* instruction */ -intel_bb_emit_reloc (ibb, ibb->handle, -I915_GEM_DOMAIN_INSTRUCTION ,0 , -BASE_ADDRESS_MODIFY , ibb->batch_offset); - -/* general state buffer size */ -intel_bb_out (ibb,0xfffff000 |1 ); -/* dynamic state buffer size */ -intel_bb_out (ibb,1 <<12 |1 ); -/* indirect object buffer size */ -intel_bb_out (ibb,0xfffff000 |1 ); -/* intruction buffer size */ -intel_bb_out (ibb,1 <<12 |1 ); - -/* Bindless surface state base address */ -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); - -if (intel_gen (intel_get_drm_devid (ibb->fd)) >=20 ) { -/* Bindless sampler */ -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); +if (HAS_4TILE (ibb->devid) ||intel_gen (ibb->devid) >12 ) { + igt_genxml_emit(ibb, GFX125_STATE_BASE_ADDRESS, sba) { +IGT_SBA_COMMON (sba, mocs, surf_base, dyn_base, inst_base); +/* WBP (0) and UC (1) are marked dont_use in the XML for this field. */ + sba.L1CacheControl =GFX125_L1CC_WB ; + sba.BindlessSamplerStateBaseAddressModifyEnable = true; + sba.BindlessSamplerStateMOCS = mocs; + } + }else if (intel_gen (ibb->devid) >=11 ) { + igt_genxml_emit(ibb, GFX11_STATE_BASE_ADDRESS, sba) { +IGT_SBA_COMMON (sba, mocs, surf_base, dyn_base, inst_base); + sba.BindlessSamplerStateBaseAddressModifyEnable = true; + sba.BindlessSamplerStateMOCS = mocs; + } + }else { + igt_genxml_emit(ibb, GFX9_STATE_BASE_ADDRESS, sba) { +IGT_SBA_COMMON (sba, mocs, surf_base, dyn_base, inst_base); + } } }
@@ -819,184 +818,119 @@ gen7_emit_urb(struct intel_bb *ibb) {const int vs_size =2 ;const int vs_start =4 ; -intel_bb_out (ibb,GEN7_3DSTATE_URB_VS ); -intel_bb_out (ibb, vs_entries | ((vs_size -1 ) <<16 ) | (vs_start <<25 )); -intel_bb_out (ibb,GEN7_3DSTATE_URB_GS ); -intel_bb_out (ibb, vs_start <<25 ); -intel_bb_out (ibb,GEN7_3DSTATE_URB_HS ); -intel_bb_out (ibb, vs_start <<25 ); -intel_bb_out (ibb,GEN7_3DSTATE_URB_DS ); -intel_bb_out (ibb, vs_start <<25 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_URB_VS, urb) { + urb.VSNumberofURBEntries = vs_entries; + urb.VSURBEntryAllocationSize = vs_size -1 ; + urb.VSURBStartingAddress = vs_start; + } + igt_genxml_emit(ibb, GFX9_3DSTATE_URB_GS, urb) { + urb.GSURBStartingAddress = vs_start; + } + igt_genxml_emit(ibb, GFX9_3DSTATE_URB_HS, urb) { + urb.HSURBStartingAddress = vs_start; + } + igt_genxml_emit(ibb, GFX9_3DSTATE_URB_DS, urb) { + urb.DSURBStartingAddress = vs_start; + } }static void gen8_emit_cc (struct intel_bb *ibb) { -intel_bb_out (ibb,GEN7_3DSTATE_BLEND_STATE_POINTERS ); -intel_bb_out (ibb, cc.blend_state |1 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_BLEND_STATE_POINTERS, bsp) { + bsp.BlendStatePointer = cc.blend_state; + bsp.BlendStatePointerValid = true; + } -intel_bb_out (ibb,GEN6_3DSTATE_CC_STATE_POINTERS ); -intel_bb_out (ibb, cc.cc_state |1 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_CC_STATE_POINTERS, ccp) { + ccp.ColorCalcStatePointer = cc.cc_state; + ccp.ColorCalcStatePointerValid = true; + } }static void gen8_emit_multisample (struct intel_bb *ibb) { -intel_bb_out (ibb,GEN8_3DSTATE_MULTISAMPLE |0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_MULTISAMPLE, ms) { } -intel_bb_out (ibb,GEN6_3DSTATE_SAMPLE_MASK ); -intel_bb_out (ibb,1 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_SAMPLE_MASK, sm) { + sm.SampleMask =1 ; + } }static void gen8_emit_vs (struct intel_bb *ibb) { -intel_bb_out (ibb,GEN6_3DSTATE_CONSTANT_VS | (11 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_CONSTANT_VS, cvs) { + cvs.MOCS =intel_get_wb_mocs (ibb->fd); + } -intel_bb_out (ibb,GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_BINDING_TABLE_POINTERS_VS, bt) { } -intel_bb_out (ibb,GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_SAMPLER_STATE_POINTERS_VS, sp) { } -intel_bb_out (ibb,GEN6_3DSTATE_VS | (9 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_VS, vs) { } }static void gen8_emit_hs (struct intel_bb *ibb) { -intel_bb_out (ibb,GEN7_3DSTATE_CONSTANT_HS | (11 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_CONSTANT_HS, chs) { + chs.MOCS =intel_get_wb_mocs (ibb->fd); + } -intel_bb_out (ibb,GEN7_3DSTATE_HS | (9 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); +if (intel_gen (ibb->devid) >=20 ) + igt_genxml_emit(ibb, GFX20_3DSTATE_HS, hs) { } + else +igt_genxml_emit (ibb ,GFX9_3DSTATE_HS ,hs ) { } -intel_bb_out (ibb,GEN7_3DSTATE_BINDING_TABLE_POINTERS_HS ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_BINDING_TABLE_POINTERS_HS, bt) { } -intel_bb_out (ibb,GEN8_3DSTATE_SAMPLER_STATE_POINTERS_HS ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_SAMPLER_STATE_POINTERS_HS, sp) { } }static void gen8_emit_gs (struct intel_bb *ibb) { -intel_bb_out (ibb,GEN6_3DSTATE_CONSTANT_GS | (11 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_CONSTANT_GS, cgs) { + cgs.MOCS =intel_get_wb_mocs (ibb->fd); + } -intel_bb_out (ibb,GEN6_3DSTATE_GS | (10 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_GS, gs) { } -intel_bb_out (ibb,GEN7_3DSTATE_BINDING_TABLE_POINTERS_GS ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_BINDING_TABLE_POINTERS_GS, bt) { } -intel_bb_out (ibb,GEN7_3DSTATE_SAMPLER_STATE_POINTERS_GS ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_SAMPLER_STATE_POINTERS_GS, sp) { } }static void gen9_emit_ds (struct intel_bb *ibb) { -intel_bb_out (ibb,GEN7_3DSTATE_CONSTANT_DS | (11 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_CONSTANT_DS, cds) { + cds.MOCS =intel_get_wb_mocs (ibb->fd); + } -intel_bb_out (ibb,GEN7_3DSTATE_DS | (11 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_DS, ds) { } -intel_bb_out (ibb,GEN7_3DSTATE_BINDING_TABLE_POINTERS_DS ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_BINDING_TABLE_POINTERS_DS, bt) { } -intel_bb_out (ibb,GEN8_3DSTATE_SAMPLER_STATE_POINTERS_DS ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_SAMPLER_STATE_POINTERS_DS, sp) { } }static void gen8_emit_wm_hz_op (struct intel_bb *ibb) {if (intel_gen (intel_get_drm_devid (ibb->fd)) >=20 ) { -intel_bb_out (ibb,GEN8_3DSTATE_WM_HZ_OP | (6 -2 )); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX20_3DSTATE_WM_HZ_OP, hz) { } }else { -intel_bb_out (ibb,GEN8_3DSTATE_WM_HZ_OP | (5 -2 )); + igt_genxml_emit(ibb, GFX9_3DSTATE_WM_HZ_OP, hz) { } } -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); }static void gen8_emit_null_state (struct intel_bb *ibb) {gen8_emit_wm_hz_op (ibb);gen8_emit_hs (ibb); -intel_bb_out (ibb,GEN7_3DSTATE_TE | (4 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + +if (intel_gen (ibb->devid) >=12 ) + igt_genxml_emit(ibb, GFX12_3DSTATE_TE, te) { } + else +igt_genxml_emit (ibb ,GFX9_3DSTATE_TE ,te ) { } +gen8_emit_gs (ibb);gen9_emit_ds (ibb);gen8_emit_vs (ibb);
@@ -1004,137 +938,109 @@ gen8_emit_null_state(struct intel_bb *ibb) {static void gen7_emit_clip (struct intel_bb *ibb) { -intel_bb_out (ibb,GEN6_3DSTATE_CLIP | (4 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 );/* pass-through */ -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_CLIP, clip) { +/* All fields zero = pass-through */ + } }static void gen8_emit_sf (struct intel_bb *ibb) { -int i; - -intel_bb_out (ibb,GEN7_3DSTATE_SBE | (6 -2 )); -intel_bb_out (ibb,1 <<GEN7_SBE_NUM_OUTPUTS_SHIFT | -GEN8_SBE_FORCE_URB_ENTRY_READ_LENGTH | -GEN8_SBE_FORCE_URB_ENTRY_READ_OFFSET | -1 <<GEN7_SBE_URB_ENTRY_READ_LENGTH_SHIFT | -1 <<GEN8_SBE_URB_ENTRY_READ_OFFSET_SHIFT ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,GEN9_SBE_ACTIVE_COMPONENT_XYZW <<0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_SBE, sbe) { + sbe.NumberofSFOutputAttributes =1 ; + sbe.ForceVertexURBEntryReadLength = true; + sbe.ForceVertexURBEntryReadOffset = true; + sbe.VertexURBEntryReadLength =1 ; + sbe.VertexURBEntryReadOffset =1 ; + sbe.AttributeActiveComponentFormat[0 ] =GFX9_ACTIVE_COMPONENT_XYZW ; + } -intel_bb_out (ibb,GEN8_3DSTATE_SBE_SWIZ | (11 -2 )); -for (i =0 ; i <8 ; i++) -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_SBE_SWIZ, swiz) { } -intel_bb_out (ibb,GEN8_3DSTATE_RASTER | (5 -2 )); -intel_bb_out (ibb,GEN8_RASTER_FRONT_WINDING_CCW |GEN8_RASTER_CULL_NONE ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_RASTER, raster) { + raster.FrontWinding =1 ;/* CCW */ + raster.CullMode =GFX9_CULLMODE_NONE ; + } -intel_bb_out (ibb,GEN6_3DSTATE_SF | (4 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_SF, sf) { } }static void gen8_emit_ps (struct intel_bb *ibb,uint32_t kernel,bool fast_clear) {const int max_threads =63 ; -intel_bb_out (ibb,GEN6_3DSTATE_WM | (2 -2 )); -intel_bb_out (ibb,/* XXX: I don't understand the BARYCENTRIC stuff, but it -* appears we need it to put our setup data in the place we -* expect (g6, see below) */ -GEN8_3DSTATE_PS_PERSPECTIVE_PIXEL_BARYCENTRIC ); - -intel_bb_out (ibb,GEN6_3DSTATE_CONSTANT_PS | (11 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_WM, wm) { + wm.BarycentricInterpolationMode =GFX9_BIM_PERSPECTIVE_PIXEL ; + } -intel_bb_out (ibb,GEN7_3DSTATE_PS | (12 -2 )); -if (intel_gen (intel_get_drm_devid (ibb->fd)) >=20 ) -intel_bb_out (ibb, kernel |1 ); -else -intel_bb_out (ibb, kernel); -intel_bb_out (ibb,0 );/* kernel hi */ + igt_genxml_emit(ibb, GFX9_3DSTATE_CONSTANT_PS, cps) { + cps.MOCS =intel_get_wb_mocs (ibb->fd); + } -if (fast_clear) -intel_bb_out (ibb,1 <<GEN6_3DSTATE_WM_BINDING_TABLE_ENTRY_COUNT_SHIFT ); -else -intel_bb_out (ibb,1 <<GEN6_3DSTATE_WM_SAMPLER_COUNT_SHIFT | -2 <<GEN6_3DSTATE_WM_BINDING_TABLE_ENTRY_COUNT_SHIFT ); - -intel_bb_out (ibb,0 );/* scratch space stuff */ -intel_bb_out (ibb,0 );/* scratch hi */ -intel_bb_out (ibb, (max_threads -1 ) <<GEN8_3DSTATE_PS_MAX_THREADS_SHIFT | -GEN6_3DSTATE_WM_16_DISPATCH_ENABLE | - (fast_clear ?GEN8_3DSTATE_FAST_CLEAR_ENABLE :0 )); -if (intel_gen (intel_get_drm_devid (ibb->fd)) >=20 ) -intel_bb_out (ibb,6 <<GEN6_3DSTATE_WM_DISPATCH_START_GRF_0_SHIFT | -GENXE_KERNEL0_POLY_PACK16_FIXED <<GENXE_KERNEL0_PACKING_POLICY ); -else -intel_bb_out (ibb,6 <<GEN6_3DSTATE_WM_DISPATCH_START_GRF_0_SHIFT ); -intel_bb_out (ibb,0 );// kernel 1 -intel_bb_out (ibb,0 );/* kernel 1 hi */ -intel_bb_out (ibb,0 );// kernel 2 -intel_bb_out (ibb,0 );/* kernel 2 hi */ +if (intel_gen (intel_get_drm_devid (ibb->fd)) >=20 ) { + igt_genxml_emit(ibb, GFX20_3DSTATE_PS, ps) { + ps.KernelStartPointer0 = kernel; + ps.Kernel0Enable = true; + ps.BindingTableEntryCount = fast_clear ?1 :2 ; + ps.SamplerCount = fast_clear ?0 :1 ; + ps.Kernel0SIMDWidth =GFX20_PS_SIMD16 ; + ps.RenderTargetFastClearEnable = fast_clear; + ps.MaximumNumberofThreadsPerPSD = max_threads -1 ; + ps.DispatchGRFStartRegisterForConstantSetupData0 =6 ; + ps.Kernel0PolyPackingPolicy =GFX20_POLY_PACK16_FIXED ; + } + }else { + igt_genxml_emit(ibb, GFX9_3DSTATE_PS, ps) { + ps.KernelStartPointer0 = kernel; + ps.BindingTableEntryCount = fast_clear ?1 :2 ; + ps.SamplerCount = fast_clear ?0 :1 ; + ps._16PixelDispatchEnable = true; + ps.RenderTargetFastClearEnable = fast_clear; + ps.MaximumNumberofThreadsPerPSD = max_threads -1 ; + ps.DispatchGRFStartRegisterForConstantSetupData0 =6 ; + } + } -intel_bb_out (ibb,GEN8_3DSTATE_PS_BLEND | (2 -2 )); -intel_bb_out (ibb,GEN8_PS_BLEND_HAS_WRITEABLE_RT ); + igt_genxml_emit(ibb, GFX9_3DSTATE_PS_BLEND, blend) { + blend.HasWriteableRT = true; + } -intel_bb_out (ibb,GEN8_3DSTATE_PS_EXTRA | (2 -2 )); -intel_bb_out (ibb,GEN8_PSX_PIXEL_SHADER_VALID |GEN8_PSX_ATTRIBUTE_ENABLE ); +if (intel_gen (intel_get_drm_devid (ibb->fd)) >=20 ) { + igt_genxml_emit(ibb, GFX20_3DSTATE_PS_EXTRA, extra) { + extra.PixelShaderValid = true; + } + }else { + igt_genxml_emit(ibb, GFX9_3DSTATE_PS_EXTRA, extra) { + extra.PixelShaderValid = true; + extra.AttributeEnable = true; + } + } }static void gen9_emit_depth (struct intel_bb *ibb) { -bool need_10dw =HAS_4TILE (ibb->devid); +uint8_t mocs =intel_get_wb_mocs (ibb->fd); -intel_bb_out (ibb,GEN8_3DSTATE_WM_DEPTH_STENCIL | (4 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_WM_DEPTH_STENCIL, wds) { } -intel_bb_out (ibb,GEN7_3DSTATE_DEPTH_BUFFER | (need_10dw ? (10 -2 ) : (8 -2 ))); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -if (need_10dw) { -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); +if (HAS_4TILE (ibb->devid)) { + igt_genxml_emit(ibb, GFX125_3DSTATE_DEPTH_BUFFER, db) { + db.MOCS = mocs; + } + }else { + igt_genxml_emit(ibb, GFX9_3DSTATE_DEPTH_BUFFER, db) { + db.MOCS = mocs; + } } -intel_bb_out (ibb,GEN8_3DSTATE_HIER_DEPTH_BUFFER | (5 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_HIER_DEPTH_BUFFER, hdb) { + hdb.MOCS = mocs; + } -intel_bb_out (ibb,GEN8_3DSTATE_STENCIL_BUFFER | (5 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_STENCIL_BUFFER, sb) { + sb.MOCS = mocs; + } } static void
@@ -1142,46 +1048,45 @@ gen7_emit_clear(struct intel_bb *ibb) {if (intel_gen (intel_get_drm_devid (ibb->fd)) >=20 )return ; -intel_bb_out (ibb,GEN7_3DSTATE_CLEAR_PARAMS | (3 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,1 );// clear valid + igt_genxml_emit(ibb, GFX9_3DSTATE_CLEAR_PARAMS, cp) { + cp.DepthClearValueValid = true; + } }static void gen6_emit_drawing_rectangle (struct intel_bb *ibb,const struct intel_buf *dst) { -if (intel_gen (intel_get_drm_devid (ibb->fd)) >=20 ) -intel_bb_out (ibb,GENXE2_3DSTATE_DRAWING_RECTANGLE_FAST | (4 -2 )); -else -intel_bb_out (ibb,GEN4_3DSTATE_DRAWING_RECTANGLE | (4 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb, (intel_buf_height (dst) -1 ) <<16 | (intel_buf_width (dst) -1 )); -intel_bb_out (ibb,0 ); +if (intel_gen (intel_get_drm_devid (ibb->fd)) >=20 ) { + igt_genxml_emit(ibb, GFX20_3DSTATE_DRAWING_RECTANGLE_FAST, dr) { + dr.ClippedDrawingRectangleXMax =intel_buf_width (dst) -1 ; + dr.ClippedDrawingRectangleYMax =intel_buf_height (dst) -1 ; + } + }else { + igt_genxml_emit(ibb, GFX9_3DSTATE_DRAWING_RECTANGLE, dr) { + dr.ClippedDrawingRectangleXMax =intel_buf_width (dst) -1 ; + dr.ClippedDrawingRectangleYMax =intel_buf_height (dst) -1 ; + } + } }static void gen8_emit_vf_topology (struct intel_bb *ibb) { -intel_bb_out (ibb,GEN8_3DSTATE_VF_TOPOLOGY ); -intel_bb_out (ibb, _3DPRIM_RECTLIST); + igt_genxml_emit(ibb, GFX9_3DSTATE_VF_TOPOLOGY, vft) { + vft.PrimitiveTopologyType =GFX9_3DPRIM_RECTLIST ; + } }/* Vertex elements MUST be defined before this according to spec */ static void gen8_emit_primitive (struct intel_bb *ibb,uint32_t offset) { -intel_bb_out (ibb,GEN8_3DSTATE_VF | (2 -2 )); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_VF, vf) { } -intel_bb_out (ibb,GEN8_3DSTATE_VF_INSTANCING | (3 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_VF_INSTANCING, vfi) { } -intel_bb_out (ibb,GEN4_3DPRIMITIVE | (7 -2 )); -intel_bb_out (ibb,0 );/* gen8+ ignore the topology type field */ -intel_bb_out (ibb,3 );/* vertex count */ -intel_bb_out (ibb,0 );/* We're specifying this instead with offset in GEN6_3DSTATE_VERTEX_BUFFERS */ -intel_bb_out (ibb,1 );/* single instance */ -intel_bb_out (ibb,0 );/* start instance location */ -intel_bb_out (ibb,0 );/* index buffer offset, ignored */ + igt_genxml_emit(ibb, GFX9_3DPRIMITIVE, prim) { + prim.VertexCountPerInstance =3 ; + prim.InstanceCount =1 ; + } }#define PIPE_CONTROL_RENDER_TARGET_FLUSH (1 << 12)
Signature · 1 line
2.34.1
PATCH 9/10 lib/rendercopy: Convert render op and entry points to genxml
In reply to Jan MaslakUpdate _gen9_render_op() and the public render/clear entry points to use igt_genxml_emit macros backed by the genxml pack headers.
--- lib/rendercopy_gen9.c | 52 +++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 22 deletions(-)
lib/rendercopy_gen9.c +30 -22
@@ -1218,8 +1218,13 @@ void _gen9_render_op(struct intel_bb *ibb,/* Start emitting the commands. The order roughly follows the mesa blorp * order */ -intel_bb_out (ibb,G4X_PIPELINE_SELECT |PIPELINE_SELECT_3D | -GEN9_PIPELINE_SELECTION_MASK ); + igt_genxml_emit(ibb, GFX9_PIPELINE_SELECT, ps) { + ps.PipelineSelection =GFX9_3D ; +/* MaskBits 15:8 is a write-enable mask for bits 5:4 (Force Media +* Awake and Media Sampler DOP Clock Gate Enable). Value 0x3 +* enables writes to both bits so PipelineSelection takes effect. */ + ps.MaskBits =3 ; + }gen12_emit_aux_pgtable_state (ibb, aux_pgtable_state, true);
@@ -1250,17 +1255,21 @@ void _gen9_render_op(struct intel_bb *ibb,gen9_emit_state_base_address (ibb);if (HAS_4TILE (ibb->devid) ||intel_gen (ibb->devid) >12 ) { -intel_bb_out (ibb,GEN4_3DSTATE_BINDING_TABLE_POOL_ALLOC |2 ); -intel_bb_emit_reloc (ibb, ibb->handle, -I915_GEM_DOMAIN_RENDER |I915_GEM_DOMAIN_INSTRUCTION ,0 , -0 , ibb->batch_offset); -intel_bb_out (ibb,1 <<12 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_BINDING_TABLE_POOL_ALLOC, btpa) { + btpa.MOCS =intel_get_wb_mocs (ibb->fd); + btpa.BindingTablePoolBaseAddress = +igt_address_of_batch (ibb, +I915_GEM_DOMAIN_RENDER |I915_GEM_DOMAIN_INSTRUCTION ,0 ); + btpa.BindingTablePoolBufferSize =1 ; + } } -intel_bb_out (ibb,GEN7_3DSTATE_VIEWPORT_STATE_POINTERS_CC ); -intel_bb_out (ibb, viewport.cc_state); -intel_bb_out (ibb,GEN8_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP ); -intel_bb_out (ibb, viewport.sf_clip_state); + igt_genxml_emit(ibb, GFX9_3DSTATE_VIEWPORT_STATE_POINTERS_CC, vp) { + vp.CCViewportPointer = viewport.cc_state; + } + igt_genxml_emit(ibb, GFX9_3DSTATE_VIEWPORT_STATE_POINTERS_SF_CLIP, vp) { + vp.SFClipViewportPointer = viewport.sf_clip_state; + }gen7_emit_urb (ibb);
@@ -1270,11 +1279,7 @@ void _gen9_render_op(struct intel_bb *ibb,gen8_emit_null_state (ibb); -intel_bb_out (ibb,GEN7_3DSTATE_STREAMOUT | (5 -2 )); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); -intel_bb_out (ibb,0 ); + igt_genxml_emit(ibb, GFX9_3DSTATE_STREAMOUT, so) { }gen7_emit_clip (ibb);
@@ -1282,14 +1287,17 @@ void _gen9_render_op(struct intel_bb *ibb,gen8_emit_ps (ibb, ps_kernel_off, fast_clear); -intel_bb_out (ibb,GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS ); -intel_bb_out (ibb, ps_binding_table); + igt_genxml_emit(ibb, GFX9_3DSTATE_BINDING_TABLE_POINTERS_PS, bt) { + bt.PointertoPSBindingTable = ps_binding_table; + } -intel_bb_out (ibb,GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS ); -intel_bb_out (ibb, ps_sampler_state); + igt_genxml_emit(ibb, GFX9_3DSTATE_SAMPLER_STATE_POINTERS_PS, sp) { + sp.PointertoPSSamplerState = ps_sampler_state; + } -intel_bb_out (ibb,GEN8_3DSTATE_SCISSOR_STATE_POINTERS ); -intel_bb_out (ibb, scissor_state); + igt_genxml_emit(ibb, GFX9_3DSTATE_SCISSOR_STATE_POINTERS, ssp) { + ssp.ScissorRectPointer = scissor_state; + }gen9_emit_depth (ibb);
Signature · 1 line
2.34.1
PATCH 10/10 lib: Add genxml annotated batch buffer decode
In reply to Jan MaslakWhen IGT_BB_ANNOTATE=1 is set, intel_bb_dump() writes a companion <filename>.annotated file alongside the raw hex dump. The annotated file identifies each command and prints its field names and values, decoded via the genxml *_decode.h headers.
The opt-in environment variable avoids file I/O overhead in normal test runs. A disclaimer in the file header notes that the decode is best-effort and may lag hardware on newer platforms.
--- lib/intel_batchbuffer.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-)
lib/intel_batchbuffer.c +31 -1
@@ -49,6 +49,7 @@#include "veboxcopy.h" #include "xe/xe_ioctl.h" #include "xe/xe_query.h" +#include "intel/genxml/igt_genxml_decode.h" #define BCS_SWCTRL 0x22200#define BCS_SRC_Y (1 << 0)
@@ -1579,7 +1580,9 @@ void intel_bb_print(struct intel_bb *ibb)* @filename: name to which write bb * @in_hex: dump bb in hex form * -* Dump batch bo to file. +* Dump batch bo to file. When IGT_BB_ANNOTATE=1 is set, also writes +* a companion annotated file (filename + ".annotated") with +* genxml-decoded field names and values. */ void intel_bb_dump (struct intel_bb *ibb,const char *filename,bool in_hex) {
@@ -1609,6 +1612,33 @@ void intel_bb_dump(struct intel_bb *ibb, const char *filename, bool in_hex) }fclose (out); +/* Write a companion annotated decode alongside the raw dump, +* but only when explicitly requested via IGT_BB_ANNOTATE=1. +*/ +if (getenv ("IGT_BB_ANNOTATE" )) { +char *ann_filename; +unsigned batch_dwords; + +igt_assert (asprintf (&ann_filename,"%s.annotated" , filename) >0 ); + batch_dwords =intel_bb_offset (ibb) /sizeof (uint32_t ); + + out =fopen (ann_filename,"w" ); +if (out) { +fprintf (out, +"# Batch buffer annotated decode\n" +"# Decoded using IGT's genxml definitions.\n" +"# This is a best-effort annotation and may be inaccurate,\n" +"# especially on newer platforms where the XML definitions\n" +"# may not yet reflect the latest hardware changes.\n" +"\n" ); +igt_genxml_decode_batch (out, ibb->devid, + (const uint32_t *)ptr, + batch_dwords); +fclose (out); + } +free (ann_filename); + } +if (ptr != ibb->batch)munmap (ptr, ibb->size); }
Signature · 1 line
2.34.1
Re: [PATCH 10/10] lib: Add genxml annotated batch buffer decode
Hi Jan,
Quoted 19 lines · Jan Maslak
When IGT_BB_ANNOTATE=1 is set,
intel_bb_dump()writes a companion <filename>.annotated file alongside the raw hex dump. The annotated file identifies each command and prints its field names and values, decoded via the genxml *_decode.h headers.The opt-in environment variable avoids file I/O overhead in normal test runs. A disclaimer in the file header notes that the decode is best-effort and may lag hardware on newer platforms.
Signed-off-by Jan Maslak <[email protected]>--- lib/intel_batchbuffer.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-)lib/intel_batchbuffer.c +0
-0
lib/intel_batchbuffer.c line 52
Quoted 4 lines
lib/intel_batchbuffer.c +1
-0@@ -49,6 +49,7 @@#include "veboxcopy.h" #include "xe/xe_ioctl.h" #include "xe/xe_query.h" +#include "intel/genxml/igt_genxml_decode.h"
Pleas move it to proper place, it should keep alphabetical order.
Regards,
Kamil
Quoted 51 lines
lib/intel_batchbuffer.c +30
-1#define BCS_SWCTRL 0x22200#define BCS_SRC_Y (1 << 0)@@ -1579,7 +1580,9 @@ void intel_bb_print(struct intel_bb *ibb)* @filename: name to which write bb * @in_hex: dump bb in hex form * -* Dump batch bo to file. +* Dump batch bo to file. When IGT_BB_ANNOTATE=1 is set, also writes +* a companion annotated file (filename + ".annotated") with +* genxml-decoded field names and values. */ void intel_bb_dump (struct intel_bb *ibb,const char *filename,bool in_hex) {@@ -1609,6 +1612,33 @@ void intel_bb_dump(struct intel_bb *ibb, const char *filename, bool in_hex) }fclose (out); +/* Write a companion annotated decode alongside the raw dump, +* but only when explicitly requested via IGT_BB_ANNOTATE=1. +*/ +if (getenv ("IGT_BB_ANNOTATE" )) { +char *ann_filename; +unsigned batch_dwords; + +igt_assert (asprintf (&ann_filename,"%s.annotated" , filename) >0 ); + batch_dwords =intel_bb_offset (ibb) /sizeof (uint32_t ); + + out =fopen (ann_filename,"w" ); +if (out) { +fprintf (out, +"# Batch buffer annotated decode\n" +"# Decoded using IGT's genxml definitions.\n" +"# This is a best-effort annotation and may be inaccurate,\n" +"# especially on newer platforms where the XML definitions\n" +"# may not yet reflect the latest hardware changes.\n" +"\n" ); +igt_genxml_decode_batch (out, ibb->devid, + (const uint32_t *)ptr, + batch_dwords); +fclose (out); + } +free (ann_filename); + } +if (ptr != ibb->batch)munmap (ptr, ibb->size); }Signature · 1 line
2.34.1