| Andreas Boll | ecd5c7c | 2012-06-12 09:05:03 +0200 | [diff] [blame] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | 
 | 2 | <html lang="en"> | 
 | 3 | <head> | 
 | 4 |   <meta http-equiv="content-type" content="text/html; charset=utf-8"> | 
 | 5 |   <title>Environment Variables</title> | 
 | 6 |   <link rel="stylesheet" type="text/css" href="mesa.css"> | 
 | 7 | </head> | 
 | 8 | <body> | 
| Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 9 |  | 
| Andreas Boll | b5da52a | 2012-09-18 18:57:02 +0200 | [diff] [blame] | 10 | <div class="header"> | 
 | 11 |   <h1>The Mesa 3D Graphics Library</h1> | 
 | 12 | </div> | 
 | 13 |  | 
 | 14 | <iframe src="contents.html"></iframe> | 
 | 15 | <div class="content"> | 
 | 16 |  | 
| Andreas Boll | ecd5c7c | 2012-06-12 09:05:03 +0200 | [diff] [blame] | 17 | <h1>Environment Variables</h1> | 
| Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 18 |  | 
 | 19 | <p> | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 20 | Normally, no environment variables need to be set.  Most of the environment | 
 | 21 | variables used by Mesa/Gallium are for debugging purposes, but they can | 
 | 22 | sometimes be useful for debugging end-user issues. | 
| Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 23 | </p> | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 24 |  | 
 | 25 |  | 
| Andreas Boll | 210a27d | 2012-06-12 09:05:36 +0200 | [diff] [blame] | 26 | <h2>LibGL environment variables</h2> | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 27 |  | 
 | 28 | <ul> | 
 | 29 | <li>LIBGL_DEBUG - If defined debug information will be printed to stderr. | 
 | 30 |    If set to 'verbose' additional information will be printed. | 
 | 31 | <li>LIBGL_DRIVERS_PATH - colon-separated list of paths to search for DRI drivers | 
| Eric Engestrom | 177fd32 | 2017-09-08 11:53:47 +0100 | [diff] [blame] | 32 | <li>LIBGL_ALWAYS_INDIRECT - if set to `true`, forces an indirect rendering context/connection. | 
| Eric Engestrom | 5c68ea2 | 2017-09-08 11:52:01 +0100 | [diff] [blame] | 33 | <li>LIBGL_ALWAYS_SOFTWARE - if set to `true`, always use software rendering | 
| Eric Engestrom | 717fb6e | 2017-09-08 11:57:26 +0100 | [diff] [blame] | 34 | <li>LIBGL_NO_DRAWARRAYS - if set to `true`, do not use DrawArrays GLX protocol (for debugging) | 
| Marek Olšák | dd6152b | 2013-03-26 03:19:10 +0100 | [diff] [blame] | 35 | <li>LIBGL_SHOW_FPS - print framerate to stdout based on the number of glXSwapBuffers | 
 | 36 |     calls per second. | 
| Eric Engestrom | 14e431b | 2017-09-08 11:55:14 +0100 | [diff] [blame] | 37 | <li>LIBGL_DRI3_DISABLE - disable DRI3 if set to `true`. | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 38 | </ul> | 
 | 39 |  | 
 | 40 |  | 
 | 41 |  | 
| Andreas Boll | 210a27d | 2012-06-12 09:05:36 +0200 | [diff] [blame] | 42 | <h2>Core Mesa environment variables</h2> | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 43 |  | 
| Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 44 | <ul> | 
| Brian Paul | b07d6a8 | 2004-02-02 22:35:55 +0000 | [diff] [blame] | 45 | <li>MESA_NO_ASM - if set, disables all assembly language optimizations | 
 | 46 | <li>MESA_NO_MMX - if set, disables Intel MMX optimizations | 
 | 47 | <li>MESA_NO_3DNOW - if set, disables AMD 3DNow! optimizations | 
 | 48 | <li>MESA_NO_SSE - if set, disables Intel SSE optimizations | 
| Eric Engestrom | 6c2e052 | 2017-09-07 11:10:55 +0100 | [diff] [blame] | 49 | <li>MESA_NO_ERROR - if set to 1, error checking is disabled as per KHR_no_error. | 
| Timothy Arceri | a0ed0eb | 2017-04-12 15:08:01 +1000 | [diff] [blame] | 50 |    This will result in undefined behaviour for invalid use of the api, but | 
 | 51 |    can reduce CPU use for apps that are known to be error free.</li> | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 52 | <li>MESA_DEBUG - if set, error messages are printed to stderr.  For example, | 
 | 53 |    if the application generates a GL_INVALID_ENUM error, a corresponding error | 
