docs: consolidate html header and footer
[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 <h1>Environment Variables</h1>
11
12 <p>
13 Normally, no environment variables need to be set. Most of the environment
14 variables used by Mesa/Gallium are for debugging purposes, but they can
15 sometimes be useful for debugging end-user issues.
16 </p>
17
18
19 <H2>LibGL environment variables</H2>
20
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
32 <H2>Core Mesa environment variables</H2>
33
34 <ul>
35 <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
39 <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.
45 <li>MESA_TEX_PROG - if set, implement conventional texture env modes with
46 fragment programs (intended for developers only)
47 <li>MESA_TNL_PROG - if set, implement conventional vertex transformation
48 operations with vertex programs (intended for developers only).
49 Setting this variable automatically sets the MESA_TEX_PROG variable as well.
50 <li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
51 A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
52 and disable the GL_EXT_bar extension.
53 <li>MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted
54 by extension year.
55 If this variable is set to year X, only extensions defined on or before year
56 X will be reported.
57 This is to work-around a bug in some games where the extension string is
58 copied into a fixed-size buffer without truncating.
59 If the extension string is too long, the buffer overrun can cause the game
60 to crash.
61 This is a work-around for that.
62 <li>MESA_GL_VERSION_OVERRIDE - changes the value returned by
63 glGetString(GL_VERSION). Valid values are point-separated version numbers,
64 such as "3.0". Mesa will not really implement all the features of the given
65 version if it's higher than what's normally reported.
66 <li>MESA_GLSL_VERSION_OVERRIDE - changes the value returned by
67 glGetString(GL_SHADING_LANGUAGE_VERSION). Valid values are integers, such as
68 "130". Mesa will not really implement all the features of the given language version
69 if it's higher than what's normally reported. (for developers only)
70 <li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a>
71 </ul>
72
73
74 <H2>Mesa Xlib driver environment variables</H2>
75
76 <p>
77 The following are only applicable to the Mesa Xlib software driver.
78 See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
79 </p>
80 <ul>
81 <li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode
82 <li>MESA_CI_VISUAL - specifies the X visual and depth for CI mode
83 <li>MESA_BACK_BUFFER - specifies how to implement the back color buffer,
84 either "pixmap" or "ximage"
85 <li>MESA_GAMMA - gamma correction coefficients for red, green, blue channels
86 <li>MESA_XSYNC - enable synchronous X behavior (for debugging only)
87 <li>MESA_GLX_FORCE_CI - if set, force GLX to treat 8bpp visuals as CI visuals
88 <li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
89 <li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
90 <li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
91 </ul>
92
93
94 <h2>i945/i965 driver environment variables (non-Gallium)</h2>
95
96 <ul>
97 <li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve
98 OpenGL conformance. If set to 2, always use software rendering.
99 <li>INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap,
100 glCopyPixels, glDrawPixels.
101 </ul>
102
103
104 <h2>Radeon driver environment variables (radeon, r200, and r300g)</h2>
105
106 <ul>
107 <li>RADEON_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
108 </ul>
109
110
111 <h2>EGL environment variables</h2>
112
113 <p>
114 Mesa EGL supports different sets of environment variables. See the
115 <a href="egl.html">Mesa EGL</a> page for the details.
116 </p>
117
118
119 <h2>Gallium environment variables</h2>
120
121 <ul>
122 <li>GALLIUM_PRINT_OPTIONS - if non-zero, print all the Gallium environment
123 variables which are used, and their current values.
124 <li>GALLIUM_NOSSE - if non-zero, do not use SSE runtime code generation for
125 shader execution
126 <li>GALLIUM_NOPPC - if non-zero, do not use PPC runtime code generation for
127 shader execution
128 <li>GALLIUM_DUMP_CPU - if non-zero, print information about the CPU on start-up
129 <li>TGSI_PRINT_SANITY - if set, do extra sanity checking on TGSI shaders and
130 print any errors to stderr.
131 <LI>DRAW_FSE - ???
132 <LI>DRAW_NO_FSE - ???
133 <li>DRAW_USE_LLVM - if set to zero, the draw module will not use LLVM to execute
134 shaders, vertex fetch, etc.
135 </ul>
136
137 <h3>Softpipe driver environment variables</h3>
138 <ul>
139 <li>SOFTPIPE_DUMP_FS - if set, the softpipe driver will print fragment shaders
140 to stderr
141 <li>SOFTPIPE_DUMP_GS - if set, the softpipe driver will print geometry shaders
142 to stderr
143 <li>SOFTPIPE_NO_RAST - if set, rasterization is no-op'd. For profiling purposes.
144 <li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for
145 vertex shading procesing.
146 </ul>
147
148
149 <h3>LLVMpipe driver environment variables</h3>
150 <ul>
151 <li>LP_NO_RAST - if set LLVMpipe will no-op rasterization
152 <li>LP_DEBUG - a comma-separated list of debug options is acceptec. See the
153 source code for details.
154 <li>LP_PERF - a comma-separated list of options to selectively no-op various
155 parts of the driver. See the source code for details.
156 <li>LP_NUM_THREADS - an integer indicating how many threads to use for rendering.
157 Zero turns of threading completely. The default value is the number of CPU
158 cores present.
159 </ul>
160
161
162 <p>
163 Other Gallium drivers have their own environment variables. These may change
164 frequently so the source code should be consulted for details.
165 </p>
166
167 </body>
168 </html>