mesa/src/gallium/tools/trace
Yogesh Mohan Marimuthu 973e6f3be0 gallium: remove start_slot parameter from pipe_context::set_vertex_buffers
This patch removes start_slot from set_vertex_buffers() as suggested in
https://gitlab.freedesktop.org/mesa/mesa/-/issues/8142

compilation testing:
all gallium drivers, nine frontend compilation has been tested.
d3d10umd compilation has not been tested

driver, frontend testing:
only llvmpipe and radeonsi driver was tested running game

only the nine frontend changes are complex. All other changes are easy.
nine front end was using start slot and also using multi context.

nine frontend code changes:
In update_vertex_elements() and update_vertex_buffers(), the vertex
buffers or streams are ordered removing the holes. In update_vertex_elements()
the vertex_buffer_index is updated for pipe driver to match the ordered list.

v2: remove start_slot usage code from Marek (Marek Olšák)
v3: nine stream number holes mask code from Axel (Axel Davy)

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> (except nine, which is Ab)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22436>
2023-08-11 06:37:22 +00:00
..
diff_state.py
dump.py
dump_state.py gallium: remove start_slot parameter from pipe_context::set_vertex_buffers 2023-08-11 06:37:22 +00:00
format.py trace: Don't use italic escape code. 2023-01-27 12:05:17 +00:00
model.py gallium/tools: reimplement tracediff completely in Python 2022-06-28 11:40:58 +00:00
parse.py pytracediff: change how 'junk' calls are handled 2022-06-28 11:40:58 +00:00
pytracediff.py pytracediff: implement pager ('less') invocation internally 2022-06-28 11:40:58 +00:00
README.txt
TODO.txt docs: Remove graw related words 2022-10-19 10:56:00 +00:00
tracediff.sh gallium/tools: add option for ignoring junk calls in trace dumper 2022-06-28 11:40:58 +00:00

These directory contains tools for manipulating traces produced by the trace
pipe driver.


Most debug builds of gallium frontends 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 an gallium frontend, you can obtain a good
and bad trace, dump respective state in JSON, and then compare the states to
identify the problem.