envvars.html 6.93 KB
Newer Older
1
2
3
4
5
6
7
8
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <title>Environment Variables</title>
  <link rel="stylesheet" type="text/css" href="mesa.css">
</head>
<body>
9

Andreas Boll's avatar
Andreas Boll committed
10
11
12
13
14
15
16
<div class="header">
  <h1>The Mesa 3D Graphics Library</h1>
</div>

<iframe src="contents.html"></iframe>
<div class="content">

17
<h1>Environment Variables</h1>
18
19

<p>
20
21
22
Normally, no environment variables need to be set.  Most of the environment
variables used by Mesa/Gallium are for debugging purposes, but they can
sometimes be useful for debugging end-user issues.
23
</p>
24
25


26
<h2>LibGL environment variables</h2>
27
28
29
30
31
32
33
34
35
36
37
38

<ul>
<li>LIBGL_DEBUG - If defined debug information will be printed to stderr.
   If set to 'verbose' additional information will be printed.
<li>LIBGL_DRIVERS_PATH - colon-separated list of paths to search for DRI drivers
<li>LIBGL_ALWAYS_INDIRECT - forces an indirect rendering context/connection.
<li>LIBGL_ALWAYS_SOFTWARE - if set, always use software rendering
<li>LIBGL_NO_DRAWARRAYS - if set do not use DrawArrays GLX protocol (for debugging)
</ul>



39
<h2>Core Mesa environment variables</h2>
40

41
<ul>
Brian Paul's avatar
Brian Paul committed
42
43
44
45
<li>MESA_NO_ASM - if set, disables all assembly language optimizations
<li>MESA_NO_MMX - if set, disables Intel MMX optimizations
<li>MESA_NO_3DNOW - if set, disables AMD 3DNow! optimizations
<li>MESA_NO_SSE - if set, disables Intel SSE optimizations
46
47
48
49
50
51
<li>MESA_DEBUG - if set, error messages are printed to stderr.  For example,
   if the application generates a GL_INVALID_ENUM error, a corresponding error
   message indicating where the error occured, and possibly why, will be
   printed to stderr.<br>
   If the value of MESA_DEBUG is 'FP' floating point arithmetic errors will
   generate exceptions.
52
53
<li>MESA_LOG_FILE - specifies a file name for logging all errors, warnings,
etc., rather than stderr
54
55
56
57
58
<li>MESA_TEX_PROG - if set, implement conventional texture env modes with
fragment programs (intended for developers only)
<li>MESA_TNL_PROG - if set, implement conventional vertex transformation
operations with vertex programs (intended for developers only).
Setting this variable automatically sets the MESA_TEX_PROG variable as well.
59
60
61
<li>MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
and disable the GL_EXT_bar extension.
62
63
64
65
66
67
68
69
70
<li>MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted
by extension year.
If this variable is set to year X, only extensions defined on or before year
X will be reported.
This is to work-around a bug in some games where the extension string is
copied into a fixed-size buffer without truncating.
If the extension string is too long, the buffer overrun can cause the game
to crash.
This is a work-around for that.
71
72
73
74
<li>MESA_GL_VERSION_OVERRIDE - changes the value returned by
glGetString(GL_VERSION). Valid values are point-separated version numbers,
such as "3.0". Mesa will not really implement all the features of the given
version if it's higher than what's normally reported.
75
76
77
78
<li>MESA_GLSL_VERSION_OVERRIDE - changes the value returned by
glGetString(GL_SHADING_LANGUAGE_VERSION). Valid values are integers, such as
"130".  Mesa will not really implement all the features of the given language version
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>
Brian Paul's avatar
Brian Paul committed
80
81
</ul>

82

83
<h2>Mesa Xlib driver environment variables</h2>
84

Brian Paul's avatar
Brian Paul committed
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.
Brian Paul's avatar
Brian Paul committed
88
89
</p>
<ul>
Brian Paul's avatar
Brian Paul committed
90
91
92
93
94
95
96
<li>MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode
<li>MESA_CI_VISUAL - specifies the X visual and depth for CI mode
<li>MESA_BACK_BUFFER - specifies how to implement the back color buffer,
    either "pixmap" or "ximage"
<li>MESA_GAMMA - gamma correction coefficients for red, green, blue channels
<li>MESA_XSYNC - enable synchronous X behavior (for debugging only)
<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.
Brian Paul's avatar
Brian Paul committed
98
<li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
Brian Paul's avatar
Brian Paul committed
99
<li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
100
101
102
</ul>


103
104
<h2>i945/i965 driver environment variables (non-Gallium)</h2>

105
106
107
108
109
110
111
112
<ul>
<li>INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve
    OpenGL conformance.  If set to 2, always use software rendering.
<li>INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap,
    glCopyPixels, glDrawPixels.
</ul>


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
118
</ul>

119
120
121

<h2>EGL environment variables</h2>

122
123
124
125
<p>
Mesa EGL supports different sets of environment variables.  See the
<a href="egl.html">Mesa EGL</a> page for the details.
</p>
126

127
128
129
130

<h2>Gallium environment variables</h2>

<ul>
131
132
<li>GALLIUM_LOG_FILE - specifies a file for logging all errors, warnings, etc.
    rather than stderr.
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<li>GALLIUM_PRINT_OPTIONS - if non-zero, print all the Gallium environment
    variables which are used, and their current values.
<li>GALLIUM_NOSSE - if non-zero, do not use SSE runtime code generation for
    shader execution
<li>GALLIUM_NOPPC - if non-zero, do not use PPC runtime code generation for
    shader execution
<li>GALLIUM_DUMP_CPU - if non-zero, print information about the CPU on start-up
<li>TGSI_PRINT_SANITY - if set, do extra sanity checking on TGSI shaders and
    print any errors to stderr.
<LI>DRAW_FSE - ???
<LI>DRAW_NO_FSE - ???
<li>DRAW_USE_LLVM - if set to zero, the draw module will not use LLVM to execute
    shaders, vertex fetch, etc.
</ul>

<h3>Softpipe driver environment variables</h3>
<ul>
<li>SOFTPIPE_DUMP_FS - if set, the softpipe driver will print fragment shaders
    to stderr
<li>SOFTPIPE_DUMP_GS - if set, the softpipe driver will print geometry shaders
    to stderr
<li>SOFTPIPE_NO_RAST - if set, rasterization is no-op'd.  For profiling purposes.
155
156
<li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for
    vertex shading procesing.
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
</ul>


<h3>LLVMpipe driver environment variables</h3>
<ul>
<li>LP_NO_RAST - if set LLVMpipe will no-op rasterization
<li>LP_DEBUG - a comma-separated list of debug options is acceptec.  See the
    source code for details.
<li>LP_PERF - a comma-separated list of options to selectively no-op various
    parts of the driver.  See the source code for details.
<li>LP_NUM_THREADS - an integer indicating how many threads to use for rendering.
    Zero turns of threading completely.  The default value is the number of CPU
    cores present.
</ul>


<p>
Other Gallium drivers have their own environment variables.  These may change
frequently so the source code should be consulted for details.
</p>

Andreas Boll's avatar
Andreas Boll committed
178
</div>
179
180
</body>
</html>