| Nathan Kidd | 0691b37 | 2014-01-03 16:44:00 -0700 | [diff] [blame] | 54 |    message indicating where the error occurred, and possibly why, will be | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 55 |    printed to stderr.<br> | 
| Alejandro Piñeiro | a97ee60 | 2016-06-27 10:00:58 +0200 | [diff] [blame] | 56 |  | 
 | 57 |    For release builds, MESA_DEBUG defaults to off (no debug output). | 
 | 58 |  | 
 | 59 |    MESA_DEBUG accepts the following comma-separated list of named | 
 | 60 |    flags, which adds extra behaviour to just set MESA_DEBUG=1: | 
 | 61 |    <ul> | 
 | 62 |      <li>silent - turn off debug messages. Only useful for debug builds.</li> | 
 | 63 |      <li>flush - flush after each drawing command</li> | 
 | 64 |      <li>incomplete_tex - extra debug messages when a texture is incomplete</li> | 
 | 65 |      <li>incomplete_fbo - extra debug messages when a fbo is incomplete</li> | 
| Brian Paul | 2acfd36 | 2016-11-17 07:20:32 -0700 | [diff] [blame] | 66 |      <li>context - create a debug context (see GLX_CONTEXT_DEBUG_BIT_ARB) and | 
 | 67 |          print error and performance messages to stderr (or MESA_LOG_FILE).</li> | 
| Alejandro Piñeiro | a97ee60 | 2016-06-27 10:00:58 +0200 | [diff] [blame] | 68 |    </ul> | 
| Brian Paul | 9ccf5bf | 2012-06-25 11:43:03 -0600 | [diff] [blame] | 69 | <li>MESA_LOG_FILE - specifies a file name for logging all errors, warnings, | 
 | 70 | etc., rather than stderr | 
| Brian Paul | 4d3ab19 | 2006-06-01 20:22:30 +0000 | [diff] [blame] | 71 | <li>MESA_TEX_PROG - if set, implement conventional texture env modes with | 
 | 72 | fragment programs (intended for developers only) | 
 | 73 | <li>MESA_TNL_PROG - if set, implement conventional vertex transformation | 
 | 74 | operations with vertex programs (intended for developers only). | 
 | 75 | Setting this variable automatically sets the MESA_TEX_PROG variable as well. | 
| Brian Paul | cc26e27 | 2009-06-08 10:56:51 -0600 | [diff] [blame] | 76 | <li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions. | 
 | 77 | A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension | 
 | 78 | and disable the GL_EXT_bar extension. | 
| Brian Paul | 82dd62f | 2011-03-24 11:39:21 -0600 | [diff] [blame] | 79 | <li>MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted | 
 | 80 | by extension year. | 
 | 81 | If this variable is set to year X, only extensions defined on or before year | 
 | 82 | X will be reported. | 
 | 83 | This is to work-around a bug in some games where the extension string is | 
 | 84 | copied into a fixed-size buffer without truncating. | 
 | 85 | If the extension string is too long, the buffer overrun can cause the game | 
 | 86 | to crash. | 
 | 87 | This is a work-around for that. | 
| Chad Versace | 0527c11 | 2011-09-26 11:48:46 -0700 | [diff] [blame] | 88 | <li>MESA_GL_VERSION_OVERRIDE - changes the value returned by | 
| Jordan Justen | 00905db | 2012-09-01 01:38:08 -0700 | [diff] [blame] | 89 | glGetString(GL_VERSION) and possibly the GL API type. | 
 | 90 | <ul> | 
