Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 3.2k
    • Issues 3.2k
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1k
    • Merge requests 1k
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MesaMesa
  • mesamesa
  • Merge requests
  • !19444

freedreno,turnip: Add tooling to edit command streams and use them in 'replay'

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Danylo Piliaiev requested to merge Danil/mesa:freedreno/feature/cmdstream-editing into main Nov 01, 2022
  • Overview 14
  • Commits 9
  • Pipelines 24
  • Changes 14

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 .rd that you want to edit, in next steps it would be identified by its number (cmdstream[%csnumber%])
  • rddecompiler -s %csnumber% trace.rd > generate_rd.c
  • Edit the code
  • Compile it using the example meson.build which uses Mesa as a subproject
  • replay trace.rd --override=%csnumber% --generator=/path/to/generate_rd

Example of generated code: Danil/mesa$7150

Current limitations:

  • No CP_LOAD_STATE6 editing;
  • packet's values are in numeric format, the decoded values are in the comments.

WIP because I there is probably some cleaning to do.

Edited Nov 03, 2022 by Danylo Piliaiev
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: freedreno/feature/cmdstream-editing