asahi: Partially identify some missing index list stuff
authorAsahi Lina <lina@asahilina.net>
Thu, 11 May 2023 05:34:36 +0000 (14:34 +0900)
committerMarge Bot <emma+marge@anholt.net>
Thu, 11 May 2023 23:24:48 +0000 (23:24 +0000)
Still unclear what the extra 2 blocks do, but at least we know the
size/order now.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22971>

src/asahi/lib/cmdbuf.xml

index 7c61853..6aca927 100644 (file)
     <field name="Restart enable" size="1" start="16" type="bool"/> 
     <field name="Index size" size="3" start="17" type="Index size"/>
 
-    <!-- XXX: Might be backwards, not sure how to check that -->
-    <field name="Index buffer present" size="1" start="20" type="bool"/>
-    <field name="Index buffer size present" size="1" start="21" type="bool"/>
+    <field name="Index buffer size present" size="1" start="20" type="bool"/>
+    <field name="Index buffer present" size="1" start="21" type="bool"/>
 
-    <!-- XXX: Might be mixed up, not sure how to check that -->
+    <!-- Order in the cmdstream is the same as bit order for these -->
     <field name="Index count present" size="1" start="22" type="bool"/>
     <field name="Instance count present" size="1" start="23" type="bool"/>
     <field name="Start present" size="1" start="24" type="bool"/>
+    <!-- 2 words, 1st word is some kind of extra vertex offset? -->
+    <field name="Unk 1 present" size="1" start="25" type="bool"/>
     <field name="Indirect buffer present" size="1" start="26" type="bool"/>
+    <!-- 1 word, unknown purpose -->
+    <field name="Unk 2 present" size="1" start="27" type="bool"/>
 
     <field name="Block Type" size="3" start="29" type="VDM Block Type" default="Index List"/>
   </struct>