| Marek Olšák | 806ab42 | 2018-03-06 18:27:30 -0500 | [diff] [blame] | 91 |   <li>The format should be MAJOR.MINOR[FC|COMPAT] | 
 | 92 |   <li>FC is an optional suffix that indicates a forward compatible | 
 | 93 |       context. This is only valid for versions >= 3.0. | 
 | 94 |   <li>COMPAT is an optional suffix that indicates a compatibility | 
 | 95 |       context or GL_ARB_compatibility support. This is only valid for | 
 | 96 |       versions >= 3.1. | 
 | 97 |   <li>GL versions <= 3.0 are set to a compatibility (non-Core) | 
 | 98 |       profile | 
 | 99 |   <li>GL versions = 3.1, depending on the driver, it may or may not | 
 | 100 |       have the ARB_compatibility extension enabled. | 
 | 101 |   <li>GL versions >= 3.2 are set to a Core profile | 
 | 102 |   <li>Examples: 2.1, 3.0, 3.0FC, 3.1, 3.1FC, 3.1COMPAT, X.Y, X.YFC, | 
 | 103 |       X.YCOMPAT. | 
 | 104 |   <ul> | 
 | 105 |     <li>2.1 - select a compatibility (non-Core) profile with GL | 
 | 106 |         version 2.1. | 
 | 107 |     <li>3.0 - select a compatibility (non-Core) profile with GL | 
 | 108 |         version 3.0. | 
 | 109 |     <li>3.0FC - select a Core+Forward Compatible profile with GL | 
 | 110 |         version 3.0. | 
 | 111 |     <li>3.1 - select GL version 3.1 with GL_ARB_compatibility enabled | 
 | 112 |         per the driver default. | 
 | 113 |     <li>3.1FC - select GL version 3.1 with forward compatibility and | 
 | 114 |         GL_ARB_compatibility disabled. | 
 | 115 |     <li>3.1COMPAT - select GL version 3.1 with GL_ARB_compatibility | 
 | 116 |         enabled. | 
 | 117 |     <li>X.Y - override GL version to X.Y without changing the profile. | 
 | 118 |     <li>X.YFC - select a Core+Forward Compatible profile with GL | 
 | 119 |         version X.Y. | 
 | 120 |     <li>X.YCOMPAT - select a Compatibility profile with GL version | 
 | 121 |         X.Y. | 
 | 122 |   </ul> | 
 | 123 |   <li>Mesa may not really implement all the features of the given | 
 | 124 |       version. (for developers only) | 
| Jordan Justen | 00905db | 2012-09-01 01:38:08 -0700 | [diff] [blame] | 125 | </ul> | 
| Alejandro Piñeiro | a150101 | 2016-02-13 19:05:49 +0100 | [diff] [blame] | 126 | <li>MESA_GLES_VERSION_OVERRIDE - changes the value returned by | 
 | 127 | glGetString(GL_VERSION) for OpenGL ES. | 
 | 128 | <ul> | 
 | 129 | <li> The format should be MAJOR.MINOR | 
 | 130 | <li> Examples: 2.0, 3.0, 3.1 | 
 | 131 | <li> Mesa may not really implement all the features of the given version. | 
 | 132 | (for developers only) | 
 | 133 | </ul> | 
| Chad Versace | a1eff55 | 2011-09-27 13:53:11 -0700 | [diff] [blame] | 134 | <li>MESA_GLSL_VERSION_OVERRIDE - changes the value returned by | 
 | 135 | glGetString(GL_SHADING_LANGUAGE_VERSION). Valid values are integers, such as | 
 | 136 | "130".  Mesa will not really implement all the features of the given language version | 
 | 137 | if it's higher than what's normally reported. (for developers only) | 
| Eric Engestrom | d861eb5 | 2017-09-08 10:49:45 +0100 | [diff] [blame] | 138 | <li>MESA_GLSL_CACHE_DISABLE - if set to `true`, disables the GLSL shader cache | 
| Timothy Arceri | 41ad178 | 2016-09-28 08:56:26 +1000 | [diff] [blame] | 139 | <li>MESA_GLSL_CACHE_MAX_SIZE - if set, determines the maximum size of | 
 | 140 | the on-disk cache of compiled GLSL programs. Should be set to a number | 
 | 141 | optionally followed by 'K', 'M', or 'G' to specify a size in | 
 | 142 | kilobytes, megabytes, or gigabytes. By default, gigabytes will be | 
| Timothy Arceri | ee8d2e2 | 2017-03-02 17:08:34 +1100 | [diff] [blame] | 143 | assumed. And if unset, a maximum size of 1GB will be used. Note: A separate | 
 | 144 | cache might be created for each architecture that Mesa is installed for on | 
 | 145 | your system. For example under the default settings you may end up with a 1GB | 
 | 146 | cache for x86_64 and another 1GB cache for i386. | 
| Timothy Arceri | 41ad178 | 2016-09-28 08:56:26 +1000 | [diff] [blame] | 147 | <li>MESA_GLSL_CACHE_DIR - if set, determines the directory to be used | 
 | 148 | for the on-disk cache of compiled GLSL programs. If this variable is | 
| Timothy Arceri | 4a91d4e | 2018-08-20 08:08:58 +1000 | [diff] [blame] | 149 | not set, then the cache will be stored in $XDG_CACHE_HOME/mesa_shader_cache (if | 
 | 150 | that variable is set), or else within .cache/mesa_shader_cache within the user's | 
