Home | History | Annotate | Download | only in docs
      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>
      9 
     10 <h1>Environment Variables</h1>
     11 
     12 <p>
     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.
     16 </p>
     17 
     18 
     19 <h2>LibGL environment variables</h2>
     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 
     32 <h2>Core Mesa environment variables</h2>
     33 
     34 <ul>
     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
     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.
     45 <li>MESA_LOG_FILE - specifies a file name for logging all errors, warnings,
     46 etc., rather than stderr
     47 <li>MESA_TEX_PROG - if set, implement conventional texture env modes with
     48 fragment programs (intended for developers only)
     49 <li>MESA_TNL_PROG - if set, implement conventional vertex transformation
     50 operations with vertex programs (intended for developers only).
     51 Setting this variable automatically sets the MESA_TEX_PROG variable as well.
     52 <li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
     53 A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
     54 and disable the GL_EXT_bar extension.
     55 <li>MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted
     56 by extension year.
     57 If this variable is set to year X, only extensions defined on or before year
     58 X will be reported.
     59 This is to work-around a bug in some games where the extension string is
     60 copied into a fixed-size buffer without truncating.
     61 If the extension string is too long, the buffer overrun can cause the game
     62 to crash.
     63 This is a work-around for that.
     64 <li>MESA_GL_VERSION_OVERRIDE - changes the value returned by
     65 glGetString(GL_VERSION). Valid values are point-separated version numbers,
     66 such as "3.0". Mesa will not really implement all the features of the given
     67 version if it's higher than what's normally reported.
     68 <li>MESA_GLSL_VERSION_OVERRIDE - changes the value returned by
     69 glGetString(GL_SHADING_LANGUAGE_VERSION). Valid values are integers, such as
     70 "130".  Mesa will not really implement all the features of the given language version
     71 if it's higher than what's normally reported. (for developers only)
     72 <li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a>
     73 </ul>
     74 
     75 
     76 <h2>Mesa Xlib driver environment variables</h2>
     77 
     78 <p>
     79 The following are only applicable to the Mesa Xlib software driver.
     80 See the <a href="xlibdriver.html">Xlib software driver page</a> for details.
     81 </p>
     82 <ul>
     83 <li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode
     84 <li>MESA_CI_VISUAL - specifies the X visual and depth for CI mode
     85 <li>MESA_BACK_BUFFER - specifies how to implement the back color buffer,
     86     either "pixmap" or "ximage"
     87 <li>MESA_GAMMA - gamma correction coefficients for red, green, blue channels
     88 <li>MESA_XSYNC - enable synchronous X behavior (for debugging only)
     89 <li>MESA_GLX_FORCE_CI - if set, force GLX to treat 8bpp visuals as CI visuals
     90 <li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
     91 <li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
     92 <li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
     93 </ul>
     94 
     95 
     96 <h2>i945/i965 driver environment variables (non-Gallium)</h2>
     97 
     98 <ul>
     99 <li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve
    100     OpenGL conformance.  If set to 2, always use software rendering.
    101 <li>INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap,
    102     glCopyPixels, glDrawPixels.
    103 </ul>
    104 
    105 
    106 <h2>Radeon driver environment variables (radeon, r200, and r300g)</h2>
    107 
    108 <ul>
    109 <li>RADEON_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
    110 </ul>
    111 
    112 
    113 <h2>EGL environment variables</h2>
    114 
    115 <p>
    116 Mesa EGL supports different sets of environment variables.  See the
    117 <a href="egl.html">Mesa EGL</a> page for the details.
    118 </p>
    119 
    120 
    121 <h2>Gallium environment variables</h2>
    122 
    123 <ul>
    124 <li>GALLIUM_LOG_FILE - specifies a file for logging all errors, warnings, etc.
    125     rather than stderr.
    126 <li>GALLIUM_PRINT_OPTIONS - if non-zero, print all the Gallium environment
    127     variables which are used, and their current values.
    128 <li>GALLIUM_NOSSE - if non-zero, do not use SSE runtime code generation for
    129     shader execution
    130 <li>GALLIUM_NOPPC - if non-zero, do not use PPC runtime code generation for
    131     shader execution
    132 <li>GALLIUM_DUMP_CPU - if non-zero, print information about the CPU on start-up
    133 <li>TGSI_PRINT_SANITY - if set, do extra sanity checking on TGSI shaders and
    134     print any errors to stderr.
    135 <LI>DRAW_FSE - ???
    136 <LI>DRAW_NO_FSE - ???
    137 <li>DRAW_USE_LLVM - if set to zero, the draw module will not use LLVM to execute
    138     shaders, vertex fetch, etc.
    139 </ul>
    140 
    141 <h3>Softpipe driver environment variables</h3>
    142 <ul>
    143 <li>SOFTPIPE_DUMP_FS - if set, the softpipe driver will print fragment shaders
    144     to stderr
    145 <li>SOFTPIPE_DUMP_GS - if set, the softpipe driver will print geometry shaders
    146     to stderr
    147 <li>SOFTPIPE_NO_RAST - if set, rasterization is no-op'd.  For profiling purposes.
    148 <li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for
    149     vertex shading procesing.
    150 </ul>
    151 
    152 
    153 <h3>LLVMpipe driver environment variables</h3>
    154 <ul>
    155 <li>LP_NO_RAST - if set LLVMpipe will no-op rasterization
    156 <li>LP_DEBUG - a comma-separated list of debug options is acceptec.  See the
    157     source code for details.
    158 <li>LP_PERF - a comma-separated list of options to selectively no-op various
    159     parts of the driver.  See the source code for details.
    160 <li>LP_NUM_THREADS - an integer indicating how many threads to use for rendering.
    161     Zero turns of threading completely.  The default value is the number of CPU
    162     cores present.
    163 </ul>
    164 
    165 
    166 <p>
    167 Other Gallium drivers have their own environment variables.  These may change
    168 frequently so the source code should be consulted for details.
    169 </p>
    170 
    171 </body>
    172 </html>
    173