blob: 67d8e292bb0b1d821a56336fd86236c2f0cb5480 [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 Bollb5da52a2012-09-18 18:57:02 +020010<div class="header">
11 <h1>The Mesa 3D Graphics Library</h1>
12</div>
13
14<iframe src="contents.html"></iframe>
15<div class="content">
16
Andreas Bollecd5c7c2012-06-12 09:05:03 +020017<h1>Environment Variables</h1>
Brian Paul0b27ace2003-03-08 17:38:57 +000018
19<p>
Brian Paul1bf99542011-02-17 07:29:20 -070020Normally, no environment variables need to be set. Most of the environment
21variables used by Mesa/Gallium are for debugging purposes, but they can
22sometimes be useful for debugging end-user issues.
Brian Paul0b27ace2003-03-08 17:38:57 +000023</p>
Brian Paul1bf99542011-02-17 07:29:20 -070024
25
Andreas Boll210a27d2012-06-12 09:05:36 +020026<h2>LibGL environment variables</h2>
Brian Paul1bf99542011-02-17 07:29:20 -070027
28<ul>
29<li>LIBGL_DEBUG - If defined debug information will be printed to stderr.
30 If set to 'verbose' additional information will be printed.
31<li>LIBGL_DRIVERS_PATH - colon-separated list of paths to search for DRI drivers
32<li>LIBGL_ALWAYS_INDIRECT - forces an indirect rendering context/connection.
33<li>LIBGL_ALWAYS_SOFTWARE - if set, always use software rendering
34<li>LIBGL_NO_DRAWARRAYS - if set do not use DrawArrays GLX protocol (for debugging)
Marek Olšákdd6152b2013-03-26 03:19:10 +010035<li>LIBGL_SHOW_FPS - print framerate to stdout based on the number of glXSwapBuffers
36 calls per second.
Brian Paul1bf99542011-02-17 07:29:20 -070037</ul>
38
39
40
Andreas Boll210a27d2012-06-12 09:05:36 +020041<h2>Core Mesa environment variables</h2>
Brian Paul1bf99542011-02-17 07:29:20 -070042
Brian Paul0b27ace2003-03-08 17:38:57 +000043<ul>
Brian Paulb07d6a82004-02-02 22:35:55 +000044<li>MESA_NO_ASM - if set, disables all assembly language optimizations
45<li>MESA_NO_MMX - if set, disables Intel MMX optimizations
46<li>MESA_NO_3DNOW - if set, disables AMD 3DNow! optimizations
47<li>MESA_NO_SSE - if set, disables Intel SSE optimizations
Brian Paul1bf99542011-02-17 07:29:20 -070048<li>MESA_DEBUG - if set, error messages are printed to stderr. For example,
49 if the application generates a GL_INVALID_ENUM error, a corresponding error
50 message indicating where the error occured, and possibly why, will be
51 printed to stderr.<br>
52 If the value of MESA_DEBUG is 'FP' floating point arithmetic errors will
53 generate exceptions.
Brian Paul9ccf5bf2012-06-25 11:43:03 -060054<li>MESA_LOG_FILE - specifies a file name for logging all errors, warnings,
55etc., rather than stderr
Brian Paul4d3ab192006-06-01 20:22:30 +000056<li>MESA_TEX_PROG - if set, implement conventional texture env modes with
57fragment programs (intended for developers only)
58<li>MESA_TNL_PROG - if set, implement conventional vertex transformation
59operations with vertex programs (intended for developers only).
60Setting this variable automatically sets the MESA_TEX_PROG variable as well.
Brian Paulcc26e272009-06-08 10:56:51 -060061<li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
62A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
63and disable the GL_EXT_bar extension.
Brian Paul82dd62f2011-03-24 11:39:21 -060064<li>MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted
65by extension year.
66If this variable is set to year X, only extensions defined on or before year
67X will be reported.
68This is to work-around a bug in some games where the extension string is
69copied into a fixed-size buffer without truncating.
70If the extension string is too long, the buffer overrun can cause the game
71to crash.
72This is a work-around for that.
Chad Versace0527c112011-09-26 11:48:46 -070073<li>MESA_GL_VERSION_OVERRIDE - changes the value returned by
Jordan Justen00905db2012-09-01 01:38:08 -070074glGetString(GL_VERSION) and possibly the GL API type.
75<ul>
76<li> The format should be MAJOR.MINOR[FC]
77<li> FC is an optional suffix that indicates a forward compatible context.
78This is only valid for versions &gt;= 3.0.
79<li> GL versions &lt; 3.0 are set to a compatibility (non-Core) profile
80<li> GL versions = 3.0, see below
81<li> GL versions &gt; 3.0 are set to a Core profile
82<li> Examples: 2.1, 3.0, 3.0FC, 3.1, 3.1FC
83<ul>
84<li> 2.1 - select a compatibility (non-Core) profile with GL version 2.1
85<li> 3.0 - select a compatibility (non-Core) profile with GL version 3.0
86<li> 3.0FC - select a Core+Forward Compatible profile with GL version 3.0
87<li> 3.1 - select a Core profile with GL version 3.1
88<li> 3.1FC - select a Core+Forward Compatible profile with GL version 3.1
89</ul>
90<li> Mesa may not really implement all the features of the given version.
91(for developers only)
92</ul>
Chad Versacea1eff552011-09-27 13:53:11 -070093<li>MESA_GLSL_VERSION_OVERRIDE - changes the value returned by
94glGetString(GL_SHADING_LANGUAGE_VERSION). Valid values are integers, such as
95"130". Mesa will not really implement all the features of the given language version
96if it's higher than what's normally reported. (for developers only)
Brian Paul1bf99542011-02-17 07:29:20 -070097<li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a>
Brian Paulb07d6a82004-02-02 22:35:55 +000098</ul>
99
Brian Paul1bf99542011-02-17 07:29:20 -0700100
Andreas Boll210a27d2012-06-12 09:05:36 +0200101<h2>Mesa Xlib driver environment variables</h2>
Brian Paul1bf99542011-02-17 07:29:20 -0700102
Brian Paulb07d6a82004-02-02 22:35:55 +0000103<p>
Brian Paul1bf99542011-02-17 07:29:20 -0700104The following are only applicable to the Mesa Xlib software driver.
Andreas Boll210a27d2012-06-12 09:05:36 +0200105See the <a href="xlibdriver.html">Xlib software driver page</a> for details.
Brian Paulb07d6a82004-02-02 22:35:55 +0000106</p>
107<ul>
Brian Paul5e9d7312006-01-27 20:12:06 +0000108<li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode
109<li>MESA_CI_VISUAL - specifies the X visual and depth for CI mode
110<li>MESA_BACK_BUFFER - specifies how to implement the back color buffer,
111 either "pixmap" or "ximage"
112<li>MESA_GAMMA - gamma correction coefficients for red, green, blue channels
113<li>MESA_XSYNC - enable synchronous X behavior (for debugging only)
114<li>MESA_GLX_FORCE_CI - if set, force GLX to treat 8bpp visuals as CI visuals
Brian Paul4f6b1ad2004-07-23 15:49:12 +0000115<li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
Brian Pauldfa5c2b2004-07-23 23:32:15 +0000116<li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
Brian Paul8894a552005-11-05 03:12:06 +0000117<li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
Brian Paul0b27ace2003-03-08 17:38:57 +0000118</ul>
119
120
Brian Paul1bf99542011-02-17 07:29:20 -0700121<h2>i945/i965 driver environment variables (non-Gallium)</h2>
122
Brian Paul1d8b3082010-01-26 09:12:32 -0700123<ul>
124<li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve
125 OpenGL conformance. If set to 2, always use software rendering.
126<li>INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap,
127 glCopyPixels, glDrawPixels.
128</ul>
129
130
Matt Turneref3cec52012-01-30 13:58:10 -0500131<h2>Radeon driver environment variables (radeon, r200, and r300g)</h2>
Brian Paul1bf99542011-02-17 07:29:20 -0700132
Brian Paul1d8b3082010-01-26 09:12:32 -0700133<ul>
Matt Turneref3cec52012-01-30 13:58:10 -0500134<li>RADEON_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
Brian Paul1d8b3082010-01-26 09:12:32 -0700135</ul>
136
Brian Paul1bf99542011-02-17 07:29:20 -0700137
138<h2>EGL environment variables</h2>
139
Chia-I Wu7fc35812010-02-02 11:05:19 +0800140<p>
141Mesa EGL supports different sets of environment variables. See the
142<a href="egl.html">Mesa EGL</a> page for the details.
143</p>
Brian Paul1d8b3082010-01-26 09:12:32 -0700144
Brian Paul1bf99542011-02-17 07:29:20 -0700145
146<h2>Gallium environment variables</h2>
147
148<ul>
Marek Olšákdd6152b2013-03-26 03:19:10 +0100149<li>GALLIUM_HUD - draws various information on the screen, like framerate,
150 cpu load, driver statistics, performance counters, etc.
151 Set GALLIUM_HUD=help and run e.g. glxgears for more info.
Brian Paul75e62022012-06-25 11:44:44 -0600152<li>GALLIUM_LOG_FILE - specifies a file for logging all errors, warnings, etc.
153 rather than stderr.
Brian Paul1bf99542011-02-17 07:29:20 -0700154<li>GALLIUM_PRINT_OPTIONS - if non-zero, print all the Gallium environment
155 variables which are used, and their current values.
Brian Paul1bf99542011-02-17 07:29:20 -0700156<li>GALLIUM_DUMP_CPU - if non-zero, print information about the CPU on start-up
157<li>TGSI_PRINT_SANITY - if set, do extra sanity checking on TGSI shaders and
158 print any errors to stderr.
159<LI>DRAW_FSE - ???
160<LI>DRAW_NO_FSE - ???
161<li>DRAW_USE_LLVM - if set to zero, the draw module will not use LLVM to execute
162 shaders, vertex fetch, etc.
Brian Paul90fa71b2013-06-07 10:12:28 -0600163<li>ST_DEBUG - controls debug output from the Mesa/Gallium state tracker.
164Setting to "tgsi", for example, will print all the TGSI shaders.
165See src/mesa/state_tracker/st_debug.c for other options.
Brian Paul1bf99542011-02-17 07:29:20 -0700166</ul>
167
168<h3>Softpipe driver environment variables</h3>
169<ul>
170<li>SOFTPIPE_DUMP_FS - if set, the softpipe driver will print fragment shaders
171 to stderr
172<li>SOFTPIPE_DUMP_GS - if set, the softpipe driver will print geometry shaders
173 to stderr
174<li>SOFTPIPE_NO_RAST - if set, rasterization is no-op'd. For profiling purposes.
Jakob Bornecrantz6afa7cd2012-01-09 21:37:50 +0100175<li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for
176 vertex shading procesing.
Brian Paul1bf99542011-02-17 07:29:20 -0700177</ul>
178
179
180<h3>LLVMpipe driver environment variables</h3>
181<ul>
182<li>LP_NO_RAST - if set LLVMpipe will no-op rasterization
183<li>LP_DEBUG - a comma-separated list of debug options is acceptec. See the
184 source code for details.
185<li>LP_PERF - a comma-separated list of options to selectively no-op various
186 parts of the driver. See the source code for details.
187<li>LP_NUM_THREADS - an integer indicating how many threads to use for rendering.
188 Zero turns of threading completely. The default value is the number of CPU
189 cores present.
190</ul>
191
Brian Paul90fa71b2013-06-07 10:12:28 -0600192<h3>VMware SVGA driver environment variables</h3>
193<ul>
194<li>SVGA_FORCE_SWTNL - force use of software vertex transformation
195<li>SVGA_NO_SWTNL - don't allow software vertex transformation fallbacks
196(will often result in incorrect rendering).
197<li>SVGA_DEBUG - for dumping shaders, constant buffers, etc. See the code
198for details.
199<li>See the driver code for other, lesser-used variables.
200</ul>
201
Brian Paul1bf99542011-02-17 07:29:20 -0700202
203<p>
204Other Gallium drivers have their own environment variables. These may change
205frequently so the source code should be consulted for details.
206</p>
207
Andreas Bollb5da52a2012-09-18 18:57:02 +0200208</div>
Andreas Bollecd5c7c2012-06-12 09:05:03 +0200209</body>
210</html>