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