Path: blob/21.2-virgl/src/gallium/tools/trace/README.txt
4561 views
These directory contains tools for manipulating traces produced by the trace1pipe driver.234Most debug builds of gallium frontends already load the trace driver by default.5To produce a trace do67export GALLIUM_TRACE=foo.gtrace89and run the application. You can choose any name, but the .gtrace is10recommended to avoid confusion with the .trace produced by apitrace.111213You can dump a trace by doing1415./dump.py foo.gtrace | less161718You can dump a JSON file describing the static state at any given draw call19(e.g., 12345) by20doing2122./dump_state.py -v -c 12345 foo.gtrace > foo.json2324or by specifying the n-th (e.g, 1st) draw call by doing2526./dump_state.py -v -d 1 foo.gtrace > foo.json2728The state is derived from the call sequence in the trace file, so no dynamic29(eg. rendered textures) is included.303132You can compare two JSON files by doing3334./diff_state.py foo.json boo.json | less3536If you're investigating a regression in an gallium frontend, you can obtain a good37and bad trace, dump respective state in JSON, and then compare the states to38identify the problem.394041