mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
The custom envvar directive is strange. It overloads the global namespace, where there's already a well-known envvar directive, but the envvar role won't resolve to envvars defined using the custom directive. It's not really critical to declare the type and default value here, and many descriptions already include this. Let's just use the plain one, and let the description take care of the details where needed. Reviewed-by: Yonggang Luo <luoyonggang@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19593>
102 lines
2.9 KiB
ReStructuredText
102 lines
2.9 KiB
ReStructuredText
Debugging
|
|
=========
|
|
|
|
Debugging utilities in gallium.
|
|
|
|
Debug Variables
|
|
^^^^^^^^^^^^^^^
|
|
|
|
All drivers respond to a set of common debug environment variables, as well as
|
|
some driver-specific variables. Set them as normal environment variables for
|
|
the platform or operating system you are running. For example, for Linux this
|
|
can be done by typing "export var=value" into a console and then running the
|
|
program from that console.
|
|
|
|
Common
|
|
""""""
|
|
|
|
.. envvar:: GALLIUM_PRINT_OPTIONS
|
|
|
|
This boolean option controls if the debug variables should be printed to
|
|
stderr. This is probably the most useful variable, since it allows you to
|
|
find which variables a driver uses.
|
|
|
|
.. envvar:: GALLIUM_TRACE
|
|
|
|
If set, this variable will cause the :ref:`trace` output to be written to the
|
|
specified file. Paths may be relative or absolute; relative paths are relative
|
|
to the working directory. For example, setting it to "trace.xml" will cause
|
|
the trace to be written to a file of the same name in the working directory.
|
|
|
|
.. envvar:: GALLIUM_TRACE_TC
|
|
|
|
If enabled while :ref:`trace` is active, this variable specifies that the threaded context
|
|
should be traced for drivers which implement it. By default, the driver thread is traced,
|
|
which will include any reordering of the command stream from threaded context.
|
|
|
|
.. envvar:: GALLIUM_TRACE_TRIGGER
|
|
|
|
If set while :ref:`trace` is active, this variable specifies a filename to monitor.
|
|
Once the file exists (e.g., from the user running 'touch /path/to/file'), a single
|
|
frame will be recorded into the trace output.
|
|
Paths may be relative or absolute; relative paths are relative to the working directory.
|
|
|
|
.. envvar:: GALLIUM_DUMP_CPU
|
|
|
|
Enable dumping of information about the current CPU that the driver is running on.
|
|
|
|
.. envvar:: TGSI_PRINT_SANITY
|
|
|
|
Gallium has a built-in shader sanity checker. This boolean option controls
|
|
whether the shader sanity checker prints its warnings and errors to stderr.
|
|
|
|
.. envvar:: DRAW_USE_LLVM
|
|
|
|
Whether the :ref:`Draw` module will attempt to use LLVM for vertex and geometry shaders.
|
|
|
|
|
|
GL State tracker-specific
|
|
"""""""""""""""""""""""""
|
|
|
|
.. envvar:: ST_DEBUG
|
|
|
|
Debug :ref:`flags` for the GL state tracker.
|
|
|
|
|
|
Driver-specific
|
|
"""""""""""""""
|
|
|
|
.. envvar:: I915_DEBUG
|
|
|
|
Debug :ref:`flags` for the i915 driver.
|
|
|
|
.. envvar:: I915_NO_HW
|
|
|
|
Stop the i915 driver from submitting commands to the hardware.
|
|
|
|
.. envvar:: I915_DUMP_CMD
|
|
|
|
Dump all commands going to the hardware.
|
|
|
|
.. envvar:: LP_DEBUG
|
|
|
|
Debug :ref:`flags` for the LLVMpipe driver.
|
|
|
|
.. envvar:: LP_NUM_THREADS
|
|
|
|
Number of threads that the LLVMpipe driver should use.
|
|
|
|
.. envvar:: FD_MESA_DEBUG
|
|
|
|
Debug :ref:`flags` for the Freedreno driver.
|
|
|
|
|
|
.. _flags:
|
|
|
|
Flags
|
|
"""""
|
|
|
|
The variables of type "flags" all take a string with comma-separated 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 which the
|
|
variable accepts. Order does not matter.
|