| Timothy Arceri | 41ad178 | 2016-09-28 08:56:26 +1000 | [diff] [blame] | 151 | home directory. | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 152 | <li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a> | 
| Nicolai Hähnle | bc8a684 | 2016-01-11 15:56:22 -0500 | [diff] [blame] | 153 | <li>MESA_NO_MINMAX_CACHE - when set, the minmax index cache is globally disabled. | 
| Kenneth Graunke | e9cf458 | 2017-09-11 15:47:55 -0700 | [diff] [blame] | 154 | <li>MESA_SHADER_CAPTURE_PATH - see <a href="shading.html#capture">Capturing Shaders</a></li> | 
 | 155 | <li>MESA_SHADER_DUMP_PATH and MESA_SHADER_READ_PATH - see <a href="shading.html#replacement">Experimenting with Shader Replacements</a></li> | 
| Jason Ekstrand | a1ee513 | 2017-11-09 19:17:17 -0800 | [diff] [blame] | 156 | <li>MESA_VK_VERSION_OVERRIDE - changes the Vulkan physical device version | 
 | 157 |     as returned in VkPhysicalDeviceProperties::apiVersion. | 
 | 158 |   <ul> | 
 | 159 |     <li>The format should be MAJOR.MINOR[.PATCH]</li> | 
 | 160 |     <li>This will not let you force a version higher than the driver's | 
 | 161 |         instance versionas advertised by vkEnumerateInstanceVersion</li> | 
 | 162 |     <li>This can be very useful for debugging but some features may not be | 
 | 163 |         implemented correctly. (For developers only)</li> | 
 | 164 |   </ul> | 
 | 165 | </li> | 
| Brian Paul | b07d6a8 | 2004-02-02 22:35:55 +0000 | [diff] [blame] | 166 | </ul> | 
 | 167 |  | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 168 |  | 
| Andreas Boll | 210a27d | 2012-06-12 09:05:36 +0200 | [diff] [blame] | 169 | <h2>Mesa Xlib driver environment variables</h2> | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 170 |  | 
| Brian Paul | b07d6a8 | 2004-02-02 22:35:55 +0000 | [diff] [blame] | 171 | <p> | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 172 | The following are only applicable to the Mesa Xlib software driver. | 
| Andreas Boll | 210a27d | 2012-06-12 09:05:36 +0200 | [diff] [blame] | 173 | See the <a href="xlibdriver.html">Xlib software driver page</a> for details. | 
| Brian Paul | b07d6a8 | 2004-02-02 22:35:55 +0000 | [diff] [blame] | 174 | </p> | 
 | 175 | <ul> | 
| Brian Paul | 5e9d731 | 2006-01-27 20:12:06 +0000 | [diff] [blame] | 176 | <li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode | 
 | 177 | <li>MESA_CI_VISUAL - specifies the X visual and depth for CI mode | 
 | 178 | <li>MESA_BACK_BUFFER - specifies how to implement the back color buffer, | 
 | 179 |     either "pixmap" or "ximage" | 
 | 180 | <li>MESA_GAMMA - gamma correction coefficients for red, green, blue channels | 
 | 181 | <li>MESA_XSYNC - enable synchronous X behavior (for debugging only) | 
 | 182 | <li>MESA_GLX_FORCE_CI - if set, force GLX to treat 8bpp visuals as CI visuals | 
| Brian Paul | 4f6b1ad | 2004-07-23 15:49:12 +0000 | [diff] [blame] | 183 | <li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel. | 
| Brian Paul | dfa5c2b | 2004-07-23 23:32:15 +0000 | [diff] [blame] | 184 | <li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer. | 
| Brian Paul | 8894a55 | 2005-11-05 03:12:06 +0000 | [diff] [blame] | 185 | <li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel. | 
| Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 186 | </ul> | 
 | 187 |  | 
 | 188 |  | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 189 | <h2>i945/i965 driver environment variables (non-Gallium)</h2> | 
 | 190 |  | 
| Brian Paul | 1d8b308 | 2010-01-26 09:12:32 -0700 | [diff] [blame] | 191 | <ul> | 
| Chris Forbes | 90d1855 | 2013-11-24 18:12:49 +1300 | [diff] [blame] | 192 | <li>INTEL_NO_HW - if set to 1, prevents batches from being submitted to the hardware. | 
 | 193 |    This is useful for debugging hangs, etc.</li> | 
 | 194 | <li>INTEL_DEBUG - a comma-separated list of named flags, which do various things: | 
 | 195 | <ul> | 
| Samuel Iglesias Gonsálvez | 2beff74 | 2017-04-20 14:02:44 +0200 | [diff] [blame] | 196 |    <li>ann - annotate IR in assembly dumps</li> | 
 | 197 |    <li>aub - dump batches into an AUB trace for use with simulation tools</li> | 
