panfrost: Add XML for mali_vertex_tiler_postfix
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 24 Aug 2020 17:13:33 +0000 (13:13 -0400)
committerMarge Bot <eric+marge@anholt.net>
Fri, 28 Aug 2020 14:53:53 +0000 (14:53 +0000)
This is a bit of everything but overall sets up the draw state.
Translating fairly directly from the header. Main structural change is
breaking out a 2-bit enum for occlusion query mode instead of
maintaining separate booleans for the modes.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476>

src/panfrost/lib/midgard.xml

index 1d9a2b72918e49f8ea7519c4fce3e472b40a3292..a6c96b35d730e3f16dbf6f1df40f70ccd4bb7a47 100644 (file)
     <value name="Layered" value="3"/>
   </enum>
 
+  <enum name="Occlusion Mode">
+    <value name="Disabled" value="0"/>
+    <value name="Predicate" value="1"/>
+    <value name="Counter" value="3"/>
+  </enum>
+
   <enum name="Stencil Op">
     <value name="Keep" value="0"/>
     <value name="Replace" value="1"/>
     <field name="Shader" size="64" start="2:0" type="address"/>
   </struct>
 
+  <struct name="Draw" size="30">
+    <field name="Unknown 1" size="3" start="0:0" type="uint"/>
+    <field name="Occlusion query" size="2" start="0:3" type="Occlusion Mode" default="Disabled"/>
+    <field name="Front face CCW" size="1" start="0:5" type="bool"/>
+    <field name="Cull front face" size="1" start="0:6" type="bool"/>
+    <field name="Cull back face" size="1" start="0:7" type="bool"/>
+    <!-- TODO 0:7-0:15 -->
+    <field name="Instances" size="8" start="0:16" type="padded" default="1"/>
+    <!-- TODO: 0:16-0:24 -->
+    <field name="Offset start" size="32" start="1:0" type="uint"/>
+    <!-- TODO: 2-3 -->
+    <field name="Position" size="64" start="4:0" type="address"/>
+    <field name="Uniform buffers" size="64" start="6:0" type="address"/>
+    <field name="Textures" size="64" start="8:0" type="address"/>
+    <field name="Samplers" size="64" start="10:0" type="address"/>
+    <field name="Push uniforms" size="64" start="12:0" type="address"/>
+    <field name="State" size="64" start="14:0" type="address"/>
+    <field name="Attribute buffers" size="64" start="16:0" type="address"/>
+    <field name="Attributes" size="64" start="18:0" type="address"/>
+    <field name="Varying buffers" size="64" start="20:0" type="address"/>
+    <field name="Varyings" size="64" start="22:0" type="address"/>
+    <field name="Viewport" size="64" start="24:0" type="address"/>
+    <field name="Occlusion" size="64" start="26:0" type="address"/>
+    <field name="Shared" size="64" start="28:0" type="address"/>
+  </struct>
+
   <struct name="Midgard Sampler">
     <field name="Magnify Nearest" size="1" start="0" type="bool" default="true"/>
     <field name="Minify Nearest" size="1" start="1" type="bool" default="true"/>