blob: 89f71739ce8311773f82be91b8c0434b03d1af0a [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 Paul9ccf5bf2012-06-25 11:43:03 -060045<li>MESA_LOG_FILE - specifies a file name for logging all errors, warnings,
46etc., rather than stderr
Brian Paul4d3ab192006-06-01 20:22:30 +000047<li>MESA_TEX_PROG - if set, implement conventional texture env modes with
48fragment programs (intended for developers only)
49<li>MESA_TNL_PROG - if set, implement conventional vertex transformation
50operations with vertex programs (intended for developers only).
51Setting this variable automatically sets the MESA_TEX_PROG variable as well.
Brian Paulcc26e272009-06-08 10:56:51 -060052<li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
53A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
54and disable the GL_EXT_bar extension.
Brian Paul82dd62f2011-03-24 11:39:21 -060055<li>MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted
56by extension year.
57If this variable is set to year X, only extensions defined on or before year
58X will be reported.
59This is to work-around a bug in some games where the extension string is
60copied into a fixed-size buffer without truncating.
61If the extension string is too long, the buffer overrun can cause the game
62to crash.
63This is a work-around for that.
Chad Versace0527c112011-09-26 11:48:46 -070064<li>MESA_GL_VERSION_OVERRIDE - changes the value returned by
65glGetString(GL_VERSION). Valid values are point-separated version numbers,
66such as "3.0". Mesa will not really implement all the features of the given
67version if it's higher than what's normally reported.
Chad Versacea1eff552011-09-27 13:53:11 -070068<li>MESA_GLSL_VERSION_OVERRIDE - changes the value returned by
69glGetString(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
71if it's higher than what's normally reported. (for developers only)
Brian Paul1bf99542011-02-17 07:29:20 -070072<li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a>
Brian Paulb07d6a82004-02-02 22:35:55 +000073</ul>
74
Brian Paul1bf99542011-02-17 07:29:20 -070075
Andreas Boll210a27d2012-06-12 09:05:36 +020076<h2>Mesa Xlib driver environment variables</h2>
Brian Paul1bf99542011-02-17 07:29:20 -070077
Brian Paulb07d6a82004-02-02 22:35:55 +000078<p>
Brian Paul1bf99542011-02-17 07:29:20 -070079The following are only applicable to the Mesa Xlib software driver.
Andreas Boll210a27d2012-06-12 09:05:36 +020080See the <a href="xlibdriver.html">Xlib software driver page</a> for details.
Brian Paulb07d6a82004-02-02 22:35:55 +000081</p>
82<ul>
Brian Paul5e9d7312006-01-27 20:12:06 +000083<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
Brian Paul4f6b1ad2004-07-23 15:49:12 +000090<li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
Brian Pauldfa5c2b2004-07-23 23:32:15 +000091<li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
Brian Paul8894a552005-11-05 03:12:06 +000092<li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
Brian Paul0b27ace2003-03-08 17:38:57 +000093</ul>
94
95
Brian Paul1bf99542011-02-17 07:29:20 -070096<h2>i945/i965 driver environment variables (non-Gallium)</h2>
97
Brian Paul1d8b3082010-01-26 09:12:32 -070098<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
Matt Turneref3cec52012-01-30 13:58:10 -0500106<h2>Radeon driver environment variables (radeon, r200, and r300g)</h2>
Brian Paul1bf99542011-02-17 07:29:20 -0700107
Brian Paul1d8b3082010-01-26 09:12:32 -0700108<ul>
Matt Turneref3cec52012-01-30 13:58:10 -0500109<li>RADEON_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
Brian Paul1d8b3082010-01-26 09:12:32 -0700110</ul>
111
Brian Paul1bf99542011-02-17 07:29:20 -0700112
113<h2>EGL environment variables</h2>
114
Chia-I Wu7fc35812010-02-02 11:05:19 +0800115<p>
116Mesa EGL supports different sets of environment variables. See the
117<a href="egl.html">Mesa EGL</a> page for the details.
118</p>
Brian Paul1d8b3082010-01-26 09:12:32 -0700119
Brian Paul1bf99542011-02-17 07:29:20 -0700120
121<h2>Gallium environment variables</h2>
122
123<ul>
Brian Paul75e62022012-06-25 11:44:44 -0600124<li>GALLIUM_LOG_FILE - specifies a file for logging all errors, warnings, etc.
125 rather than stderr.
Brian Paul1bf99542011-02-17 07:29:20 -0700126<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.
Jakob Bornecrantz6afa7cd2012-01-09 21:37:50 +0100148<li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for
149 vertex shading procesing.
Brian Paul1bf99542011-02-17 07:29:20 -0700150</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>
167Other Gallium drivers have their own environment variables. These may change
168frequently so the source code should be consulted for details.
169</p>
170
Andreas Bollecd5c7c2012-06-12 09:05:03 +0200171</body>
172</html>