docs: add new iframe layout
[mesa.git] / docs / envvars.html
1 <!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>
9
10 <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
17 <h1>Environment Variables</h1>
18
19 <p>
20 Normally, no environment variables need to be set. Most of the environment
21 variables used by Mesa/Gallium are for debugging purposes, but they can
22 sometimes be useful for debugging end-user issues.
23 </p>
24
25
26 <h2>LibGL environment variables</h2>
27
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
39 <h2>Core Mesa environment variables</h2>
40
41 <ul>
42 <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
46 <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.
52 <li>MESA_LOG_FILE - specifies a file name for logging all errors, warnings,
53 etc., rather than stderr
54 <li>MESA_TEX_PROG - if set, implement conventional texture env modes with
55 fragment programs (intended for developers only)
56 <li>MESA_TNL_PROG - if set, implement conventional vertex transformation
57 operations with vertex programs (intended for developers only).
58 Setting this variable automatically sets the MESA_TEX_PROG variable as well.
59 <li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
60 A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
61 and disable the GL_EXT_bar extension.
62 <li>MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted
63 by extension year.
64 If this variable is set to year X, only extensions defined on or before year
65 X will be reported.
66 This is to work-around a bug in some games where the extension string is
67 copied into a fixed-size buffer without truncating.
68 If the extension string is too long, the buffer overrun can cause the game
69 to crash.
70 This is a work-around for that.
71 <li>MESA_GL_VERSION_OVERRIDE - changes the value returned by
72 glGetString(GL_VERSION). Valid values are point-separated version numbers,
73 such as "3.0". Mesa will not really implement all the features of the given
74 version if it's higher than what's normally reported.
75 <li>MESA_GLSL_VERSION_OVERRIDE - changes the value returned by
76 glGetString(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
78 if it's higher than what's normally reported. (for developers only)
79 <li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a>
80 </ul>
81
82
83 <h2>Mesa Xlib driver environment variables</h2>
84
85 <p>
86 The following are only applicable to the Mesa Xlib software driver.
87 See the <a href="xlibdriver.html">Xlib software driver page</a> for details.
88 </p>
89 <ul>
90 <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
97 <li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
98 <li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
99 <li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
100 </ul>
101
102
103 <h2>i945/i965 driver environment variables (non-Gallium)</h2>
104
105 <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
113 <h2>Radeon driver environment variables (radeon, r200, and r300g)</h2>
114
115 <ul>
116 <li>RADEON_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
117 </ul>
118
119
120 <h2>EGL environment variables</h2>
121
122 <p>
123 Mesa EGL supports different sets of environment variables. See the
124 <a href="egl.html">Mesa EGL</a> page for the details.
125 </p>
126
127
128 <h2>Gallium environment variables</h2>
129
130 <ul>
131 <li>GALLIUM_LOG_FILE - specifies a file for logging all errors, warnings, etc.
132 rather than stderr.
133 <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.
155 <li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for
156 vertex shading procesing.
157 </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>
174 Other Gallium drivers have their own environment variables. These may change
175 frequently so the source code should be consulted for details.
176 </p>
177
178 </div>
179 </body>
180 </html>