#include <stddef.h>
-void disassemble_midgard(uint8_t *code, size_t size, bool stats, unsigned regs, const char *prefix);
+
+struct midgard_disasm_stats {
+ /* Counts gleaned from disassembly, or negative if the field cannot be
+ * inferred, for instance due to indirect access. If negative, the abs
+ * is the upper limit for the count. */
+
+ signed texture_count;
+ signed sampler_count;
+ signed attribute_count;
+ signed varying_count;
+ signed uniform_count;
+ signed uniform_buffer_count;
+ signed work_count;
+
+ /* These are pseudometrics for shader-db */
+ unsigned instruction_count;
+ unsigned bundle_count;
+ unsigned quadword_count;
+};
+
+struct midgard_disasm_stats
+disassemble_midgard(uint8_t *code, size_t size);