panfrost: Refactor XML to permit non-IDVS jobs
authorAlyssa Rosenzweig <alyssa@collabora.com>
Thu, 17 Mar 2022 17:22:10 +0000 (13:22 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 18 Mar 2022 18:52:05 +0000 (18:52 +0000)
Tiler jobs look similar, but don't have the Allocations fields. Refactor to make
this possible to express.

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

src/panfrost/lib/genxml/decode.c
src/panfrost/lib/genxml/v9.xml

index 0d47760..4c4f179 100644 (file)
@@ -1266,7 +1266,8 @@ pandecode_malloc_vertex_job(const struct pandecode_mapped_memory *mem,
         struct mali_malloc_vertex_job_packed *PANDECODE_PTR_VAR(p, mem, job);
 
         DUMP_SECTION(MALLOC_VERTEX_JOB, PRIMITIVE, p, "Primitive:\n");
-        DUMP_SECTION(MALLOC_VERTEX_JOB, COUNTS, p, "Counts:\n");
+        DUMP_SECTION(MALLOC_VERTEX_JOB, INSTANCE_COUNT, p, "Instance count:\n");
+        DUMP_SECTION(MALLOC_VERTEX_JOB, ALLOCATION, p, "Allocation:\n");
         DUMP_SECTION(MALLOC_VERTEX_JOB, TILER, p, "Tiler:\n");
         DUMP_SECTION(MALLOC_VERTEX_JOB, SCISSOR, p, "Scissor:\n");
         DUMP_SECTION(MALLOC_VERTEX_JOB, PRIMITIVE_SIZE, p, "Primitive Size:\n");
index 6e4e58d..ef831fd 100644 (file)
     <field name="Shader" start="16:0" size="512" type="Shader Environment"/>
   </struct>
 
-  <struct name="IDVS Counts" size="4">
-    <field name="Instance count" start="0:0" size="32" type="uint"/>
-    <field name="Vertex packet stride" start="1:0" size="16" type="uint"/>
-    <field name="Vertex attribute stride" start="1:16" size="16" type="uint"/>
-    <field name="Tiler" size="64" start="2:0" type="address"/>
+  <struct name="Count" size="1">
+    <field name="Count" start="0:0" size="32" type="uint"/>
+  </struct>
+
+  <struct name="Allocation" size="1">
+    <field name="Vertex packet stride" start="0:0" size="16" type="uint"/>
+    <field name="Vertex attribute stride" start="0:16" size="16" type="uint"/>
   </struct>
 
   <struct name="Tiler Pointer" size="2">
   <aggregate name="Malloc Vertex Job" size="384" align="128">
     <section name="Header" offset="0" type="Job Header"/>
     <section name="Primitive" offset="32" type="Primitive"/>
-    <section name="Counts" offset="48" type="IDVS Counts"/>
+    <section name="Instance Count" offset="48" type="Count"/>
+    <section name="Allocation" offset="52" type="Allocation"/>
     <section name="Tiler" offset="56" type="Tiler Pointer"/>
     <section name="Scissor" offset="104" type="Scissor"/>
     <section name="Primitive Size" offset="112" type="Primitive Size"/>