| Chris Forbes | 90d1855 | 2013-11-24 18:12:49 +1300 | [diff] [blame] | 198 |    <li>bat - emit batch information</li> | 
| Samuel Iglesias Gonsálvez | 2beff74 | 2017-04-20 14:02:44 +0200 | [diff] [blame] | 199 |    <li>blit - emit messages about blit operations</li> | 
 | 200 |    <li>blorp - emit messages about the blorp operations (blits & clears)</li> | 
| Chris Forbes | 90d1855 | 2013-11-24 18:12:49 +1300 | [diff] [blame] | 201 |    <li>buf - emit messages about buffer objects</li> | 
| Samuel Iglesias Gonsálvez | 2beff74 | 2017-04-20 14:02:44 +0200 | [diff] [blame] | 202 |    <li>clip - emit messages about the clip unit (for old gens, includes the CLIP program)</li> | 
 | 203 |    <li>color - use color in output</li> | 
 | 204 |    <li>cs - dump shader assembly for compute shaders</li> | 
 | 205 |    <li>do32 - generate compute shader SIMD32 programs even if workgroup size doesn't exceed the SIMD16 limit</li> | 
 | 206 |    <li>dri - emit messages about the DRI interface</li> | 
| Chris Forbes | 90d1855 | 2013-11-24 18:12:49 +1300 | [diff] [blame] | 207 |    <li>fbo - emit messages about framebuffers</li> | 
 | 208 |    <li>fs - dump shader assembly for fragment shaders</li> | 
 | 209 |    <li>gs - dump shader assembly for geometry shaders</li> | 
| Samuel Iglesias Gonsálvez | 2beff74 | 2017-04-20 14:02:44 +0200 | [diff] [blame] | 210 |    <li>hex - print instruction hex dump with the disassembly</li> | 
 | 211 |    <li>l3 - emit messages about the new L3 state during transitions</li> | 
 | 212 |    <li>miptree - emit messages about miptrees</li> | 
| Grazvydas Ignotas | 2343235 | 2016-06-28 01:33:21 +0300 | [diff] [blame] | 213 |    <li>no8 - don't generate SIMD8 fragment shader</li> | 
| Samuel Iglesias Gonsálvez | 2beff74 | 2017-04-20 14:02:44 +0200 | [diff] [blame] | 214 |    <li>no16 - suppress generation of 16-wide fragment shaders. useful for debugging broken shaders</li> | 
 | 215 |    <li>nocompact - disable instruction compaction</li> | 
 | 216 |    <li>nodualobj - suppress generation of dual-object geometry shader code</li> | 
 | 217 |    <li>norbc - disable single sampled render buffer compression</li> | 
 | 218 |    <li>optimizer - dump shader assembly to files at each optimization pass and iteration that make progress</li> | 
 | 219 |    <li>perf - emit messages about performance issues</li> | 
 | 220 |    <li>perfmon - emit messages about AMD_performance_monitor</li> | 
 | 221 |    <li>pix - emit messages about pixel operations</li> | 
 | 222 |    <li>prim - emit messages about drawing primitives</li> | 
| Kenneth Graunke | 4f8d1af | 2017-09-15 17:47:07 -0700 | [diff] [blame] | 223 |    <li>reemit - mark all state dirty on each draw call</li> | 
| Samuel Iglesias Gonsálvez | 2beff74 | 2017-04-20 14:02:44 +0200 | [diff] [blame] | 224 |    <li>sf - emit messages about the strips & fans unit (for old gens, includes the SF program)</li> | 
 | 225 |    <li>shader_time - record how much GPU time is spent in each shader</li> | 
| Iago Toral Quiroga | 8f45691 | 2016-03-18 08:39:23 +0100 | [diff] [blame] | 226 |    <li>spill_fs - force spilling of all registers in the scalar backend (useful to debug spilling code)</li> | 
 | 227 |    <li>spill_vec4 - force spilling of all registers in the vec4 backend (useful to debug spilling code)</li> | 
| Samuel Iglesias Gonsálvez | 2beff74 | 2017-04-20 14:02:44 +0200 | [diff] [blame] | 228 |    <li>state - emit messages about state flag tracking</li> | 
| Kenneth Graunke | edfd8d4 | 2017-09-05 15:46:30 -0700 | [diff] [blame] | 229 |    <li>submit - emit batchbuffer usage statistics</li> | 
| Samuel Iglesias Gonsálvez | 2beff74 | 2017-04-20 14:02:44 +0200 | [diff] [blame] | 230 |    <li>sync - after sending each batch, emit a message and wait for that batch to finish rendering</li> | 
| Grazvydas Ignotas | 2343235 | 2016-06-28 01:33:21 +0300 | [diff] [blame] | 231 |    <li>tcs - dump shader assembly for tessellation control shaders</li> | 
 | 232 |    <li>tes - dump shader assembly for tessellation evaluation shaders</li> | 
