#include <stdarg.h>
#include "util/list.h"
+struct clif_bo {
+ const char *name;
+ uint32_t offset;
+ uint32_t size;
+ void *vaddr;
+};
+
struct clif_dump {
const struct v3d_device_info *devinfo;
- bool (*lookup_vaddr)(void *data, uint32_t addr, void **vaddr);
FILE *out;
- /* Opaque data from the caller that is passed to the callbacks. */
- void *data;
struct v3d_spec *spec;
/* List of struct reloc_worklist_entry */
struct list_head worklist;
+
+ struct clif_bo *bo;
+ int bo_count;
+ int bo_array_size;
+
+ /**
+ * Flag to switch from CLIF ABI to slightly more human-readable
+ * output.
+ */
+ bool pretty;
};
enum reloc_worklist_type {
+ reloc_cl,
reloc_gl_shader_state,
reloc_generic_tile_list,
};
uint32_t addr;
union {
+ struct {
+ uint32_t end;
+ } cl;
struct {
uint32_t num_attrs;
} shader_state;
};
};
+struct clif_bo *
+clif_lookup_bo(struct clif_dump *clif, uint32_t addr);
+
struct reloc_worklist_entry *
clif_dump_add_address_to_worklist(struct clif_dump *clif,
enum reloc_worklist_type type,
bool v3d33_clif_dump_packet(struct clif_dump *clif, uint32_t offset,
const uint8_t *cl, uint32_t *size);
-void v3d33_clif_dump_gl_shader_state_record(struct clif_dump *clif,
- struct reloc_worklist_entry *reloc,
- void *vaddr);
bool v3d41_clif_dump_packet(struct clif_dump *clif, uint32_t offset,
const uint8_t *cl, uint32_t *size);
-void v3d41_clif_dump_gl_shader_state_record(struct clif_dump *clif,
- struct reloc_worklist_entry *reloc,
- void *vaddr);
bool v3d42_clif_dump_packet(struct clif_dump *clif, uint32_t offset,
const uint8_t *cl, uint32_t *size);
-void v3d42_clif_dump_gl_shader_state_record(struct clif_dump *clif,
- struct reloc_worklist_entry *reloc,
- void *vaddr);
static inline void
out(struct clif_dump *clif, const char *fmt, ...)