blob: ac9f8ad5662edbaeb7ef791d4959bc0753f2342f [file] [log] [blame]
Thomas Wood84f23412014-10-29 11:18:27 +00001Intel GPU Tools
2===============
3
4Description
5-----------
6
7Intel GPU Tools is a collection of tools for development and testing of the
8Intel DRM driver. There are many macro-level test suites that get used against
9the driver, including xtest, rendercheck, piglit, and oglconform, but failures
Eric Anholt8c641832009-03-26 17:15:11 -070010from those can be difficult to track down to kernel changes, and many require
11complicated build procedures or specific testing environments to get useful
Thomas Wood84f23412014-10-29 11:18:27 +000012results. Therefore, Intel GPU Tools includes low-level tools and tests
13specifically for development and testing of the Intel DRM Driver.
Eric Anholt8c641832009-03-26 17:15:11 -070014
Thomas Wood84f23412014-10-29 11:18:27 +000015Intel GPU Tools is split into several sections:
Eric Anholt8c641832009-03-26 17:15:11 -070016
17benchmarks/
Thomas Wood84f23412014-10-29 11:18:27 +000018 This is a collection of useful microbenchmarks that can be used to tune
19 DRM code in relevant ways.
Eric Anholt8c641832009-03-26 17:15:11 -070020
Eric Anholt676a1092009-03-27 16:03:02 -070021 The benchmarks require KMS to be enabled. When run with an X Server
22 running, they must be run as root to avoid the authentication
23 requirement.
24
Daniel Vettereafdf502011-11-01 14:33:53 +010025 Note that a few other microbenchmarks are in tests (like gem_gtt_speed).
26
Eric Anholt8c641832009-03-26 17:15:11 -070027tests/
28 This is a set of automated tests to run against the DRM to validate
Thomas Wood84f23412014-10-29 11:18:27 +000029 changes. Many of the tests have subtests, which can be listed by using
30 the --list-subtests command line option and then run using the
31 --run-subtest option. If --run-subtest is not used, all subtests will
32 be run. Some tests have futher options and these are detailed by using
33 the --help option.
Eric Anholt8c641832009-03-26 17:15:11 -070034
Thomas Woodd3cfe282014-07-11 10:47:43 +010035 The test suite can be run using the run-tests.sh script available in
36 the scripts directory. Piglit is used to run the tests and can either
37 be installed from your distribution (if available), or can be
38 downloaded locally for use with the script by running:
Daniel Vettereafdf502011-11-01 14:33:53 +010039
Thomas Woodd3cfe282014-07-11 10:47:43 +010040 ./scripts/run-tests.sh -d
41
42 run-tests.sh has options for filtering and excluding tests from test
43 runs:
44
45 -t <regex> only include tests that match the regular expression
46 -x <regex> exclude tests that match the regular expression
47
48 Useful patterns for test filtering are described in
49 tests/NAMING-CONVENTION and the full list of tests and subtests can be
50 produced by passing -l to the run-tests.sh script.
51
52 Results are written to a JSON file and an HTML summary can also be
53 created by passing -s to the run-tests.sh script. Further options are
54 are detailed by using the -h option.
55
56
57 If not using the script, piglit can be obtained from:
Daniel Vetterdf545c12012-12-04 10:34:46 +010058
59 git://anongit.freedesktop.org/piglit
60
Thomas Wood6d28f6a2014-06-09 13:35:21 +010061 There is no need to build and install piglit if it is only going to be
62 used for running i-g-t tests.
63
64 Set the IGT_TEST_ROOT environment variable to point to the tests
Thomas Woodd3cfe282014-07-11 10:47:43 +010065 directory, or set the path key in the "igt" section of piglit.conf to
66 the intel-gpu-tools root directory.
Daniel Vetterdf545c12012-12-04 10:34:46 +010067
Thomas Woodd3cfe282014-07-11 10:47:43 +010068 The tests in the i-g-t sources need to have been built already. Then we
69 can run the testcases with (as usual as root, no other drm clients
70 running):
Daniel Vetterfd6c66c2013-12-20 15:49:59 +010071
Thomas Wood6d28f6a2014-06-09 13:35:21 +010072 piglit-sources # ./piglit run igt <results-file>
Daniel Vetterdf545c12012-12-04 10:34:46 +010073
74 The testlist is built at runtime, so no need to update anything in
75 piglit when adding new tests. See
76
Thomas Wood6d28f6a2014-06-09 13:35:21 +010077 piglit-sources $ ./piglit run -h
Daniel Vetterdf545c12012-12-04 10:34:46 +010078
79 for some useful options.
80
Daniel Vettera7433ec2013-08-12 14:02:03 +020081 Piglit only runs a default set of tests and is useful for regression
82 testing. Other tests not run are:
83 - tests that might hang the gpu, see HANG in Makefile.am
84 - gem_stress, a stress test suite. Look at the source for all the
85 various options.
86 - testdisplay is only run in the default mode. testdisplay has tons of
87 options to test different kms functionality, again read the source for
88 the details.
89
Daniel Vettereafdf502011-11-01 14:33:53 +010090lib/
91 Common helper functions and headers used by the other tools.
92
93man/
94 Manpages, unfortunately rather incomplete.
Eric Anholt676a1092009-03-27 16:03:02 -070095
Eric Anholt8c641832009-03-26 17:15:11 -070096tools/
97 This is a collection of debugging tools that had previously been
98 built with the 2D driver but not shipped. Some distros were hacking
99 up the 2D build to ship them. Instead, here's a separate package for
100 people debugging the driver.
Eric Anholt6abc9b12009-03-26 18:44:13 -0700101
Daniel Vettereafdf502011-11-01 14:33:53 +0100102 These tools generally must be run as root, safe for the ones that just
103 decode dumps.
Ben Widawsky3b10b7b2011-07-28 14:58:24 -0700104
Ben Widawskyd8d114b2013-02-07 08:35:57 -0800105tools/quick_dump
106 Quick dumper is a python tool built with SWIG bindings to
107 important libraries exported by the rest of the tool suite. The tool
108 itself is quite straight forward, and should also be a useful example
109 for others wishing to write python based i915 tools.
110
Ben Widawskyd8d114b2013-02-07 08:35:57 -0800111 Note to package maintainers: It is not recommended to package
112 this directory, as the tool is not yet designed for wide usage. If the
113 package is installed via "make install" the users will have to set
Ben Widawskycf17d102013-02-19 09:53:43 -0800114 their python library path appropriately. Use --disable-dumper
Ben Widawskyd8d114b2013-02-07 08:35:57 -0800115
Ben Widawsky3b10b7b2011-07-28 14:58:24 -0700116debugger/
117 This tool is to be used to do shader debugging. It acts like a
118 debug server accepting connections from debug clients such as
119 mesa. The connections is made with unix domain sockets, and at some
120 point it would be nice if this directory contained a library for
121 initiating connections with debug clients..
122
123 The debugger must be run as root: "sudo debugger/eudb"
Jani Nikulabefabe22013-10-08 21:19:06 +0300124
Daniel Vettera90846a2014-03-11 21:03:39 +0100125docs/
Thomas Wood84f23412014-10-29 11:18:27 +0000126 Contains the automatically generated intel-gpu-tools libraries
127 reference documentation in docs/reference/. You need to have the
128 gtk-doc tools installed and use the "--enable-gtk-doc" configure flag
129 to generate this API documentation.
Daniel Vettera90846a2014-03-11 21:03:39 +0100130
Thomas Wood3dd7ad12014-06-09 14:05:42 +0100131 To regenerate the html files when updating documentation, use:
Daniel Vetterc8190142014-03-25 17:46:32 +0100132
133 $ make clean -C docs && make -C docs
134
Thomas Wood3dd7ad12014-06-09 14:05:42 +0100135 If you've added/changed/removed a symbol or anything else that changes
136 the overall structure or indexes, this needs to be reflected in
137 intel-gpu-tools-sections.txt. Entirely new sections will also need to be
138 added to intel-gpu-tools-docs.xml in the appropriate place.
Daniel Vetterc8190142014-03-25 17:46:32 +0100139
Thomas Wood84f23412014-10-29 11:18:27 +0000140
141Requirements
142------------
143
Jani Nikulad9a25af2015-04-01 12:08:59 +0300144This is a non-exhaustive list of package dependencies required for building
145everything (package names may vary):
Jani Nikulabefabe22013-10-08 21:19:06 +0300146
Daniel Vettera90846a2014-03-11 21:03:39 +0100147 gtk-doc-tools
Jani Nikulad9a25af2015-04-01 12:08:59 +0300148 libcairo2-dev
149 libdrm-dev
150 libpciaccess-dev
151 libpython3.3-dev
152 libunwind-dev
Jani Nikula4650d342015-04-14 22:33:33 +0300153 python-docutils
Jani Nikulad9a25af2015-04-01 12:08:59 +0300154 swig2.0
155 x11proto-dri2-dev
156 xutils-dev