blob: fffb50a47185973da4e588689d6a1ba86cf3f25d [file] [log] [blame]
Andreas Bollecd5c7c2012-06-12 09:05:03 +02001<!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 Paul0b27ace2003-03-08 17:38:57 +00009
Andreas Bollecd5c7c2012-06-12 09:05:03 +020010<h1>Environment Variables</h1>
Brian Paul0b27ace2003-03-08 17:38:57 +000011
12<p>
Brian Paul1bf99542011-02-17 07:29:20 -070013Normally, no environment variables need to be set. Most of the environment
14variables used by Mesa/Gallium are for debugging purposes, but they can
15sometimes be useful for debugging end-user issues.
Brian Paul0b27ace2003-03-08 17:38:57 +000016</p>
Brian Paul1bf99542011-02-17 07:29:20 -070017
18
Andreas Boll210a27d2012-06-12 09:05:36 +020019<h2>LibGL environment variables</h2>
Brian Paul1bf99542011-02-17 07:29:20 -070020
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 Boll210a27d2012-06-12 09:05:36 +020032<h2>Core Mesa environment variables</h2>
Brian Paul1bf99542011-02-17 07:29:20 -070033
Brian Paul0b27ace2003-03-08 17:38:57 +000034<ul>
Brian Paulb07d6a82004-02-02 22:35:55 +000035<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 Paul1bf99542011-02-17 07:29:20 -070039<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 Paul4d3ab192006-06-01 20:22:30 +000045<li>MESA_TEX_PROG - if set, implement conventional texture env modes with
46fragment programs (intended for developers only)
47<li>MESA_TNL_PROG - if set, implement conventional vertex transformation
48operations with vertex programs (intended for developers only).
49Setting this variable automatically sets the MESA_TEX_PROG variable as well.
Brian Paulcc26e272009-06-08 10:56:51 -060050<li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
51A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
52and disable the GL_EXT_bar extension.
Brian Paul82dd62f2011-03-24 11:39:21 -060053<li>MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted
54by extension year.
55If this variable is set to year X, only extensions defined on or before year
56X will be reported.
57This is to work-around a bug in some games where the extension string is
58copied into a fixed-size buffer without truncating.
59If the extension string is too long, the buffer overrun can cause the game
60to crash.
61This is a work-around for that.
Chad Versace0527c112011-09-26 11:48:46 -070062<li>MESA_GL_VERSION_OVERRIDE - changes the value returned by
63glGetString(GL_VERSION). Valid values are point-separated version numbers,
64such as "3.0". Mesa will not really implement all the features of the given
65version if it's higher than what's normally reported.
Chad Versacea1eff552011-09-27 13:53:11 -070066<li>MESA_GLSL_VERSION_OVERRIDE - changes the value returned by
67glGetString(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
69if it's higher than what's normally reported. (for developers only)
Brian Paul1bf99542011-02-17 07:29:20 -070070<li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a>
Brian Paulb07d6a82004-02-02 22:35:55 +000071</ul>
72
Brian Paul1bf99542011-02-17 07:29:20 -070073
Andreas Boll210a27d2012-06-12 09:05:36 +020074<h2>Mesa Xlib driver environment variables</h2>
Brian Paul1bf99542011-02-17 07:29:20 -070075
Brian Paulb07d6a82004-02-02 22:35:55 +000076<p>
Brian Paul1bf99542011-02-17 07:29:20 -070077The following are only applicable to the Mesa Xlib software driver.
Andreas Boll210a27d2012-06-12 09:05:36 +020078See the <a href="xlibdriver.html">Xlib software driver page</a> for details.
Brian Paulb07d6a82004-02-02 22:35:55 +000079</p>
80<ul>
Brian Paul5e9d7312006-01-27 20:12:06 +000081<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 Paul4f6b1ad2004-07-23 15:49:12 +000088<li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
Brian Pauldfa5c2b2004-07-23 23:32:15 +000089<li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
Brian Paul8894a552005-11-05 03:12:06 +000090<li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
Brian Paul0b27ace2003-03-08 17:38:57 +000091</ul>
92
93
Brian Paul1bf99542011-02-17 07:29:20 -070094<h2>i945/i965 driver environment variables (non-Gallium)</h2>
95
Brian Paul1d8b3082010-01-26 09:12:32 -070096<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 Turneref3cec52012-01-30 13:58:10 -0500104<h2>Radeon driver environment variables (radeon, r200, and r300g)</h2>
Brian Paul1bf99542011-02-17 07:29:20 -0700105
Brian Paul1d8b3082010-01-26 09:12:32 -0700106<ul>
Matt Turneref3cec52012-01-30 13:58:10 -0500107<li>RADEON_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
Brian Paul1d8b3082010-01-26 09:12:32 -0700108</ul>
109
Brian Paul1bf99542011-02-17 07:29:20 -0700110
111<h2>EGL environment variables</h2>
112
Chia-I Wu7fc35812010-02-02 11:05:19 +0800113<p>
114Mesa EGL supports different sets of environment variables. See the
115<a href="egl.html">Mesa EGL</a> page for the details.
116</p>
Brian Paul1d8b3082010-01-26 09:12:32 -0700117
Brian Paul1bf99542011-02-17 07:29:20 -0700118
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 Bornecrantz6afa7cd2012-01-09 21:37:50 +0100144<li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for
145 vertex shading procesing.
Brian Paul1bf99542011-02-17 07:29:20 -0700146</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>
163Other Gallium drivers have their own environment variables. These may change
164frequently so the source code should be consulted for details.
165</p>
166
Andreas Bollecd5c7c2012-06-12 09:05:03 +0200167</body>
168</html>