blob: 74f51bc0ea708f2e1d0eeacda30c3c98476c8dd2 [file] [log] [blame]
Jakob Bornecrantzd62b29f2010-08-15 00:59:57 +01001Debugging
2=========
3
4Debugging utilities in gallium.
5
6Debug Variables
7^^^^^^^^^^^^^^^
8
9All drivers respond to a couple of debug enviromental variables. Below is
10a collection of them. Set them as you would any normal enviromental variable
11for the platform/operating system you are running. For linux this can be
12done by typing "export var=value" into a console and then running the
13program from that console.
14
15Common
16""""""
17
18GALLIUM_PRINT_OPTIONS <bool> (false)
19
20This options controls if the debug variables should be printed to stderr.
21This is probably the most usefull variable since it allows you to find
22which variables a driver responds to.
23
24GALLIUM_RBUG <bool> (false)
25
26Controls if the :ref:`rbug` should be used.
27
28GALLIUM_TRACE <string> ("")
29
30If not set tracing is not used, if set it will write the output to the file
31specifed by the variable. So setting it to "trace.xml" will write the output
32to the file "trace.xml".
33
34GALLIUM_DUMP_CPU <bool> (false)
35
36Dump information about the current cpu that the driver is running on.
37
38TGSI_PRINT_SANITY <bool> (false)
39
40Gallium has a inbuilt shader sanity checker, this option controls if results
41from it should be printed. This include warnings such as unused variables.
42
43DRAW_USE_LLVM <bool> (false)
44
45Should the :ref:`draw` module use llvm for vertex and geometry shaders.
46
47ST_DEBUG <flags> (0x0)
48
49Debug :ref:`flags` for the GL state tracker.
50
51
52Driver specific
53"""""""""""""""
54
55I915_DEBUG <flags> (0x0)
56
57Debug :ref:`flags` for the i915 driver.
58
59I915_NO_HW <bool> (false)
60
61Stop the i915 driver from submitting commands to the hardware.
62
63I915_DUMP_CMD <bool> (false)
64
65Dump all commands going to the hardware.
66
67LP_DEBUG <flags> (0x0)
68
69Debug :ref:`flags` for the llvmpipe driver.
70
71LP_NUM_THREADS <int> (num cpus)
72
73Number of threads that the llvmpipe driver should use.
74
75
76.. _flags:
77
78Flags
79"""""
80
81The variables of type <flags> all take a string with comma seperated
82flags to enable different debugging for different parts of the drivers
83or state tracker. If set to "help" the driver will print a list of flags
84to which the variable can be set to. Order does not matter.
85
86
87.. _rbug:
88
89Remote Debugger
90^^^^^^^^^^^^^^^
91
92Or rbug for short allows for runtime inspections of :ref:`Context`,
93:ref:`Screen`, Resources and Shaders; pauseing and stepping of draw calls;
94and runtime disable and replacement of shaders. Is used with rbug-gui which
95is hosted outside of the main mesa repositor. Rbug is can be used over a
96network connection so the debbuger does not need to be on the same machine.