intel/genxml: Use blend function and factor enums where applicable
authorKristian H. Kristensen <hoegsberg@gmail.com>
Tue, 29 Nov 2016 01:42:46 +0000 (17:42 -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 69f11c4718dd0b02d259068bc6cf3d1beffd6e44..de626a72b738e53b9b11bdce83954acc77ddadd0 100644 (file)
     <value name="STORE_PID" value="7"/>
   </enum>
 
+  <enum name="3D_Color_Buffer_Blend_Function" prefix="BLENDFUNCTION">
+    <value name="ADD" value="0"/>
+    <value name="SUBTRACT" value="1"/>
+    <value name="REVERSE_SUBTRACT" value="2"/>
+    <value name="MIN" value="3"/>
+    <value name="MAX" value="4"/>
+  </enum>
+
+  <enum name="3D_Color_Buffer_Blend_Factor" prefix="BLENDFACTOR">
+    <value name="ONE" value="1"/>
+    <value name="SRC_COLOR" value="2"/>
+    <value name="SRC_ALPHA" value="3"/>
+    <value name="DST_ALPHA" value="4"/>
+    <value name="DST_COLOR" value="5"/>
+    <value name="SRC_ALPHA_SATURATE" value="6"/>
+    <value name="CONST_COLOR" value="7"/>
+    <value name="CONST_ALPHA" value="8"/>
+    <value name="SRC1_COLOR" value="9"/>
+    <value name="SRC1_ALPHA" value="10"/>
+    <value name="ZERO" value="17"/>
+    <value name="INV_SRC_COLOR" value="18"/>
+    <value name="INV_SRC_ALPHA" value="19"/>
+    <value name="INV_DST_ALPHA" value="20"/>
+    <value name="INV_DST_COLOR" value="21"/>
+    <value name="INV_CONST_COLOR" value="23"/>
+    <value name="INV_CONST_ALPHA" value="24"/>
+    <value name="INV_SRC1_COLOR" value="25"/>
+    <value name="INV_SRC1_ALPHA" value="26"/>
+  </enum>
+
   <enum name="3D_Compare_Function" prefix="COMPAREFUNCTION">
     <value name="ALWAYS" value="0"/>
     <value name="NEVER" value="1"/>
   <struct name="BLEND_STATE_ENTRY" length="2">
     <field name="Color Buffer Blend Enable" start="31" end="31" type="bool"/>
     <field name="Independent Alpha Blend Enable" start="30" end="30" type="bool"/>
-    <field name="Alpha Blend Function" start="26" end="28" type="uint">
-      <value name="BLENDFUNCTION_ADD" value="0"/>
-      <value name="BLENDFUNCTION_SUBTRACT" value="1"/>
-      <value name="BLENDFUNCTION_REVERSE_SUBTRACT" value="2"/>
-      <value name="BLENDFUNCTION_MIN" value="3"/>
-      <value name="BLENDFUNCTION_MAX" value="4"/>
-    </field>
-    <field name="Source Alpha Blend Factor" start="20" end="24" type="uint">
-      <value name="BLENDFACTOR_ONE" value="1"/>
-      <value name="BLENDFACTOR_SRC_COLOR" value="2"/>
-      <value name="BLENDFACTOR_SRC_ALPHA" value="3"/>
-      <value name="BLENDFACTOR_DST_ALPHA" value="4"/>
-      <value name="BLENDFACTOR_DST_COLOR" value="5"/>
-      <value name="BLENDFACTOR_SRC_ALPHA_SATURATE" value="6"/>
-      <value name="BLENDFACTOR_CONST_COLOR" value="7"/>
-      <value name="BLENDFACTOR_CONST_ALPHA" value="8"/>
-      <value name="BLENDFACTOR_SRC1_COLOR" value="9"/>
-      <value name="BLENDFACTOR_SRC1_ALPHA" value="10"/>
-      <value name="BLENDFACTOR_ZERO" value="17"/>
-      <value name="BLENDFACTOR_INV_SRC_COLOR" value="18"/>
-      <value name="BLENDFACTOR_INV_SRC_ALPHA" value="19"/>
-      <value name="BLENDFACTOR_INV_DST_ALPHA" value="20"/>
-      <value name="BLENDFACTOR_INV_DST_COLOR" value="21"/>
-      <value name="BLENDFACTOR_INV_CONST_COLOR" value="23"/>
-      <value name="BLENDFACTOR_INV_CONST_ALPHA" value="24"/>
-      <value name="BLENDFACTOR_INV_SRC1_COLOR" value="25"/>
-      <value name="BLENDFACTOR_INV_SRC1_ALPHA" value="26"/>
-    </field>
-    <field name="Destination Alpha Blend Factor" start="15" end="19" type="uint"/>
-    <field name="Color Blend Function" start="11" end="13" type="uint">
-      <value name="BLENDFUNCTION_ADD" value="0"/>
-      <value name="BLENDFUNCTION_SUBTRACT" value="1"/>
-      <value name="BLENDFUNCTION_REVERSE_SUBTRACT" value="2"/>
-      <value name="BLENDFUNCTION_MIN  " value="3"/>
-      <value name="BLENDFUNCTION_MAX" value="4"/>
-    </field>
-    <field name="Source Blend Factor" start="5" end="9" type="uint"/>
-    <field name="Destination Blend Factor" start="0" end="4" type="uint"/>
+    <field name="Alpha Blend Function" start="26" end="28" type="3D_Color_Buffer_Blend_Function"/>
+    <field name="Source Alpha Blend Factor" start="20" end="24" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Destination Alpha Blend Factor" start="15" end="19" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Color Blend Function" start="11" end="13" type="3D_Color_Buffer_Blend_Function"/>
+    <field name="Source Blend Factor" start="5" end="9" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Destination Blend Factor" start="0" end="4" type="3D_Color_Buffer_Blend_Factor"/>
     <field name="AlphaToCoverage Enable" start="63" end="63" type="bool"/>
     <field name="AlphaToOne Enable" start="62" end="62" type="bool"/>
     <field name="AlphaToCoverage Dither Enable" start="61" end="61" type="bool"/>
index 65e2240ae5430ae0d4bd9b9f9d67a358cd101a81..2c269d47aa74b433c0b6652fdc95faa16ac15c4f 100644 (file)
     <value name="INVERT" value="7"/>
   </enum>
 
+  <enum name="3D_Color_Buffer_Blend_Factor" prefix="BLENDFACTOR">
+    <value name="ONE" value="1"/>
+    <value name="SRC_COLOR" value="2"/>
+    <value name="SRC_ALPHA" value="3"/>
+    <value name="DST_ALPHA" value="4"/>
+    <value name="DST_COLOR" value="5"/>
+    <value name="SRC_ALPHA_SATURATE" value="6"/>
+    <value name="CONST_COLOR" value="7"/>
+    <value name="CONST_ALPHA" value="8"/>
+    <value name="SRC1_COLOR" value="9"/>
+    <value name="SRC1_ALPHA" value="10"/>
+    <value name="ZERO" value="17"/>
+    <value name="INV_SRC_COLOR" value="18"/>
+    <value name="INV_SRC_ALPHA" value="19"/>
+    <value name="INV_DST_ALPHA" value="20"/>
+    <value name="INV_DST_COLOR" value="21"/>
+    <value name="INV_CONST_COLOR" value="23"/>
+    <value name="INV_CONST_ALPHA" value="24"/>
+    <value name="INV_SRC1_COLOR" value="25"/>
+    <value name="INV_SRC1_ALPHA" value="26"/>
+  </enum>
+
+  <enum name="3D_Color_Buffer_Blend_Function" prefix="BLENDFUNCTION">
+    <value name="ADD" value="0"/>
+    <value name="SUBTRACT" value="1"/>
+    <value name="REVERSE_SUBTRACT" value="2"/>
+    <value name="MIN" value="3"/>
+    <value name="MAX" value="4"/>
+  </enum>
+
   <enum name="3D_Compare_Function" prefix="COMPAREFUNCTION">
     <value name="ALWAYS" value="0"/>
     <value name="NEVER" value="1"/>
   <struct name="BLEND_STATE_ENTRY" length="2">
     <field name="Color Buffer Blend Enable" start="31" end="31" type="bool"/>
     <field name="Independent Alpha Blend Enable" start="30" end="30" type="bool"/>
-    <field name="Alpha Blend Function" start="26" end="28" type="uint">
-      <value name="BLENDFUNCTION_ADD" value="0"/>
-      <value name="BLENDFUNCTION_SUBTRACT" value="1"/>
-      <value name="BLENDFUNCTION_REVERSE_SUBTRACT" value="2"/>
-      <value name="BLENDFUNCTION_MIN" value="3"/>
-      <value name="BLENDFUNCTION_MAX" value="4"/>
-    </field>
-    <field name="Source Alpha Blend Factor" start="20" end="24" type="uint">
-      <value name="BLENDFACTOR_ONE" value="1"/>
-      <value name="BLENDFACTOR_SRC_COLOR" value="2"/>
-      <value name="BLENDFACTOR_SRC_ALPHA" value="3"/>
-      <value name="BLENDFACTOR_DST_ALPHA" value="4"/>
-      <value name="BLENDFACTOR_DST_COLOR" value="5"/>
-      <value name="BLENDFACTOR_SRC_ALPHA_SATURATE" value="6"/>
-      <value name="BLENDFACTOR_CONST_COLOR" value="7"/>
-      <value name="BLENDFACTOR_CONST_ALPHA" value="8"/>
-      <value name="BLENDFACTOR_SRC1_COLOR" value="9"/>
-      <value name="BLENDFACTOR_SRC1_ALPHA" value="10"/>
-      <value name="BLENDFACTOR_ZERO" value="17"/>
-      <value name="BLENDFACTOR_INV_SRC_COLOR" value="18"/>
-      <value name="BLENDFACTOR_INV_SRC_ALPHA" value="19"/>
-      <value name="BLENDFACTOR_INV_DST_ALPHA" value="20"/>
-      <value name="BLENDFACTOR_INV_DST_COLOR" value="21"/>
-      <value name="BLENDFACTOR_INV_CONST_COLOR" value="23"/>
-      <value name="BLENDFACTOR_INV_CONST_ALPHA" value="24"/>
-      <value name="BLENDFACTOR_INV_SRC1_COLOR" value="25"/>
-      <value name="BLENDFACTOR_INV_SRC1_ALPHA" value="26"/>
-    </field>
-    <field name="Destination Alpha Blend Factor" start="15" end="19" type="uint"/>
-    <field name="Color Blend Function" start="11" end="13" type="uint">
-      <value name="BLENDFUNCTION_ADD" value="0"/>
-      <value name="BLENDFUNCTION_SUBTRACT" value="1"/>
-      <value name="BLENDFUNCTION_REVERSE_SUBTRACT" value="2"/>
-      <value name="BLENDFUNCTION_MIN  " value="3"/>
-      <value name="BLENDFUNCTION_MAX" value="4"/>
-    </field>
-    <field name="Source Blend Factor" start="5" end="9" type="uint"/>
-    <field name="Destination Blend Factor" start="0" end="4" type="uint"/>
+    <field name="Alpha Blend Function" start="26" end="28" type="3D_Color_Buffer_Blend_Function"/>
+    <field name="Source Alpha Blend Factor" start="20" end="24" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Destination Alpha Blend Factor" start="15" end="19" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Color Blend Function" start="11" end="13" type="3D_Color_Buffer_Blend_Function"/>
+    <field name="Source Blend Factor" start="5" end="9" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Destination Blend Factor" start="0" end="4" type="3D_Color_Buffer_Blend_Factor"/>
     <field name="AlphaToCoverage Enable" start="63" end="63" type="bool"/>
     <field name="AlphaToOne Enable" start="62" end="62" type="bool"/>
     <field name="AlphaToCoverage Dither Enable" start="61" end="61" type="bool"/>
index e5fbe15c63cdaf0c690fc049919fc7f856ead1ce..0104236198d2d75261cff3862f2f34e7cd149ac7 100644 (file)
     <value name="INVERT" value="7"/>
   </enum>
 
+  <enum name="3D_Color_Buffer_Blend_Factor" prefix="BLENDFACTOR">
+    <value name="ONE" value="1"/>
+    <value name="SRC_COLOR" value="2"/>
+    <value name="SRC_ALPHA" value="3"/>
+    <value name="DST_ALPHA" value="4"/>
+    <value name="DST_COLOR" value="5"/>
+    <value name="SRC_ALPHA_SATURATE" value="6"/>
+    <value name="CONST_COLOR" value="7"/>
+    <value name="CONST_ALPHA" value="8"/>
+    <value name="SRC1_COLOR" value="9"/>
+    <value name="SRC1_ALPHA" value="10"/>
+    <value name="ZERO" value="17"/>
+    <value name="INV_SRC_COLOR" value="18"/>
+    <value name="INV_SRC_ALPHA" value="19"/>
+    <value name="INV_DST_ALPHA" value="20"/>
+    <value name="INV_DST_COLOR" value="21"/>
+    <value name="INV_CONST_COLOR" value="23"/>
+    <value name="INV_CONST_ALPHA" value="24"/>
+    <value name="INV_SRC1_COLOR" value="25"/>
+    <value name="INV_SRC1_ALPHA" value="26"/>
+  </enum>
+
+  <enum name="3D_Color_Buffer_Blend_Function" prefix="BLENDFUNCTION">
+    <value name="ADD" value="0"/>
+    <value name="SUBTRACT" value="1"/>
+    <value name="REVERSE_SUBTRACT" value="2"/>
+    <value name="MIN" value="3"/>
+    <value name="MAX" value="4"/>
+  </enum>
+
   <enum name="3D_Compare_Function" prefix="COMPAREFUNCTION">
     <value name="ALWAYS" value="0"/>
     <value name="NEVER" value="1"/>
   <struct name="BLEND_STATE_ENTRY" length="2">
     <field name="Color Buffer Blend Enable" start="31" end="31" type="bool"/>
     <field name="Independent Alpha Blend Enable" start="30" end="30" type="bool"/>
-    <field name="Alpha Blend Function" start="26" end="28" type="uint">
-      <value name="BLENDFUNCTION_ADD" value="0"/>
-      <value name="BLENDFUNCTION_SUBTRACT" value="1"/>
-      <value name="BLENDFUNCTION_REVERSE_SUBTRACT" value="2"/>
-      <value name="BLENDFUNCTION_MIN" value="3"/>
-      <value name="BLENDFUNCTION_MAX" value="4"/>
-    </field>
-    <field name="Source Alpha Blend Factor" start="20" end="24" type="uint">
-      <value name="BLENDFACTOR_ONE" value="1"/>
-      <value name="BLENDFACTOR_SRC_COLOR" value="2"/>
-      <value name="BLENDFACTOR_SRC_ALPHA" value="3"/>
-      <value name="BLENDFACTOR_DST_ALPHA" value="4"/>
-      <value name="BLENDFACTOR_DST_COLOR" value="5"/>
-      <value name="BLENDFACTOR_SRC_ALPHA_SATURATE" value="6"/>
-      <value name="BLENDFACTOR_CONST_COLOR" value="7"/>
-      <value name="BLENDFACTOR_CONST_ALPHA" value="8"/>
-      <value name="BLENDFACTOR_SRC1_COLOR" value="9"/>
-      <value name="BLENDFACTOR_SRC1_ALPHA" value="10"/>
-      <value name="BLENDFACTOR_ZERO" value="17"/>
-      <value name="BLENDFACTOR_INV_SRC_COLOR" value="18"/>
-      <value name="BLENDFACTOR_INV_SRC_ALPHA" value="19"/>
-      <value name="BLENDFACTOR_INV_DST_ALPHA" value="20"/>
-      <value name="BLENDFACTOR_INV_DST_COLOR" value="21"/>
-      <value name="BLENDFACTOR_INV_CONST_COLOR" value="23"/>
-      <value name="BLENDFACTOR_INV_CONST_ALPHA" value="24"/>
-      <value name="BLENDFACTOR_INV_SRC1_COLOR" value="25"/>
-      <value name="BLENDFACTOR_INV_SRC1_ALPHA" value="26"/>
-    </field>
-    <field name="Destination Alpha Blend Factor" start="15" end="19" type="uint"/>
-    <field name="Color Blend Function" start="11" end="13" type="uint">
-      <value name="BLENDFUNCTION_ADD" value="0"/>
-      <value name="BLENDFUNCTION_SUBTRACT" value="1"/>
-      <value name="BLENDFUNCTION_REVERSE_SUBTRACT" value="2"/>
-      <value name="BLENDFUNCTION_MIN  " value="3"/>
-      <value name="BLENDFUNCTION_MAX" value="4"/>
-    </field>
-    <field name="Source Blend Factor" start="5" end="9" type="uint"/>
-    <field name="Destination Blend Factor" start="0" end="4" type="uint"/>
+    <field name="Alpha Blend Function" start="26" end="28" type="3D_Color_Buffer_Blend_Function"/>
+    <field name="Source Alpha Blend Factor" start="20" end="24" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Destination Alpha Blend Factor" start="15" end="19" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Color Blend Function" start="11" end="13" type="3D_Color_Buffer_Blend_Function"/>
+    <field name="Source Blend Factor" start="5" end="9" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Destination Blend Factor" start="0" end="4" type="3D_Color_Buffer_Blend_Factor"/>
     <field name="AlphaToCoverage Enable" start="63" end="63" type="bool"/>
     <field name="AlphaToOne Enable" start="62" end="62" type="bool"/>
     <field name="AlphaToCoverage Dither Enable" start="61" end="61" type="bool"/>
index f55c121a430899131add6edf8decb5d62f683190..f9c1ab3fed9c03c03a7ddd41b9c0797b08f62cc4 100644 (file)
     <field name="Pre-Blend Color Clamp Enable" start="33" end="33" type="bool"/>
     <field name="Post-Blend Color Clamp Enable" start="32" end="32" type="bool"/>
     <field name="Color Buffer Blend Enable" start="31" end="31" type="bool"/>
-    <field name="Source Blend Factor" start="26" end="30" type="uint"/>
-    <field name="Destination Blend Factor" start="21" end="25" type="uint"/>
-    <field name="Color Blend Function" start="18" end="20" type="uint"/>
-    <field name="Source Alpha Blend Factor" start="13" end="17" type="uint"/>
-    <field name="Destination Alpha Blend Factor" start="8" end="12" type="uint"/>
-    <field name="Alpha Blend Function" start="5" end="7" type="uint"/>
+    <field name="Source Blend Factor" start="26" end="30" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Destination Blend Factor" start="21" end="25" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Color Blend Function" start="18" end="20" type="3D_Color_Buffer_Blend_Function"/>
+    <field name="Source Alpha Blend Factor" start="13" end="17" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Destination Alpha Blend Factor" start="8" end="12" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Alpha Blend Function" start="5" end="7" type="3D_Color_Buffer_Blend_Function"/>
     <field name="Write Disable Alpha" start="3" end="3" type="bool"/>
     <field name="Write Disable Red" start="2" end="2" type="bool"/>
     <field name="Write Disable Green" start="1" end="1" type="bool"/>
index 5c910748478c8388ce1fb20ed190d0c7471b76bd..5ba6ba155820f540ff5cb247b921e9bad2d047fc 100644 (file)
     <field name="Pre-Blend Color Clamp Enable" start="33" end="33" type="bool"/>
     <field name="Post-Blend Color Clamp Enable" start="32" end="32" type="bool"/>
     <field name="Color Buffer Blend Enable" start="31" end="31" type="bool"/>
-    <field name="Source Blend Factor" start="26" end="30" type="uint"/>
-    <field name="Destination Blend Factor" start="21" end="25" type="uint"/>
-    <field name="Color Blend Function" start="18" end="20" type="uint"/>
-    <field name="Source Alpha Blend Factor" start="13" end="17" type="uint"/>
-    <field name="Destination Alpha Blend Factor" start="8" end="12" type="uint"/>
-    <field name="Alpha Blend Function" start="5" end="7" type="uint"/>
+    <field name="Source Blend Factor" start="26" end="30" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Destination Blend Factor" start="21" end="25" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Color Blend Function" start="18" end="20" type="3D_Color_Buffer_Blend_Function"/>
+    <field name="Source Alpha Blend Factor" start="13" end="17" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Destination Alpha Blend Factor" start="8" end="12" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Alpha Blend Function" start="5" end="7" type="3D_Color_Buffer_Blend_Function"/>
     <field name="Write Disable Alpha" start="3" end="3" type="bool"/>
     <field name="Write Disable Red" start="2" end="2" type="bool"/>
     <field name="Write Disable Green" start="1" end="1" type="bool"/>
     <field name="Alpha To Coverage Enable" start="63" end="63" type="bool"/>
     <field name="Has Writeable RT" start="62" end="62" type="bool"/>
     <field name="Color Buffer Blend Enable" start="61" end="61" type="bool"/>
-    <field name="Source Alpha Blend Factor" start="56" end="60" type="uint"/>
-    <field name="Destination Alpha Blend Factor" start="51" end="55" type="uint"/>
-    <field name="Source Blend Factor" start="46" end="50" type="uint"/>
-    <field name="Destination Blend Factor" start="41" end="45" type="uint"/>
+    <field name="Source Alpha Blend Factor" start="56" end="60" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Destination Alpha Blend Factor" start="51" end="55" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Source Blend Factor" start="46" end="50" type="3D_Color_Buffer_Blend_Factor"/>
+    <field name="Destination Blend Factor" start="41" end="45" type="3D_Color_Buffer_Blend_Factor"/>
     <field name="Alpha Test Enable" start="40" end="40" type="bool"/>
     <field name="Independent Alpha Blend Enable" start="39" end="39" type="bool"/>
   </instruction>