pan/decode: Hoist shader-db stats to shared decode
[mesa.git] / src / panfrost / midgard / disassemble.h
index ca578b7d3aa27070ef52725958cb1b8549587d1f..dacc7a16d5dcc72ab890de5690411e1b211b0376 100644 (file)
@@ -1,2 +1,23 @@
 #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);