diff options
author | Kenneth Graunke <[email protected]> | 2018-12-11 00:34:11 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2018-12-14 00:44:54 -0800 |
commit | 0b44644ca6886de4201e3edd911b7d418a9d7680 (patch) | |
tree | 56cab0cfb09f7f56411eda32ba3476b8aa76c378 /src/intel/genxml/gen7.xml | |
parent | a2ec78883f402ccfb60bce3c35ec819061e6338f (diff) |
genxml: Consistently use a numeric "MOCS" field
When we first started using genxml, we decided to represent MOCS as an
actual structure, and pack values. However, in many places, it was more
convenient to use a numeric value rather than treating it as a struct,
so we added secondary setters in a bunch of places as well.
We were not entirely consistent, either. Some places only had one.
Gen6 had both kinds of setters for STATE_BASE_ADDRESS, but newer gens
only had the struct-based setters. The names were sometimes "Constant
Buffer Object Control State" instead of "Memory", making it harder to
find. Many had prefixes like "Vertex Buffer MOCS"...in a vertex buffer
packet...which is a bit redundant.
On modern hardware, MOCS is simply an index into a table, but we were
still carrying around the structure with an "Index to MOCS Table" field,
in addition to the direct numeric setters. This is clunky - we really
just want a number on new hardware.
This patch eliminates the struct-based setters, and makes the numeric
setters be consistently called "MOCS". We leave the struct definition
around on Gen7-8 for reference purposes, but it is unused.
v2: Drop bonus "Depth Buffer MOCS" fields on Gen7.5 and Gen9
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/intel/genxml/gen7.xml')
-rw-r--r-- | src/intel/genxml/gen7.xml | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/src/intel/genxml/gen7.xml b/src/intel/genxml/gen7.xml index 49b08281993..893c12b8af9 100644 --- a/src/intel/genxml/gen7.xml +++ b/src/intel/genxml/gen7.xml @@ -157,7 +157,7 @@ <group count="4" start="0" size="16"> <field name="Read Length" start="0" end="15" type="uint"/> </group> - <field name="Constant Buffer Object Control State" start="64" end="68" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="MOCS" start="64" end="68" type="uint"/> <group count="4" start="64" size="32"> <field name="Buffer" start="5" end="31" type="address"/> </group> @@ -169,8 +169,7 @@ <value name="VERTEXDATA" value="0"/> <value name="INSTANCEDATA" value="1"/> </field> - <field name="Vertex Buffer Memory Object Control State" start="16" end="19" type="MEMORY_OBJECT_CONTROL_STATE"/> - <field name="Vertex Buffer MOCS" start="16" end="19" type="uint"/> + <field name="MOCS" start="16" end="19" type="uint"/> <field name="Address Modify Enable" start="14" end="14" type="bool"/> <field name="Null Vertex Buffer" start="13" end="13" type="bool"/> <field name="Vertex Fetch Invalidate" start="12" end="12" type="bool" default="0"/> @@ -443,7 +442,6 @@ <field name="Strbuf Minimum Array Element" start="128" end="154" type="uint"/> <field name="X Offset" start="185" end="191" type="uint"/> <field name="Y Offset" start="180" end="183" type="uint"/> - <field name="Surface Object Control State" start="176" end="179" type="MEMORY_OBJECT_CONTROL_STATE"/> <field name="MOCS" start="176" end="179" type="uint"/> <field name="Surface Min LOD" start="164" end="167" type="uint"/> <field name="MIP Count / LOD" start="160" end="163" type="uint"/> @@ -815,8 +813,7 @@ <value name="SURFTYPE_CUBE (must be zero)" value="0"/> </field> <field name="Minimum Array Element" start="138" end="148" type="uint"/> - <field name="Depth Buffer Object Control State" start="128" end="131" type="MEMORY_OBJECT_CONTROL_STATE"/> - <field name="Depth Buffer MOCS" start="128" end="131" type="uint"/> + <field name="MOCS" start="128" end="131" type="uint"/> <field name="Depth Coordinate Offset Y" start="176" end="191" type="int"/> <field name="Depth Coordinate Offset X" start="160" end="175" type="int"/> <field name="Render Target View Extent" start="213" end="223" type="uint"/> @@ -949,8 +946,7 @@ <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="7"/> <field name="DWord Length" start="0" end="7" type="uint" default="1"/> - <field name="Hierarchical Depth Buffer Object Control State" start="57" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/> - <field name="Hierarchical Depth Buffer MOCS" start="57" end="60" type="uint"/> + <field name="MOCS" start="57" end="60" type="uint"/> <field name="Surface Pitch" start="32" end="48" type="uint"/> <field name="Surface Base Address" start="64" end="95" type="address"/> </instruction> @@ -996,8 +992,7 @@ <field name="Command SubType" start="27" end="28" type="uint" default="3"/> <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="10"/> - <field name="Memory Object Control State" start="12" end="15" type="MEMORY_OBJECT_CONTROL_STATE"/> - <field name="IndexBufferMOCS" start="12" end="15" type="uint"/> + <field name="MOCS" start="12" end="15" type="uint"/> <field name="Cut Index Enable" start="10" end="10" type="bool"/> <field name="Index Format" start="8" end="9" type="uint" prefix="INDEX"> <value name="BYTE" value="0"/> @@ -1422,8 +1417,7 @@ <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="24"/> <field name="DWord Length" start="0" end="7" type="uint" default="2"/> <field name="SO Buffer Index" start="61" end="62" type="uint"/> - <field name="SO Buffer Object Control State" start="57" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/> - <field name="SO Buffer MOCS" start="57" end="60" type="uint"/> + <field name="MOCS" start="57" end="60" type="uint"/> <field name="Surface Pitch" start="32" end="43" type="uint"/> <field name="Surface Base Address" start="66" end="95" type="address"/> <field name="Surface End Address" start="98" end="127" type="address"/> @@ -1454,8 +1448,7 @@ <field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/> <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="6"/> <field name="DWord Length" start="0" end="7" type="uint" default="1"/> - <field name="Stencil Buffer Object Control State" start="57" end="60" type="MEMORY_OBJECT_CONTROL_STATE"/> - <field name="Stencil Buffer MOCS" start="57" end="60" type="uint"/> + <field name="MOCS" start="57" end="60" type="uint"/> <field name="Surface Pitch" start="32" end="48" type="uint"/> <field name="Surface Base Address" start="64" end="95" type="address"/> </instruction> @@ -2238,21 +2231,21 @@ <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="1"/> <field name="DWord Length" start="0" end="7" type="uint" default="8"/> <field name="General State Base Address" start="44" end="63" type="address"/> - <field name="General State Memory Object Control State" start="40" end="43" type="MEMORY_OBJECT_CONTROL_STATE"/> - <field name="Stateless Data Port Access Memory Object Control State" start="36" end="39" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="General State MOCS" start="40" end="43" type="uint"/> + <field name="Stateless Data Port Access MOCS" start="36" end="39" type="uint"/> <field name="Stateless Data Port Access Force Write Thru" start="35" end="35" type="uint"/> <field name="General State Base Address Modify Enable" start="32" end="32" type="bool"/> <field name="Surface State Base Address" start="76" end="95" type="address"/> - <field name="Surface State Memory Object Control State" start="72" end="75" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Surface State MOCS" start="72" end="75" type="uint"/> <field name="Surface State Base Address Modify Enable" start="64" end="64" type="bool"/> <field name="Dynamic State Base Address" start="108" end="127" type="address"/> - <field name="Dynamic State Memory Object Control State" start="104" end="107" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Dynamic State MOCS" start="104" end="107" type="uint"/> <field name="Dynamic State Base Address Modify Enable" start="96" end="96" type="bool"/> <field name="Indirect Object Base Address" start="140" end="159" type="address"/> - <field name="Indirect Object Memory Object Control State" start="136" end="139" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Indirect Object MOCS" start="136" end="139" type="uint"/> <field name="Indirect Object Base Address Modify Enable" start="128" end="128" type="bool"/> <field name="Instruction Base Address" start="172" end="191" type="address"/> - <field name="Instruction Memory Object Control State" start="168" end="171" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="Instruction MOCS" start="168" end="171" type="uint"/> <field name="Instruction Base Address Modify Enable" start="160" end="160" type="bool"/> <field name="General State Access Upper Bound" start="204" end="223" type="address"/> <field name="General State Access Upper Bound Modify Enable" start="192" end="192" type="bool"/> @@ -2290,7 +2283,7 @@ <field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="3"/> <field name="DWord Length" start="0" end="7" type="uint" default="0"/> <field name="SW Tessellation Base Address" start="44" end="63" type="address"/> - <field name="SW Tessellation Memory Object Control State" start="40" end="43" type="MEMORY_OBJECT_CONTROL_STATE"/> + <field name="SW Tessellation MOCS" start="40" end="43" type="uint"/> </instruction> <register name="IA_VERTICES_COUNT" length="2" num="0x2310"> |