| Samuel Iglesias Gonsálvez | 2beff74 | 2017-04-20 14:02:44 +0200 | [diff] [blame] | 233 |    <li>tex - emit messages about textures.</li> | 
 | 234 |    <li>urb - emit messages about URB setup</li> | 
| Samuel Iglesias Gonsálvez | 2beff74 | 2017-04-20 14:02:44 +0200 | [diff] [blame] | 235 |    <li>vert - emit messages about vertex assembly</li> | 
 | 236 |    <li>vs - dump shader assembly for vertex shaders</li> | 
| Chris Forbes | 90d1855 | 2013-11-24 18:12:49 +1300 | [diff] [blame] | 237 | </ul> | 
| Kenneth Graunke | 9cd6902 | 2017-06-03 12:26:29 -0700 | [diff] [blame] | 238 | <li>INTEL_SCALAR_VS (or TCS, TES, GS) - force scalar/vec4 mode for a shader stage (Gen8-9 only)</li> | 
| Juan A. Suarez Romero | 883ca59 | 2017-01-11 18:51:35 +0100 | [diff] [blame] | 239 | <li>INTEL_PRECISE_TRIG - if set to 1, true or yes, then the driver prefers | 
 | 240 |    accuracy over performance in trig functions.</li> | 
| Brian Paul | 1d8b308 | 2010-01-26 09:12:32 -0700 | [diff] [blame] | 241 | </ul> | 
 | 242 |  | 
 | 243 |  | 
| Matt Turner | ef3cec5 | 2012-01-30 13:58:10 -0500 | [diff] [blame] | 244 | <h2>Radeon driver environment variables (radeon, r200, and r300g)</h2> | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 245 |  | 
| Brian Paul | 1d8b308 | 2010-01-26 09:12:32 -0700 | [diff] [blame] | 246 | <ul> | 
| Matt Turner | ef3cec5 | 2012-01-30 13:58:10 -0500 | [diff] [blame] | 247 | <li>RADEON_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting. | 
| Brian Paul | 1d8b308 | 2010-01-26 09:12:32 -0700 | [diff] [blame] | 248 | </ul> | 
 | 249 |  | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 250 |  | 
 | 251 | <h2>EGL environment variables</h2> | 
 | 252 |  | 
| Chia-I Wu | 7fc3581 | 2010-02-02 11:05:19 +0800 | [diff] [blame] | 253 | <p> | 
 | 254 | Mesa EGL supports different sets of environment variables.  See the | 
 | 255 | <a href="egl.html">Mesa EGL</a> page for the details. | 
 | 256 | </p> | 
| Brian Paul | 1d8b308 | 2010-01-26 09:12:32 -0700 | [diff] [blame] | 257 |  | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 258 |  | 
 | 259 | <h2>Gallium environment variables</h2> | 
 | 260 |  | 
 | 261 | <ul> | 
| Marek Olšák | dd6152b | 2013-03-26 03:19:10 +0100 | [diff] [blame] | 262 | <li>GALLIUM_HUD - draws various information on the screen, like framerate, | 
 | 263 |     cpu load, driver statistics, performance counters, etc. | 
 | 264 |     Set GALLIUM_HUD=help and run e.g. glxgears for more info. | 
| Jimmy Berry | 09d6107 | 2015-11-03 23:24:47 -0600 | [diff] [blame] | 265 | <li>GALLIUM_HUD_PERIOD - sets the hud update rate in seconds (float). Use zero | 
 | 266 |     to update every frame. The default period is 1/2 second. | 
| Jimmy Berry | 56a1c10 | 2015-11-09 23:20:37 -0600 | [diff] [blame] | 267 | <li>GALLIUM_HUD_VISIBLE - control default visibility, defaults to true. | 
 | 268 | <li>GALLIUM_HUD_TOGGLE_SIGNAL - toggle visibility via user specified signal. | 
 | 269 |     Especially useful to toggle hud at specific points of application and | 
 | 270 |     disable for unencumbered viewing the rest of the time. For example, set | 
