Merged requested to merge Danil/mesa:freedreno/feature/cmdstream-editing into main
In !19171 (merged) there was a first half of the puzzle, here is the second one.
I chose a similar path to what @krh did in https://gitlab.freedesktop.org/krh/fdtrace. Though instead of decompiling all cmdstreams (and creating a standalone replayer), which could be too much for a big traces, I chose to narrow decompiling and editing to a single cmdstream (which could be picked).
So the idea is:
- Find cmdstream in
.rdthat you want to edit, in next steps it would be identified by its number (
rddecompiler -s %csnumber% trace.rd > generate_rd.c
- Edit the code
- Compile it using the example
meson.buildwhich uses Mesa as a subproject
replay trace.rd --override=%csnumber% --generator=/path/to/generate_rd
Example of generated code: Danil/mesa$7150
- packet's values are in numeric format, the decoded values are in the comments.
WIP because I there is probably some cleaning to do.