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