freedreno/decode: Add cffrawdump tool
Dumps registers, commands and raw shader instructions in a way that is easily parseable and "fast" (rnn lookups aren't that fast).
Example of output format:
0x002e CP_SET_BIN_DATA5_OFFSET[0] 0x10000 { VSC_SIZE = 1 | VSC_N = 0 }
0x002e CP_SET_BIN_DATA5_OFFSET[1] 0x2080 { BIN_DATA_OFFSET = 8320 }
0x002e CP_SET_BIN_DATA5_OFFSET[2] 0x8 { BIN_SIZE_OFFSET = 8 }
0x80f0 GRAS_SC_WINDOW_SCISSOR_TL 0x240 { X = 576 | Y = 0 }
0x80f1 GRAS_SC_WINDOW_SCISSOR_BR 0x2cf02ff { X = 767 | Y = 719 }
0xae08 0xae08 0x400
0xae09 0xae09 0x430800
0xae0a 0xae0a 0x0
0xa81b SP_VS_OBJ_FIRST_EXEC_OFFSET 0x0 0
0x038200000000000a
0x0282000000000009
0xc02600fc00c78100
Made to process a large number of traces in order to build a database of unique register, cp command, and shader instruction values.
Why not modify cffdump or use lua scripting?
cffdump already has a lot of toggles and arcane conditions, it was easier to have a separate tool than to coerce cffdump to output in a suitable format and be fast enough to process hundreds of gigabytes of compressed traces.