2010-08-15 00:59:57 +01:00
|
|
|
Debugging
|
|
|
|
=========
|
|
|
|
|
|
|
|
Debugging utilities in gallium.
|
|
|
|
|
|
|
|
Debug Variables
|
|
|
|
^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
All drivers respond to a couple of debug enviromental variables. Below is
|
|
|
|
a collection of them. Set them as you would any normal enviromental variable
|
|
|
|
for the platform/operating system you are running. For linux this can be
|
|
|
|
done by typing "export var=value" into a console and then running the
|
|
|
|
program from that console.
|
|
|
|
|
|
|
|
Common
|
|
|
|
""""""
|
|
|
|
|
2010-08-15 11:05:18 +01:00
|
|
|
.. envvar:: GALLIUM_PRINT_OPTIONS <bool> (false)
|
2010-08-15 00:59:57 +01:00
|
|
|
|
|
|
|
This options controls if the debug variables should be printed to stderr.
|
|
|
|
This is probably the most usefull variable since it allows you to find
|
|
|
|
which variables a driver responds to.
|
|
|
|
|
2010-08-15 11:05:18 +01:00
|
|
|
.. envvar:: GALLIUM_RBUG <bool> (false)
|
2010-08-15 00:59:57 +01:00
|
|
|
|
|
|
|
Controls if the :ref:`rbug` should be used.
|
|
|
|
|
2010-08-15 11:05:18 +01:00
|
|
|
.. envvar:: GALLIUM_TRACE <string> ("")
|
2010-08-15 00:59:57 +01:00
|
|
|
|
|
|
|
If not set tracing is not used, if set it will write the output to the file
|
|
|
|
specifed by the variable. So setting it to "trace.xml" will write the output
|
|
|
|
to the file "trace.xml".
|
|
|
|
|
2010-08-15 11:05:18 +01:00
|
|
|
.. envvar:: GALLIUM_DUMP_CPU <bool> (false)
|
2010-08-15 00:59:57 +01:00
|
|
|
|
|
|
|
Dump information about the current cpu that the driver is running on.
|
|
|
|
|
2010-08-15 11:05:18 +01:00
|
|
|
.. envvar:: TGSI_PRINT_SANITY <bool> (false)
|
2010-08-15 00:59:57 +01:00
|
|
|
|
|
|
|
Gallium has a inbuilt shader sanity checker, this option controls if results
|
|
|
|
from it should be printed. This include warnings such as unused variables.
|
|
|
|
|
2010-08-15 11:05:18 +01:00
|
|
|
.. envvar:: DRAW_USE_LLVM <bool> (false)
|
2010-08-15 00:59:57 +01:00
|
|
|
|
|
|
|
Should the :ref:`draw` module use llvm for vertex and geometry shaders.
|
|
|
|
|
2010-08-15 11:05:18 +01:00
|
|
|
.. envvar:: ST_DEBUG <flags> (0x0)
|
2010-08-15 00:59:57 +01:00
|
|
|
|
|
|
|
Debug :ref:`flags` for the GL state tracker.
|
|
|
|
|
|
|
|
|
|
|
|
Driver specific
|
|
|
|
"""""""""""""""
|
|
|
|
|
2010-08-15 11:05:18 +01:00
|
|
|
.. envvar:: I915_DEBUG <flags> (0x0)
|
2010-08-15 00:59:57 +01:00
|
|
|
|
|
|
|
Debug :ref:`flags` for the i915 driver.
|
|
|
|
|
2010-08-15 11:05:18 +01:00
|
|
|
.. envvar:: I915_NO_HW <bool> (false)
|
2010-08-15 00:59:57 +01:00
|
|
|
|
|
|
|
Stop the i915 driver from submitting commands to the hardware.
|
|
|
|
|
2010-08-15 11:05:18 +01:00
|
|
|
.. envvar:: I915_DUMP_CMD <bool> (false)
|
2010-08-15 00:59:57 +01:00
|
|
|
|
|
|
|
Dump all commands going to the hardware.
|
|
|
|
|
2010-08-15 11:05:18 +01:00
|
|
|
.. envvar:: LP_DEBUG <flags> (0x0)
|
2010-08-15 00:59:57 +01:00
|
|
|
|
|
|
|
Debug :ref:`flags` for the llvmpipe driver.
|
|
|
|
|
2010-08-15 11:05:18 +01:00
|
|
|
.. envvar:: LP_NUM_THREADS <int> (num cpus)
|
2010-08-15 00:59:57 +01:00
|
|
|
|
|
|
|
Number of threads that the llvmpipe driver should use.
|
|
|
|
|
|
|
|
|
|
|
|
.. _flags:
|
|
|
|
|
|
|
|
Flags
|
|
|
|
"""""
|
|
|
|
|
|
|
|
The variables of type <flags> all take a string with comma seperated
|
|
|
|
flags to enable different debugging for different parts of the drivers
|
|
|
|
or state tracker. If set to "help" the driver will print a list of flags
|
|
|
|
to which the variable can be set to. Order does not matter.
|
|
|
|
|
|
|
|
|
|
|
|
.. _rbug:
|
|
|
|
|
|
|
|
Remote Debugger
|
|
|
|
^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
Or rbug for short allows for runtime inspections of :ref:`Context`,
|
|
|
|
:ref:`Screen`, Resources and Shaders; pauseing and stepping of draw calls;
|
|
|
|
and runtime disable and replacement of shaders. Is used with rbug-gui which
|
|
|
|
is hosted outside of the main mesa repositor. Rbug is can be used over a
|
|
|
|
network connection so the debbuger does not need to be on the same machine.
|