docs/envvars: document MESA_VK_WSI_PRESENT_MODE
[platform/upstream/mesa.git] / docs / envvars.rst
1 Environment Variables
2 =====================
3
4 Normally, no environment variables need to be set. Most of the
5 environment variables used by Mesa/Gallium are for debugging purposes,
6 but they can sometimes be useful for debugging end-user issues.
7
8 LibGL environment variables
9 ---------------------------
10
11 :envvar:`LIBGL_DEBUG`
12    If defined debug information will be printed to stderr. If set to
13    ``verbose`` additional information will be printed.
14 :envvar:`LIBGL_DRIVERS_PATH`
15    colon-separated list of paths to search for DRI drivers
16 :envvar:`LIBGL_ALWAYS_INDIRECT`
17    if set to ``true``, forces an indirect rendering context/connection.
18 :envvar:`LIBGL_ALWAYS_SOFTWARE`
19    if set to ``true``, always use software rendering
20 :envvar:`LIBGL_NO_DRAWARRAYS`
21    if set to ``true``, do not use DrawArrays GLX protocol (for
22    debugging)
23 :envvar:`LIBGL_SHOW_FPS`
24    print framerate to stdout based on the number of ``glXSwapBuffers``
25    calls per second.
26 :envvar:`LIBGL_DRI2_DISABLE`
27    disable DRI2 if set to ``true``.
28 :envvar:`LIBGL_DRI3_DISABLE`
29    disable DRI3 if set to ``true``.
30
31 Core Mesa environment variables
32 -------------------------------
33
34 :envvar:`MESA_NO_ASM`
35    if set, disables all assembly language optimizations
36 :envvar:`MESA_NO_MMX`
37    if set, disables Intel MMX optimizations
38 :envvar:`MESA_NO_3DNOW`
39    if set, disables AMD 3DNow! optimizations
40 :envvar:`MESA_NO_SSE`
41    if set, disables Intel SSE optimizations
42 :envvar:`MESA_NO_ERROR`
43    if set to 1, error checking is disabled as per ``KHR_no_error``. This
44    will result in undefined behavior for invalid use of the API, but
45    can reduce CPU use for apps that are known to be error free.
46 :envvar:`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, :envvar:`MESA_DEBUG`
51    defaults to off (no debug output). :envvar:`MESA_DEBUG` accepts the
52    following comma-separated list of named flags, which adds extra
53    behavior to just set :envvar:`MESA_DEBUG` to ``1``:
54
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``
62       extra debug messages when a FBO is incomplete
63    ``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 :envvar:`MESA_LOG_FILE`
69    specifies a file name for logging all errors, warnings, etc., rather
70    than stderr
71 :envvar:`MESA_TEX_PROG`
72    if set, implement conventional texture environment modes with fragment
73    programs (intended for developers only)
74 :envvar:`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 :envvar:`MESA_TEX_PROG` variable as well.
78 :envvar:`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 :envvar:`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 :envvar:`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 :envvar:`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 :envvar:`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 :envvar:`MESA_GLSL_CACHE_DISABLE`
146    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.
149 :envvar:`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
154    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
163 :envvar:`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 :envvar:`MESA_GLSL`
170    :ref:`shading language compiler options <envvars>`
171 :envvar:`MESA_NO_MINMAX_CACHE`
172    when set, the minmax index cache is globally disabled.
173 :envvar:`MESA_SHADER_CAPTURE_PATH`
174    see :ref:`Capturing Shaders <capture>`
175 :envvar:`MESA_SHADER_DUMP_PATH` and :envvar:`MESA_SHADER_READ_PATH`
176    see :ref:`Experimenting with Shader
177    Replacements <replacement>`
178 :envvar:`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)
187 :envvar:`MESA_VK_WSI_PRESENT_MODE`
188    overrides the WSI present mode clients specify in
189    ``VkSwapchainCreateInfoKHR::presentMode``. Values can be ``fifo``,
190    ``relaxed``, ``mailbox`` or ``immediate``.
191 :envvar:`MESA_LOADER_DRIVER_OVERRIDE`
192    chooses a different driver binary such as ``etnaviv`` or ``zink``.
193
194 NIR passes environment variables
195 --------------------------------
196
197 The following are only applicable for drivers that uses NIR, as they
198 modify the behavior for the common ``NIR_PASS`` and ``NIR_PASS_V`` macros,
199 that wrap calls to NIR lowering/optimizations.
200
201 :envvar:`NIR_PRINT`
202    If defined, the resulting NIR shader will be printed out at each
203    successful NIR lowering/optimization call.
204 :envvar:`NIR_TEST_CLONE`
205    If defined, cloning a NIR shader would be tested at each successful
206    NIR lowering/optimization call.
207 :envvar:`NIR_TEST_SERIALIZE`
208    If defined, serialize and deserialize a NIR shader would be tested at
209    each successful NIR lowering/optimization call.
210
211 Mesa Xlib driver environment variables
212 --------------------------------------
213
214 The following are only applicable to the Mesa Xlib software driver. See
215 the :doc:`Xlib software driver page <xlibdriver>` for details.
216
217 :envvar:`MESA_RGB_VISUAL`
218    specifies the X visual and depth for RGB mode
219 :envvar:`MESA_BACK_BUFFER`
220    specifies how to implement the back color buffer, either ``pixmap``
221    or ``ximage``
222 :envvar:`MESA_GAMMA`
223    gamma correction coefficients for red, green, blue channels
224 :envvar:`MESA_XSYNC`
225    enable synchronous X behavior (for debugging only)
226 :envvar:`MESA_GLX_FORCE_CI`
227    if set, force GLX to treat 8 BPP visuals as CI visuals
228 :envvar:`MESA_GLX_FORCE_ALPHA`
229    if set, forces RGB windows to have an alpha channel.
230 :envvar:`MESA_GLX_DEPTH_BITS`
231    specifies default number of bits for depth buffer.
232 :envvar:`MESA_GLX_ALPHA_BITS`
233    specifies default number of bits for alpha channel.
234
235 i945/i965 driver environment variables (non-Gallium)
236 ----------------------------------------------------
237
238 :envvar:`INTEL_NO_HW`
239    if set to 1, prevents batches from being submitted to the hardware.
240    This is useful for debugging hangs, etc.
241 :envvar:`INTEL_DEBUG`
242    a comma-separated list of named flags, which do various things:
243
244    ``ann``
245       annotate IR in assembly dumps
246    ``aub``
247       dump batches into an AUB trace for use with simulation tools
248    ``bat``
249       emit batch information
250    ``blit``
251       emit messages about blit operations
252    ``blorp``
253       emit messages about the blorp operations (blits & clears)
254    ``buf``
255       emit messages about buffer objects
256    ``clip``
257       emit messages about the clip unit (for old gens, includes the CLIP
258       program)
259    ``color``
260       use color in output
261    ``cs``
262       dump shader assembly for compute shaders
263    ``do32``
264       generate compute shader SIMD32 programs even if workgroup size
265       doesn't exceed the SIMD16 limit
266    ``dri``
267       emit messages about the DRI interface
268    ``fbo``
269       emit messages about framebuffers
270    ``fs``
271       dump shader assembly for fragment shaders
272    ``gs``
273       dump shader assembly for geometry shaders
274    ``hex``
275       print instruction hex dump with the disassembly
276    ``l3``
277       emit messages about the new L3 state during transitions
278    ``miptree``
279       emit messages about miptrees
280    ``no8``
281       don't generate SIMD8 fragment shader
282    ``no16``
283       suppress generation of 16-wide fragment shaders. useful for
284       debugging broken shaders
285    ``nocompact``
286       disable instruction compaction
287    ``nodualobj``
288       suppress generation of dual-object geometry shader code
289    ``nofc``
290       disable fast clears
291    ``norbc``
292       disable single sampled render buffer compression
293    ``optimizer``
294       dump shader assembly to files at each optimization pass and
295       iteration that make progress
296    ``perf``
297       emit messages about performance issues
298    ``perfmon``
299       emit messages about ``AMD_performance_monitor``
300    ``pix``
301       emit messages about pixel operations
302    ``prim``
303       emit messages about drawing primitives
304    ``reemit``
305       mark all state dirty on each draw call
306    ``sf``
307       emit messages about the strips & fans unit (for old gens, includes
308       the SF program)
309    ``shader_time``
310       record how much GPU time is spent in each shader
311    ``spill_fs``
312       force spilling of all registers in the scalar backend (useful to
313       debug spilling code)
314    ``spill_vec4``
315       force spilling of all registers in the vec4 backend (useful to
316       debug spilling code)
317    ``state``
318       emit messages about state flag tracking
319    ``submit``
320       emit batchbuffer usage statistics
321    ``sync``
322       after sending each batch, emit a message and wait for that batch
323       to finish rendering
324    ``tcs``
325       dump shader assembly for tessellation control shaders
326    ``tes``
327       dump shader assembly for tessellation evaluation shaders
328    ``tex``
329       emit messages about textures.
330    ``urb``
331       emit messages about URB setup
332    ``vert``
333       emit messages about vertex assembly
334    ``vs``
335       dump shader assembly for vertex shaders
336
337 :envvar:`INTEL_SCALAR_VS` (or ``TCS``, ``TES``, ``GS``)
338    force scalar/vec4 mode for a shader stage (Gen8-9 only)
339 :envvar:`INTEL_PRECISE_TRIG`
340    if set to 1, true or yes, then the driver prefers accuracy over
341    performance in trig functions.
342 :envvar:`INTEL_SHADER_ASM_READ_PATH`
343    if set, determines the directory to be used for overriding shader
344    assembly. The binaries with custom assembly should be placed in
345    this folder and have a name formatted as ``sha1_of_assembly.bin``.
346    The sha1 of a shader assembly is printed when assembly is dumped via
347    corresponding :envvar:`INTEL_DEBUG` flag (e.g. ``vs`` for vertex shader).
348    A binary could be generated from a dumped assembly by ``i965_asm``.
349    For :envvar:`INTEL_SHADER_ASM_READ_PATH` to work it is necessary to enable
350    dumping of corresponding shader stages via :envvar:`INTEL_DEBUG`.
351    It is advised to use ``nocompact`` flag of :envvar:`INTEL_DEBUG` when
352    dumping and overriding shader assemblies.
353    The success of assembly override would be signified by "Successfully
354    overrode shader with sha1 <sha1>" in stderr replacing the original
355    assembly.
356 :envvar:`INTEL_BLACKHOLE_DEFAULT`
357    if set to 1, true or yes, then the OpenGL implementation will
358    default ``GL_BLACKHOLE_RENDER_INTEL`` to true, thus disabling any
359    rendering.
360
361
362 Radeon driver environment variables (radeon, r200, and r300g)
363 -------------------------------------------------------------
364
365 :envvar:`RADEON_NO_TCL`
366    if set, disable hardware-accelerated Transform/Clip/Lighting.
367
368 EGL environment variables
369 -------------------------
370
371 Mesa EGL supports different sets of environment variables. See the
372 :doc:`Mesa EGL <egl>` page for the details.
373
374 Gallium environment variables
375 -----------------------------
376
377 :envvar:`GALLIUM_HUD`
378    draws various information on the screen, like framerate, CPU load,
379    driver statistics, performance counters, etc. Set
380    :envvar:`GALLIUM_HUD` to ``help`` and run e.g. ``glxgears`` for more info.
381 :envvar:`GALLIUM_HUD_PERIOD`
382    sets the HUD update rate in seconds (float). Use zero to update every
383    frame. The default period is 1/2 second.
384 :envvar:`GALLIUM_HUD_VISIBLE`
385    control default visibility, defaults to true.
386 :envvar:`GALLIUM_HUD_TOGGLE_SIGNAL`
387    toggle visibility via user specified signal. Especially useful to
388    toggle HUD at specific points of application and disable for
389    unencumbered viewing the rest of the time. For example, set
390    :envvar:`GALLIUM_HUD_VISIBLE` to ``false`` and
391    :envvar:`GALLIUM_HUD_TOGGLE_SIGNAL` to ``10`` (``SIGUSR1``). Use
392    ``kill -10 <pid>`` to toggle the HUD as desired.
393 :envvar:`GALLIUM_HUD_SCALE`
394    Scale HUD by an integer factor, for high DPI displays. Default is 1.
395 :envvar:`GALLIUM_HUD_DUMP_DIR`
396    specifies a directory for writing the displayed HUD values into
397    files.
398 :envvar:`GALLIUM_DRIVER`
399    useful in combination with :envvar:`LIBGL_ALWAYS_SOFTWARE`=`true` for
400    choosing one of the software renderers ``softpipe``, ``llvmpipe`` or
401    ``swr``.
402 :envvar:`GALLIUM_LOG_FILE`
403    specifies a file for logging all errors, warnings, etc. rather than
404    stderr.
405 :envvar:`GALLIUM_PIPE_SEARCH_DIR`
406    specifies an alternate search directory for pipe-loader which overrides
407    the compile-time path based on the install location.
408 :envvar:`GALLIUM_PRINT_OPTIONS`
409    if non-zero, print all the Gallium environment variables which are
410    used, and their current values.
411 :envvar:`GALLIUM_DUMP_CPU`
412    if non-zero, print information about the CPU on start-up
413 :envvar:`TGSI_PRINT_SANITY`
414    if set, do extra sanity checking on TGSI shaders and print any errors
415    to stderr.
416 :envvar:`DRAW_FSE`
417    Enable fetch-shade-emit middle-end even though its not correct (e.g.
418    for softpipe)
419 :envvar:`DRAW_NO_FSE`
420    Disable fetch-shade-emit middle-end even when it is correct
421 :envvar:`DRAW_USE_LLVM`
422    if set to zero, the draw module will not use LLVM to execute shaders,
423    vertex fetch, etc.
424 :envvar:`ST_DEBUG`
425    controls debug output from the Mesa/Gallium state tracker. Setting to
426    ``tgsi``, for example, will print all the TGSI shaders. See
427    :file:`src/mesa/state_tracker/st_debug.c` for other options.
428
429 Clover environment variables
430 ----------------------------
431
432 :envvar:`CLOVER_EXTRA_BUILD_OPTIONS`
433    allows specifying additional compiler and linker options. Specified
434    options are appended after the options set by the OpenCL program in
435    ``clBuildProgram``.
436 :envvar:`CLOVER_EXTRA_COMPILE_OPTIONS`
437    allows specifying additional compiler options. Specified options are
438    appended after the options set by the OpenCL program in
439    ``clCompileProgram``.
440 :envvar:`CLOVER_EXTRA_LINK_OPTIONS`
441    allows specifying additional linker options. Specified options are
442    appended after the options set by the OpenCL program in
443    ``clLinkProgram``.
444
445 Softpipe driver environment variables
446 -------------------------------------
447
448 :envvar:`SOFTPIPE_DEBUG`
449    a comma-separated list of named flags, which do various things:
450
451    ``vs``
452       Dump vertex shader assembly to stderr
453    ``fs``
454       Dump fragment shader assembly to stderr
455    ``gs``
456       Dump geometry shader assembly to stderr
457    ``cs``
458       Dump compute shader assembly to stderr
459    ``no_rast``
460       rasterization is disabled. For profiling purposes.
461    ``use_llvm``
462       the softpipe driver will try to use LLVM JIT for vertex
463       shading processing.
464    ``use_tgsi``
465       if set, the softpipe driver will ask to directly consume TGSI, instead
466       of NIR.
467
468 LLVMpipe driver environment variables
469 -------------------------------------
470
471 :envvar:`LP_NO_RAST`
472    if set LLVMpipe will no-op rasterization
473 :envvar:`LP_DEBUG`
474    a comma-separated list of debug options is accepted. See the source
475    code for details.
476 :envvar:`LP_PERF`
477    a comma-separated list of options to selectively no-op various parts
478    of the driver. See the source code for details.
479 :envvar:`LP_NUM_THREADS`
480    an integer indicating how many threads to use for rendering. Zero
481    turns off threading completely. The default value is the number of
482    CPU cores present.
483
484 VMware SVGA driver environment variables
485 ----------------------------------------
486
487 :envvar`SVGA_FORCE_SWTNL`
488    force use of software vertex transformation
489 :envvar`SVGA_NO_SWTNL`
490    don't allow software vertex transformation fallbacks (will often
491    result in incorrect rendering).
492 :envvar`SVGA_DEBUG`
493    for dumping shaders, constant buffers, etc. See the code for details.
494 :envvar`SVGA_EXTRA_LOGGING`
495    if set, enables extra logging to the ``vmware.log`` file, such as the
496    OpenGL program's name and command line arguments.
497 :envvar`SVGA_NO_LOGGING`
498    if set, disables logging to the ``vmware.log`` file. This is useful
499    when using Valgrind because it otherwise crashes when initializing
500    the host log feature.
501
502 See the driver code for other, lesser-used variables.
503
504 WGL environment variables
505 -------------------------
506
507 :envvar:`WGL_SWAP_INTERVAL`
508    to set a swap interval, equivalent to calling
509    ``wglSwapIntervalEXT()`` in an application. If this environment
510    variable is set, application calls to ``wglSwapIntervalEXT()`` will
511    have no effect.
512
513 VA-API environment variables
514 ----------------------------
515
516 :envvar:`VAAPI_MPEG4_ENABLED`
517    enable MPEG4 for VA-API, disabled by default.
518
519 VC4 driver environment variables
520 --------------------------------
521
522 :envvar:`VC4_DEBUG`
523    a comma-separated list of named flags, which do various things:
524
525    ``cl``
526       dump command list during creation
527    ``qpu``
528       dump generated QPU instructions
529    ``qir``
530       dump QPU IR during program compile
531    ``nir``
532       dump NIR during program compile
533    ``tgsi``
534       dump TGSI during program compile
535    ``shaderdb``
536       dump program compile information for shader-db analysis
537    ``perf``
538       print during performance-related events
539    ``norast``
540       skip actual hardware execution of commands
541    ``always_flush``
542       flush after each draw call
543    ``always_sync``
544       wait for finish after each flush
545    ``dump``
546       write a GPU command stream trace file (VC4 simulator only)
547
548 RADV driver environment variables
549 ---------------------------------
550
551 :envvar:`RADV_DEBUG`
552    a comma-separated list of named flags, which do various things:
553
554    ``llvm``
555       enable LLVM compiler backend
556    ``allbos``
557       force all allocated buffers to be referenced in submissions
558    ``checkir``
559       validate the LLVM IR before LLVM compiles the shader
560    ``errors``
561       display more info about errors
562    ``forcecompress``
563       Enables DCC,FMASK,CMASK,HTILE in situations where the driver supports it
564       but normally does not deem it beneficial.
565    ``hang``
566       enable GPU hangs detection and dump a report to
567       $HOME/radv_dumps_<pid>_<time> if a GPU hang is detected
568    ``img``
569       Print image info
570    ``info``
571       show GPU-related information
572    ``invariantgeom``
573       Mark geometry-affecting outputs as invariant. This works around a common
574       class of application bugs appearing as flickering.
575    ``metashaders``
576       dump internal meta shaders
577    ``nobinning``
578       disable primitive binning
579    ``nocache``
580       disable shaders cache
581    ``nocompute``
582       disable compute queue
583    ``nodcc``
584       disable Delta Color Compression (DCC) on images
585    ``nodisplaydcc``
586       disable Delta Color Compression (DCC) on displayable images
587    ``nodynamicbounds``
588       do not check OOB access for dynamic descriptors
589    ``nofastclears``
590       disable fast color/depthstencil clears
591    ``nohiz``
592       disable HIZ for depthstencil images
593    ``noibs``
594       disable directly recording command buffers in GPU-visible memory
595    ``nomemorycache``
596       disable memory shaders cache
597    ``nongg``
598       disable NGG for GFX10+
599    ``nooutoforder``
600       disable out-of-order rasterization
601    ``notccompatcmask``
602       disable TC-compat CMASK for MSAA surfaces
603    ``noumr``
604       disable UMR dumps during GPU hang detection (only with
605       :envvar:`RADV_DEBUG`=``hang``)
606    ``novrsflatshading``
607       disable VRS for flat shading (only on GFX10.3+)
608    ``preoptir``
609       dump LLVM IR before any optimizations
610    ``shaders``
611       dump shaders
612    ``shaderstats``
613       dump shader statistics
614    ``spirv``
615       dump SPIR-V
616    ``startup``
617       display info at startup
618    ``syncshaders``
619       synchronize shaders after all draws/dispatches
620    ``vmfaults``
621       check for VM memory faults via dmesg
622    ``zerovram``
623       initialize all memory allocated in VRAM as zero
624
625 :envvar:`RADV_FORCE_FAMILY`
626    create a null device to compile shaders without a AMD GPU (e.g. vega10)
627
628 :envvar:`RADV_FORCE_VRS`
629    allow to force per-pipeline vertex VRS rates on GFX10.3+. This is only
630    forced for pipelines that don't explicitely use VRS or flat shading.
631    The supported values are 2x2, 1x2 and 2x1. Only for testing purposes.
632
633 :envvar:`RADV_PERFTEST`
634    a comma-separated list of named flags, which do various things:
635
636    ``bolist``
637       enable the global BO list
638    ``cswave32``
639       enable wave32 for compute shaders (GFX10+)
640    ``dccmsaa``
641       enable DCC for MSAA images
642    ``gewave32``
643       enable wave32 for vertex/tess/geometry shaders (GFX10+)
644    ``localbos``
645       enable local BOs
646    ``nosam``
647       disable optimizations that get enabled when all VRAM is CPU visible.
648    ``pswave32``
649       enable wave32 for pixel shaders (GFX10+)
650    ``rt``
651       enable rt extensions whose implementation is still experimental.
652    ``sam``
653       enable optimizations to move more driver internal objects to VRAM.
654
655 :envvar`RADV_TEX_ANISO`
656    force anisotropy filter (up to 16)
657
658 :envvar:`ACO_DEBUG`
659    a comma-separated list of named flags, which do various things:
660
661    ``validateir``
662       validate the ACO IR at various points of compilation (enabled by
663       default for debug/debugoptimized builds)
664    ``validatera``
665       validate register assignment of ACO IR and catches many RA bugs
666    ``perfwarn``
667       abort on some suboptimal code generation
668    ``force-waitcnt``
669       force emitting waitcnt states if there is something to wait for
670    ``novn``
671       disable value numbering
672    ``noopt``
673       disable various optimizations
674    ``noscheduling``
675       disable instructions scheduling
676    ``perfinfo``
677       print information used to calculate some pipeline statistics
678    ``liveinfo``
679       print liveness and register demand information before scheduling
680
681 radeonsi driver environment variables
682 -------------------------------------
683
684 :envvar:`AMD_DEBUG`
685    a comma-separated list of named flags, which do various things:
686
687    ``nodcc``
688       Disable DCC.
689    ``nodccclear``
690       Disable DCC fast clear.
691    ``nodccfb``
692       Disable separate DCC on the main framebuffer
693    ``nodccmsaa``
694       Disable DCC for MSAA
695    ``nodpbb``
696       Disable DPBB.
697    ``nodfsm``
698       Disable DFSM.
699    ``notiling``
700       Disable tiling
701    ``nofmask``
702       Disable MSAA compression
703    ``nohyperz``
704       Disable Hyper-Z
705    ``no2d``
706       Disable 2D tiling
707    ``info``
708       Print driver information
709    ``tex``
710       Print texture info
711    ``compute``
712       Print compute info
713    ``vm``
714       Print virtual addresses when creating resources
715    ``vs``
716       Print vertex shaders
717    ``ps``
718       Print pixel shaders
719    ``gs``
720       Print geometry shaders
721    ``tcs``
722       Print tessellation control shaders
723    ``tes``
724       Print tessellation evaluation shaders
725    ``cs``
726       Print compute shaders
727    ``noir``
728       Don't print the LLVM IR
729    ``nonir``
730       Don't print NIR when printing shaders
731    ``noasm``
732       Don't print disassembled shaders
733    ``preoptir``
734       Print the LLVM IR before initial optimizations
735    ``gisel``
736       Enable LLVM global instruction selector.
737    ``w32ge``
738       Use Wave32 for vertex, tessellation, and geometry shaders.
739    ``w32ps``
740       Use Wave32 for pixel shaders.
741    ``w32cs``
742       Use Wave32 for computes shaders.
743    ``w64ge``
744       Use Wave64 for vertex, tessellation, and geometry shaders.
745    ``w64ps``
746       Use Wave64 for pixel shaders.
747    ``w64cs``
748       Use Wave64 for computes shaders.
749    ``checkir``
750       Enable additional sanity checks on shader IR
751    ``mono``
752       Use old-style monolithic shaders compiled on demand
753    ``nooptvariant``
754       Disable compiling optimized shader variants.
755    ``nowc``
756       Disable GTT write combining
757    ``check_vm``
758       Check VM faults and dump debug info.
759    ``reserve_vmid``
760       Force VMID reservation per context.
761    ``nogfx``
762       Disable graphics. Only multimedia compute paths can be used.
763    ``nongg``
764       Disable NGG and use the legacy pipeline.
765    ``nggc``
766       Always use NGG culling even when it can hurt.
767    ``nonggc``
768       Disable NGG culling.
769    ``alwayspd``
770       Always enable the primitive discard compute shader.
771    ``pd``
772       Enable the primitive discard compute shader for large draw calls.
773    ``nopd``
774       Disable the primitive discard compute shader.
775    ``switch_on_eop``
776       Program WD/IA to switch on end-of-packet.
777    ``nooutoforder``
778       Disable out-of-order rasterization
779    ``dpbb``
780       Enable DPBB.
781    ``dfsm``
782       Enable DFSM.
783
784 r600 driver environment variables
785 ---------------------------------
786
787 :envvar:`R600_DEBUG`
788    a comma-separated list of named flags, which do various things:
789
790    ``nocpdma``
791       Disable CP DMA
792    ``nosb``
793       Disable sb backend for graphics shaders
794    ``sbcl``
795       Enable sb backend for compute shaders
796    ``sbdry``
797       Don't use optimized bytecode (just print the dumps)
798    ``sbstat``
799       Print optimization statistics for shaders
800    ``sbdump``
801       Print IR dumps after some optimization passes
802    ``sbnofallback``
803       Abort on errors instead of fallback
804    ``sbdisasm``
805       Use sb disassembler for shader dumps
806    ``sbsafemath``
807       Disable unsafe math optimizations
808    ``nirsb``
809       Enable NIR with SB optimizer
810    ``tex``
811       Print texture info
812    ``nir``
813       Enable experimental NIR shaders
814    ``compute``
815       Print compute info
816    ``vm``
817       Print virtual addresses when creating resources
818    ``info``
819       Print driver information
820    ``fs``
821       Print fetch shaders
822    ``vs``
823       Print vertex shaders
824    ``gs``
825       Print geometry shaders
826    ``ps``
827       Print pixel shaders
828    ``cs``
829       Print compute shaders
830    ``tcs``
831       Print tessellation control shaders
832    ``tes``
833       Print tessellation evaluation shaders
834    ``noir``
835       Don't print the LLVM IR
836    ``notgsi``
837       Don't print the TGSI
838    ``noasm``
839       Don't print disassembled shaders
840    ``preoptir``
841       Print the LLVM IR before initial optimizations
842    ``checkir``
843       Enable additional sanity checks on shader IR
844    ``nooptvariant``
845       Disable compiling optimized shader variants.
846    ``testdma``
847       Invoke SDMA tests and exit.
848    ``testvmfaultcp``
849       Invoke a CP VM fault test and exit.
850    ``testvmfaultsdma``
851       Invoke a SDMA VM fault test and exit.
852    ``testvmfaultshader``
853       Invoke a shader VM fault test and exit.
854    ``nodma``
855       Disable asynchronous DMA
856    ``nohyperz``
857       Disable Hyper-Z
858    ``noinvalrange``
859       Disable handling of INVALIDATE_RANGE map flags
860    ``no2d``
861       Disable 2D tiling
862    ``notiling``
863       Disable tiling
864    ``switch_on_eop``
865       Program WD/IA to switch on end-of-packet.
866    ``forcedma``
867       Use asynchronous DMA for all operations when possible.
868    ``precompile``
869       Compile one shader variant at shader creation.
870    ``nowc``
871       Disable GTT write combining
872    ``check_vm``
873       Check VM faults and dump debug info.
874    ``unsafemath``
875       Enable unsafe math shader optimizations
876
877 :envvar:`R600_DEBUG_COMPUTE`
878    if set to ``true``, various compute-related debug information will
879    be printed to stderr. Defaults to ``false``.
880 :envvar:`R600_DUMP_SHADERS`
881    if set to ``true``, NIR shaders will be printed to stderr. Defaults
882    to ``false``.
883 :envvar:`R600_HYPERZ`
884    If set to ``false``, disables HyperZ optimizations. Defaults to ``true``.
885 :envvar:`R600_NIR_DEBUG`
886    a comma-separated list of named flags, which do various things:
887
888    ``instr``
889       Log all consumed nir instructions
890    ``ir``
891       Log created R600 IR
892    ``cc``
893       Log R600 IR to assembly code creation
894    ``noerr``
895       Don't log shader conversion errors
896    ``si``
897       Log shader info (non-zero values)
898    ``reg``
899       Log register allocation and lookup
900    ``io``
901       Log shader in and output
902    ``ass``
903       Log IR to assembly conversion
904    ``flow``
905       Log control flow instructions
906    ``merge``
907       Log register merge operations
908    ``nomerge``
909       Skip register merge step
910    ``tex``
911       Log texture ops
912    ``trans``
913       Log generic translation messages
914
915 Other Gallium drivers have their own environment variables. These may
916 change frequently so the source code should be consulted for details.