intel/genxml: Use enum 3D_Stencil_Operation where applicable
authorKristian H. Kristensen <hoegsberg@gmail.com>
Tue, 29 Nov 2016 01:10:57 +0000 (17:10 -0800)
committerKristian H. Kristensen <hoegsberg@gmail.com>
Wed, 30 Nov 2016 06:02:49 +0000 (22:02 -0800)
Signed-off-by: Kristian H. Kristensen <hoegsberg@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/genxml/gen6.xml
src/intel/genxml/gen7.xml
src/intel/genxml/gen75.xml
src/intel/genxml/gen8.xml
src/intel/genxml/gen9.xml

index 732a76c40e16f559f0dd2564a0d920be657b3698..57b69a40de96ff733b237f2faba585d7c2a2bc9c 100644 (file)
     <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"/>
   <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"/>
index dd63742fec2e628de99ca3dae74174882a04f4a9..020e2944f4ac1e64f5a73b6f4c2a10dea7b7969c 100644 (file)
     <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"/>
   <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"/>
index b5e27d08de296d6a9491c8ee5df4851592034f9b..ffe241bc0a67da05fdfe3d1dbaf9c3aeca9d4238 100644 (file)
     <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"/>
   <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"/>
index 2695721bd4d9e88b57e284e95f171d5bcf8fea07..7ae6d1377d1986797f7b6d5af75c51818c34b62a 100644 (file)
     <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"/>
index b9dcc548fb6ffc2da687fa7ad12a29c4cfb0dd63..bda1c73309f9ff23114eebdcba3a6da3dc4a4d15 100644 (file)
     <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"/>