envvars.html 6.42 KB
Newer Older
1
2
3
4
<HTML>

<TITLE>Environment Variables</TITLE>

Brian Paul's avatar
Brian Paul committed
5
6
7
<link rel="stylesheet" type="text/css" href="mesa.css"></head>

<BODY>
8
9
10
11

<H1>Environment Variables</H1>

<p>
12
13
14
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.
15
</p>
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32


<H2>LibGL environment variables</H2>

<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>



<H2>Core Mesa environment variables</H2>

33
<ul>
Brian Paul's avatar
Brian Paul committed
34
35
36
37
<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
38
39
40
41
42
43
<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.
44
45
46
47
48
<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.
49
50
51
<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.
52
53
54
55
56
57
58
59
60
<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.
61
62
63
64
<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.
65
66
67
68
<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)
69
<li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a>
Brian Paul's avatar
Brian Paul committed
70
71
</ul>

72
73
74

<H2>Mesa Xlib driver environment variables</H2>

Brian Paul's avatar
Brian Paul committed
75
<p>
76
The following are only applicable to the Mesa Xlib software driver.
77
See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
Brian Paul's avatar
Brian Paul committed
78
79
</p>
<ul>
Brian Paul's avatar
Brian Paul committed
80
81
82
83
84
85
86
<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
87
<li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
Brian Paul's avatar
Brian Paul committed
88
<li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
Brian Paul's avatar
Brian Paul committed
89
<li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
90
91
92
</ul>


93
94
<h2>i945/i965 driver environment variables (non-Gallium)</h2>

95
96
97
98
99
100
101
102
<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>


103
<h2>Radeon driver environment variables (radeon, r200, and r300g)</h2>
104

105
<ul>
106
<li>RADEON_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
107
108
</ul>

109
110
111

<h2>EGL environment variables</h2>

112
113
114
115
<p>
Mesa EGL supports different sets of environment variables.  See the
<a href="egl.html">Mesa EGL</a> page for the details.
</p>
116

117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142

<h2>Gallium environment variables</h2>

<ul>
<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.
143
144
<li>SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for
    vertex shading procesing.
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
</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>


<br>
<br>


171
172
</BODY>
</HTML>