OSDN Git Service

v3d: Move clif dumping to a separate step from noting where the CLs are.
authorEric Anholt <eric@anholt.net>
Mon, 25 Jun 2018 22:02:26 +0000 (15:02 -0700)
committerEric Anholt <eric@anholt.net>
Sat, 28 Jul 2018 00:08:35 +0000 (17:08 -0700)
Now all the printing happens from the same worklist processing.

src/broadcom/clif/clif_dump.c
src/broadcom/clif/clif_private.h
src/gallium/drivers/v3d/v3d_job.c

index fe68b51..b48a156 100644 (file)
@@ -170,6 +170,11 @@ clif_process_worklist(struct clif_dump *clif)
                 }
 
                 switch (reloc->type) {
+                case reloc_cl:
+                        clif_dump_cl(clif, reloc->addr, reloc->cl.end);
+                        out(clif, "\n");
+                        break;
+
                 case reloc_gl_shader_state:
                         clif_dump_gl_shader_state_record(clif,
                                                          reloc,
@@ -184,13 +189,18 @@ clif_process_worklist(struct clif_dump *clif)
         }
 }
 
+void clif_dump(struct clif_dump *clif)
+{
+        clif_process_worklist(clif);
+}
+
 void
 clif_dump_add_cl(struct clif_dump *clif, uint32_t start, uint32_t end)
 {
-        clif_dump_cl(clif, start, end);
-        out(clif, "\n");
+        struct reloc_worklist_entry *entry =
+                clif_dump_add_address_to_worklist(clif, reloc_cl, start);
 
-        clif_process_worklist(clif);
+        entry->cl.end = end;
 }
 
 void
index 0d762c4..da5f2a3 100644 (file)
@@ -50,6 +50,7 @@ struct clif_dump {
 };
 
 enum reloc_worklist_type {
+        reloc_cl,
         reloc_gl_shader_state,
         reloc_generic_tile_list,
 };
@@ -62,6 +63,9 @@ struct reloc_worklist_entry {
 
         union {
                 struct {
+                        uint32_t end;
+                } cl;
+                struct {
                         uint32_t num_attrs;
                 } shader_state;
                 struct {
index 20f8bcc..54b2c8d 100644 (file)
@@ -371,6 +371,8 @@ v3d_clif_dump(struct v3d_context *v3d, struct v3d_job *job)
                 job->submit.rcl_start, job->submit.rcl_end);
         clif_dump_add_cl(clif, job->submit.rcl_start, job->submit.rcl_end);
 
+        clif_dump(clif);
+
         clif_dump_destroy(clif);
 }