blob: 49c9025dac2b407842d6ac6d7fcc41ea4ed46336 [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)
35</ul>
36
37
38
Andreas Boll210a27d2012-06-12 09:05:36 +020039<h2>Core Mesa environment variables</h2>
Brian Paul1bf99542011-02-17 07:29:20 -070040
Brian Paul0b27ace2003-03-08 17:38:57 +000041<ul>
Brian Paulb07d6a82004-02-02 22:35:55 +000042<li>MESA_NO_ASM - if set, disables all assembly language optimizations
43<li>MESA_NO_MMX - if set, disables Intel MMX optimizations
44<li>MESA_NO_3DNOW - if set, disables AMD 3DNow! optimizations
45<li>MESA_NO_SSE - if set, disables Intel SSE optimizations
Brian Paul1bf99542011-02-17 07:29:20 -070046<li>MESA_DEBUG - if set, error messages are printed to stderr. For example,
47 if the application generates a GL_INVALID_ENUM error, a corresponding error
48 message indicating where the error occured, and possibly why, will be
49 printed to stderr.<br>
50 If the value of MESA_DEBUG is 'FP' floating point arithmetic errors will
51 generate exceptions.
Brian Paul9ccf5bf2012-06-25 11:43:03 -060052<li>MESA_LOG_FILE - specifies a file name for logging all errors, warnings,
53etc., rather than stderr
Brian Paul4d3ab192006-06-01 20:22:30 +000054<li>MESA_TEX_PROG - if set, implement conventional texture env modes with
55fragment programs (intended for developers only)
56<li>MESA_TNL_PROG - if set, implement conventional vertex transformation
57operations with vertex programs (intended for developers only).
58Setting this variable automatically sets the MESA_TEX_PROG variable as well.
Brian Paulcc26e272009-06-08 10:56:51 -060059<li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
60A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
61and disable the GL_EXT_bar extension.
Brian Paul82dd62f2011-03-24 11:39:21 -060062<li>MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted
63by extension year.
64If this variable is set to year X, only extensions defined on or before year
65X will be reported.
66This is to work-around a bug in some games where the extension string is
67copied into a fixed-size buffer without truncating.
68If the extension string is too long, the buffer overrun can cause the game
69to crash.
70This is a work-around for that.
Chad Versace0527c112011-09-26 11:48:46 -070071<li>MESA_GL_VERSION_OVERRIDE - changes the value returned by
72glGetString(GL_VERSION). Valid values are point-separated version numbers,
73such as "3.0". Mesa will not really implement all the features of the given
74version if it's higher than what's normally reported.
Chad Versacea1eff552011-09-27 13:53:11 -070075<li>MESA_GLSL_VERSION_OVERRIDE - changes the value returned by
76glGetString(GL_SHADING_LANGUAGE_VERSION). Valid values are integers, such as
77"130". Mesa will not really implement all the features of the given language version
78if it's higher than what's normally reported. (for developers only)
Brian Paul1bf99542011-02-17 07:29:20 -070079<li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a>
Brian Paulb07d6a82004-02-02 22:35:55 +000080</ul>
81
Brian Paul1bf99542011-02-17 07:29:20 -070082
Andreas Boll210a27d2012-06-12 09:05:36 +020083<h2>Mesa Xlib driver environment variables</h2>
Brian Paul1bf99542011-02-17 07:29:20 -070084
Brian Paulb07d6a82004-02-02 22:35:55 +000085<p>
Brian Paul1bf99542011-02-17 07:29:20 -070086The following are only applicable to the Mesa Xlib software driver.
Andreas Boll210a27d2012-06-12 09:05:36 +020087See the <a href="xlibdriver.html">Xlib software driver page</a> for details.
Brian Paulb07d6a82004-02-02 22:35:55 +000088</p>
89<ul>
Brian Paul5e9d7312006-01-27 20:12:06 +000090<li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode
91<li>MESA_CI_VISUAL - specifies the X visual and depth for CI mode
92<li>MESA_BACK_BUFFER - specifies how to implement the back color buffer,
93 either "pixmap" or "ximage"
94<li>MESA_GAMMA - gamma correction coefficients for red, green, blue channels
95<li>MESA_XSYNC - enable synchronous X behavior (for debugging only)
96<li>MESA_GLX_FORCE_CI - if set, force GLX to treat 8bpp visuals as CI visuals
Brian Paul4f6b1ad2004-07-23 15:49:12 +000097<li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
Brian Pauldfa5c2b2004-07-23 23:32:15 +000098<li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
Brian Paul8894a552005-11-05 03:12:06 +000099<li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
Brian Paul0b27ace2003-03-08 17:38:57 +0000100</ul>
101
102
Brian Paul1bf99542011-02-17 07:29:20 -0700103<h2>i945/i965 driver environment variables (non-Gallium)</h2>
104
Brian Paul1d8b3082010-01-26 09:12:32 -0700105<ul>
106<li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve
107 OpenGL conformance. If set to 2, always use software rendering.
108<li>INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap,
109 glCopyPixels, glDrawPixels.
110</ul>
111
112
Matt Turneref3cec52012-01-30 13:58:10 -0500113<h2>Radeon driver environment variables (radeon, r200, and r300g)</h2>
Brian Paul1bf99542011-02-17 07:29:20 -0700114
Brian Paul1d8b3082010-01-26 09:12:32 -0700115<ul>
Matt Turneref3cec52012-01-30 13:58:10 -0500116<li>RADEON_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
Brian Paul1d8b3082010-01-26 09:12:32 -0700117</ul>
118
Brian Paul1bf99542011-02-17 07:29:20 -0700119
120<h2>EGL environment variables</h2>
121
Chia-I Wu7fc35812010-02-02 11:05:19 +0800122<p>
123Mesa EGL supports different sets of environment variables. See the
124<a href="egl.html">Mesa EGL</a> page for the details.
125</p>
Brian Paul1d8b3082010-01-26 09:12:32 -0700126
Brian Paul1bf99542011-02-17 07:29:20 -0700127
128<h2>Gallium environment variables</h2>
129
130<ul>
Brian Paul75e62022012-06-25 11:44:44 -0600131<li>GALLIUM_LOG_FILE - specifies a file for logging all errors, warnings, etc.
132 rather than stderr.
Brian Paul1bf99542011-02-17 07:29:20 -0700133<li>GALLIUM_PRINT_OPTIONS - if non-zero, print all the Gallium environment
134 variables which are used, and their current values.
135<li>GALLIUM_NOSSE - if non-zero, do not use SSE runtime code generation for
136 shader execution
137<li>GALLIUM_NOPPC - if non-zero, do not use PPC runtime code generation for
138 shader execution
139<li>GALLIUM_DUMP_CPU - if non-zero, print information about the CPU on start-up
140<li>TGSI_PRINT_SANITY - if set, do extra sanity checking on TGSI shaders and
141 print any errors to stderr.
142<LI>DRAW_FSE - ???
143<LI>DRAW_NO_FSE - ???
144<li>DRAW_USE_LLVM - if set to zero, the draw module will not use LLVM to execute
145 shaders, vertex fetch, etc.
146</ul>
147
148<h3>Softpipe driver environment variables</h3>
149<ul>
150<li>SOFTPIPE_DUMP_FS - if set, the softpipe driver will print fragment shaders
151 to stderr
152<li>SOFTPIPE_DUMP_GS - if set, the softpipe driver will print geometry shaders
153 to stderr
154<li>SOFTPIPE_NO_RAST - if set, rasterization is no-op'd. For profiling purposes.
Jakob Bornecrantz6afa7cd2012-01-09 21:37:50 +0100155<li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for
156 vertex shading procesing.
Brian Paul1bf99542011-02-17 07:29:20 -0700157</ul>
158
159
160<h3>LLVMpipe driver environment variables</h3>
161<ul>
162<li>LP_NO_RAST - if set LLVMpipe will no-op rasterization
163<li>LP_DEBUG - a comma-separated list of debug options is acceptec. See the
164 source code for details.
165<li>LP_PERF - a comma-separated list of options to selectively no-op various
166 parts of the driver. See the source code for details.
167<li>LP_NUM_THREADS - an integer indicating how many threads to use for rendering.
168 Zero turns of threading completely. The default value is the number of CPU
169 cores present.
170</ul>
171
172
173<p>
174Other Gallium drivers have their own environment variables. These may change
175frequently so the source code should be consulted for details.
176</p>
177
Andreas Bollb5da52a2012-09-18 18:57:02 +0200178</div>
Andreas Bollecd5c7c2012-06-12 09:05:03 +0200179</body>
180</html>