From 2d7e837716f3b91c694acbc6a986a0b27fe19f2d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Fri, 21 Jun 2013 11:12:31 +0100 Subject: [PATCH] tools/trace: Quick instructions/notes. Reviewed-by: Brian Paul --- src/gallium/tools/trace/README.txt | 39 ++++++++++++++++++++++++++++++ src/gallium/tools/trace/TODO.txt | 9 +++++++ 2 files changed, 48 insertions(+) create mode 100644 src/gallium/tools/trace/README.txt create mode 100644 src/gallium/tools/trace/TODO.txt diff --git a/src/gallium/tools/trace/README.txt b/src/gallium/tools/trace/README.txt new file mode 100644 index 00000000000..830cd150fab --- /dev/null +++ b/src/gallium/tools/trace/README.txt @@ -0,0 +1,39 @@ +These directory contains tools for manipulating traces produced by the trace +pipe driver. + + +Most debug builds of state trackers already load the trace driver by default. +To produce a trace do + + export GALLIUM_TRACE=foo.gtrace + +and run the application. You can choose any name, but the .gtrace is +recommended to avoid confusion with the .trace produced by apitrace. + + +You can dump a trace by doing + + ./dump.py foo.gtrace | less + + +You can dump a JSON file describing the static state at any given draw call +(e.g., 12345) by +doing + + ./dump_state.py -v -c 12345 foo.gtrace > foo.json + +or by specifying the n-th (e.g, 1st) draw call by doing + + ./dump_state.py -v -d 1 foo.gtrace > foo.json + +The state is derived from the call sequence in the trace file, so no dynamic +(eg. rendered textures) is included. + + +You can compare two JSON files by doing + + ./diff_state.py foo.json boo.json | less + +If you're investigating a regression in a state tracker, you can obtain a good +and bad trace, dump respective state in JSON, and then compare the states to +identify the problem. diff --git a/src/gallium/tools/trace/TODO.txt b/src/gallium/tools/trace/TODO.txt new file mode 100644 index 00000000000..8bb8cfdc047 --- /dev/null +++ b/src/gallium/tools/trace/TODO.txt @@ -0,0 +1,9 @@ +* track more state + + * constant buffers + +* organize state better (e.g., group stuff according to the place in the + pipeline) + +* write an utility that generated a simple graw C code that matches a + state dump. -- 2.30.2