| Christoph Haag | 7b414bc | 2016-09-07 01:13:39 +0200 | [diff] [blame] | 271 |     GALLIUM_HUD_VISIBLE to false and GALLIUM_HUD_TOGGLE_SIGNAL to 10 (SIGUSR1). | 
| Andres Gomez | a055f51 | 2018-04-09 13:32:43 +0300 | [diff] [blame] | 272 |     Use kill -10 <pid> to toggle the hud as desired. | 
| Edmondo Tommasina | 3f5fba8 | 2016-12-21 22:58:14 +0100 | [diff] [blame] | 273 | <li>GALLIUM_HUD_DUMP_DIR - specifies a directory for writing the displayed | 
 | 274 |     hud values into files. | 
| Eric Engestrom | 5c68ea2 | 2017-09-08 11:52:01 +0100 | [diff] [blame] | 275 | <li>GALLIUM_DRIVER - useful in combination with LIBGL_ALWAYS_SOFTWARE=true for | 
| Christoph Haag | 55ba5fa | 2016-09-08 21:32:04 +0200 | [diff] [blame] | 276 |     choosing one of the software renderers "softpipe", "llvmpipe" or "swr". | 
| Brian Paul | 75e6202 | 2012-06-25 11:44:44 -0600 | [diff] [blame] | 277 | <li>GALLIUM_LOG_FILE - specifies a file for logging all errors, warnings, etc. | 
 | 278 |     rather than stderr. | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 279 | <li>GALLIUM_PRINT_OPTIONS - if non-zero, print all the Gallium environment | 
 | 280 |     variables which are used, and their current values. | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 281 | <li>GALLIUM_DUMP_CPU - if non-zero, print information about the CPU on start-up | 
 | 282 | <li>TGSI_PRINT_SANITY - if set, do extra sanity checking on TGSI shaders and | 
 | 283 |     print any errors to stderr. | 
 | 284 | <LI>DRAW_FSE - ??? | 
 | 285 | <LI>DRAW_NO_FSE - ??? | 
 | 286 | <li>DRAW_USE_LLVM - if set to zero, the draw module will not use LLVM to execute | 
 | 287 |     shaders, vertex fetch, etc. | 
| Brian Paul | 90fa71b | 2013-06-07 10:12:28 -0600 | [diff] [blame] | 288 | <li>ST_DEBUG - controls debug output from the Mesa/Gallium state tracker. | 
 | 289 | Setting to "tgsi", for example, will print all the TGSI shaders. | 
 | 290 | See src/mesa/state_tracker/st_debug.c for other options. | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 291 | </ul> | 
 | 292 |  | 
| Vedran Miletić | 2fba720 | 2016-09-28 16:18:24 +0200 | [diff] [blame] | 293 | <h3>Clover state tracker environment variables</h3> | 
 | 294 |  | 
 | 295 | <ul> | 
 | 296 | <li>CLOVER_EXTRA_BUILD_OPTIONS - allows specifying additional compiler and linker | 
 | 297 |     options. Specified options are appended after the options set by the OpenCL | 
 | 298 |     program in clBuildProgram. | 
 | 299 | <li>CLOVER_EXTRA_COMPILE_OPTIONS - allows specifying additional compiler | 
 | 300 |     options. Specified options are appended after the options set by the OpenCL | 
 | 301 |     program in clCompileProgram. | 
 | 302 | <li>CLOVER_EXTRA_LINK_OPTIONS - allows specifying additional linker | 
 | 303 |     options. Specified options are appended after the options set by the OpenCL | 
 | 304 |     program in clLinkProgram. | 
 | 305 | </ul> | 
 | 306 |  | 
 | 307 |  | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 308 | <h3>Softpipe driver environment variables</h3> | 
 | 309 | <ul> | 
 | 310 | <li>SOFTPIPE_DUMP_FS - if set, the softpipe driver will print fragment shaders | 
 | 311 |     to stderr | 
 | 312 | <li>SOFTPIPE_DUMP_GS - if set, the softpipe driver will print geometry shaders | 
 | 313 |     to stderr | 
 | 314 | <li>SOFTPIPE_NO_RAST - if set, rasterization is no-op'd.  For profiling purposes. | 
| Jakob Bornecrantz | 6afa7cd | 2012-01-09 21:37:50 +0100 | [diff] [blame] | 315 | <li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for | 
| Nathan Kidd | 0691b37 | 2014-01-03 16:44:00 -0700 | [diff] [blame] | 316 |     vertex shading processing. | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 317 | </ul> | 
 | 318 |  | 
 | 319 |  | 
 | 320 | <h3>LLVMpipe driver environment variables</h3> | 
 | 321 | <ul> | 
 | 322 | <li>LP_NO_RAST - if set LLVMpipe will no-op rasterization | 
