• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Environment Variables
2=====================
3
4Normally, no environment variables need to be set. Most of the
5environment variables used by Mesa/Gallium are for debugging purposes,
6but they can sometimes be useful for debugging end-user issues.
7
8LibGL environment variables
9---------------------------
10
11.. envvar:: LIBGL_DEBUG
12
13   If defined debug information will be printed to stderr. If set to
14   ``verbose`` additional information will be printed.
15
16.. envvar:: LIBGL_ALWAYS_INDIRECT
17
18   if set to ``true``, forces an indirect rendering context/connection.
19
20.. envvar:: LIBGL_ALWAYS_SOFTWARE
21
22   if set to ``true``, always use software rendering
23
24.. envvar:: LIBGL_NO_DRAWARRAYS
25
26   if set to ``true``, do not use DrawArrays GLX protocol (for
27   debugging)
28
29.. envvar:: LIBGL_DRI2_DISABLE
30
31   disable DRI2 if set to ``true``.
32
33.. envvar:: LIBGL_DRI3_DISABLE
34
35   disable DRI3 if set to ``true``.
36
37.. envvar:: LIBGL_KOPPER_DISABLE
38
39   disable Vulkan swapchains with Zink if set to ``true``.
40   In general, this should not be used unless you know what you are
41   doing. Some examples of "knowing what you are doing" include:
42   - using a VK driver which has no WSI implementation for your display server
43   - profiling the DRI frontend against your VK driver's WSI implementation
44
45.. envvar:: LIBGL_KOPPER_DRI2
46
47   disable DRI3 with Zink if set to ``true``.
48   In general, this should not be used unless you know what you are
49   doing. Some examples of "knowing what you are doing" include:
50   - running xrdp
51   - using a VK driver which doesn't support modifiers
52
53Core Mesa environment variables
54-------------------------------
55
56.. envvar:: MESA_NO_ERROR
57
58   if set to 1, error checking is disabled as per :ext:`GL_KHR_no_error`.
59   This will result in undefined behavior for invalid use of the API, but
60   can reduce CPU use for apps that are known to be error free.
61
62.. envvar:: MESA_DEBUG
63
64   if set, error messages are printed to stderr. For example, if the
65   application generates a ``GL_INVALID_ENUM`` error, a corresponding
66   error message indicating where the error occurred, and possibly why,
67   will be printed to stderr. For release builds, :envvar:`MESA_DEBUG`
68   defaults to off (no debug output). :envvar:`MESA_DEBUG` accepts the
69   following comma-separated list of named flags, which adds extra
70   behavior to just set :envvar:`MESA_DEBUG` to ``1``:
71
72   ``silent``
73      turn off debug messages. Only useful for debug builds.
74   ``flush``
75      flush after each drawing command
76   ``incomplete_tex``
77      extra debug messages when a texture is incomplete
78   ``incomplete_fbo``
79      extra debug messages when a FBO is incomplete
80   ``context``
81      create a debug context (see ``GLX_CONTEXT_DEBUG_BIT_ARB``) and
82      print error and performance messages to stderr (or
83      ``MESA_LOG_FILE``).
84
85.. envvar:: MESA_PROCESS_NAME
86
87   if set, overrides the process name string used internally for various
88   purposes (e.g. for driconf option matching, logging, artifact storage,
89   etc.).
90
91.. envvar:: MESA_LOG_FILE
92
93   specifies a file name for logging all errors, warnings, etc., rather
94   than stderr
95
96.. envvar:: MESA_EXTENSION_OVERRIDE
97
98   can be used to enable/disable extensions. A value such as
99   ``GL_EXT_foo -GL_EXT_bar`` will enable the ``GL_EXT_foo`` extension
100   and disable the ``GL_EXT_bar`` extension. Note that this will override
101   extensions override configured using driconf.
102
103.. envvar:: MESA_EXTENSION_MAX_YEAR
104
105   The ``GL_EXTENSIONS`` string returned by Mesa is sorted by extension
106   year. If this variable is set to year X, only extensions defined on
107   or before year X will be reported. This is to work-around a bug in
108   some games where the extension string is copied into a fixed-size
109   buffer without truncating. If the extension string is too long, the
110   buffer overrun can cause the game to crash. This is a work-around for
111   that.
112
113.. envvar:: MESA_GL_VERSION_OVERRIDE
114
115   changes the value returned by ``glGetString(GL_VERSION)`` and
116   possibly the GL API type.
117
118   -  The format should be ``MAJOR.MINOR[FC|COMPAT]``
119   -  ``FC`` is an optional suffix that indicates a forward compatible
120      context. This is only valid for versions >= 3.0.
121   -  ``COMPAT`` is an optional suffix that indicates a compatibility
122      context or :ext:`GL_ARB_compatibility` support. This is only valid
123      for versions >= 3.1.
124   -  GL versions <= 3.0 are set to a compatibility (non-Core) profile
125   -  GL versions = 3.1, depending on the driver, it may or may not have
126      the :ext:`GL_ARB_compatibility` extension enabled.
127   -  GL versions >= 3.2 are set to a Core profile
128   -  Examples:
129
130      ``2.1``
131         select a compatibility (non-Core) profile with GL version 2.1.
132      ``3.0``
133         select a compatibility (non-Core) profile with GL version 3.0.
134      ``3.0FC``
135         select a Core+Forward Compatible profile with GL version 3.0.
136      ``3.1``
137         select GL version 3.1 with :ext:`GL_ARB_compatibility` enabled
138         per the driver default.
139      ``3.1FC``
140         select GL version 3.1 with forward compatibility and
141         :ext:`GL_ARB_compatibility` disabled.
142      ``3.1COMPAT``
143         select GL version 3.1 with :ext:`GL_ARB_compatibility` enabled.
144      ``X.Y``
145         override GL version to X.Y without changing the profile.
146      ``X.YFC``
147         select a Core+Forward Compatible profile with GL version X.Y.
148      ``X.YCOMPAT``
149         select a Compatibility profile with GL version X.Y.
150
151   -  Mesa may not really implement all the features of the given
152      version. (for developers only)
153
154.. envvar:: MESA_GLES_VERSION_OVERRIDE
155
156   changes the value returned by ``glGetString(GL_VERSION)`` for OpenGL
157   ES.
158
159   -  The format should be ``MAJOR.MINOR``
160   -  Examples: ``2.0``, ``3.0``, ``3.1``
161   -  Mesa may not really implement all the features of the given
162      version. (for developers only)
163
164.. envvar:: MESA_GLSL_VERSION_OVERRIDE
165
166   changes the value returned by
167   ``glGetString(GL_SHADING_LANGUAGE_VERSION)``. Valid values are
168   integers, such as ``130``. Mesa will not really implement all the
169   features of the given language version if it's higher than what's
170   normally reported. (for developers only)
171
172.. envvar:: MESA_DRICONF_EXECUTABLE_OVERRIDE
173
174   if set, overrides the "executable" string used specifically for driconf
175   option matching. This takes higher precedence over more general process
176   name override (e.g. MESA_PROCESS_NAME).
177
178.. envvar:: MESA_SHADER_CACHE_DISABLE
179
180   if set to ``true``, disables the on-disk shader cache. If set to
181   ``false``, enables the on-disk shader cache when it is disabled by
182   default.  Note that EGL_ANDROID_blob_cache is still enabled even
183   if on-disk shader cache is disabled.
184
185.. envvar:: MESA_SHADER_CACHE_MAX_SIZE
186
187   if set, determines the maximum size of the on-disk cache of compiled
188   shader programs. Should be set to a number optionally followed by
189   ``K``, ``M``, or ``G`` to specify a size in kilobytes, megabytes, or
190   gigabytes. By default, gigabytes will be assumed. And if unset, a
191   maximum size of 1GB will be used.
192
193   .. note::
194
195      A separate cache might be created for each architecture that Mesa is
196      installed for on your system. For example under the default settings
197      you may end up with a 1GB cache for x86_64 and another 1GB cache for
198      i386.
199
200.. envvar:: MESA_SHADER_CACHE_DIR
201
202   if set, determines the directory to be used for the on-disk cache of
203   compiled shader programs. If this variable is not set, then the cache
204   will be stored in ``$XDG_CACHE_HOME/mesa_shader_cache_db`` (if that
205   variable is set), or else within ``.cache/mesa_shader_cache_db`` within
206   the user's home directory.
207
208.. envvar:: MESA_SHADER_CACHE_SHOW_STATS
209
210   if set to ``true``, keeps hit/miss statistics for the shader cache.
211   These statistics are printed when the app terminates.
212
213.. envvar:: MESA_DISK_CACHE_SINGLE_FILE
214
215   if set to 1, enables the single file Fossilize DB on-disk shader
216   cache implementation instead of the default Mesa-DB cache
217   implementation. This implementation allows for loading of precompiled
218   cache DBs via :envvar:`MESA_DISK_CACHE_READ_ONLY_FOZ_DBS` or
219   :envvar:`MESA_DISK_CACHE_READ_ONLY_FOZ_DBS_DYNAMIC_LIST`. This
220   implementation does not support cache size limits via
221   :envvar:`MESA_SHADER_CACHE_MAX_SIZE`. If
222   :envvar:`MESA_SHADER_CACHE_DIR` is not set, the cache will be stored
223   in ``$XDG_CACHE_HOME/mesa_shader_cache_sf`` (if that variable is set)
224   or else within ``.cache/mesa_shader_cache_sf`` within the user's home
225   directory.
226
227.. envvar:: MESA_DISK_CACHE_MULTI_FILE
228
229   if set to 1, enables the multi file on-disk shader cache implementation
230   instead of the default Mesa-DB cache implementation.
231   This implementation increases the overall disk usage.
232   If :envvar:`MESA_SHADER_CACHE_DIR` is not set, the cache will be stored
233   in ``$XDG_CACHE_HOME/mesa_shader_cache`` (if that variable is set)
234   or else within ``.cache/mesa_shader_cache`` within the user's home
235   directory.
236
237.. envvar:: MESA_DISK_CACHE_READ_ONLY_FOZ_DBS
238
239   if set with :envvar:`MESA_DISK_CACHE_SINGLE_FILE` enabled, references
240   a string of comma separated file paths to read only Fossilize DB
241   shader caches for loading at initialization. The file paths are
242   relative to the cache directory and do not include suffixes,
243   referencing both the cache DB and its index file. E.g.
244   ``MESA_DISK_CACHE_SINGLE_FILE=filename1`` refers to ``filename1.foz``
245   and ``filename1_idx.foz``. A limit of 8 DBs can be loaded and this limit
246   is shared with :envvar:`MESA_DISK_CACHE_READ_ONLY_FOZ_DBS_DYNAMIC_LIST`.
247
248.. envvar:: MESA_DISK_CACHE_DATABASE_NUM_PARTS
249
250   specifies number of mesa-db cache parts, default is 50.
251
252.. envvar:: MESA_DISK_CACHE_DATABASE_EVICTION_SCORE_2X_PERIOD
253
254   Mesa-DB cache eviction algorithm calculates weighted score for the
255   cache items. The weight is doubled based on the last access time of
256   cache entry. By default period of weight doubling is set to one month.
257   Period value is given in seconds.
258
259.. envvar:: MESA_DISK_CACHE_READ_ONLY_FOZ_DBS_DYNAMIC_LIST
260
261   if set with :envvar:`MESA_DISK_CACHE_SINGLE_FILE` enabled, references
262   a text file that contains a new-line separated list of read only
263   Fossilize DB shader caches to load. The list file is modifiable at
264   runtime to allow for loading read only caches after initialization
265   unlike :envvar:`MESA_DISK_CACHE_READ_ONLY_FOZ_DBS`. This variable
266   takes an absolute path to the list file. The list file must exist at
267   initialization for updating to occur. Cache files in the list take
268   relative paths to the current cache directory like
269   :envvar:`MESA_DISK_CACHE_READ_ONLY_FOZ_DBS`. A limit of 8 DBs can be
270   loaded and this limit is shared with
271   :envvar:`MESA_DISK_CACHE_READ_ONLY_FOZ_DBS`.
272
273.. envvar:: MESA_DISK_CACHE_COMBINE_RW_WITH_RO_FOZ
274
275   if set to 1, enables simultaneous use of :abbr:`RW (read-write)` and
276   :abbr:`RW (read-write)` Fossilize DB caches. At first, data will be
277   retrieved from the RO Fossilize cache. If data isn't found in the RO
278   cache, then it will be retrieved from the RW cache.
279
280.. envvar:: MESA_GLSL
281
282   :ref:`shading language compiler options <envvars>`
283
284.. envvar:: MESA_NO_MINMAX_CACHE
285
286   when set, the minmax index cache is globally disabled.
287
288.. envvar:: MESA_SHADER_CAPTURE_PATH
289
290   see :ref:`Capturing Shaders <capture>`
291
292.. envvar:: MESA_SHADER_DUMP_PATH
293
294   see :ref:`Experimenting with Shader Replacements <replacement>`
295
296.. envvar:: MESA_SHADER_READ_PATH
297
298   see :ref:`Experimenting with Shader Replacements <replacement>`
299
300.. envvar:: MESA_VK_VERSION_OVERRIDE
301
302   changes the Vulkan physical device version as returned in
303   ``VkPhysicalDeviceProperties::apiVersion``.
304
305   -  The format should be ``MAJOR.MINOR[.PATCH]``
306   -  This will not let you force a version higher than the driver's
307      instance version as advertised by ``vkEnumerateInstanceVersion``
308   -  This can be very useful for debugging but some features may not be
309      implemented correctly. (For developers only)
310
311.. envvar:: MESA_VK_WSI_PRESENT_MODE
312
313   overrides the WSI present mode clients specify in
314   ``VkSwapchainCreateInfoKHR::presentMode``. Values can be ``fifo``,
315   ``relaxed``, ``mailbox`` or ``immediate``.
316
317.. envvar:: MESA_VK_WSI_HEADLESS_SWAPCHAIN
318
319   Forces all swapchains to be headless (no rendering will be display
320   in the swapchain's window).
321
322.. envvar:: MESA_VK_ABORT_ON_DEVICE_LOSS
323
324   causes the Vulkan driver to call abort() immediately after detecting a
325   lost device.  This is extremely useful when testing as it prevents the
326   test suite from continuing on with a lost device.
327
328.. envvar:: MESA_VK_ENABLE_SUBMIT_THREAD
329
330   for Vulkan drivers which support real timeline semaphores, this forces
331   them to use a submit thread from the beginning, regardless of whether or
332   not they ever see a wait-before-signal condition.
333
334.. envvar:: MESA_VK_DEVICE_SELECT_DEBUG
335
336   print debug info about device selection decision-making
337
338.. envvar:: MESA_VK_TRACE
339
340   A comma-separated list of trace types used for offline analysis. The
341   option names are equal to the file extension. Traces are dumped into ``/tmp``.
342   Captures can be triggered by pressing ``F1`` with the application window
343   focused (Currently X11 only) or via :envvar:`MESA_VK_TRACE_FRAME` and
344   :envvar:`MESA_VK_TRACE_TRIGGER`.
345
346   .. list-table::
347      :header-rows: 1
348
349      * - File extension
350        - Offline analysis tool
351        - Supported drivers
352      * - ``rmv``
353        - Radeon Memory Visualizer
354        - ``RADV``
355      * - ``rgp``
356        - Radeon GPU Profiler
357        - ``RADV``
358      * - ``rra``
359        - Radeon Raytracing Analyzer
360        - ``RADV``
361      * - ``ctxroll``
362        - Context rolls
363        - ``RADV``
364
365   - Creating RMV captures requires the ``scripts/setup.sh`` script in the
366     Radeon Developer Tools folder to be run beforehand
367
368.. envvar:: MESA_VK_TRACE_PER_SUBMIT
369
370   Enables per-submit capture for compute-only workload. Disabled by default
371   and only valid with MESA_VK_TRACE=rgp.
372
373.. envvar:: MESA_VK_TRACE_FRAME
374
375   Specifies a frame index at which a trace capture is automatically triggered.
376   Ignored when MESA_VK_TRACE_PER_SUBMIT is enabled.
377
378.. envvar:: MESA_VK_TRACE_TRIGGER
379
380   Specifies a trigger file. Creating the file triggers the capture. (e.g.
381   ``export MESA_VK_TRACE_TRIGGER=/tmp/trigger`` and then ``touch /tmp/trigger``)
382   Ignored when MESA_VK_TRACE_PER_SUBMIT is enabled.
383
384.. envvar:: MESA_LOADER_DRIVER_OVERRIDE
385
386   chooses a different driver binary such as ``etnaviv`` or ``zink``.
387
388.. envvar:: DRI_PRIME_DEBUG
389
390   print debug info about device selection decision-making
391
392.. envvar:: DRI_PRIME
393
394   the default GPU is the one used by Wayland/Xorg or the one connected to a
395   display. This variable allows to select a different GPU. It applies to OpenGL
396   and Vulkan (in this case "select" means the GPU will be first in the reported
397   physical devices list). The supported syntaxes are:
398
399   - ``DRI_PRIME=N``: selects the Nth non-default GPU (N > 0).
400   - ``DRI_PRIME=pci-0000_02_00_0``: selects the GPU connected to this PCIe bus
401   - ``DRI_PRIME=vendor_id:device_id``: selects the first GPU matching these ids.
402
403   For Vulkan it's possible to append ``!``, in which case only the selected GPU
404   will be exposed to the application (e.g.: DRI_PRIME=1!).
405
406   .. note::
407
408      ``lspci -nn | grep VGA`` can be used to know the PCIe bus or ids to use.
409
410.. envvar:: DRIRC_CONFIGDIR
411
412   If set, overrides the global search-directories used when searching for
413   drirc config files. The user-local one will still be used. Mostly useful for
414   internal debugging.
415
416NIR passes environment variables
417--------------------------------
418
419The following are only applicable for drivers that uses NIR, as they
420modify the behavior for the common ``NIR_PASS`` and ``NIR_PASS_V`` macros,
421that wrap calls to NIR lowering/optimizations.
422
423.. envvar:: NIR_DEBUG
424
425   a comma-separated list of debug options to apply to NIR
426   shaders. Use ``NIR_DEBUG=help`` to print a list of available options.
427
428.. envvar:: NIR_SKIP
429
430   a comma-separated list of optimization/lowering passes to skip.
431
432Mesa Xlib driver environment variables
433--------------------------------------
434
435The following are only applicable to the Mesa Xlib software driver. See
436the :doc:`Xlib software driver page <xlibdriver>` for details.
437
438.. envvar:: MESA_RGB_VISUAL
439
440   specifies the X visual and depth for RGB mode
441
442.. envvar:: MESA_BACK_BUFFER
443
444   specifies how to implement the back color buffer, either ``pixmap``
445   or ``ximage``
446
447.. envvar:: MESA_XSYNC
448
449   enable synchronous X behavior (for debugging only)
450
451.. envvar:: MESA_GLX_FORCE_ALPHA
452
453   if set, forces RGB windows to have an alpha channel.
454
455.. envvar:: MESA_GLX_DEPTH_BITS
456
457   specifies default number of bits for depth buffer.
458
459.. envvar:: MESA_GLX_ALPHA_BITS
460
461   specifies default number of bits for alpha channel.
462
463Mesa WGL driver environment variables
464-------------------------------------
465
466The following are only applicable to the Mesa WGL driver, which is in use
467on Windows.
468
469.. envvar:: WGL_FORCE_MSAA
470
471   if set to a positive value, specifies the number of MSAA samples to
472   force when choosing the display configuration.
473
474.. envvar:: WGL_DISABLE_ERROR_DIALOGS
475
476   if set to 1, true or yes, disables Win32 error dialogs. Useful for
477   automated test-runs.
478
479.. envvar:: WGL_SWAP_INTERVAL
480
481   to set a swap interval, equivalent to calling
482   ``wglSwapIntervalEXT()`` in an application. If this environment
483   variable is set, application calls to ``wglSwapIntervalEXT()`` will
484   have no effect.
485
486Intel driver environment variables
487----------------------------------------------------
488
489.. envvar:: INTEL_BLACKHOLE_DEFAULT
490
491   if set to 1, true or yes, then the OpenGL implementation will
492   default ``GL_BLACKHOLE_RENDER_INTEL`` to true, thus disabling any
493   rendering.
494
495.. envvar:: INTEL_DEBUG
496
497   a comma-separated list of named flags, which do various things:
498
499   ``ann``
500      annotate IR in assembly dumps
501   ``bat``
502      emit batch information. Can control in which frames batches
503      get dumped using ``INTEL_DEBUG_BATCH_FRAME_*``, where
504      ``INTEL_DEBUG_BATCH_FRAME_START`` <= frame < ``INTEL_DEBUG_BATCH_FRAME_STOP``
505   ``blit``
506      emit messages about blit operations
507   ``blorp``
508      emit messages about the blorp operations (blits & clears)
509   ``buf``
510      emit messages about buffer objects
511   ``bt``
512      emit messages binding tables
513   ``capture-all``
514      flag all buffers to be captured by the kernel driver when
515      generating an error stage after a GPU hang
516   ``clip``
517      emit messages about the clip unit (for old gens, includes the CLIP
518      program)
519   ``color``
520      use color in output
521   ``cs``
522      dump shader assembly for compute shaders
523   ``do32``
524      generate compute shader SIMD32 programs even if workgroup size
525      doesn't exceed the SIMD16 limit
526   ``draw_bkp``
527      Add semaphore wait before/after draw call count.
528      ``INTEL_DEBUG_BKP_BEFORE_DRAW_COUNT`` or
529      ``INTEL_DEBUG_BKP_AFTER_DRAW_COUNT`` can control draw call number.
530      To make test wait forever, we need to set preempt_timeout_ms and
531      i915.enable_hangcheck to zero.
532   ``fall``
533      emit messages about performance issues (same as ``perf``)
534   ``fs``
535      dump shader assembly for fragment shaders
536   ``gs``
537      dump shader assembly for geometry shaders
538   ``heaps``
539      print information about the driver's heaps (ANV only)
540   ``hex``
541      print instruction hex dump with the disassembly
542   ``l3``
543      emit messages about the new L3 state during transitions
544   ``mesh``
545      dump shader assembly for mesh shaders
546   ``no8``
547      don't generate SIMD8 fragment shader
548   ``no16``
549      suppress generation of 16-wide fragment shaders. useful for
550      debugging broken shaders
551   ``no32``
552      suppress generation of 32-wide fragment shaders. useful for
553      debugging broken shaders
554   ``no-oaconfig``
555      disable HW performance metric configuration, and anything
556      related to i915-perf (useful when running on simulation)
557   ``nocompact``
558      disable instruction compaction
559   ``nodualobj``
560      suppress generation of dual-object geometry shader code
561   ``nofc``
562      disable fast clears
563   ``noccs``
564      disable lossless color compression
565   ``optimizer``
566      dump shader assembly to files at each optimization pass and
567      iteration that make progress
568   ``pc``
569      emit messages about PIPE_CONTROL instruction usage
570   ``perf``
571      emit messages about performance issues
572   ``perfmon``
573      emit messages about :ext:`GL_AMD_performance_monitor`
574   ``perf-symbol-names``
575      use performance counter symbols instead of the counter name
576      (counter symbols are like variable names, it's sometimes easier
577      to work with when you have lots of metrics to collect)
578   ``reemit``
579      mark all state dirty on each draw call
580   ``rt``
581      dump shader assembly for ray tracing shaders
582   ``sf``
583      emit messages about the strips & fans unit (for old gens, includes
584      the SF program)
585   ``shader-print``
586      allow developer print traces added by `brw_nir_printf` to be
587      printed out on the console
588   ``soft64``
589      enable implementation of software 64bit floating point support
590   ``sparse``
591      dump usage of sparse resources
592   ``spill_fs``
593      force spilling of all registers in the scalar backend (useful to
594      debug spilling code)
595   ``spill_vec4``
596      force spilling of all registers in the vec4 backend (useful to
597      debug spilling code)
598   ``stall``
599      inserts a stall on the GPU after each draw/dispatch command to
600      wait for it to finish before starting any new work.
601   ``submit``
602      emit batchbuffer usage statistics
603   ``sync``
604      after sending each batch, wait on the CPU for that batch to
605      finish rendering
606   ``swsb-stall``
607      Insert sync NOP after each instruction. This is only valid for Gfx12+.
608   ``task``
609      dump shader assembly for task shaders
610   ``tcs``
611      dump shader assembly for tessellation control shaders
612   ``tcs8``
613      force usage of 8-patches tessellation control shaders (only
614      for gfx 9-11)
615   ``tes``
616      dump shader assembly for tessellation evaluation shaders
617   ``tex``
618      emit messages about textures.
619   ``urb``
620      emit messages about URB setup
621   ``vs``
622      dump shader assembly for vertex shaders
623   ``wm``
624      dump shader assembly for fragment shaders (same as ``fs``)
625   ``cl-quiet``
626      quiets the OpenCL warnings recommending use of Intel compute-runtime
627
628.. envvar:: INTEL_DECODE
629
630   a comma-separated list of enable/disable flags configuring the
631   output produced by ``INTEL_DEBUG=bat`` (use with
632   ``INTEL_DECODE=+color,-floats``) :
633
634   ``color``
635      print colored output
636
637   ``floats``
638      try to decode floating point data in buffers
639
640   ``full``
641      print additional custom information for instructions (usually
642      pulling more information by inspecting memory)
643
644   ``offsets``
645      print offsets of instructions
646
647.. envvar:: INTEL_EXTENDED_METRICS
648
649   By default, only a standard set of GPU metrics are advertised. This
650   reduces time to collect metrics and hides infrequently used metrics.
651   To enable all metrics, set value to 1.
652
653.. envvar:: INTEL_FORCE_PROBE
654
655   A comma-separated list of device probe override values. The basic
656   format is ``<pci-id>[,<pci-id>,...]``. The wildcard value of ``*``
657   will specify all known PCI IDs. If ``!`` precedes a PCI ID, or the
658   wildcard value, then the device support will be disabled. All
659   numbers are interpreted in base 16, and a ``0x`` prefix is
660   optional. Values specified later take precedence, so the wildcard
661   probably should only be used at the beginning.
662
663   Some examples :
664
665   ``1234,!abcd``
666      Device 0x1234 would be forced on and 0xabcd would be disabled.
667
668   ``1234,!*``
669      All devices are disabled since the wildcard appears later.
670
671   ``!*,0x1234``
672      All devices disabled except 0x1234 which is forced on.
673
674   ``*,!0x1234``
675      All devices are forced on, except 0x1234 which is disabled.
676
677   ``!0x1234,1234``
678      Support for device 0x1234 is forced on since the enable appears
679      later.
680
681   .. note::
682      If a device requires using :envvar:`INTEL_FORCE_PROBE` to force
683      it to load, then Mesa does not have full support for the device.
684      It may have limited, or possibly no functionality within Mesa at
685      this point. It is recommended to upgrade to a Mesa which does
686      not require :envvar:`INTEL_FORCE_PROBE` for the device as soon
687      as it is available.
688
689.. envvar:: INTEL_MEASURE
690
691   Collects GPU timestamps over common intervals, and generates a CSV report
692   to show how long rendering took.  The overhead of collection is limited to
693   the flushing that is required at the interval boundaries for accurate
694   timestamps. By default, timing data is sent to ``stderr``.  To direct output
695   to a file:
696
697   ``INTEL_MEASURE=file=/tmp/measure.csv {workload}``
698
699   To begin capturing timestamps at a particular frame:
700
701   ``INTEL_MEASURE=file=/tmp/measure.csv,start=15 {workload}``
702
703   To capture only 23 frames:
704
705   ``INTEL_MEASURE=count=23 {workload}``
706
707   To capture frames 15-37, stopping before frame 38:
708
709   ``INTEL_MEASURE=start=15,count=23 {workload}``
710
711   Designate an asynchronous control file with:
712
713   ``INTEL_MEASURE=control=path/to/control.fifo {workload}``
714
715   As the workload runs, enable capture for 5 frames with:
716
717   ``$ echo 5 > path/to/control.fifo``
718
719   Enable unbounded capture:
720
721   ``$ echo -1 > path/to/control.fifo``
722
723   and disable with:
724
725   ``$ echo 0 > path/to/control.fifo``
726
727   Select the boundaries of each snapshot with:
728
729   ``INTEL_MEASURE=draw``
730      Collects timings for every render (DEFAULT)
731
732   ``INTEL_MEASURE=rt``
733      Collects timings when the render target changes
734
735   ``INTEL_MEASURE=batch``
736      Collects timings when batches are submitted
737
738   ``INTEL_MEASURE=frame``
739      Collects timings at frame boundaries
740
741   With ``INTEL_MEASURE=interval=5``, the duration of 5 events will be
742   combined into a single record in the output.  When possible, a single
743   start and end event will be submitted to the GPU to minimize
744   stalling.  Combined events will not span batches, except in
745   the case of ``INTEL_MEASURE=frame``.
746
747   Collect CPU timestamps instead of GPU timestamps.  Prints results
748   immediately instead of waiting for GPU execution.  Useful when used
749   with interactive debug to know which frame, or where in frame, you
750   are currently in.
751
752   ``INTEL_MEASURE=cpu {workload}``
753
754.. envvar:: INTEL_MODIFIER_OVERRIDE
755
756   if set, determines the single DRM modifier reported back to (Vulkan)
757   applications, in order to make selecting modifier deterministic
758   between Vulkan driver and applications. The value can be one of the
759   supported modifiers on a platform, but other values are also acceptable
760   for debug purposes.
761
762.. envvar:: INTEL_NO_HW
763
764   if set to 1, true or yes, prevents batches from being submitted to the
765   hardware. This is useful for debugging hangs, etc.
766
767.. envvar:: INTEL_PRECISE_TRIG
768
769   if set to 1, true or yes, then the driver prefers accuracy over
770   performance in trig functions.
771
772.. envvar:: INTEL_SHADER_OPTIMIZER_PATH
773
774   if set, determines the directory to be used for overriding shader
775   assembly. The binaries with custom assembly should be placed in
776   this folder and have a name formatted as ``sha1_of_assembly.bin``.
777   The SHA-1 of a shader assembly is printed when assembly is dumped via
778   corresponding :envvar:`INTEL_DEBUG` flag (e.g. ``vs`` for vertex shader).
779   A binary could be generated from a dumped assembly by ``i965_asm``.
780   For :envvar:`INTEL_SHADER_ASM_READ_PATH` to work it is necessary to enable
781   dumping of corresponding shader stages via :envvar:`INTEL_DEBUG`.
782   It is advised to use ``nocompact`` flag of :envvar:`INTEL_DEBUG` when
783   dumping and overriding shader assemblies.
784   The success of assembly override would be signified by "Successfully
785   overrode shader with sha1 <SHA-1>" in stderr replacing the original
786   assembly.
787
788.. envvar:: INTEL_SHADER_ASM_READ_PATH
789
790   if set, determines the directory to be used for overriding shader
791   assembly. The binaries with custom assembly should be placed in
792   this folder and have a name formatted as ``sha1_of_assembly.bin``.
793   The SHA-1 of a shader assembly is printed when assembly is dumped via
794   corresponding :envvar:`INTEL_DEBUG` flag (e.g. ``vs`` for vertex shader).
795   A binary could be generated from a dumped assembly by ``i965_asm``.
796   For :envvar:`INTEL_SHADER_ASM_READ_PATH` to work it is necessary to enable
797   dumping of corresponding shader stages via :envvar:`INTEL_DEBUG`.
798   It is advised to use ``nocompact`` flag of :envvar:`INTEL_DEBUG` when
799   dumping and overriding shader assemblies.
800   The success of assembly override would be signified by "Successfully
801   overrode shader with sha1 <SHA-1>" in stderr replacing the original
802   assembly.
803
804.. envvar:: INTEL_SHADER_BIN_DUMP_PATH
805
806   if set, determines the directory to which the compiled shaders will be
807   dumped. They will be dumped as ``sha1_of_assembly.bin``, where the sha1
808   values will be the same as can be found in the :envvar:`INTEL_DEBUG`
809   output, and can be used for :envvar:`INTEL_SHADER_ASM_READ_PATH` input.
810
811   .. note::
812      Unlike the text form of shader dumping, :envvar:`INTEL_DEBUG`
813      does not affect on the list of shaders to dump. All generated shaders
814      are always dumped if :envvar:`INTEL_SHADER_BIN_DUMP_PATH` variable is
815      set.
816
817.. envvar:: INTEL_SIMD_DEBUG
818
819   a comma-separated list of named flags, which control simd dispatch widths:
820
821   ``fs8``
822      allow generation of SIMD8 fragment shader
823   ``fs16``
824      allow generation of SIMD16 fragment shader
825   ``fs32``
826      allow generation of SIMD32 fragment shader
827   ``cs8``
828      allow generation of SIMD8 compute shader
829   ``cs16``
830      allow generation of SIMD16 compute shader
831   ``cs32``
832      allow generation of SIMD32 compute shader
833   ``ts8``
834      allow generation of SIMD8 task shader
835   ``ts16``
836      allow generation of SIMD16 task shader
837   ``ts32``
838      allow generation of SIMD32 task shader
839   ``ms8``
840      allow generation of SIMD8 mesh shader
841   ``ms16``
842      allow generation of SIMD16 mesh shader
843   ``ms32``
844      allow generation of SIMD32 mesh shader
845   ``rt8``
846      allow generation of SIMD8 ray-tracing shader
847   ``rt16``
848      allow generation of SIMD16 ray-tracing shader
849   ``rt32``
850      allow generation of SIMD32 ray-tracing shader
851
852   If none of widths for particular shader stage was specified, then all
853   widths are allowed.
854
855Anvil(ANV) driver environment variables
856---------------------------------------
857
858.. envvar:: ANV_ENABLE_PIPELINE_CACHE
859
860   If defined to ``0`` or ``false``, this will disable pipeline
861   caching, forcing ANV to reparse and recompile any VkShaderModule
862   (SPIRV) it is given.
863
864.. envvar:: ANV_DISABLE_SECONDARY_CMD_BUFFER_CALLS
865
866   If defined to ``1`` or ``true``, this will prevent usage of self
867   modifying command buffers to implement ``vkCmdExecuteCommands``. As
868   a result of this, it will also disable :ext:`VK_KHR_performance_query`.
869
870.. envvar:: ANV_ALWAYS_BINDLESS
871
872   If defined to ``1`` or ``true``, this forces all descriptor sets to
873   use the internal :ref:`Bindless model`.
874
875.. envvar:: ANV_QUEUE_THREAD_DISABLE
876
877   If defined to ``1`` or ``true``, this disables support for timeline
878   semaphores.
879
880.. envvar:: ANV_USERSPACE_RELOCS
881
882   If defined to ``1`` or ``true``, this forces ANV to always do
883   kernel relocations in command buffers. This should only have an
884   effect on hardware that doesn't support soft-pinning (Ivybridge,
885   Haswell, Cherryview).
886
887.. envvar:: ANV_PRIMITIVE_REPLICATION_MAX_VIEWS
888
889   Specifies up to how many view shaders can be lowered to handle
890   :ext:`VK_KHR_multiview`. Beyond this number, multiview is implemented
891   using instanced rendering. If unspecified, the value default to
892   ``2``.
893
894.. envvar:: ANV_NO_GPL
895
896   If set to 1, true, or yes, then VK_EXT_graphics_pipeline_library
897   will be disabled.
898
899.. envvar:: ANV_SPARSE
900
901   By default, the sparse resources feature is enabled. However, if set to 0,
902   false, or no, it will be disabled.
903   Platforms older than Tiger Lake do not support this feature.
904
905.. envvar:: ANV_SPARSE_USE_TRTT
906
907   On platforms supported by Xe KMD (Lunar Lake and newer) this parameter
908   changes the implementation of sparse resources feature.
909   For i915 there is no option, sparse resources is always implemented with
910   TRTT.
911
912DRI environment variables
913-------------------------
914
915.. envvar:: DRI_NO_MSAA
916
917   disable MSAA for GLX/EGL MSAA visuals
918
919
920Vulkan mesa device select layer environment variables
921-----------------------------------------------------
922
923.. envvar:: MESA_VK_DEVICE_SELECT
924
925   when set to "list" prints the list of devices.
926   when set to "vid:did" number from PCI device. That PCI device is
927   selected as default. The default device is returned as the first
928   device in vkEnumeratePhysicalDevices API.
929   Using "vid:did!" will have the same effect as using the
930   ``MESA_VK_DEVICE_SELECT_FORCE_DEFAULT_DEVICE`` variable.
931
932.. envvar:: MESA_VK_DEVICE_SELECT_FORCE_DEFAULT_DEVICE
933
934   when set to 1, the device identified as default will be the only
935   one returned in vkEnumeratePhysicalDevices API.
936
937
938EGL environment variables
939-------------------------
940
941Mesa EGL supports different sets of environment variables. See the
942:doc:`Mesa EGL <egl>` page for the details.
943
944Gallium environment variables
945-----------------------------
946
947.. envvar:: GALLIUM_HUD
948
949   draws various information on the screen, like framerate, CPU load,
950   driver statistics, performance counters, etc. Set
951   :envvar:`GALLIUM_HUD` to ``help`` and run e.g. ``glxgears`` for more info.
952
953.. envvar:: GALLIUM_HUD_PERIOD
954
955   sets the HUD update rate in seconds (float). Use zero to update every
956   frame. The default period is 1/2 second.
957
958.. envvar:: GALLIUM_HUD_VISIBLE
959
960   control default visibility, defaults to true.
961
962.. envvar:: GALLIUM_HUD_OPACITY
963
964   control background opacity as an integer percentage (1-100), defaults to 66%.
965
966.. envvar:: GALLIUM_HUD_TOGGLE_SIGNAL
967
968   toggle visibility via user specified signal. Especially useful to
969   toggle HUD at specific points of application and disable for
970   unencumbered viewing the rest of the time. For example, set
971   :envvar:`GALLIUM_HUD_VISIBLE` to ``false`` and
972   :envvar:`GALLIUM_HUD_TOGGLE_SIGNAL` to ``10`` (``SIGUSR1``). Use
973   ``kill -10 <pid>`` to toggle the HUD as desired.
974
975.. envvar:: GALLIUM_HUD_SCALE
976
977   Scale HUD by an integer factor, for high DPI displays. Default is 1.
978
979.. envvar:: GALLIUM_HUD_ROTATION
980
981   Rotate the HUD by an integer number of degrees, the specified value must be
982   a multiple of 90. Default is 0.
983
984.. envvar:: GALLIUM_HUD_DUMP_DIR
985
986   specifies a directory for writing the displayed HUD values into
987   files.
988
989.. envvar:: GALLIUM_DRIVER
990
991   useful in combination with :envvar:`LIBGL_ALWAYS_SOFTWARE` = ``true`` for
992   choosing one of the software renderers ``softpipe`` or ``llvmpipe``.
993
994.. envvar:: GALLIUM_LOG_FILE
995
996   specifies a file for logging all errors, warnings, etc. rather than
997   stderr.
998
999.. envvar:: GALLIUM_PIPE_SEARCH_DIR
1000
1001   specifies an alternate search directory for pipe-loader which overrides
1002   the compile-time path based on the install location.
1003
1004.. envvar:: GALLIUM_PRINT_OPTIONS
1005
1006   if non-zero, print all the Gallium environment variables which are
1007   used, and their current values.
1008
1009.. envvar:: GALLIUM_TRACE
1010
1011   If set, this variable will cause the :ref:`trace` output to be written to the
1012   specified file. Paths may be relative or absolute; relative paths are relative
1013   to the working directory.  For example, setting it to "trace.xml" will cause
1014   the trace to be written to a file of the same name in the working directory.
1015
1016.. envvar:: GALLIUM_TRACE_TC
1017
1018   If enabled while :ref:`trace` is active, this variable specifies that the threaded context
1019   should be traced for drivers which implement it. By default, the driver thread is traced,
1020   which will include any reordering of the command stream from threaded context.
1021
1022.. envvar:: GALLIUM_TRACE_TRIGGER
1023
1024   If set while :ref:`trace` is active, this variable specifies a filename to monitor.
1025   Once the file exists (e.g., from the user running 'touch /path/to/file'), a single
1026   frame will be recorded into the trace output.
1027   Paths may be relative or absolute; relative paths are relative to the working directory.
1028
1029.. envvar:: GALLIUM_DUMP_CPU
1030
1031   if non-zero, print information about the CPU on start-up
1032
1033.. envvar:: TGSI_PRINT_SANITY
1034
1035   if set, do extra sanity checking on TGSI shaders and print any errors
1036   to stderr.
1037
1038.. envvar:: DRAW_FSE
1039
1040   Enable fetch-shade-emit middle-end even though its not correct (e.g.
1041   for Softpipe)
1042
1043.. envvar:: DRAW_NO_FSE
1044
1045   Disable fetch-shade-emit middle-end even when it is correct
1046
1047.. envvar:: DRAW_USE_LLVM
1048
1049   if set to zero, the draw module will not use LLVM to execute shaders,
1050   vertex fetch, etc.
1051
1052.. envvar:: ST_DEBUG
1053
1054   controls debug output from the Mesa/Gallium state tracker. Setting to
1055   ``tgsi``, for example, will print all the TGSI shaders. See
1056   :file:`src/mesa/state_tracker/st_debug.c` for other options.
1057
1058.. envvar:: GALLIUM_OVERRIDE_CPU_CAPS
1059
1060   Override CPU capabilities for LLVMpipe and Softpipe, possible values for x86:
1061   ``nosse``
1062   ``sse``
1063   ``sse2``
1064   ``sse3``
1065   ``ssse3``
1066   ``sse4.1``
1067   ``avx``
1068
1069Clover environment variables
1070----------------------------
1071
1072.. envvar:: CLOVER_DEVICE_TYPE
1073
1074   allows to overwrite the device type of devices. Possible values are
1075   ``accelerator``, ``cpu``, ``custom`` and ``gpu``
1076
1077.. envvar:: CLOVER_DEVICE_VERSION_OVERRIDE
1078
1079   overwrites the auto detected OpenCL version of a device. Possible values:
1080   ``1.0``
1081   ``1.1``
1082   ``1.2``
1083   ``2.0``
1084   ``2.1``
1085   ``2.2``
1086   ``3.0``
1087
1088.. envvar:: CLOVER_DEVICE_CLC_VERSION_OVERRIDE
1089
1090   overwrites the auto detected CLC version. Possible values:
1091   ``1.0``
1092   ``1.1``
1093   ``1.2``
1094   ``2.0``
1095   ``2.1``
1096   ``2.2``
1097   ``3.0``
1098
1099.. envvar:: CLOVER_EXTRA_BUILD_OPTIONS
1100
1101   allows specifying additional compiler and linker options. Specified
1102   options are appended after the options set by the OpenCL program in
1103   ``clBuildProgram``.
1104
1105.. envvar:: CLOVER_EXTRA_COMPILE_OPTIONS
1106
1107   allows specifying additional compiler options. Specified options are
1108   appended after the options set by the OpenCL program in
1109   ``clCompileProgram``.
1110
1111.. envvar:: CLOVER_EXTRA_LINK_OPTIONS
1112
1113   allows specifying additional linker options. Specified options are
1114   appended after the options set by the OpenCL program in
1115   ``clLinkProgram``.
1116
1117.. _rusticl-env-var:
1118
1119Rusticl environment variables
1120-----------------------------
1121
1122.. envvar:: RUSTICL_DEVICE_TYPE
1123
1124   allows to overwrite the device type of devices. Possible values are
1125   ``accelerator``, ``cpu``, ``custom`` and ``gpu``
1126
1127.. envvar:: RUSTICL_CL_VERSION
1128
1129   overwrites the auto detected OpenCL version of all devices. Specified as
1130   ``major.minor``.
1131
1132.. envvar:: RUSTICL_ENABLE
1133
1134   a comma-separated list of drivers to enable CL on. An optional list of
1135   comma-separated integers can be passed per driver to specify which devices
1136   to enable. Examples:
1137
1138   -  ``RUSTICL_ENABLE=iris`` (enables all iris devices)
1139   -  ``RUSTICL_ENABLE=iris:1,radeonsi:0,2`` (enables second iris and first
1140      and third radeonsi device)
1141
1142   Supported drivers (decent support with maybe a few conformance issues or bugs):
1143   ``iris``,
1144   ``llvmpipe``,
1145   ``nouveau``,
1146   ``panfrost``,
1147   ``radeonsi``,
1148   Experimental drivers (unknown level of support, expect conformance issues or major bugs):
1149   ``r600``
1150
1151.. envvar:: RUSTICL_FEATURES
1152
1153   a comma-separated list of features to enable. Those are disabled by default
1154   as they might not be stable enough or break OpenCL conformance.
1155
1156   - ``fp16`` enables OpenCL half support
1157   - ``fp64`` enables OpenCL double support
1158
1159.. envvar:: RUSTICL_DEBUG
1160
1161   a comma-separated list of debug channels to enable.
1162
1163   - ``allow_invalid_spirv`` disables validation of any input SPIR-V
1164   - ``clc`` dumps all OpenCL C source being compiled
1165   - ``nir`` dumps nirs in various compilation stages. Might print nothing if shader caching is
1166             enabled.
1167   - ``no_reuse_context`` pipe_contexts are not recycled
1168   - ``no_variants`` disable kernel variants (e.g. specialized binaries for offsets == 0)
1169   - ``perf`` prints a warning when hitting slow paths once
1170   - ``perfspam`` same as perf, but doesn't skip same warnings
1171   - ``program`` dumps compilation logs to stderr
1172   - ``sync`` waits on the GPU to complete after every event
1173   - ``validate`` validates any internally generated SPIR-Vs, e.g. through compiling OpenCL C code
1174
1175.. envvar:: RUSTICL_MAX_WORK_GROUPS
1176
1177   Limits the amount of threads per dimension in a work-group. Useful for splitting up long running
1178   tasks to increase responsiveness or to simulate the lowering of huge global sizes for testing.
1179
1180.. _clc-env-var:
1181
1182clc environment variables
1183-----------------------------
1184
1185.. envvar:: CLC_DEBUG
1186
1187   a comma-separated list of debug channels to enable.
1188
1189   - ``dump_llvm`` Dumps all generated LLVM IRs
1190   - ``dump_spirv`` Dumps all compiled, linked and specialized SPIR-Vs
1191   - ``verbose`` Enable debug logging of clc code
1192
1193Nine frontend environment variables
1194-----------------------------------
1195
1196.. envvar:: D3D_ALWAYS_SOFTWARE
1197
1198   an integer, which forces Nine to use the CPU instead of GPU acceleration.
1199
1200.. envvar:: NINE_DEBUG
1201
1202   a comma-separated list of named flags that do debugging things.
1203   Use ``NINE_DEBUG=help`` to print a list of available options.
1204
1205.. envvar:: NINE_FF_DUMP
1206
1207   a boolean, which dumps shaders generated by a fixed function (FF).
1208
1209.. envvar:: NINE_SHADER
1210
1211   a comma-separated list of named flags, which do alternate shader handling.
1212   Use ``NINE_SHADER=help`` to print a list of available options.
1213
1214.. envvar:: NINE_QUIRKS
1215
1216   a comma-separated list of named flags that do various things.
1217   Use ``NINE_DEBUG=help`` to print a list of available options.
1218
1219Softpipe driver environment variables
1220-------------------------------------
1221
1222.. envvar:: SOFTPIPE_DEBUG
1223
1224   a comma-separated list of named flags, which do various things:
1225
1226   ``vs``
1227      Dump vertex shader assembly to stderr
1228   ``fs``
1229      Dump fragment shader assembly to stderr
1230   ``gs``
1231      Dump geometry shader assembly to stderr
1232   ``cs``
1233      Dump compute shader assembly to stderr
1234   ``no_rast``
1235      rasterization is disabled. For profiling purposes.
1236   ``use_llvm``
1237      the Softpipe driver will try to use LLVM JIT for vertex
1238      shading processing.
1239
1240LLVMpipe driver environment variables
1241-------------------------------------
1242
1243.. envvar:: LP_NO_RAST
1244
1245   if set LLVMpipe will no-op rasterization
1246
1247.. envvar:: LP_DEBUG
1248
1249   a comma-separated list of debug options is accepted. See the source
1250   code for details.
1251
1252.. envvar:: LP_PERF
1253
1254   a comma-separated list of options to selectively no-op various parts
1255   of the driver. See the source code for details.
1256
1257.. envvar:: LP_NUM_THREADS
1258
1259   an integer indicating how many threads to use for rendering. Zero
1260   turns off threading completely. The default value is the number of
1261   CPU cores present.
1262
1263VMware SVGA driver environment variables
1264----------------------------------------
1265
1266.. envvar:: SVGA_FORCE_SWTNL
1267
1268   force use of software vertex transformation
1269
1270.. envvar:: SVGA_NO_SWTNL
1271
1272   don't allow software vertex transformation fallbacks (will often
1273   result in incorrect rendering).
1274
1275.. envvar:: SVGA_DEBUG
1276
1277   for dumping shaders, constant buffers, etc. See the code for details.
1278
1279.. envvar:: SVGA_EXTRA_LOGGING
1280
1281   if set, enables extra logging to the ``vmware.log`` file, such as the
1282   OpenGL program's name and command line arguments.
1283
1284.. envvar:: SVGA_NO_LOGGING
1285
1286   if set, disables logging to the ``vmware.log`` file. This is useful
1287   when using Valgrind because it otherwise crashes when initializing
1288   the host log feature.
1289
1290See the driver code for other, lesser-used variables.
1291
1292VA-API environment variables
1293----------------------------
1294
1295.. envvar:: VAAPI_MPEG4_ENABLED
1296
1297   enable MPEG4 for VA-API, disabled by default.
1298
1299VC4 driver environment variables
1300--------------------------------
1301
1302.. envvar:: VC4_DEBUG
1303
1304   a comma-separated list of named flags, which do various things. Use
1305   ``VC4_DEBUG=help`` to print a list of available options.
1306
1307V3D/V3DV driver environment variables
1308-------------------------------------
1309
1310.. envvar:: V3D_DEBUG
1311
1312   a comma-separated list of debug options. Use ``V3D_DEBUG=help`` to
1313   print a list of available options.
1314
1315
1316.. _radv env-vars:
1317
1318RADV driver environment variables
1319---------------------------------
1320
1321.. envvar:: RADV_DEBUG
1322
1323   a comma-separated list of named flags, which do various things:
1324
1325   ``llvm``
1326      enable LLVM compiler backend
1327   ``allbos``
1328      force all allocated buffers to be referenced in submissions
1329   ``checkir``
1330      validate the LLVM IR before LLVM compiles the shader
1331   ``dump_trap_handler``
1332      dump the trap handler shader
1333   ``epilogs``
1334      dump fragment shader epilogs
1335   ``extra_md``
1336      add extra information in bo metadata to help tools (umr)
1337   ``forcecompress``
1338      Enables DCC,FMASK,CMASK,HTILE in situations where the driver supports it
1339      but normally does not deem it beneficial.
1340   ``hang``
1341      enable GPU hangs detection and dump a report to
1342      $HOME/radv_dumps_<pid>_<time> if a GPU hang is detected
1343   ``img``
1344      Print image info
1345   ``info``
1346      show GPU-related information
1347   ``invariantgeom``
1348      Mark geometry-affecting outputs as invariant. This works around a common
1349      class of application bugs appearing as flickering.
1350   ``metashaders``
1351      dump internal meta shaders
1352   ``noatocdithering``
1353      disable dithering for alpha to coverage
1354   ``nobinning``
1355      disable primitive binning
1356   ``nocache``
1357      disable shaders cache
1358   ``nocompute``
1359      disable compute queue
1360   ``nodcc``
1361      disable Delta Color Compression (DCC) on images
1362   ``nodisplaydcc``
1363      disable Delta Color Compression (DCC) on displayable images
1364   ``nodynamicbounds``
1365      do not check OOB access for dynamic descriptors
1366   ``noeso``
1367      disable VK_EXT_shader_object
1368   ``nofastclears``
1369      disable fast color/depthstencil clears
1370   ``nofmask``
1371      disable FMASK compression on MSAA images (GFX6-GFX10.3)
1372   ``nogpl``
1373      disable VK_EXT_graphics_pipeline_library
1374   ``nohiz``
1375      disable HIZ for depthstencil images
1376   ``noibs``
1377      disable directly recording command buffers in GPU-visible memory
1378   ``nomeshshader``
1379      disable mesh shader support on GFX10.3+
1380   ``nongg``
1381      disable NGG for GFX10 and GFX10.3
1382   ``nonggc``
1383      disable NGG culling on GPUs where it's enabled by default (GFX10.3 only).
1384   ``nongg_gs``
1385      disable NGG GS for GFX10 and GFX10.3
1386   ``nort``
1387      skip executing vkCmdTraceRays and ray queries (RT extensions will still be
1388      advertised)
1389   ``notccompatcmask``
1390      disable TC-compat CMASK for MSAA surfaces
1391   ``noumr``
1392      disable UMR dumps during GPU hang detection (only with
1393      :envvar:`RADV_DEBUG` = ``hang``)
1394   ``novrsflatshading``
1395      disable VRS for flat shading (only on GFX10.3+)
1396   ``preoptir``
1397      Dump backend IR (ACO or LLVM) before any optimizations.
1398   ``prologs``
1399      dump vertex shader prologs
1400   ``psocachestats``
1401     dump PSO cache stats (hits/misses) to verify precompilation of shaders
1402   ``shaders``
1403      dump shaders
1404   ``shaderstats``
1405      dump shader statistics
1406   ``shadowregs``
1407      enable register shadowing
1408   ``spirv``
1409      dump SPIR-V
1410   ``splitfma``
1411      split application-provided fused multiply-add in geometry stages
1412   ``startup``
1413      display info at startup
1414   ``syncshaders``
1415      synchronize shaders after all draws/dispatches
1416   ``zerovram``
1417      initialize all memory allocated in VRAM as zero
1418   ``vs``
1419      Dump vertex shaders.
1420   ``tcs``
1421      Dump tessellation control shaders.
1422   ``tes``
1423      Dump tessellation evaluation shaders.
1424   ``gs``
1425      Dump geometry shaders.
1426   ``ps``
1427      Dump fragment shaders.
1428   ``task``
1429      Dump task shaders.
1430   ``mesh``
1431      Dump mesh shaders.
1432   ``cs``
1433      Dump compute (and ray tracing) shaders.
1434   ``nir``
1435      Dump NIR for selected shader stages.
1436   ``ir``
1437      Dump backend IR (ACO or LLVM) for selected shader stages.
1438   ``asm``
1439      Dump shader disassembly for selected shader stages.
1440
1441.. envvar:: RADV_FORCE_FAMILY
1442
1443   create a null device to compile shaders without a AMD GPU (e.g. VEGA10)
1444
1445.. envvar:: RADV_FORCE_VRS
1446
1447   allow to force per-pipeline vertex VRS rates on GFX10.3+. This is only
1448   forced for pipelines that don't explicitly use VRS or flat shading.
1449   The supported values are 2x2, 1x2, 2x1 and 1x1. Only for testing purposes.
1450
1451.. envvar:: RADV_FORCE_VRS_CONFIG_FILE
1452
1453   similar to ``RADV_FORCE_VRS`` but allow to configure from a file. If present,
1454   this supersedes ``RADV_FORCE_VRS``.
1455
1456.. envvar:: RADV_PERFTEST
1457
1458   a comma-separated list of named flags, which do various things:
1459
1460   ``bolist``
1461      enable the global BO list
1462   ``cswave32``
1463      enable wave32 for compute shaders (GFX10+)
1464   ``dccmsaa``
1465      enable DCC for MSAA images
1466   ``dmashaders``
1467      upload shaders to invisible VRAM (might be useful for non-resizable BAR systems)
1468   ``emulate_rt``
1469      forces ray-tracing to be emulated in software on GFX10_3+ and enables
1470      rt extensions with older hardware.
1471   ``gewave32``
1472      enable wave32 for vertex/tess/geometry shaders (GFX10+)
1473   ``localbos``
1474      enable local BOs
1475   ``nggc``
1476      enable NGG culling on GPUs where it's not enabled by default (GFX10.1 only).
1477   ``nircache``
1478      cache per-stage NIR for graphics pipelines
1479   ``nosam``
1480      disable optimizations that get enabled when all VRAM is CPU visible.
1481   ``pswave32``
1482      enable wave32 for pixel shaders (GFX10+)
1483   ``rtwave32``
1484      enable wave32 for ray tracing shaders (GFX11+)
1485   ``rtwave64``
1486      enable wave64 for ray tracing shaders (GFX10-10.3)
1487   ``sam``
1488      enable optimizations to move more driver internal objects to VRAM.
1489   ``transfer_queue``
1490      enable experimental transfer queue support (GFX9+, not yet spec compliant)
1491   ``video_decode``
1492      enable experimental video decoding support
1493
1494.. envvar:: RADV_TEX_ANISO
1495
1496   force anisotropy filter (up to 16)
1497
1498.. envvar:: RADV_THREAD_TRACE_BUFFER_SIZE
1499
1500   set the SQTT/RGP buffer size in bytes (default value is 32MiB, the buffer is
1501   automatically resized if too small)
1502
1503.. envvar:: RADV_THREAD_TRACE_CACHE_COUNTERS
1504
1505   enable/disable SQTT/RGP cache counters on GFX10+ (enabled by default)
1506
1507.. envvar:: RADV_THREAD_TRACE_INSTRUCTION_TIMING
1508
1509   enable/disable SQTT/RGP instruction timing (enabled by default)
1510
1511.. envvar:: RADV_THREAD_TRACE_QUEUE_EVENTS
1512
1513   enable/disable SQTT/RGP queue events (enabled by default)
1514
1515.. envvar:: RADV_TRAP_HANDLER
1516
1517   enable/disable the experimental trap handler for debugging GPU hangs on GFX8
1518   (disabled by default)
1519
1520.. envvar:: RADV_TRAP_HANDLER_EXCP
1521
1522  a comma-separated list of named flags to configure the trap handler
1523  exceptions, see the list below:
1524
1525  ``mem_viol``
1526    enable memory violation exception
1527  ``float_div_by_zero``
1528    enable floating point division by zero exception
1529  ``float_overflow``
1530    enable floating point overflow exception
1531  ``float_underflow``
1532    enable floating point underflow exception
1533
1534.. envvar:: RADV_RRA_TRACE_VALIDATE
1535
1536   enable validation of captured acceleration structures. Can be
1537   useful if RRA crashes upon opening a trace.
1538
1539.. envvar:: RADV_RRA_TRACE_HISTORY_SIZE
1540
1541   set the ray history buffer size when capturing RRA traces (default value is 100MiB,
1542   small buffers may result in incomplete traces)
1543
1544.. envvar:: RADV_RRA_TRACE_RESOLUTION_SCALE
1545
1546   decrease the resolution used for dumping the ray history resolution when capturing
1547   RRA traces. This allows for dumping every Nth invocation along each dispatch dimension.
1548
1549.. envvar:: RADV_PROFILE_PSTATE
1550
1551   choose the specific pstate to enter when using thread tracing or when acquiring the
1552   profiling lock for performance queries.
1553
1554   ``standard``
1555      force GPU clocks to an arbitrary fixed level
1556   ``min_sclk``
1557      force the shader clock to its minimum level
1558   ``min_mclk``
1559      force the memory clock to its minimum level
1560   ``peak``
1561      force GPU clocks to their maximum level, this is the default value
1562
1563.. envvar:: ACO_DEBUG
1564
1565   a comma-separated list of named flags, which do various things:
1566
1567   ``validateir``
1568      validate the ACO IR at various points of compilation (enabled by
1569      default for debug/debugoptimized builds)
1570   ``novalidateir``
1571      disable ACO IR validation in debug/debugoptimized builds
1572   ``validatera``
1573      validate register assignment of ACO IR and catches many RA bugs
1574   ``force-waitcnt``
1575      force emitting waitcnt states if there is something to wait for
1576   ``force-waitdeps``
1577     force emitting waitcnt dependencies for debugging hazards on GFX10+
1578   ``novn``
1579      disable value numbering
1580   ``noopt``
1581      disable various optimizations
1582   ``nosched``
1583      disable pre-RA, ILP and VOPD instruction scheduling
1584   ``nosched-ilp``
1585      disable ILP instruction scheduling
1586   ``nosched-vopd``
1587      disable VOPD instruction scheduling
1588   ``perfinfo``
1589      print information used to calculate some pipeline statistics
1590   ``liveinfo``
1591      print liveness and register demand information before scheduling
1592
1593RadeonSI driver environment variables
1594-------------------------------------
1595
1596.. envvar:: radeonsi_no_infinite_interp
1597
1598   Kill PS with infinite interp coeff (might fix hangs)
1599
1600.. envvar:: radeonsi_clamp_div_by_zero
1601
1602   Clamp div by zero (x / 0 becomes FLT_MAX instead of NaN) (might fix rendering corruptions)
1603
1604.. envvar:: radeonsi_zerovram
1605
1606   Clear all allocated memory to 0 before usage (might fix rendering corruptions)
1607
1608.. envvar:: AMD_DEBUG
1609
1610   a comma-separated list of named flags, which do various things:
1611
1612   ``nodcc``
1613      Disable DCC.
1614   ``nodccclear``
1615      Disable DCC fast clear
1616   ``nodisplaydcc``
1617      disable Delta Color Compression (DCC) on displayable images
1618   ``nodccmsaa``
1619      Disable DCC for MSAA
1620   ``nodpbb``
1621      Disable DPBB. Overrules the dpbb enable option.
1622   ``noefc``
1623      Disable hardware based encoder color format conversion
1624   ``lowlatencyenc``
1625      Enable low latency encoding
1626   ``notiling``
1627      Disable tiling
1628   ``nofmask``
1629      Disable MSAA compression
1630   ``nohyperz``
1631      Disable Hyper-Z
1632   ``no2d``
1633      Disable 2D tiling
1634   ``info``
1635      Print driver information
1636   ``tex``
1637      Print texture info
1638   ``compute``
1639      Print compute info
1640   ``vm``
1641      Print virtual addresses when creating resources
1642   ``vs``
1643      Print vertex shaders
1644   ``ps``
1645      Print pixel shaders
1646   ``gs``
1647      Print geometry shaders
1648   ``tcs``
1649      Print tessellation control shaders
1650   ``tes``
1651      Print tessellation evaluation shaders
1652   ``cs``
1653      Print compute shaders
1654   ``noir``
1655      Don't print the LLVM IR
1656   ``nonir``
1657      Don't print NIR when printing shaders
1658   ``noasm``
1659      Don't print disassembled shaders
1660   ``preoptir``
1661      Print the LLVM IR before initial optimizations
1662   ``w32ge``
1663      Use Wave32 for vertex, tessellation, and geometry shaders.
1664   ``w32ps``
1665      Use Wave32 for pixel shaders.
1666   ``w32cs``
1667      Use Wave32 for computes shaders.
1668   ``w64ge``
1669      Use Wave64 for vertex, tessellation, and geometry shaders.
1670   ``w64ps``
1671      Use Wave64 for pixel shaders.
1672   ``w64cs``
1673      Use Wave64 for computes shaders.
1674   ``checkir``
1675      Enable additional sanity checks on shader IR
1676   ``mono``
1677      Use old-style monolithic shaders compiled on demand
1678   ``nooptvariant``
1679      Disable compiling optimized shader variants.
1680   ``useaco``
1681      Use ACO as shader compiler when possible
1682   ``nowc``
1683      Disable GTT write combining
1684   ``check_vm``
1685      Check VM faults and dump debug info.
1686   ``reserve_vmid``
1687      Force VMID reservation per context.
1688   ``nongg``
1689      Disable NGG and use the legacy pipeline.
1690   ``nggc``
1691      Always use NGG culling even on GPUs where it is disabled by default.
1692   ``nonggc``
1693      Disable NGG culling.
1694   ``switch_on_eop``
1695      Program WD/IA to switch on end-of-packet.
1696   ``nooutoforder``
1697      Disable out-of-order rasterization
1698   ``dpbb``
1699      Enable DPBB. Enable DPBB for gfx9 dGPU. Default enabled for gfx9 APU and >= gfx10.
1700   ``extra_md``
1701      add extra information in bo metadata to help tools (umr)
1702
1703r600 driver environment variables
1704---------------------------------
1705
1706.. envvar:: R600_DEBUG
1707
1708   a comma-separated list of named flags, which do various things:
1709
1710   ``nocpdma``
1711      Disable CP DMA
1712   ``nosb``
1713      Disable sb backend for graphics shaders
1714   ``sbcl``
1715      Enable sb backend for compute shaders
1716   ``sbdry``
1717      Don't use optimized bytecode (just print the dumps)
1718   ``sbstat``
1719      Print optimization statistics for shaders
1720   ``sbdump``
1721      Print IR dumps after some optimization passes
1722   ``sbnofallback``
1723      Abort on errors instead of fallback
1724   ``sbdisasm``
1725      Use sb disassembler for shader dumps
1726   ``sbsafemath``
1727      Disable unsafe math optimizations
1728   ``nirsb``
1729      Enable NIR with SB optimizer
1730   ``tex``
1731      Print texture info
1732   ``nir``
1733      Enable experimental NIR shaders
1734   ``compute``
1735      Print compute info
1736   ``vm``
1737      Print virtual addresses when creating resources
1738   ``info``
1739      Print driver information
1740   ``fs``
1741      Print fetch shaders
1742   ``vs``
1743      Print vertex shaders
1744   ``gs``
1745      Print geometry shaders
1746   ``ps``
1747      Print pixel shaders
1748   ``cs``
1749      Print compute shaders
1750   ``tcs``
1751      Print tessellation control shaders
1752   ``tes``
1753      Print tessellation evaluation shaders
1754   ``noir``
1755      Don't print the LLVM IR
1756   ``notgsi``
1757      Don't print the TGSI
1758   ``noasm``
1759      Don't print disassembled shaders
1760   ``preoptir``
1761      Print the LLVM IR before initial optimizations
1762   ``checkir``
1763      Enable additional sanity checks on shader IR
1764   ``nooptvariant``
1765      Disable compiling optimized shader variants.
1766   ``testdma``
1767      Invoke SDMA tests and exit.
1768   ``testvmfaultcp``
1769      Invoke a CP VM fault test and exit.
1770   ``testvmfaultsdma``
1771      Invoke a SDMA VM fault test and exit.
1772   ``testvmfaultshader``
1773      Invoke a shader VM fault test and exit.
1774   ``nodma``
1775      Disable asynchronous DMA
1776   ``nohyperz``
1777      Disable Hyper-Z
1778   ``noinvalrange``
1779      Disable handling of INVALIDATE_RANGE map flags
1780   ``no2d``
1781      Disable 2D tiling
1782   ``notiling``
1783      Disable tiling
1784   ``switch_on_eop``
1785      Program WD/IA to switch on end-of-packet.
1786   ``forcedma``
1787      Use asynchronous DMA for all operations when possible.
1788   ``precompile``
1789      Compile one shader variant at shader creation.
1790   ``nowc``
1791      Disable GTT write combining
1792   ``check_vm``
1793      Check VM faults and dump debug info.
1794   ``unsafemath``
1795      Enable unsafe math shader optimizations
1796
1797.. envvar:: R600_DEBUG_COMPUTE
1798
1799   if set to ``true``, various compute-related debug information will
1800   be printed to stderr. Defaults to ``false``.
1801
1802.. envvar:: R600_DUMP_SHADERS
1803
1804   if set to ``true``, NIR shaders will be printed to stderr. Defaults
1805   to ``false``.
1806
1807.. envvar:: R600_HYPERZ
1808
1809   If set to ``false``, disables HyperZ optimizations. Defaults to ``true``.
1810
1811.. envvar:: R600_NIR_DEBUG
1812
1813   a comma-separated list of named flags, which do various things:
1814
1815   ``instr``
1816      Log all consumed nir instructions
1817   ``ir``
1818      Log created R600 IR
1819   ``cc``
1820      Log R600 IR to assembly code creation
1821   ``noerr``
1822      Don't log shader conversion errors
1823   ``si``
1824      Log shader info (non-zero values)
1825   ``reg``
1826      Log register allocation and lookup
1827   ``io``
1828      Log shader in and output
1829   ``ass``
1830      Log IR to assembly conversion
1831   ``flow``
1832      Log control flow instructions
1833   ``merge``
1834      Log register merge operations
1835   ``nomerge``
1836      Skip register merge step
1837   ``tex``
1838      Log texture ops
1839   ``trans``
1840      Log generic translation messages
1841
1842r300 driver environment variables
1843---------------------------------
1844
1845.. envvar:: RADEON_DEBUG
1846
1847   a comma-separated list of named flags, which do various things:
1848
1849   ``info``
1850      Print hardware info (printed by default on debug builds
1851   ``fp``
1852      Log fragment program compilation
1853   ``vp``
1854      Log vertex program compilation
1855   ``draw``
1856      Log draw calls
1857   ``swtcl``
1858      Log SWTCL-specific info
1859   ``rsblock``
1860      Log rasterizer registers
1861   ``psc``
1862      Log vertex stream registers
1863   ``tex``
1864      Log basic info about textures
1865   ``texalloc``
1866      Log texture mipmap tree info
1867   ``rs``
1868      Log rasterizer
1869   ``fb``
1870      Log framebuffer
1871   ``cbzb``
1872      Log fast color clear info
1873   ``hyperz``
1874      Log HyperZ info
1875   ``scissor``
1876      Log scissor info
1877   ``msaa``
1878      Log MSAA resources
1879   ``anisohq``
1880      Use high quality anisotropic filtering
1881   ``notiling``
1882      Disable tiling
1883   ``noimmd``
1884      Disable immediate mode
1885   ``noopt``
1886      Disable shader optimizations
1887   ``nocbzb``
1888      Disable fast color clear
1889   ``nozmask``
1890      Disable zbuffer compression
1891   ``nohiz``
1892      Disable hierarchical zbuffer
1893   ``nocmask``
1894      Disable AA compression and fast AA clear
1895   ``notcl``
1896      Disable hardware accelerated Transform/Clip/Lighting
1897   ``ieeemath``
1898      Force IEEE versions of VS math opcodes where applicable
1899      and also IEEE handling of multiply by zero (R5xx only)
1900   ``ffmath``
1901      Force FF versions of VS math opcodes where applicable
1902      and 0 * anything = 0 rules in FS
1903
1904
1905Asahi driver environment variables
1906----------------------------------
1907
1908.. envvar:: ASAHI_MESA_DEBUG
1909
1910   a comma-separated list of named flags, which do various things:
1911
1912   ``trace``
1913      Trace work submitted to the GPU to files, using the agxdecode
1914      infrastructure. This produces a large volume of data, so should be used
1915      with caution. The traces are written to ``agxdecode.dump``,
1916      but this can be overridden using ``AGXDECODE_DUMP_FILE``.
1917   ``no16``
1918      Disable 16-bit floating point support. This may workaround application
1919      bugs in certain OpenGL ES applications originally written for desktops. If
1920      such applications are found in the wild, they should be fixed upstream (if
1921      possible) or added in the Mesa-wide driconf (if closed source).
1922   ``dirty``
1923      In debug builds only: disable dirty tracking optimizations.
1924   ``nowc``
1925      Disable write-combining (force all allocations to be write-through). This
1926      may be useful for diagnosing certain performance issues. Note imported
1927      buffers may still be write-combined.
1928
1929.. envvar:: AGX_MESA_DEBUG
1930
1931   a comma-separated list of named flags, which do various things:
1932
1933   ``shaders``
1934      Print shaders being compiled at various stages in the pipeline.
1935   ``shaderdb``
1936      Print statistics about compiled shaders.
1937   ``verbose``
1938      Disassemble in verbose mode, including additional information that may be
1939      useful for debugging.
1940   ``internal``
1941      Include even internal shaders (as produced for clears, blits, and such)
1942      when printing shaders. Without this flag, internal shaders are ignored by
1943      the shaders and shaderdb flags.
1944   ``novalidate``
1945      In debug builds only: skip internal intermediate representation validation.
1946   ``noopt``
1947      Disable various backend optimizations.
1948
1949.. _imagination env-vars:
1950
1951PowerVR driver environment variables
1952------------------------------------------------
1953
1954.. envvar:: PVR_DEBUG
1955
1956   A comma-separated list of debug options. Use ``PVR_DEBUG=help`` to
1957   print a list of available options.
1958
1959.. envvar:: ROGUE_DEBUG
1960
1961   a comma-separated list of named flags for the Rogue compiler,
1962   which do various things:
1963
1964   ``nir``
1965      Print the input NIR to stdout.
1966   ``nir_passes``
1967      Print the output of each NIR pass to stdout.
1968   ``ir``
1969      Print the input Rogue IR to stdout.
1970   ``ir_passes``
1971      Print the output of each Rogue IR pass to stdout.
1972   ``ir_details``
1973      Includes additional details when printing Rogue IR.
1974   ``vld_skip``
1975      Skips the compiler validation step.
1976   ``vld_nonfatal``
1977      Prints all the validation errors instead of stopping after the first.
1978
1979.. envvar:: ROGUE_COLOR
1980
1981   if set to ``auto`` Rogue IR will be colorized if stdout is not a pipe.
1982   Color is forced off if set to ``off``/``0`` or on if set to ``on``/``1``.
1983   Defaults to ``auto``.
1984
1985.. envvar:: PCO_DEBUG
1986
1987   A comma-separated list of named flags for the PCO compiler,
1988   which control various compilation options:
1989
1990   ``val_skip``
1991      Skip IR validation.
1992
1993   ``reindex``
1994      Reindex IR at the end of each pass.
1995
1996.. envvar:: PCO_SKIP_PASSES
1997
1998   A comma-separated list of passes to skip.
1999
2000.. envvar:: PCO_PRINT
2001
2002   A comma-separated list of named flags for the PCO compiler,
2003   which control debug printing options:
2004
2005   ``vs``
2006      Print the IR for vertex shaders.
2007   ``fs``
2008      Print the IR for fragment shaders.
2009   ``cs``
2010      Print the IR for compute shaders.
2011   ``all``
2012      Print the IR for all shaders.
2013   ``internal``
2014      Print the IR for internal shader types.
2015   ``passes``
2016      Print the IR after each pass.
2017   ``nir``
2018      Print the resulting NIR.
2019   ``binary``
2020      Print the resulting binary.
2021   ``verbose``
2022      Print verbose IR.
2023   ``ra``
2024      Print register alloc info.
2025
2026.. envvar:: PCO_COLOR
2027
2028   if set to ``auto`` PCO IR will be colorized if stdout is not a pipe.
2029   Color is forced off if set to ``off``/``0`` or on if set to ``on``/``1``.
2030   Defaults to ``auto``.
2031
2032i915 driver environment variables
2033---------------------------------
2034
2035.. envvar:: I915_DEBUG
2036
2037   Debug flags for the i915 driver.
2038
2039.. envvar:: I915_NO_HW
2040
2041   Stop the i915 driver from submitting commands to the hardware.
2042
2043.. envvar:: I915_DUMP_CMD
2044
2045   Dump all commands going to the hardware.
2046
2047Freedreno driver environment variables
2048--------------------------------------
2049
2050.. envvar:: FD_MESA_DEBUG
2051
2052   Debug flags for the Freedreno driver.
2053
2054----
2055
2056Other Gallium drivers have their own environment variables. These may
2057change frequently so the source code should be consulted for details.
2058
2059
2060Vulkan loader environment variables
2061-----------------------------------
2062
2063These variable are handled by `Khronos' Vulkan loader
2064<https://github.com/KhronosGroup/Vulkan-Loader>`__, *not by Mesa*, but they
2065are documented here as we reference them in other places in our docs.
2066
2067.. envvar:: VK_DRIVER_FILES
2068
2069   Force the loader to use the specific driver JSON files. The value contains
2070   a list of delimited full path listings to driver JSON Manifest files
2071   and/or paths to folders containing driver JSON files.
2072
2073   See `Vulkan loader docs on environment variables`_.
2074
2075.. envvar:: VK_LOADER_LAYERS_ENABLE
2076
2077    A comma-delimited list of globs to search for in known layers and used to
2078    select only the layers whose layer name matches one or more of the
2079    provided globs.
2080    Known layers are those which are found by the loader taking into account
2081    default search paths and other environment variables (like VK_LAYER_PATH).
2082
2083   See `Vulkan loader docs on environment variables`_.
2084
2085.. envvar:: VK_ICD_FILENAMES
2086
2087   `Deprecated`_, replaced by :envvar:`VK_DRIVER_FILES`.
2088
2089.. envvar:: VK_INSTANCE_LAYERS
2090
2091   `Deprecated`_, replaced by :envvar:`VK_LOADER_LAYERS_ENABLE`.
2092
2093.. _Vulkan loader docs on environment variables: https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md#table-of-debug-environment-variables
2094.. _Deprecated: https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md#deprecated-environment-variables
2095