[Mesa-dev] [PATCH 11/18] intel/genxml: Use enum 3D_Stencil_Operation where applicable
Kristian H. Kristensen
hoegsberg at gmail.com
Tue Nov 29 20:48:11 UTC 2016
Signed-off-by: Kristian H. Kristensen <hoegsberg at gmail.com>
---
src/intel/genxml/gen6.xml | 39 ++++++++++++++++-----------------------
src/intel/genxml/gen7.xml | 41 +++++++++++++++++------------------------
src/intel/genxml/gen75.xml | 41 +++++++++++++++++------------------------
src/intel/genxml/gen8.xml | 12 ++++++------
src/intel/genxml/gen9.xml | 12 ++++++------
5 files changed, 62 insertions(+), 83 deletions(-)
diff --git a/src/intel/genxml/gen6.xml b/src/intel/genxml/gen6.xml
index 732a76c..ae8978b 100644
--- a/src/intel/genxml/gen6.xml
+++ b/src/intel/genxml/gen6.xml
@@ -45,6 +45,17 @@
<value name="GEQUAL" value="7"/>
</enum>
+ <enum name="3D_Stencil_Operation" prefix="STENCILOP">
+ <value name="KEEP" value="0"/>
+ <value name="ZERO" value="1"/>
+ <value name="REPLACE" value="2"/>
+ <value name="INCRSAT" value="3"/>
+ <value name="DECRSAT" value="4"/>
+ <value name="INCR" value="5"/>
+ <value name="DECR" value="6"/>
+ <value name="INVERT" value="7"/>
+ </enum>
+
<enum name="SURFACE_FORMAT" prefix="SF">
<value name="R32G32B32A32_FLOAT" value="0"/>
<value name="R32G32B32A32_SINT" value="1"/>
@@ -470,32 +481,14 @@
<struct name="DEPTH_STENCIL_STATE" length="3">
<field name="Stencil Test Enable" start="31" end="31" type="bool"/>
<field name="Stencil Test Function" start="28" end="30" type="3D_Compare_Function"/>
- <field name="Stencil Fail Op" start="25" end="27" type="uint">
- <value name="STENCILOP_KEEP" value="0"/>
- <value name="STENCILOP_ZERO" value="1"/>
- <value name="STENCILOP_REPLACE" value="2"/>
- <value name="STENCILOP_INCRSAT" value="3"/>
- <value name="STENCILOP_DECRSAT" value="4"/>
- <value name="STENCILOP_INCR" value="5"/>
- <value name="STENCILOP_DECR" value="6"/>
- <value name="STENCILOP_INVERT" value="7"/>
- </field>
- <field name="Stencil Pass Depth Fail Op" start="22" end="24" type="uint"/>
- <field name="Stencil Pass Depth Pass Op" start="19" end="21" type="uint"/>
+ <field name="Stencil Fail Op" start="25" end="27" type="3D_Stencil_Operation"/>
+ <field name="Stencil Pass Depth Fail Op" start="22" end="24" type="3D_Stencil_Operation"/>
+ <field name="Stencil Pass Depth Pass Op" start="19" end="21" type="3D_Stencil_Operation"/>
<field name="Stencil Buffer Write Enable" start="18" end="18" type="bool"/>
<field name="Double Sided Stencil Enable" start="15" end="15" type="bool"/>
<field name="Backface Stencil Test Function" start="12" end="14" type="3D_Compare_Function"/>
- <field name="Backface Stencil Fail Op" start="9" end="11" type="uint">
- <value name="STENCILOP_KEEP" value="0"/>
- <value name="STENCILOP_ZERO" value="1"/>
- <value name="STENCILOP_REPLACE" value="2"/>
- <value name="STENCILOP_INCRSAT" value="3"/>
- <value name="STENCILOP_DECRSAT" value="4"/>
- <value name="STENCILOP_INCR" value="5"/>
- <value name="STENCILOP_DECR" value="6"/>
- <value name="STENCILOP_INVERT" value="7"/>
- </field>
- <field name="Backface Stencil Pass Depth Fail Op" start="6" end="8" type="uint"/>
+ <field name="Backface Stencil Fail Op" start="9" end="11" type="3D_Stencil_Operation"/>
+ <field name="Backface Stencil Pass Depth Fail Op" start="6" end="8" type="3D_Stencil_Operation"/>
<field name="Backface Stencil Pass Depth Pass Op" start="3" end="5" type="uint"/>
<field name="Stencil Test Mask" start="56" end="63" type="uint"/>
<field name="Stencil Write Mask" start="48" end="55" type="uint"/>
diff --git a/src/intel/genxml/gen7.xml b/src/intel/genxml/gen7.xml
index d18b02a..f650e76 100644
--- a/src/intel/genxml/gen7.xml
+++ b/src/intel/genxml/gen7.xml
@@ -66,6 +66,17 @@
<value name="STORE_PID" value="7"/>
</enum>
+ <enum name="3D_Stencil_Operation" prefix="STENCILOP">
+ <value name="KEEP" value="0"/>
+ <value name="ZERO" value="1"/>
+ <value name="REPLACE" value="2"/>
+ <value name="INCRSAT" value="3"/>
+ <value name="DECRSAT" value="4"/>
+ <value name="INCR" value="5"/>
+ <value name="DECR" value="6"/>
+ <value name="INVERT" value="7"/>
+ </enum>
+
<enum name="3D_Compare_Function" prefix="COMPAREFUNCTION">
<value name="ALWAYS" value="0"/>
<value name="NEVER" value="1"/>
@@ -525,33 +536,15 @@
<struct name="DEPTH_STENCIL_STATE" length="3">
<field name="Stencil Test Enable" start="31" end="31" type="bool"/>
<field name="Stencil Test Function" start="28" end="30" type="3D_Compare_Function"/>
- <field name="Stencil Fail Op" start="25" end="27" type="uint">
- <value name="STENCILOP_KEEP" value="0"/>
- <value name="STENCILOP_ZERO" value="1"/>
- <value name="STENCILOP_REPLACE" value="2"/>
- <value name="STENCILOP_INCRSAT" value="3"/>
- <value name="STENCILOP_DECRSAT" value="4"/>
- <value name="STENCILOP_INCR" value="5"/>
- <value name="STENCILOP_DECR" value="6"/>
- <value name="STENCILOP_INVERT" value="7"/>
- </field>
- <field name="Stencil Pass Depth Fail Op" start="22" end="24" type="uint"/>
- <field name="Stencil Pass Depth Pass Op" start="19" end="21" type="uint"/>
+ <field name="Stencil Fail Op" start="25" end="27" type="3D_Stencil_Operation"/>
+ <field name="Stencil Pass Depth Fail Op" start="22" end="24" type="3D_Stencil_Operation"/>
+ <field name="Stencil Pass Depth Pass Op" start="19" end="21" type="3D_Stencil_Operation"/>
<field name="Stencil Buffer Write Enable" start="18" end="18" type="bool"/>
<field name="Double Sided Stencil Enable" start="15" end="15" type="bool"/>
<field name="Backface Stencil Test Function" start="12" end="14" type="3D_Compare_Function"/>
- <field name="Backface Stencil Fail Op" start="9" end="11" type="uint">
- <value name="STENCILOP_KEEP" value="0"/>
- <value name="STENCILOP_ZERO" value="1"/>
- <value name="STENCILOP_REPLACE" value="2"/>
- <value name="STENCILOP_INCRSAT" value="3"/>
- <value name="STENCILOP_DECRSAT" value="4"/>
- <value name="STENCILOP_INCR" value="5"/>
- <value name="STENCILOP_DECR" value="6"/>
- <value name="STENCILOP_INVERT" value="7"/>
- </field>
- <field name="Backface Stencil Pass Depth Fail Op" start="6" end="8" type="uint"/>
- <field name="Backface Stencil Pass Depth Pass Op" start="3" end="5" type="uint"/>
+ <field name="Backface Stencil Fail Op" start="9" end="11" type="3D_Stencil_Operation"/>
+ <field name="Backface Stencil Pass Depth Fail Op" start="6" end="8" type="3D_Stencil_Operation"/>
+ <field name="Backface Stencil Pass Depth Pass Op" start="3" end="5" type="3D_Stencil_Operation"/>
<field name="Stencil Test Mask" start="56" end="63" type="uint"/>
<field name="Stencil Write Mask" start="48" end="55" type="uint"/>
<field name="Backface Stencil Test Mask" start="40" end="47" type="uint"/>
diff --git a/src/intel/genxml/gen75.xml b/src/intel/genxml/gen75.xml
index 123c9e3..4123fc5 100644
--- a/src/intel/genxml/gen75.xml
+++ b/src/intel/genxml/gen75.xml
@@ -66,6 +66,17 @@
<value name="STORE_PID" value="7"/>
</enum>
+ <enum name="3D_Stencil_Operation" prefix="STENCILOP">
+ <value name="KEEP" value="0"/>
+ <value name="ZERO" value="1"/>
+ <value name="REPLACE" value="2"/>
+ <value name="INCRSAT" value="3"/>
+ <value name="DECRSAT" value="4"/>
+ <value name="INCR" value="5"/>
+ <value name="DECR" value="6"/>
+ <value name="INVERT" value="7"/>
+ </enum>
+
<enum name="3D_Compare_Function" prefix="COMPAREFUNCTION">
<value name="ALWAYS" value="0"/>
<value name="NEVER" value="1"/>
@@ -535,33 +546,15 @@
<struct name="DEPTH_STENCIL_STATE" length="3">
<field name="Stencil Test Enable" start="31" end="31" type="bool"/>
<field name="Stencil Test Function" start="28" end="30" type="3D_Compare_Function"/>
- <field name="Stencil Fail Op" start="25" end="27" type="uint">
- <value name="STENCILOP_KEEP" value="0"/>
- <value name="STENCILOP_ZERO" value="1"/>
- <value name="STENCILOP_REPLACE" value="2"/>
- <value name="STENCILOP_INCRSAT" value="3"/>
- <value name="STENCILOP_DECRSAT" value="4"/>
- <value name="STENCILOP_INCR" value="5"/>
- <value name="STENCILOP_DECR" value="6"/>
- <value name="STENCILOP_INVERT" value="7"/>
- </field>
- <field name="Stencil Pass Depth Fail Op" start="22" end="24" type="uint"/>
- <field name="Stencil Pass Depth Pass Op" start="19" end="21" type="uint"/>
+ <field name="Stencil Fail Op" start="25" end="27" type="3D_Stencil_Operation"/>
+ <field name="Stencil Pass Depth Fail Op" start="22" end="24" type="3D_Stencil_Operation"/>
+ <field name="Stencil Pass Depth Pass Op" start="19" end="21" type="3D_Stencil_Operation"/>
<field name="Stencil Buffer Write Enable" start="18" end="18" type="bool"/>
<field name="Double Sided Stencil Enable" start="15" end="15" type="bool"/>
<field name="Backface Stencil Test Function" start="12" end="14" type="3D_Compare_Function"/>
- <field name="Backface Stencil Fail Op" start="9" end="11" type="uint">
- <value name="STENCILOP_KEEP" value="0"/>
- <value name="STENCILOP_ZERO" value="1"/>
- <value name="STENCILOP_REPLACE" value="2"/>
- <value name="STENCILOP_INCRSAT" value="3"/>
- <value name="STENCILOP_DECRSAT" value="4"/>
- <value name="STENCILOP_INCR" value="5"/>
- <value name="STENCILOP_DECR" value="6"/>
- <value name="STENCILOP_INVERT" value="7"/>
- </field>
- <field name="Backface Stencil Pass Depth Fail Op" start="6" end="8" type="uint"/>
- <field name="Backface Stencil Pass Depth Pass Op" start="3" end="5" type="uint"/>
+ <field name="Backface Stencil Fail Op" start="9" end="11" type="3D_Stencil_Operation"/>
+ <field name="Backface Stencil Pass Depth Fail Op" start="6" end="8" type="3D_Stencil_Operation"/>
+ <field name="Backface Stencil Pass Depth Pass Op" start="3" end="5" type="3D_Stencil_Operation"/>
<field name="Stencil Test Mask" start="56" end="63" type="uint"/>
<field name="Stencil Write Mask" start="48" end="55" type="uint"/>
<field name="Backface Stencil Test Mask" start="40" end="47" type="uint"/>
diff --git a/src/intel/genxml/gen8.xml b/src/intel/genxml/gen8.xml
index 58feef3..94a415b 100644
--- a/src/intel/genxml/gen8.xml
+++ b/src/intel/genxml/gen8.xml
@@ -2370,13 +2370,13 @@
<field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/>
<field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="78"/>
<field name="DWord Length" start="0" end="7" type="uint" default="1"/>
- <field name="Stencil Fail Op" start="61" end="63" type="uint"/>
- <field name="Stencil Pass Depth Fail Op" start="58" end="60" type="uint"/>
- <field name="Stencil Pass Depth Pass Op" start="55" end="57" type="uint"/>
+ <field name="Stencil Fail Op" start="61" end="63" type="3D_Stencil_Operation"/>
+ <field name="Stencil Pass Depth Fail Op" start="58" end="60" type="3D_Stencil_Operation"/>
+ <field name="Stencil Pass Depth Pass Op" start="55" end="57" type="3D_Stencil_Operation"/>
<field name="Backface Stencil Test Function" start="52" end="54" type="3D_Compare_Function"/>
- <field name="Backface Stencil Fail Op" start="49" end="51" type="uint"/>
- <field name="Backface Stencil Pass Depth Fail Op" start="46" end="48" type="uint"/>
- <field name="Backface Stencil Pass Depth Pass Op" start="43" end="45" type="uint"/>
+ <field name="Backface Stencil Fail Op" start="49" end="51" type="3D_Stencil_Operation"/>
+ <field name="Backface Stencil Pass Depth Fail Op" start="46" end="48" type="3D_Stencil_Operation"/>
+ <field name="Backface Stencil Pass Depth Pass Op" start="43" end="45" type="3D_Stencil_Operation"/>
<field name="Stencil Test Function" start="40" end="42" type="3D_Compare_Function"/>
<field name="Depth Test Function" start="37" end="39" type="3D_Compare_Function"/>
<field name="Double Sided Stencil Enable" start="36" end="36" type="bool"/>
diff --git a/src/intel/genxml/gen9.xml b/src/intel/genxml/gen9.xml
index b9dcc54..bda1c73 100644
--- a/src/intel/genxml/gen9.xml
+++ b/src/intel/genxml/gen9.xml
@@ -2595,13 +2595,13 @@
<field name="3D Command Opcode" start="24" end="26" type="uint" default="0"/>
<field name="3D Command Sub Opcode" start="16" end="23" type="uint" default="78"/>
<field name="DWord Length" start="0" end="7" type="uint" default="2"/>
- <field name="Stencil Fail Op" start="61" end="63" type="uint"/>
- <field name="Stencil Pass Depth Fail Op" start="58" end="60" type="uint"/>
- <field name="Stencil Pass Depth Pass Op" start="55" end="57" type="uint"/>
+ <field name="Stencil Fail Op" start="61" end="63" type="3D_Stencil_Operation"/>
+ <field name="Stencil Pass Depth Fail Op" start="58" end="60" type="3D_Stencil_Operation"/>
+ <field name="Stencil Pass Depth Pass Op" start="55" end="57" type="3D_Stencil_Operation"/>
<field name="Backface Stencil Test Function" start="52" end="54" type="3D_Compare_Function"/>
- <field name="Backface Stencil Fail Op" start="49" end="51" type="uint"/>
- <field name="Backface Stencil Pass Depth Fail Op" start="46" end="48" type="uint"/>
- <field name="Backface Stencil Pass Depth Pass Op" start="43" end="45" type="uint"/>
+ <field name="Backface Stencil Fail Op" start="49" end="51" type="3D_Stencil_Operation"/>
+ <field name="Backface Stencil Pass Depth Fail Op" start="46" end="48" type="3D_Stencil_Operation"/>
+ <field name="Backface Stencil Pass Depth Pass Op" start="43" end="45" type="3D_Stencil_Operation"/>
<field name="Stencil Test Function" start="40" end="42" type="3D_Compare_Function"/>
<field name="Depth Test Function" start="37" end="39" type="3D_Compare_Function"/>
<field name="Double Sided Stencil Enable" start="36" end="36" type="bool"/>
--
2.9.3
More information about the mesa-dev
mailing list