Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 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 | ``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 Jackson | a59b1b18 | 2020-11-19 09:54:18 -0500 | [diff] [blame] | 26 | ``LIBGL_DRI2_DISABLE`` |
| 27 | disable DRI2 if set to ``true``. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 28 | ``LIBGL_DRI3_DISABLE`` |
| 29 | disable DRI3 if set to ``true``. |
| 30 | |
| 31 | Core 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-Lund | f408343 | 2020-09-30 10:33:25 +0200 | [diff] [blame] | 44 | will result in undefined behavior for invalid use of the API, but |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 45 | 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-Lund | 9890927 | 2020-09-25 14:54:56 +0200 | [diff] [blame] | 53 | behavior to just set ``MESA_DEBUG=1``: |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 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`` |
Erik Faye-Lund | 4aded09 | 2020-09-30 15:03:03 +0200 | [diff] [blame] | 62 | extra debug messages when a FBO is incomplete |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 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 | ``MESA_LOG_FILE`` |
| 69 | specifies a file name for logging all errors, warnings, etc., rather |
| 70 | than stderr |
| 71 | ``MESA_TEX_PROG`` |
Erik Faye-Lund | 86196fa | 2021-02-03 13:14:34 +0100 | [diff] [blame] | 72 | if set, implement conventional texture environment modes with fragment |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 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 Bates | 5de5693 | 2020-09-30 18:35:02 -0700 | [diff] [blame] | 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. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 149 | ``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-Lund | bf3f0f7 | 2019-06-04 10:39:58 +0200 | [diff] [blame] | 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 | |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 163 | ``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-Lund | 9be0e2d | 2020-06-15 12:31:36 +0200 | [diff] [blame] | 170 | :ref:`shading language compiler options <envvars>` |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 171 | ``MESA_NO_MINMAX_CACHE`` |
| 172 | when set, the minmax index cache is globally disabled. |
| 173 | ``MESA_SHADER_CAPTURE_PATH`` |
Erik Faye-Lund | 9be0e2d | 2020-06-15 12:31:36 +0200 | [diff] [blame] | 174 | see :ref:`Capturing Shaders <capture>` |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 175 | ``MESA_SHADER_DUMP_PATH`` and ``MESA_SHADER_READ_PATH`` |
Erik Faye-Lund | 9be0e2d | 2020-06-15 12:31:36 +0200 | [diff] [blame] | 176 | see :ref:`Experimenting with Shader |
| 177 | Replacements <replacement>` |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 178 | ``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 Ziak | f590148 | 2020-09-29 14:38:03 +0000 | [diff] [blame] | 187 | ``MESA_LOADER_DRIVER_OVERRIDE`` |
| 188 | chooses a different driver binary such as ``etnaviv`` or ``zink``. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 189 | |
Eric Engestrom | 9497a1f | 2020-07-09 00:52:27 +0200 | [diff] [blame] | 190 | NIR passes environment variables |
| 191 | -------------------------------- |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 192 | |
| 193 | The following are only applicable for drivers that uses NIR, as they |
Erik Faye-Lund | 9890927 | 2020-09-25 14:54:56 +0200 | [diff] [blame] | 194 | modify the behavior for the common NIR_PASS and NIR_PASS_V macros, that |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 195 | wrap calls to NIR lowering/optimizations. |
| 196 | |
| 197 | ``NIR_PRINT`` |
| 198 | If defined, the resulting NIR shader will be printed out at each |
Eric Engestrom | 9497a1f | 2020-07-09 00:52:27 +0200 | [diff] [blame] | 199 | successful NIR lowering/optimization call. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 200 | ``NIR_TEST_CLONE`` |
Eric Engestrom | 9497a1f | 2020-07-09 00:52:27 +0200 | [diff] [blame] | 201 | If defined, cloning a NIR shader would be tested at each successful |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 202 | NIR lowering/optimization call. |
| 203 | ``NIR_TEST_SERIALIZE`` |
| 204 | If defined, serialize and deserialize a NIR shader would be tested at |
Eric Engestrom | 9497a1f | 2020-07-09 00:52:27 +0200 | [diff] [blame] | 205 | each successful NIR lowering/optimization call. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 206 | |
| 207 | Mesa Xlib driver environment variables |
| 208 | -------------------------------------- |
| 209 | |
| 210 | The following are only applicable to the Mesa Xlib software driver. See |
Erik Faye-Lund | 9be0e2d | 2020-06-15 12:31:36 +0200 | [diff] [blame] | 211 | the :doc:`Xlib software driver page <xlibdriver>` for details. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 212 | |
| 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-Lund | a1904c9 | 2020-09-28 14:57:37 +0200 | [diff] [blame] | 225 | if set, force GLX to treat 8 BPP visuals as CI visuals |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 226 | ``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 | |
| 233 | i945/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 Piliaiev | 2c08404 | 2020-09-28 19:29:42 +0300 | [diff] [blame] | 340 | ``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 Landwerlin | b039e03 | 2020-11-09 18:45:18 +0200 | [diff] [blame] | 354 | ``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-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 359 | |
| 360 | Radeon driver environment variables (radeon, r200, and r300g) |
| 361 | ------------------------------------------------------------- |
| 362 | |
| 363 | ``RADEON_NO_TCL`` |
| 364 | if set, disable hardware-accelerated Transform/Clip/Lighting. |
| 365 | |
| 366 | EGL environment variables |
| 367 | ------------------------- |
| 368 | |
Erik Faye-Lund | 9be0e2d | 2020-06-15 12:31:36 +0200 | [diff] [blame] | 369 | Mesa EGL supports different sets of environment variables. See the |
| 370 | :doc:`Mesa EGL <egl>` page for the details. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 371 | |
| 372 | Gallium environment variables |
| 373 | ----------------------------- |
| 374 | |
| 375 | ``GALLIUM_HUD`` |
Erik Faye-Lund | ae7975e | 2020-09-29 19:15:32 +0200 | [diff] [blame] | 376 | draws various information on the screen, like framerate, CPU load, |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 377 | driver statistics, performance counters, etc. Set |
| 378 | ``GALLIUM_HUD=help`` and run e.g. ``glxgears`` for more info. |
| 379 | ``GALLIUM_HUD_PERIOD`` |
Erik Faye-Lund | e8d0313 | 2020-09-30 10:36:29 +0200 | [diff] [blame] | 380 | sets the HUD update rate in seconds (float). Use zero to update every |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 381 | 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-Lund | e8d0313 | 2020-09-30 10:36:29 +0200 | [diff] [blame] | 386 | toggle HUD at specific points of application and disable for |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 387 | 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-Lund | e8d0313 | 2020-09-30 10:36:29 +0200 | [diff] [blame] | 390 | ``kill -10 <pid>`` to toggle the HUD as desired. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 391 | ``GALLIUM_HUD_SCALE`` |
Erik Faye-Lund | e8d0313 | 2020-09-30 10:36:29 +0200 | [diff] [blame] | 392 | Scale HUD by an integer factor, for high DPI displays. Default is 1. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 393 | ``GALLIUM_HUD_DUMP_DIR`` |
Erik Faye-Lund | e8d0313 | 2020-09-30 10:36:29 +0200 | [diff] [blame] | 394 | specifies a directory for writing the displayed HUD values into |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 395 | 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 Ekstrand | 449f1fe | 2020-08-18 11:59:19 -0500 | [diff] [blame] | 403 | ``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-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 406 | ``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 | |
| 426 | Clover 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 | |
| 442 | Softpipe driver environment variables |
| 443 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 444 | |
Eric Anholt | 991def0 | 2020-07-21 15:11:56 -0700 | [diff] [blame] | 445 | ``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`` |
Erik Faye-Lund | 22fac1b | 2021-02-03 13:06:51 +0100 | [diff] [blame] | 457 | rasterization is disabled. For profiling purposes. |
Eric Anholt | 991def0 | 2020-07-21 15:11:56 -0700 | [diff] [blame] | 458 | ``use_llvm`` |
| 459 | the softpipe driver will try to use LLVM JIT for vertex |
| 460 | shading processing. |
Eric Anholt | d0f8fe5 | 2019-12-31 16:20:52 -0800 | [diff] [blame] | 461 | ``use_tgsi`` |
| 462 | if set, the softpipe driver will ask to directly consume TGSI, instead |
| 463 | of NIR. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 464 | |
| 465 | LLVMpipe 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 | |
| 481 | VMware 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 | |
| 499 | See the driver code for other, lesser-used variables. |
| 500 | |
| 501 | WGL 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 | |
| 510 | VA-API environment variables |
| 511 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 512 | |
| 513 | ``VAAPI_MPEG4_ENABLED`` |
| 514 | enable MPEG4 for VA-API, disabled by default. |
| 515 | |
| 516 | VC4 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 | |
| 545 | RADV driver environment variables |
| 546 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 547 | |
| 548 | ``RADV_DEBUG`` |
| 549 | a comma-separated list of named flags, which do various things: |
| 550 | |
Daniel Schürmann | b78f645 | 2020-06-12 17:55:00 +0100 | [diff] [blame] | 551 | ``llvm`` |
| 552 | enable LLVM compiler backend |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 553 | ``allbos`` |
| 554 | force all allocated buffers to be referenced in submissions |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 555 | ``checkir`` |
| 556 | validate the LLVM IR before LLVM compiles the shader |
| 557 | ``errors`` |
| 558 | display more info about errors |
Bas Nieuwenhuizen | 2fa83dc | 2020-08-10 00:10:38 +0200 | [diff] [blame] | 559 | ``forcecompress`` |
| 560 | Enables DCC,FMASK,CMASK,HTILE in situations where the driver supports it |
| 561 | but normally does not deem it beneficial. |
Samuel Pitoiset | 33c9d4b | 2020-10-19 18:37:26 +0200 | [diff] [blame] | 562 | ``hang`` |
Samuel Pitoiset | 8d7f78c | 2020-11-20 09:19:55 +0100 | [diff] [blame] | 563 | enable GPU hangs detection and dump a report to |
| 564 | $HOME/radv_dumps_<pid>_<time> if a GPU hang is detected |
Simon Ser | 1cf1ece | 2020-07-03 15:16:00 +0200 | [diff] [blame] | 565 | ``img`` |
| 566 | Print image info |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 567 | ``info`` |
| 568 | show GPU-related information |
Rhys Perry | f17de6a | 2020-12-14 21:54:28 +0000 | [diff] [blame] | 569 | ``invariantgeom`` |
| 570 | Mark geometry-affecting outputs as invariant. This works around a common |
| 571 | class of application bugs appearing as flickering. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 572 | ``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 Nieuwenhuizen | ff99faf | 2021-02-28 02:59:25 +0100 | [diff] [blame] | 582 | ``nodisplaydcc`` |
| 583 | disable Delta Color Compression (DCC) on displayable images |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 584 | ``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-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 592 | ``nomemorycache`` |
| 593 | disable memory shaders cache |
| 594 | ``nongg`` |
| 595 | disable NGG for GFX10+ |
| 596 | ``nooutoforder`` |
| 597 | disable out-of-order rasterization |
Samuel Pitoiset | 9d42e71 | 2021-03-03 17:24:34 +0100 | [diff] [blame] | 598 | ``notccompatcmask`` |
| 599 | disable TC-compat CMASK for MSAA surfaces |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 600 | ``nothreadllvm`` |
| 601 | disable LLVM threaded compilation |
Samuel Pitoiset | 4ffa6ac | 2020-11-20 09:56:59 +0100 | [diff] [blame] | 602 | ``noumr`` |
| 603 | disable UMR dumps during GPU hang detection (only with RADV_DEBUG=hang) |
Samuel Pitoiset | 92764ab | 2021-03-10 17:04:18 +0100 | [diff] [blame] | 604 | ``novrsflatshading`` |
| 605 | disable VRS for flat shading (only on GFX10.3+) |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 606 | ``preoptir`` |
| 607 | dump LLVM IR before any optimizations |
| 608 | ``shaders`` |
| 609 | dump shaders |
| 610 | ``shaderstats`` |
| 611 | dump shader statistics |
| 612 | ``spirv`` |
| 613 | dump SPIR-V |
| 614 | ``startup`` |
| 615 | display info at startup |
| 616 | ``syncshaders`` |
| 617 | synchronize shaders after all draws/dispatches |
| 618 | ``vmfaults`` |
| 619 | check for VM memory faults via dmesg |
| 620 | ``zerovram`` |
| 621 | initialize all memory allocated in VRAM as zero |
| 622 | |
| 623 | ``RADV_FORCE_FAMILY`` |
Samuel Pitoiset | 8fa7aa1 | 2021-04-01 14:35:23 +0200 | [diff] [blame] | 624 | create a null device to compile shaders without a AMD GPU (e.g. vega10) |
Samuel Pitoiset | 1ad295e | 2021-01-19 16:12:01 +0100 | [diff] [blame] | 625 | |
| 626 | ``RADV_FORCE_VRS`` |
| 627 | allow to force per-pipeline vertex VRS rates on GFX10.3+. This is only |
| 628 | forced for pipelines that don't explicitely use VRS or flat shading. |
| 629 | The supported values are 2x2, 1x2 and 2x1. Only for testing purposes. |
| 630 | |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 631 | ``RADV_PERFTEST`` |
| 632 | a comma-separated list of named flags, which do various things: |
| 633 | |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 634 | ``bolist`` |
| 635 | enable the global BO list |
| 636 | ``cswave32`` |
| 637 | enable wave32 for compute shaders (GFX10+) |
| 638 | ``dccmsaa`` |
| 639 | enable DCC for MSAA images |
Samuel Pitoiset | 2ded998 | 2021-03-30 14:50:58 +0200 | [diff] [blame] | 640 | ``dccstores`` |
| 641 | enable DCC for storage images (for performance testing on GFX10.3 only) |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 642 | ``dfsm`` |
Erik Faye-Lund | 807d867 | 2021-02-03 13:13:25 +0100 | [diff] [blame] | 643 | enable DFSM |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 644 | ``gewave32`` |
| 645 | enable wave32 for vertex/tess/geometry shaders (GFX10+) |
| 646 | ``localbos`` |
| 647 | enable local BOs |
Bas Nieuwenhuizen | f06e91d | 2020-12-08 00:25:56 +0100 | [diff] [blame] | 648 | ``nosam`` |
| 649 | disable optimizations that get enabled when all VRAM is CPU visible. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 650 | ``pswave32`` |
| 651 | enable wave32 for pixel shaders (GFX10+) |
Bas Nieuwenhuizen | 3c9452c | 2021-02-27 20:16:21 +0100 | [diff] [blame] | 652 | ``sam`` |
| 653 | enable optimizations to move more driver internal objects to VRAM. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 654 | ``tccompatcmask`` |
| 655 | enable TC-compat cmask for MSAA images |
| 656 | |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 657 | ``RADV_TEX_ANISO`` |
| 658 | force anisotropy filter (up to 16) |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 659 | ``ACO_DEBUG`` |
| 660 | a comma-separated list of named flags, which do various things: |
| 661 | |
| 662 | ``validateir`` |
| 663 | validate the ACO IR at various points of compilation (enabled by |
| 664 | default for debug/debugoptimized builds) |
| 665 | ``validatera`` |
| 666 | validate register assignment of ACO IR and catches many RA bugs |
| 667 | ``perfwarn`` |
| 668 | abort on some suboptimal code generation |
Samuel Pitoiset | f153151 | 2020-08-19 10:40:35 +0200 | [diff] [blame] | 669 | ``force-waitcnt`` |
| 670 | force emitting waitcnt states if there is something to wait for |
Samuel Pitoiset | 502b9da | 2020-08-26 14:24:45 +0200 | [diff] [blame] | 671 | ``novn`` |
| 672 | disable value numbering |
| 673 | ``noopt`` |
| 674 | disable various optimizations |
| 675 | ``noscheduling`` |
| 676 | disable instructions scheduling |
Rhys Perry | 8e409ab | 2021-03-15 14:17:57 +0000 | [diff] [blame] | 677 | ``perfinfo`` |
| 678 | print information used to calculate some pipeline statistics |
Rhys Perry | e2cdbb2 | 2021-03-15 14:17:14 +0000 | [diff] [blame] | 679 | ``liveinfo`` |
| 680 | print liveness and register demand information before scheduling |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 681 | |
| 682 | radeonsi driver environment variables |
| 683 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 684 | |
| 685 | ``AMD_DEBUG`` |
| 686 | a comma-separated list of named flags, which do various things: |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 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 |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 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. |
Erik Faye-Lund | 4d06683 | 2020-06-12 20:09:42 +0200 | [diff] [blame] | 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 | Other Gallium drivers have their own environment variables. These may |
| 785 | change frequently so the source code should be consulted for details. |