blob: 28ef199308913d638cb8751019d78b4512ec85c8 [file] [log] [blame]
Erik Faye-Lund4d066832020-06-12 20:09:42 +02001Environment 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``LIBGL_DEBUG``
12 If defined debug information will be printed to stderr. If set to
13 ``verbose`` additional information will be printed.
14``LIBGL_DRIVERS_PATH``
15 colon-separated list of paths to search for DRI drivers
16``LIBGL_ALWAYS_INDIRECT``
17 if set to ``true``, forces an indirect rendering context/connection.
18``LIBGL_ALWAYS_SOFTWARE``
19 if set to ``true``, always use software rendering
20``LIBGL_NO_DRAWARRAYS``
21 if set to ``true``, do not use DrawArrays GLX protocol (for
22 debugging)
23``LIBGL_SHOW_FPS``
24 print framerate to stdout based on the number of ``glXSwapBuffers``
25 calls per second.
Adam Jacksona59b1b182020-11-19 09:54:18 -050026``LIBGL_DRI2_DISABLE``
27 disable DRI2 if set to ``true``.
Erik Faye-Lund4d066832020-06-12 20:09:42 +020028``LIBGL_DRI3_DISABLE``
29 disable DRI3 if set to ``true``.
30
31Core Mesa environment variables
32-------------------------------
33
34``MESA_NO_ASM``
35 if set, disables all assembly language optimizations
36``MESA_NO_MMX``
37 if set, disables Intel MMX optimizations
38``MESA_NO_3DNOW``
39 if set, disables AMD 3DNow! optimizations
40``MESA_NO_SSE``
41 if set, disables Intel SSE optimizations
42``MESA_NO_ERROR``
43 if set to 1, error checking is disabled as per ``KHR_no_error``. This
Erik Faye-Lundf4083432020-09-30 10:33:25 +020044 will result in undefined behavior for invalid use of the API, but
Erik Faye-Lund4d066832020-06-12 20:09:42 +020045 can reduce CPU use for apps that are known to be error free.
46``MESA_DEBUG``
47 if set, error messages are printed to stderr. For example, if the
48 application generates a ``GL_INVALID_ENUM`` error, a corresponding
49 error message indicating where the error occurred, and possibly why,
50 will be printed to stderr. For release builds, ``MESA_DEBUG``
51 defaults to off (no debug output). ``MESA_DEBUG`` accepts the
52 following comma-separated list of named flags, which adds extra
Erik Faye-Lund98909272020-09-25 14:54:56 +020053 behavior to just set ``MESA_DEBUG=1``:
Erik Faye-Lund4d066832020-06-12 20:09:42 +020054
55 ``silent``
56 turn off debug messages. Only useful for debug builds.
57 ``flush``
58 flush after each drawing command
59 ``incomplete_tex``
60 extra debug messages when a texture is incomplete
61 ``incomplete_fbo``
Erik Faye-Lund4aded092020-09-30 15:03:03 +020062 extra debug messages when a FBO is incomplete
Erik Faye-Lund4d066832020-06-12 20:09:42 +020063 ``context``
64 create a debug context (see ``GLX_CONTEXT_DEBUG_BIT_ARB``) and
65 print error and performance messages to stderr (or
66 ``MESA_LOG_FILE``).
67
68``MESA_LOG_FILE``
69 specifies a file name for logging all errors, warnings, etc., rather
70 than stderr
71``MESA_TEX_PROG``
72 if set, implement conventional texture env modes with fragment
73 programs (intended for developers only)
74``MESA_TNL_PROG``
75 if set, implement conventional vertex transformation operations with
76 vertex programs (intended for developers only). Setting this variable
77 automatically sets the ``MESA_TEX_PROG`` variable as well.
78``MESA_EXTENSION_OVERRIDE``
79 can be used to enable/disable extensions. A value such as
80 ``GL_EXT_foo -GL_EXT_bar`` will enable the ``GL_EXT_foo`` extension
81 and disable the ``GL_EXT_bar`` extension.
82``MESA_EXTENSION_MAX_YEAR``
83 The ``GL_EXTENSIONS`` string returned by Mesa is sorted by extension
84 year. If this variable is set to year X, only extensions defined on
85 or before year X will be reported. This is to work-around a bug in
86 some games where the extension string is copied into a fixed-size
87 buffer without truncating. If the extension string is too long, the
88 buffer overrun can cause the game to crash. This is a work-around for
89 that.
90``MESA_GL_VERSION_OVERRIDE``
91 changes the value returned by ``glGetString(GL_VERSION)`` and
92 possibly the GL API type.
93
94 - The format should be ``MAJOR.MINOR[FC|COMPAT]``
95 - ``FC`` is an optional suffix that indicates a forward compatible
96 context. This is only valid for versions >= 3.0.
97 - ``COMPAT`` is an optional suffix that indicates a compatibility
98 context or ``GL_ARB_compatibility`` support. This is only valid
99 for versions >= 3.1.
100 - GL versions <= 3.0 are set to a compatibility (non-Core) profile
101 - GL versions = 3.1, depending on the driver, it may or may not have
102 the ``ARB_compatibility`` extension enabled.
103 - GL versions >= 3.2 are set to a Core profile
104 - Examples:
105
106 ``2.1``
107 select a compatibility (non-Core) profile with GL version 2.1.
108 ``3.0``
109 select a compatibility (non-Core) profile with GL version 3.0.
110 ``3.0FC``
111 select a Core+Forward Compatible profile with GL version 3.0.
112 ``3.1``
113 select GL version 3.1 with ``GL_ARB_compatibility`` enabled per
114 the driver default.
115 ``3.1FC``
116 select GL version 3.1 with forward compatibility and
117 ``GL_ARB_compatibility`` disabled.
118 ``3.1COMPAT``
119 select GL version 3.1 with ``GL_ARB_compatibility`` enabled.
120 ``X.Y``
121 override GL version to X.Y without changing the profile.
122 ``X.YFC``
123 select a Core+Forward Compatible profile with GL version X.Y.
124 ``X.YCOMPAT``
125 select a Compatibility profile with GL version X.Y.
126
127 - Mesa may not really implement all the features of the given
128 version. (for developers only)
129
130``MESA_GLES_VERSION_OVERRIDE``
131 changes the value returned by ``glGetString(GL_VERSION)`` for OpenGL
132 ES.
133
134 - The format should be ``MAJOR.MINOR``
135 - Examples: ``2.0``, ``3.0``, ``3.1``
136 - Mesa may not really implement all the features of the given
137 version. (for developers only)
138
139``MESA_GLSL_VERSION_OVERRIDE``
140 changes the value returned by
141 ``glGetString(GL_SHADING_LANGUAGE_VERSION)``. Valid values are
142 integers, such as ``130``. Mesa will not really implement all the
143 features of the given language version if it's higher than what's
144 normally reported. (for developers only)
145``MESA_GLSL_CACHE_DISABLE``
John Bates5de56932020-09-30 18:35:02 -0700146 if set to ``true``, disables the GLSL shader cache. If set to
147 ``false``, enables the GLSL shader cache when it is disabled by
148 default.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200149``MESA_GLSL_CACHE_MAX_SIZE``
150 if set, determines the maximum size of the on-disk cache of compiled
151 GLSL programs. Should be set to a number optionally followed by
152 ``K``, ``M``, or ``G`` to specify a size in kilobytes, megabytes, or
153 gigabytes. By default, gigabytes will be assumed. And if unset, a
Erik Faye-Lundbf3f0f72019-06-04 10:39:58 +0200154 maximum size of 1GB will be used.
155
156 .. note::
157
158 A separate cache might be created for each architecture that Mesa is
159 installed for on your system. For example under the default settings
160 you may end up with a 1GB cache for x86_64 and another 1GB cache for
161 i386.
162
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200163``MESA_GLSL_CACHE_DIR``
164 if set, determines the directory to be used for the on-disk cache of
165 compiled GLSL programs. If this variable is not set, then the cache
166 will be stored in ``$XDG_CACHE_HOME/mesa_shader_cache`` (if that
167 variable is set), or else within ``.cache/mesa_shader_cache`` within
168 the user's home directory.
169``MESA_GLSL``
Erik Faye-Lund9be0e2d2020-06-15 12:31:36 +0200170 :ref:`shading language compiler options <envvars>`
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200171``MESA_NO_MINMAX_CACHE``
172 when set, the minmax index cache is globally disabled.
173``MESA_SHADER_CAPTURE_PATH``
Erik Faye-Lund9be0e2d2020-06-15 12:31:36 +0200174 see :ref:`Capturing Shaders <capture>`
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200175``MESA_SHADER_DUMP_PATH`` and ``MESA_SHADER_READ_PATH``
Erik Faye-Lund9be0e2d2020-06-15 12:31:36 +0200176 see :ref:`Experimenting with Shader
177 Replacements <replacement>`
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200178``MESA_VK_VERSION_OVERRIDE``
179 changes the Vulkan physical device version as returned in
180 ``VkPhysicalDeviceProperties::apiVersion``.
181
182 - The format should be ``MAJOR.MINOR[.PATCH]``
183 - This will not let you force a version higher than the driver's
184 instance version as advertised by ``vkEnumerateInstanceVersion``
185 - This can be very useful for debugging but some features may not be
186 implemented correctly. (For developers only)
Jan Ziakf5901482020-09-29 14:38:03 +0000187``MESA_LOADER_DRIVER_OVERRIDE``
188 chooses a different driver binary such as ``etnaviv`` or ``zink``.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200189
Eric Engestrom9497a1f2020-07-09 00:52:27 +0200190NIR passes environment variables
191--------------------------------
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200192
193The following are only applicable for drivers that uses NIR, as they
Erik Faye-Lund98909272020-09-25 14:54:56 +0200194modify the behavior for the common NIR_PASS and NIR_PASS_V macros, that
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200195wrap calls to NIR lowering/optimizations.
196
197``NIR_PRINT``
198 If defined, the resulting NIR shader will be printed out at each
Eric Engestrom9497a1f2020-07-09 00:52:27 +0200199 successful NIR lowering/optimization call.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200200``NIR_TEST_CLONE``
Eric Engestrom9497a1f2020-07-09 00:52:27 +0200201 If defined, cloning a NIR shader would be tested at each successful
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200202 NIR lowering/optimization call.
203``NIR_TEST_SERIALIZE``
204 If defined, serialize and deserialize a NIR shader would be tested at
Eric Engestrom9497a1f2020-07-09 00:52:27 +0200205 each successful NIR lowering/optimization call.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200206
207Mesa Xlib driver environment variables
208--------------------------------------
209
210The following are only applicable to the Mesa Xlib software driver. See
Erik Faye-Lund9be0e2d2020-06-15 12:31:36 +0200211the :doc:`Xlib software driver page <xlibdriver>` for details.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200212
213``MESA_RGB_VISUAL``
214 specifies the X visual and depth for RGB mode
215``MESA_CI_VISUAL``
216 specifies the X visual and depth for CI mode
217``MESA_BACK_BUFFER``
218 specifies how to implement the back color buffer, either ``pixmap``
219 or ``ximage``
220``MESA_GAMMA``
221 gamma correction coefficients for red, green, blue channels
222``MESA_XSYNC``
223 enable synchronous X behavior (for debugging only)
224``MESA_GLX_FORCE_CI``
Erik Faye-Lunda1904c92020-09-28 14:57:37 +0200225 if set, force GLX to treat 8 BPP visuals as CI visuals
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200226``MESA_GLX_FORCE_ALPHA``
227 if set, forces RGB windows to have an alpha channel.
228``MESA_GLX_DEPTH_BITS``
229 specifies default number of bits for depth buffer.
230``MESA_GLX_ALPHA_BITS``
231 specifies default number of bits for alpha channel.
232
233i945/i965 driver environment variables (non-Gallium)
234----------------------------------------------------
235
236``INTEL_NO_HW``
237 if set to 1, prevents batches from being submitted to the hardware.
238 This is useful for debugging hangs, etc.
239``INTEL_DEBUG``
240 a comma-separated list of named flags, which do various things:
241
242 ``ann``
243 annotate IR in assembly dumps
244 ``aub``
245 dump batches into an AUB trace for use with simulation tools
246 ``bat``
247 emit batch information
248 ``blit``
249 emit messages about blit operations
250 ``blorp``
251 emit messages about the blorp operations (blits & clears)
252 ``buf``
253 emit messages about buffer objects
254 ``clip``
255 emit messages about the clip unit (for old gens, includes the CLIP
256 program)
257 ``color``
258 use color in output
259 ``cs``
260 dump shader assembly for compute shaders
261 ``do32``
262 generate compute shader SIMD32 programs even if workgroup size
263 doesn't exceed the SIMD16 limit
264 ``dri``
265 emit messages about the DRI interface
266 ``fbo``
267 emit messages about framebuffers
268 ``fs``
269 dump shader assembly for fragment shaders
270 ``gs``
271 dump shader assembly for geometry shaders
272 ``hex``
273 print instruction hex dump with the disassembly
274 ``l3``
275 emit messages about the new L3 state during transitions
276 ``miptree``
277 emit messages about miptrees
278 ``no8``
279 don't generate SIMD8 fragment shader
280 ``no16``
281 suppress generation of 16-wide fragment shaders. useful for
282 debugging broken shaders
283 ``nocompact``
284 disable instruction compaction
285 ``nodualobj``
286 suppress generation of dual-object geometry shader code
287 ``nofc``
288 disable fast clears
289 ``norbc``
290 disable single sampled render buffer compression
291 ``optimizer``
292 dump shader assembly to files at each optimization pass and
293 iteration that make progress
294 ``perf``
295 emit messages about performance issues
296 ``perfmon``
297 emit messages about ``AMD_performance_monitor``
298 ``pix``
299 emit messages about pixel operations
300 ``prim``
301 emit messages about drawing primitives
302 ``reemit``
303 mark all state dirty on each draw call
304 ``sf``
305 emit messages about the strips & fans unit (for old gens, includes
306 the SF program)
307 ``shader_time``
308 record how much GPU time is spent in each shader
309 ``spill_fs``
310 force spilling of all registers in the scalar backend (useful to
311 debug spilling code)
312 ``spill_vec4``
313 force spilling of all registers in the vec4 backend (useful to
314 debug spilling code)
315 ``state``
316 emit messages about state flag tracking
317 ``submit``
318 emit batchbuffer usage statistics
319 ``sync``
320 after sending each batch, emit a message and wait for that batch
321 to finish rendering
322 ``tcs``
323 dump shader assembly for tessellation control shaders
324 ``tes``
325 dump shader assembly for tessellation evaluation shaders
326 ``tex``
327 emit messages about textures.
328 ``urb``
329 emit messages about URB setup
330 ``vert``
331 emit messages about vertex assembly
332 ``vs``
333 dump shader assembly for vertex shaders
334
335``INTEL_SCALAR_VS`` (or ``TCS``, ``TES``, ``GS``)
336 force scalar/vec4 mode for a shader stage (Gen8-9 only)
337``INTEL_PRECISE_TRIG``
338 if set to 1, true or yes, then the driver prefers accuracy over
339 performance in trig functions.
Danylo Piliaiev2c084042020-09-28 19:29:42 +0300340``INTEL_SHADER_ASM_READ_PATH``
341 if set, determines the directory to be used for overriding shader
342 assembly. The binaries with custom assembly should be placed in
343 this folder and have a name formatted as ``sha1_of_assembly.bin``.
344 The sha1 of a shader assembly is printed when assembly is dumped via
345 corresponding ``INTEL_DEBUG`` flag (e.g. ``vs`` for vertex shader).
346 A binary could be generated from a dumped assembly by ``i965_asm``.
347 For ``INTEL_SHADER_ASM_READ_PATH`` to work it is necessary to enable
348 dumping of corresponding shader stages via ``INTEL_DEBUG``.
349 It is advised to use ``nocompact`` flag of ``INTEL_DEBUG`` when
350 dumping and overriding shader assemblies.
351 The success of assembly override would be signified by "Successfully
352 overrode shader with sha1 <sha1>" in stderr replacing the original
353 assembly.
Lionel Landwerlinb039e032020-11-09 18:45:18 +0200354``INTEL_BLACKHOLE_DEFAULT``
355 if set to 1, true or yes, then the OpenGL implementation will
356 default ``GL_BLACKHOLE_RENDER_INTEL`` to true, thus disabling any
357 rendering.
358
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200359
360Radeon driver environment variables (radeon, r200, and r300g)
361-------------------------------------------------------------
362
363``RADEON_NO_TCL``
364 if set, disable hardware-accelerated Transform/Clip/Lighting.
365
366EGL environment variables
367-------------------------
368
Erik Faye-Lund9be0e2d2020-06-15 12:31:36 +0200369Mesa EGL supports different sets of environment variables. See the
370:doc:`Mesa EGL <egl>` page for the details.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200371
372Gallium environment variables
373-----------------------------
374
375``GALLIUM_HUD``
Erik Faye-Lundae7975e2020-09-29 19:15:32 +0200376 draws various information on the screen, like framerate, CPU load,
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200377 driver statistics, performance counters, etc. Set
378 ``GALLIUM_HUD=help`` and run e.g. ``glxgears`` for more info.
379``GALLIUM_HUD_PERIOD``
Erik Faye-Lunde8d03132020-09-30 10:36:29 +0200380 sets the HUD update rate in seconds (float). Use zero to update every
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200381 frame. The default period is 1/2 second.
382``GALLIUM_HUD_VISIBLE``
383 control default visibility, defaults to true.
384``GALLIUM_HUD_TOGGLE_SIGNAL``
385 toggle visibility via user specified signal. Especially useful to
Erik Faye-Lunde8d03132020-09-30 10:36:29 +0200386 toggle HUD at specific points of application and disable for
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200387 unencumbered viewing the rest of the time. For example, set
388 ``GALLIUM_HUD_VISIBLE`` to ``false`` and
389 ``GALLIUM_HUD_TOGGLE_SIGNAL`` to ``10`` (``SIGUSR1``). Use
Erik Faye-Lunde8d03132020-09-30 10:36:29 +0200390 ``kill -10 <pid>`` to toggle the HUD as desired.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200391``GALLIUM_HUD_SCALE``
Erik Faye-Lunde8d03132020-09-30 10:36:29 +0200392 Scale HUD by an integer factor, for high DPI displays. Default is 1.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200393``GALLIUM_HUD_DUMP_DIR``
Erik Faye-Lunde8d03132020-09-30 10:36:29 +0200394 specifies a directory for writing the displayed HUD values into
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200395 files.
396``GALLIUM_DRIVER``
397 useful in combination with ``LIBGL_ALWAYS_SOFTWARE=true`` for
398 choosing one of the software renderers ``softpipe``, ``llvmpipe`` or
399 ``swr``.
400``GALLIUM_LOG_FILE``
401 specifies a file for logging all errors, warnings, etc. rather than
402 stderr.
Jason Ekstrand449f1fe2020-08-18 11:59:19 -0500403``GALLIUM_PIPE_SEARCH_DIR``
404 specifies an alternate search directory for pipe-loader which overrides
405 the compile-time path based on the install location.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200406``GALLIUM_PRINT_OPTIONS``
407 if non-zero, print all the Gallium environment variables which are
408 used, and their current values.
409``GALLIUM_DUMP_CPU``
410 if non-zero, print information about the CPU on start-up
411``TGSI_PRINT_SANITY``
412 if set, do extra sanity checking on TGSI shaders and print any errors
413 to stderr.
414``DRAW_FSE``
415 ???
416``DRAW_NO_FSE``
417 ???
418``DRAW_USE_LLVM``
419 if set to zero, the draw module will not use LLVM to execute shaders,
420 vertex fetch, etc.
421``ST_DEBUG``
422 controls debug output from the Mesa/Gallium state tracker. Setting to
423 ``tgsi``, for example, will print all the TGSI shaders. See
424 ``src/mesa/state_tracker/st_debug.c`` for other options.
425
426Clover environment variables
427~~~~~~~~~~~~~~~~~~~~~~~~~~~~
428
429``CLOVER_EXTRA_BUILD_OPTIONS``
430 allows specifying additional compiler and linker options. Specified
431 options are appended after the options set by the OpenCL program in
432 ``clBuildProgram``.
433``CLOVER_EXTRA_COMPILE_OPTIONS``
434 allows specifying additional compiler options. Specified options are
435 appended after the options set by the OpenCL program in
436 ``clCompileProgram``.
437``CLOVER_EXTRA_LINK_OPTIONS``
438 allows specifying additional linker options. Specified options are
439 appended after the options set by the OpenCL program in
440 ``clLinkProgram``.
441
442Softpipe driver environment variables
443~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
444
Eric Anholt991def02020-07-21 15:11:56 -0700445``SOFTPIPE_DEBUG``
446 a comma-separated list of named flags, which do various things:
447
448 ``vs``
449 Dump vertex shader assembly to stderr
450 ``fs``
451 Dump fragment shader assembly to stderr
452 ``gs``
453 Dump geometry shader assembly to stderr
454 ``cs``
455 Dump compute shader assembly to stderr
456 ``no_rast``
457 rasterization is no-op'd. For profiling purposes.
458 ``use_llvm``
459 the softpipe driver will try to use LLVM JIT for vertex
460 shading processing.
Eric Anholtd0f8fe52019-12-31 16:20:52 -0800461 ``use_tgsi``
462 if set, the softpipe driver will ask to directly consume TGSI, instead
463 of NIR.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200464
465LLVMpipe driver environment variables
466~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
467
468``LP_NO_RAST``
469 if set LLVMpipe will no-op rasterization
470``LP_DEBUG``
471 a comma-separated list of debug options is accepted. See the source
472 code for details.
473``LP_PERF``
474 a comma-separated list of options to selectively no-op various parts
475 of the driver. See the source code for details.
476``LP_NUM_THREADS``
477 an integer indicating how many threads to use for rendering. Zero
478 turns off threading completely. The default value is the number of
479 CPU cores present.
480
481VMware SVGA driver environment variables
482~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
483
484``SVGA_FORCE_SWTNL``
485 force use of software vertex transformation
486``SVGA_NO_SWTNL``
487 don't allow software vertex transformation fallbacks (will often
488 result in incorrect rendering).
489``SVGA_DEBUG``
490 for dumping shaders, constant buffers, etc. See the code for details.
491``SVGA_EXTRA_LOGGING``
492 if set, enables extra logging to the ``vmware.log`` file, such as the
493 OpenGL program's name and command line arguments.
494``SVGA_NO_LOGGING``
495 if set, disables logging to the ``vmware.log`` file. This is useful
496 when using Valgrind because it otherwise crashes when initializing
497 the host log feature.
498
499See the driver code for other, lesser-used variables.
500
501WGL environment variables
502~~~~~~~~~~~~~~~~~~~~~~~~~
503
504``WGL_SWAP_INTERVAL``
505 to set a swap interval, equivalent to calling
506 ``wglSwapIntervalEXT()`` in an application. If this environment
507 variable is set, application calls to ``wglSwapIntervalEXT()`` will
508 have no effect.
509
510VA-API environment variables
511~~~~~~~~~~~~~~~~~~~~~~~~~~~~
512
513``VAAPI_MPEG4_ENABLED``
514 enable MPEG4 for VA-API, disabled by default.
515
516VC4 driver environment variables
517~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
518
519``VC4_DEBUG``
520 a comma-separated list of named flags, which do various things:
521
522 ``cl``
523 dump command list during creation
524 ``qpu``
525 dump generated QPU instructions
526 ``qir``
527 dump QPU IR during program compile
528 ``nir``
529 dump NIR during program compile
530 ``tgsi``
531 dump TGSI during program compile
532 ``shaderdb``
533 dump program compile information for shader-db analysis
534 ``perf``
535 print during performance-related events
536 ``norast``
537 skip actual hardware execution of commands
538 ``always_flush``
539 flush after each draw call
540 ``always_sync``
541 wait for finish after each flush
542 ``dump``
543 write a GPU command stream trace file (VC4 simulator only)
544
545RADV driver environment variables
546~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
547
548``RADV_DEBUG``
549 a comma-separated list of named flags, which do various things:
550
Daniel Schürmannb78f6452020-06-12 17:55:00 +0100551 ``llvm``
552 enable LLVM compiler backend
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200553 ``allbos``
554 force all allocated buffers to be referenced in submissions
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200555 ``checkir``
556 validate the LLVM IR before LLVM compiles the shader
557 ``errors``
558 display more info about errors
Bas Nieuwenhuizen2fa83dc2020-08-10 00:10:38 +0200559 ``forcecompress``
560 Enables DCC,FMASK,CMASK,HTILE in situations where the driver supports it
561 but normally does not deem it beneficial.
Samuel Pitoiset33c9d4b2020-10-19 18:37:26 +0200562 ``hang``
Samuel Pitoiset8d7f78c2020-11-20 09:19:55 +0100563 enable GPU hangs detection and dump a report to
564 $HOME/radv_dumps_<pid>_<time> if a GPU hang is detected
Simon Ser1cf1ece2020-07-03 15:16:00 +0200565 ``img``
566 Print image info
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200567 ``info``
568 show GPU-related information
Rhys Perryf17de6a2020-12-14 21:54:28 +0000569 ``invariantgeom``
570 Mark geometry-affecting outputs as invariant. This works around a common
571 class of application bugs appearing as flickering.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200572 ``metashaders``
573 dump internal meta shaders
574 ``nobinning``
575 disable primitive binning
576 ``nocache``
577 disable shaders cache
578 ``nocompute``
579 disable compute queue
580 ``nodcc``
581 disable Delta Color Compression (DCC) on images
Bas Nieuwenhuizenff99faf2021-02-28 02:59:25 +0100582 ``nodisplaydcc``
583 disable Delta Color Compression (DCC) on displayable images
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200584 ``nodynamicbounds``
585 do not check OOB access for dynamic descriptors
586 ``nofastclears``
587 disable fast color/depthstencil clears
588 ``nohiz``
589 disable HIZ for depthstencil images
590 ``noibs``
591 disable directly recording command buffers in GPU-visible memory
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200592 ``nomemorycache``
593 disable memory shaders cache
594 ``nongg``
595 disable NGG for GFX10+
596 ``nooutoforder``
597 disable out-of-order rasterization
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200598 ``nothreadllvm``
599 disable LLVM threaded compilation
Samuel Pitoiset4ffa6ac2020-11-20 09:56:59 +0100600 ``noumr``
601 disable UMR dumps during GPU hang detection (only with RADV_DEBUG=hang)
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200602 ``preoptir``
603 dump LLVM IR before any optimizations
604 ``shaders``
605 dump shaders
606 ``shaderstats``
607 dump shader statistics
608 ``spirv``
609 dump SPIR-V
610 ``startup``
611 display info at startup
612 ``syncshaders``
613 synchronize shaders after all draws/dispatches
614 ``vmfaults``
615 check for VM memory faults via dmesg
616 ``zerovram``
617 initialize all memory allocated in VRAM as zero
618
619``RADV_FORCE_FAMILY``
Erik Faye-Lund689145e2020-09-30 15:24:01 +0200620 create a null device to compile shaders without a AMD GPU (e.g.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200621 gfx900)
622``RADV_PERFTEST``
623 a comma-separated list of named flags, which do various things:
624
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200625 ``bolist``
626 enable the global BO list
627 ``cswave32``
628 enable wave32 for compute shaders (GFX10+)
629 ``dccmsaa``
630 enable DCC for MSAA images
631 ``dfsm``
632 enable dfsm
633 ``gewave32``
634 enable wave32 for vertex/tess/geometry shaders (GFX10+)
635 ``localbos``
636 enable local BOs
Bas Nieuwenhuizenf06e91d2020-12-08 00:25:56 +0100637 ``nosam``
638 disable optimizations that get enabled when all VRAM is CPU visible.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200639 ``pswave32``
640 enable wave32 for pixel shaders (GFX10+)
Bas Nieuwenhuizen3c9452c2021-02-27 20:16:21 +0100641 ``sam``
642 enable optimizations to move more driver internal objects to VRAM.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200643 ``tccompatcmask``
644 enable TC-compat cmask for MSAA images
645
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200646``RADV_TEX_ANISO``
647 force anisotropy filter (up to 16)
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200648``ACO_DEBUG``
649 a comma-separated list of named flags, which do various things:
650
651 ``validateir``
652 validate the ACO IR at various points of compilation (enabled by
653 default for debug/debugoptimized builds)
654 ``validatera``
655 validate register assignment of ACO IR and catches many RA bugs
656 ``perfwarn``
657 abort on some suboptimal code generation
Samuel Pitoisetf1531512020-08-19 10:40:35 +0200658 ``force-waitcnt``
659 force emitting waitcnt states if there is something to wait for
Samuel Pitoiset502b9da2020-08-26 14:24:45 +0200660 ``novn``
661 disable value numbering
662 ``noopt``
663 disable various optimizations
664 ``noscheduling``
665 disable instructions scheduling
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200666
667radeonsi driver environment variables
668~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
669
670``AMD_DEBUG``
671 a comma-separated list of named flags, which do various things:
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200672``nodcc``
673 Disable DCC.
674``nodccclear``
675 Disable DCC fast clear.
676``nodccfb``
677 Disable separate DCC on the main framebuffer
678``nodccmsaa``
679 Disable DCC for MSAA
680``nodpbb``
681 Disable DPBB.
682``nodfsm``
683 Disable DFSM.
684``notiling``
685 Disable tiling
686``nofmask``
687 Disable MSAA compression
688``nohyperz``
689 Disable Hyper-Z
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200690``no2d``
691 Disable 2D tiling
692``info``
693 Print driver information
694``tex``
695 Print texture info
696``compute``
697 Print compute info
698``vm``
699 Print virtual addresses when creating resources
700``vs``
701 Print vertex shaders
702``ps``
703 Print pixel shaders
704``gs``
705 Print geometry shaders
706``tcs``
707 Print tessellation control shaders
708``tes``
709 Print tessellation evaluation shaders
710``cs``
711 Print compute shaders
712``noir``
713 Don't print the LLVM IR
714``nonir``
715 Don't print NIR when printing shaders
716``noasm``
717 Don't print disassembled shaders
718``preoptir``
719 Print the LLVM IR before initial optimizations
720``gisel``
721 Enable LLVM global instruction selector.
722``w32ge``
723 Use Wave32 for vertex, tessellation, and geometry shaders.
724``w32ps``
725 Use Wave32 for pixel shaders.
726``w32cs``
727 Use Wave32 for computes shaders.
728``w64ge``
729 Use Wave64 for vertex, tessellation, and geometry shaders.
730``w64ps``
731 Use Wave64 for pixel shaders.
732``w64cs``
733 Use Wave64 for computes shaders.
734``checkir``
735 Enable additional sanity checks on shader IR
736``mono``
737 Use old-style monolithic shaders compiled on demand
738``nooptvariant``
739 Disable compiling optimized shader variants.
Erik Faye-Lund4d066832020-06-12 20:09:42 +0200740``nowc``
741 Disable GTT write combining
742``check_vm``
743 Check VM faults and dump debug info.
744``reserve_vmid``
745 Force VMID reservation per context.
746``nogfx``
747 Disable graphics. Only multimedia compute paths can be used.
748``nongg``
749 Disable NGG and use the legacy pipeline.
750``nggc``
751 Always use NGG culling even when it can hurt.
752``nonggc``
753 Disable NGG culling.
754``alwayspd``
755 Always enable the primitive discard compute shader.
756``pd``
757 Enable the primitive discard compute shader for large draw calls.
758``nopd``
759 Disable the primitive discard compute shader.
760``switch_on_eop``
761 Program WD/IA to switch on end-of-packet.
762``nooutoforder``
763 Disable out-of-order rasterization
764``dpbb``
765 Enable DPBB.
766``dfsm``
767 Enable DFSM.
768
769Other Gallium drivers have their own environment variables. These may
770change frequently so the source code should be consulted for details.