blob: 5a988847b5205d11c9bc16a74fc4476c8388290c [file] [log] [blame]
Brian Paul0b27ace2003-03-08 17:38:57 +00001<HTML>
2
3<TITLE>Environment Variables</TITLE>
4
Brian Paul36da0452005-01-20 03:55:10 +00005<link rel="stylesheet" type="text/css" href="mesa.css"></head>
6
7<BODY>
Brian Paul0b27ace2003-03-08 17:38:57 +00008
9<H1>Environment Variables</H1>
10
11<p>
Brian Paul1bf99542011-02-17 07:29:20 -070012Normally, no environment variables need to be set. Most of the environment
13variables used by Mesa/Gallium are for debugging purposes, but they can
14sometimes be useful for debugging end-user issues.
Brian Paul0b27ace2003-03-08 17:38:57 +000015</p>
Brian Paul1bf99542011-02-17 07:29:20 -070016
17
18<H2>LibGL environment variables</H2>
19
20<ul>
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)
27</ul>
28
29
30
31<H2>Core Mesa environment variables</H2>
32
Brian Paul0b27ace2003-03-08 17:38:57 +000033<ul>
Brian Paulb07d6a82004-02-02 22:35:55 +000034<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
Brian Paul1bf99542011-02-17 07:29:20 -070038<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
43 generate exceptions.
Brian Paul4d3ab192006-06-01 20:22:30 +000044<li>MESA_TEX_PROG - if set, implement conventional texture env modes with
45fragment programs (intended for developers only)
46<li>MESA_TNL_PROG - if set, implement conventional vertex transformation
47operations with vertex programs (intended for developers only).
48Setting this variable automatically sets the MESA_TEX_PROG variable as well.
Brian Paulcc26e272009-06-08 10:56:51 -060049<li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
50A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
51and disable the GL_EXT_bar extension.
Brian Paul82dd62f2011-03-24 11:39:21 -060052<li>MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted
53by extension year.
54If this variable is set to year X, only extensions defined on or before year
55X will be reported.
56This is to work-around a bug in some games where the extension string is
57copied into a fixed-size buffer without truncating.
58If the extension string is too long, the buffer overrun can cause the game
59to crash.
60This is a work-around for that.
Chad Versace0527c112011-09-26 11:48:46 -070061<li>MESA_GL_VERSION_OVERRIDE - changes the value returned by
62glGetString(GL_VERSION). Valid values are point-separated version numbers,
63such as "3.0". Mesa will not really implement all the features of the given
64version if it's higher than what's normally reported.
Chad Versacea1eff552011-09-27 13:53:11 -070065<li>MESA_GLSL_VERSION_OVERRIDE - changes the value returned by
66glGetString(GL_SHADING_LANGUAGE_VERSION). Valid values are integers, such as
67"130". Mesa will not really implement all the features of the given language version
68if it's higher than what's normally reported. (for developers only)
Brian Paul1bf99542011-02-17 07:29:20 -070069<li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a>
Brian Paulb07d6a82004-02-02 22:35:55 +000070</ul>
71
Brian Paul1bf99542011-02-17 07:29:20 -070072
73<H2>Mesa Xlib driver environment variables</H2>
74
Brian Paulb07d6a82004-02-02 22:35:55 +000075<p>
Brian Paul1bf99542011-02-17 07:29:20 -070076The following are only applicable to the Mesa Xlib software driver.
Brian Paulb6c41fd2009-01-22 09:58:52 -070077See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
Brian Paulb07d6a82004-02-02 22:35:55 +000078</p>
79<ul>
Brian Paul5e9d7312006-01-27 20:12:06 +000080<li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode
81<li>MESA_CI_VISUAL - specifies the X visual and depth for CI mode
82<li>MESA_BACK_BUFFER - specifies how to implement the back color buffer,
83 either "pixmap" or "ximage"
84<li>MESA_GAMMA - gamma correction coefficients for red, green, blue channels
85<li>MESA_XSYNC - enable synchronous X behavior (for debugging only)
86<li>MESA_GLX_FORCE_CI - if set, force GLX to treat 8bpp visuals as CI visuals
Brian Paul4f6b1ad2004-07-23 15:49:12 +000087<li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
Brian Pauldfa5c2b2004-07-23 23:32:15 +000088<li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
Brian Paul8894a552005-11-05 03:12:06 +000089<li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
Brian Paul0b27ace2003-03-08 17:38:57 +000090</ul>
91
92
Brian Paul1bf99542011-02-17 07:29:20 -070093<h2>i945/i965 driver environment variables (non-Gallium)</h2>
94
Brian Paul1d8b3082010-01-26 09:12:32 -070095<ul>
96<li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve
97 OpenGL conformance. If set to 2, always use software rendering.
98<li>INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap,
99 glCopyPixels, glDrawPixels.
100</ul>
101
102
Brian Paul1bf99542011-02-17 07:29:20 -0700103<h2>Radeon R300 driver environment variables (non-Gallium)</h2>
104
Brian Paul1d8b3082010-01-26 09:12:32 -0700105<ul>
106<li>R300_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
107</ul>
108
Brian Paul1bf99542011-02-17 07:29:20 -0700109
110<h2>EGL environment variables</h2>
111
Chia-I Wu7fc35812010-02-02 11:05:19 +0800112<p>
113Mesa EGL supports different sets of environment variables. See the
114<a href="egl.html">Mesa EGL</a> page for the details.
115</p>
Brian Paul1d8b3082010-01-26 09:12:32 -0700116
Brian Paul1bf99542011-02-17 07:29:20 -0700117
118<h2>Gallium environment variables</h2>
119
120<ul>
121<li>GALLIUM_PRINT_OPTIONS - if non-zero, print all the Gallium environment
122 variables which are used, and their current values.
123<li>GALLIUM_NOSSE - if non-zero, do not use SSE runtime code generation for
124 shader execution
125<li>GALLIUM_NOPPC - if non-zero, do not use PPC runtime code generation for
126 shader execution
127<li>GALLIUM_DUMP_CPU - if non-zero, print information about the CPU on start-up
128<li>TGSI_PRINT_SANITY - if set, do extra sanity checking on TGSI shaders and
129 print any errors to stderr.
130<LI>DRAW_FSE - ???
131<LI>DRAW_NO_FSE - ???
132<li>DRAW_USE_LLVM - if set to zero, the draw module will not use LLVM to execute
133 shaders, vertex fetch, etc.
134</ul>
135
136<h3>Softpipe driver environment variables</h3>
137<ul>
138<li>SOFTPIPE_DUMP_FS - if set, the softpipe driver will print fragment shaders
139 to stderr
140<li>SOFTPIPE_DUMP_GS - if set, the softpipe driver will print geometry shaders
141 to stderr
142<li>SOFTPIPE_NO_RAST - if set, rasterization is no-op'd. For profiling purposes.
Jakob Bornecrantz6afa7cd2012-01-09 21:37:50 +0100143<li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for
144 vertex shading procesing.
Brian Paul1bf99542011-02-17 07:29:20 -0700145</ul>
146
147
148<h3>LLVMpipe driver environment variables</h3>
149<ul>
150<li>LP_NO_RAST - if set LLVMpipe will no-op rasterization
151<li>LP_DEBUG - a comma-separated list of debug options is acceptec. See the
152 source code for details.
153<li>LP_PERF - a comma-separated list of options to selectively no-op various
154 parts of the driver. See the source code for details.
155<li>LP_NUM_THREADS - an integer indicating how many threads to use for rendering.
156 Zero turns of threading completely. The default value is the number of CPU
157 cores present.
158</ul>
159
160
161<p>
162Other Gallium drivers have their own environment variables. These may change
163frequently so the source code should be consulted for details.
164</p>
165
166
167<br>
168<br>
169
170
Brian Paul0b27ace2003-03-08 17:38:57 +0000171</BODY>
172</HTML>