| Nathan Kidd | 0691b37 | 2014-01-03 16:44:00 -0700 | [diff] [blame] | 323 | <li>LP_DEBUG - a comma-separated list of debug options is accepted.  See the | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 324 |     source code for details. | 
 | 325 | <li>LP_PERF - a comma-separated list of options to selectively no-op various | 
 | 326 |     parts of the driver.  See the source code for details. | 
 | 327 | <li>LP_NUM_THREADS - an integer indicating how many threads to use for rendering. | 
| Rhys Kidd | a0f55e9 | 2016-02-20 16:15:35 +0100 | [diff] [blame] | 328 |     Zero turns off threading completely.  The default value is the number of CPU | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 329 |     cores present. | 
 | 330 | </ul> | 
 | 331 |  | 
| Brian Paul | 90fa71b | 2013-06-07 10:12:28 -0600 | [diff] [blame] | 332 | <h3>VMware SVGA driver environment variables</h3> | 
 | 333 | <ul> | 
 | 334 | <li>SVGA_FORCE_SWTNL - force use of software vertex transformation | 
 | 335 | <li>SVGA_NO_SWTNL - don't allow software vertex transformation fallbacks | 
 | 336 | (will often result in incorrect rendering). | 
 | 337 | <li>SVGA_DEBUG - for dumping shaders, constant buffers, etc.  See the code | 
 | 338 | for details. | 
| Brian Paul | cf1adb7 | 2017-05-23 07:45:12 -0600 | [diff] [blame] | 339 | <li>SVGA_EXTRA_LOGGING - if set, enables extra logging to the vmware.log file, | 
 | 340 | such as the OpenGL program's name and command line arguments. | 
| Brian Paul | 90fa71b | 2013-06-07 10:12:28 -0600 | [diff] [blame] | 341 | <li>See the driver code for other, lesser-used variables. | 
 | 342 | </ul> | 
 | 343 |  | 
| Brian Paul | bebf758 | 2018-03-27 12:39:05 -0600 | [diff] [blame] | 344 | <h3>WGL environment variables</h3> | 
 | 345 | <ul> | 
 | 346 | <li>WGL_SWAP_INTERVAL - to set a swap interval, equivalent to calling | 
 | 347 | wglSwapIntervalEXT() in an application.  If this environment variable | 
 | 348 | is set, application calls to wglSwapIntervalEXT() will have no effect. | 
 | 349 | </ul> | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 350 |  | 
| Christian König | a2c5200 | 2015-11-23 15:21:19 +0100 | [diff] [blame] | 351 | <h3>VA-API state tracker environment variables</h3> | 
 | 352 | <ul> | 
 | 353 | <li>VAAPI_MPEG4_ENABLED - enable MPEG4 for VA-API, disabled by default. | 
 | 354 | </ul> | 
 | 355 |  | 
 | 356 |  | 
| Rhys Kidd | 76e2af3 | 2016-02-13 16:03:02 -0500 | [diff] [blame] | 357 | <h3>VC4 driver environment variables</h3> | 
 | 358 | <ul> | 
 | 359 | <li>VC4_DEBUG - a comma-separated list of named flags, which do various things: | 
 | 360 | <ul> | 
 | 361 |    <li>cl - dump command list during creation</li> | 
 | 362 |    <li>qpu - dump generated QPU instructions</li> | 
 | 363 |    <li>qir - dump QPU IR during program compile</li> | 
 | 364 |    <li>nir - dump NIR during program compile</li> | 
 | 365 |    <li>tgsi - dump TGSI during program compile</li> | 
 | 366 |    <li>shaderdb - dump program compile information for shader-db analysis</li> | 
 | 367 |    <li>perf - print during performance-related events</li> | 
 | 368 |    <li>norast - skip actual hardware execution of commands</li> | 
 | 369 |    <li>always_flush - flush after each draw call</li> | 
 | 370 |    <li>always_sync - wait for finish after each flush</li> | 
 | 371 |    <li>dump - write a GPU command stream trace file (VC4 simulator only)</li> | 
 | 372 | </ul> | 
 | 373 | </ul> | 
 | 374 |  | 
 | 375 |  | 
| Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 376 | <p> | 
 | 377 | Other Gallium drivers have their own environment variables.  These may change | 
 | 378 | frequently so the source code should be consulted for details. | 
 | 379 | </p> | 
 | 380 |  | 
| Andreas Boll | b5da52a | 2012-09-18 18:57:02 +0200 | [diff] [blame] | 381 | </div> | 
| Andreas Boll | ecd5c7c | 2012-06-12 09:05:03 +0200 | [diff] [blame] | 382 | </body> | 
 | 383 | </html> |