3 <TITLE>Environment Variables
</TITLE>
5 <link rel=
"stylesheet" type=
"text/css" href=
"mesa.css"></head>
9 <H1>Environment Variables
</H1>
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.
18 <H2>LibGL environment variables
</H2>
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)
31 <H2>Core Mesa environment variables
</H2>
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
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
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.
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.
52 <li>MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted
54 If this variable is set to year X, only extensions defined on or before year
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
60 This is a work-around for that.
61 <li>MESA_GLSL -
<a href=
"shading.html#envvars">shading language compiler options
</a>
65 <H2>Mesa Xlib driver environment variables
</H2>
68 The following are only applicable to the Mesa Xlib software driver.
69 See the
<A HREF=
"xlibdriver.html">Xlib software driver page
</A> for details.
72 <li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode
73 <li>MESA_CI_VISUAL - specifies the X visual and depth for CI mode
74 <li>MESA_BACK_BUFFER - specifies how to implement the back color buffer,
75 either
"pixmap" or
"ximage"
76 <li>MESA_GAMMA - gamma correction coefficients for red, green, blue channels
77 <li>MESA_XSYNC - enable synchronous X behavior (for debugging only)
78 <li>MESA_GLX_FORCE_CI - if set, force GLX to treat
8bpp visuals as CI visuals
79 <li>MESA_GLX_FX - set to either
"fullscreen" for full-screen rendering,
80 "window" to render into a window, or
"disable" to disable the Glide driver.
81 <li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
82 <li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
83 <li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
87 <h2>i945/i965 driver environment variables (non-Gallium)
</h2>
90 <li>INTEL_STRICT_CONFORMANCE - if set to
1, enable sw fallbacks to improve
91 OpenGL conformance. If set to
2, always use software rendering.
92 <li>INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap,
93 glCopyPixels, glDrawPixels.
97 <h2>Radeon R300 driver environment variables (non-Gallium)
</h2>
100 <li>R300_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
104 <h2>EGL environment variables
</h2>
107 Mesa EGL supports different sets of environment variables. See the
108 <a href=
"egl.html">Mesa EGL
</a> page for the details.
112 <h2>Gallium environment variables
</h2>
115 <li>GALLIUM_PRINT_OPTIONS - if non-zero, print all the Gallium environment
116 variables which are used, and their current values.
117 <li>GALLIUM_NOSSE - if non-zero, do not use SSE runtime code generation for
119 <li>GALLIUM_NOPPC - if non-zero, do not use PPC runtime code generation for
121 <li>GALLIUM_DUMP_CPU - if non-zero, print information about the CPU on start-up
122 <li>TGSI_PRINT_SANITY - if set, do extra sanity checking on TGSI shaders and
123 print any errors to stderr.
125 <LI>DRAW_NO_FSE - ???
126 <li>DRAW_USE_LLVM - if set to zero, the draw module will not use LLVM to execute
127 shaders, vertex fetch, etc.
130 <h3>Softpipe driver environment variables
</h3>
132 <li>SOFTPIPE_DUMP_FS - if set, the softpipe driver will print fragment shaders
134 <li>SOFTPIPE_DUMP_GS - if set, the softpipe driver will print geometry shaders
136 <li>SOFTPIPE_NO_RAST - if set, rasterization is no-op'd. For profiling purposes.
140 <h3>LLVMpipe driver environment variables
</h3>
142 <li>LP_NO_RAST - if set LLVMpipe will no-op rasterization
143 <li>LP_DEBUG - a comma-separated list of debug options is acceptec. See the
144 source code for details.
145 <li>LP_PERF - a comma-separated list of options to selectively no-op various
146 parts of the driver. See the source code for details.
147 <li>LP_NUM_THREADS - an integer indicating how many threads to use for rendering.
148 Zero turns of threading completely. The default value is the number of CPU
154 Other Gallium drivers have their own environment variables. These may change
155 frequently so the source code should be consulted for details.