v3d: Pass the whole clif_dump structure to v3d_print_group().
[mesa.git] / src / gallium / drivers / vc4 / vc4_cl_dump.c
index ca1b9a3152810feb7749e3b971bba0480eda6819..c5be426d132a667a2fce226f64d2deef8e85bbe0 100644 (file)
@@ -28,6 +28,7 @@
 #include "kernel/vc4_packet.h"
 
 #include "broadcom/cle/v3d_decoder.h"
+#include "broadcom/clif/clif_dump.h"
 
 void
 vc4_dump_cl(void *cl, uint32_t size, bool is_render)
@@ -41,6 +42,8 @@ vc4_dump_cl(void *cl, uint32_t size, bool is_render)
         };
         struct v3d_spec *spec = v3d_spec_load(&devinfo);
 
+        struct clif_dump *clif = clif_dump_init(&devinfo, stderr, NULL, NULL);
+
         uint32_t offset = 0, hw_offset = 0;
         uint8_t *p = cl;
 
@@ -60,7 +63,7 @@ vc4_dump_cl(void *cl, uint32_t size, bool is_render)
                 fprintf(stderr, "0x%08x 0x%08x: 0x%02x %s\n",
                         offset, hw_offset, header, v3d_group_get_name(inst));
 
-                v3d_print_group(stderr, inst, offset, p, "");
+                v3d_print_group(clif, inst, offset, p, "");
 
                 switch (header) {
                 case VC4_PACKET_HALT:
@@ -75,5 +78,7 @@ vc4_dump_cl(void *cl, uint32_t size, bool is_render)
                         hw_offset += length;
                 p += length;
         }
+
+        clif_dump_destroy(clif);
 }