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 | ecd5c7c | 2012-06-12 09:05:03 +0200 | [diff] [blame] | 10 | <h1>Environment Variables</h1> |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 11 | |
| 12 | <p> |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 13 | Normally, no environment variables need to be set. Most of the environment |
| 14 | variables used by Mesa/Gallium are for debugging purposes, but they can |
| 15 | sometimes be useful for debugging end-user issues. |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 16 | </p> |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 17 | |
| 18 | |
Andreas Boll | 210a27d | 2012-06-12 09:05:36 +0200 | [diff] [blame^] | 19 | <h2>LibGL environment variables</h2> |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 20 | |
| 21 | <ul> |
| 22 | <li>LIBGL_DEBUG - If defined debug information will be printed to stderr. |
| 23 | If set to 'verbose' additional information will be printed. |
| 24 | <li>LIBGL_DRIVERS_PATH - colon-separated list of paths to search for DRI drivers |
| 25 | <li>LIBGL_ALWAYS_INDIRECT - forces an indirect rendering context/connection. |
| 26 | <li>LIBGL_ALWAYS_SOFTWARE - if set, always use software rendering |
| 27 | <li>LIBGL_NO_DRAWARRAYS - if set do not use DrawArrays GLX protocol (for debugging) |
| 28 | </ul> |
| 29 | |
| 30 | |
| 31 | |
Andreas Boll | 210a27d | 2012-06-12 09:05:36 +0200 | [diff] [blame^] | 32 | <h2>Core Mesa environment variables</h2> |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 33 | |
Brian Paul | 0b27ace | 2003-03-08 17:38:57 +0000 | [diff] [blame] | 34 | <ul> |
Brian Paul | b07d6a8 | 2004-02-02 22:35:55 +0000 | [diff] [blame] | 35 | <li>MESA_NO_ASM - if set, disables all assembly language optimizations |
| 36 | <li>MESA_NO_MMX - if set, disables Intel MMX optimizations |
| 37 | <li>MESA_NO_3DNOW - if set, disables AMD 3DNow! optimizations |
| 38 | <li>MESA_NO_SSE - if set, disables Intel SSE optimizations |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 39 | <li>MESA_DEBUG - if set, error messages are printed to stderr. For example, |
| 40 | if the application generates a GL_INVALID_ENUM error, a corresponding error |
| 41 | message indicating where the error occured, and possibly why, will be |
| 42 | printed to stderr.<br> |
| 43 | If the value of MESA_DEBUG is 'FP' floating point arithmetic errors will |
| 44 | generate exceptions. |
Brian Paul | 4d3ab19 | 2006-06-01 20:22:30 +0000 | [diff] [blame] | 45 | <li>MESA_TEX_PROG - if set, implement conventional texture env modes with |
| 46 | fragment programs (intended for developers only) |
| 47 | <li>MESA_TNL_PROG - if set, implement conventional vertex transformation |
| 48 | operations with vertex programs (intended for developers only). |
| 49 | Setting this variable automatically sets the MESA_TEX_PROG variable as well. |
Brian Paul | cc26e27 | 2009-06-08 10:56:51 -0600 | [diff] [blame] | 50 | <li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions. |
| 51 | A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension |
| 52 | and disable the GL_EXT_bar extension. |
Brian Paul | 82dd62f | 2011-03-24 11:39:21 -0600 | [diff] [blame] | 53 | <li>MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted |
| 54 | by extension year. |
| 55 | If this variable is set to year X, only extensions defined on or before year |
| 56 | X will be reported. |
| 57 | This is to work-around a bug in some games where the extension string is |
| 58 | copied into a fixed-size buffer without truncating. |
| 59 | If the extension string is too long, the buffer overrun can cause the game |
| 60 | to crash. |
| 61 | This is a work-around for that. |
Chad Versace | 0527c11 | 2011-09-26 11:48:46 -0700 | [diff] [blame] | 62 | <li>MESA_GL_VERSION_OVERRIDE - changes the value returned by |
| 63 | glGetString(GL_VERSION). Valid values are point-separated version numbers, |
| 64 | such as "3.0". Mesa will not really implement all the features of the given |
| 65 | version if it's higher than what's normally reported. |
Chad Versace | a1eff55 | 2011-09-27 13:53:11 -0700 | [diff] [blame] | 66 | <li>MESA_GLSL_VERSION_OVERRIDE - changes the value returned by |
| 67 | glGetString(GL_SHADING_LANGUAGE_VERSION). Valid values are integers, such as |
| 68 | "130". Mesa will not really implement all the features of the given language version |
| 69 | if it's higher than what's normally reported. (for developers only) |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 70 | <li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a> |
Brian Paul | b07d6a8 | 2004-02-02 22:35:55 +0000 | [diff] [blame] | 71 | </ul> |
| 72 | |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 73 | |
Andreas Boll | 210a27d | 2012-06-12 09:05:36 +0200 | [diff] [blame^] | 74 | <h2>Mesa Xlib driver environment variables</h2> |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 75 | |
Brian Paul | b07d6a8 | 2004-02-02 22:35:55 +0000 | [diff] [blame] | 76 | <p> |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 77 | The following are only applicable to the Mesa Xlib software driver. |
Andreas Boll | 210a27d | 2012-06-12 09:05:36 +0200 | [diff] [blame^] | 78 | 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] | 79 | </p> |
| 80 | <ul> |
Brian Paul | 5e9d731 | 2006-01-27 20:12:06 +0000 | [diff] [blame] | 81 | <li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode |
| 82 | <li>MESA_CI_VISUAL - specifies the X visual and depth for CI mode |
| 83 | <li>MESA_BACK_BUFFER - specifies how to implement the back color buffer, |
| 84 | either "pixmap" or "ximage" |
| 85 | <li>MESA_GAMMA - gamma correction coefficients for red, green, blue channels |
| 86 | <li>MESA_XSYNC - enable synchronous X behavior (for debugging only) |
| 87 | <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] | 88 | <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] | 89 | <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] | 90 | <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] | 91 | </ul> |
| 92 | |
| 93 | |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 94 | <h2>i945/i965 driver environment variables (non-Gallium)</h2> |
| 95 | |
Brian Paul | 1d8b308 | 2010-01-26 09:12:32 -0700 | [diff] [blame] | 96 | <ul> |
| 97 | <li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve |
| 98 | OpenGL conformance. If set to 2, always use software rendering. |
| 99 | <li>INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap, |
| 100 | glCopyPixels, glDrawPixels. |
| 101 | </ul> |
| 102 | |
| 103 | |
Matt Turner | ef3cec5 | 2012-01-30 13:58:10 -0500 | [diff] [blame] | 104 | <h2>Radeon driver environment variables (radeon, r200, and r300g)</h2> |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 105 | |
Brian Paul | 1d8b308 | 2010-01-26 09:12:32 -0700 | [diff] [blame] | 106 | <ul> |
Matt Turner | ef3cec5 | 2012-01-30 13:58:10 -0500 | [diff] [blame] | 107 | <li>RADEON_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting. |
Brian Paul | 1d8b308 | 2010-01-26 09:12:32 -0700 | [diff] [blame] | 108 | </ul> |
| 109 | |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 110 | |
| 111 | <h2>EGL environment variables</h2> |
| 112 | |
Chia-I Wu | 7fc3581 | 2010-02-02 11:05:19 +0800 | [diff] [blame] | 113 | <p> |
| 114 | Mesa EGL supports different sets of environment variables. See the |
| 115 | <a href="egl.html">Mesa EGL</a> page for the details. |
| 116 | </p> |
Brian Paul | 1d8b308 | 2010-01-26 09:12:32 -0700 | [diff] [blame] | 117 | |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 118 | |
| 119 | <h2>Gallium environment variables</h2> |
| 120 | |
| 121 | <ul> |
| 122 | <li>GALLIUM_PRINT_OPTIONS - if non-zero, print all the Gallium environment |
| 123 | variables which are used, and their current values. |
| 124 | <li>GALLIUM_NOSSE - if non-zero, do not use SSE runtime code generation for |
| 125 | shader execution |
| 126 | <li>GALLIUM_NOPPC - if non-zero, do not use PPC runtime code generation for |
| 127 | shader execution |
| 128 | <li>GALLIUM_DUMP_CPU - if non-zero, print information about the CPU on start-up |
| 129 | <li>TGSI_PRINT_SANITY - if set, do extra sanity checking on TGSI shaders and |
| 130 | print any errors to stderr. |
| 131 | <LI>DRAW_FSE - ??? |
| 132 | <LI>DRAW_NO_FSE - ??? |
| 133 | <li>DRAW_USE_LLVM - if set to zero, the draw module will not use LLVM to execute |
| 134 | shaders, vertex fetch, etc. |
| 135 | </ul> |
| 136 | |
| 137 | <h3>Softpipe driver environment variables</h3> |
| 138 | <ul> |
| 139 | <li>SOFTPIPE_DUMP_FS - if set, the softpipe driver will print fragment shaders |
| 140 | to stderr |
| 141 | <li>SOFTPIPE_DUMP_GS - if set, the softpipe driver will print geometry shaders |
| 142 | to stderr |
| 143 | <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] | 144 | <li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for |
| 145 | vertex shading procesing. |
Brian Paul | 1bf9954 | 2011-02-17 07:29:20 -0700 | [diff] [blame] | 146 | </ul> |
| 147 | |
| 148 | |
| 149 | <h3>LLVMpipe driver environment variables</h3> |
| 150 | <ul> |
| 151 | <li>LP_NO_RAST - if set LLVMpipe will no-op rasterization |
| 152 | <li>LP_DEBUG - a comma-separated list of debug options is acceptec. See the |
| 153 | source code for details. |
| 154 | <li>LP_PERF - a comma-separated list of options to selectively no-op various |
| 155 | parts of the driver. See the source code for details. |
| 156 | <li>LP_NUM_THREADS - an integer indicating how many threads to use for rendering. |
| 157 | Zero turns of threading completely. The default value is the number of CPU |
| 158 | cores present. |
| 159 | </ul> |
| 160 | |
| 161 | |
| 162 | <p> |
| 163 | Other Gallium drivers have their own environment variables. These may change |
| 164 | frequently so the source code should be consulted for details. |
| 165 | </p> |
| 166 | |
Andreas Boll | ecd5c7c | 2012-06-12 09:05:03 +0200 | [diff] [blame] | 167 | </body> |
| 168 | </html> |