envvars.html 5.9 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
<li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a>
Brian Paul's avatar
Brian Paul committed
62
63
</ul>

64
65
66

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

Brian Paul's avatar
Brian Paul committed
67
<p>
68
The following are only applicable to the Mesa Xlib software driver.
69
See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
Brian Paul's avatar
Brian Paul committed
70
71
</p>
<ul>
Brian Paul's avatar
Brian Paul committed
72
73
74
75
76
77
78
<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
Brian Paul's avatar
Brian Paul committed
79
80
<li>MESA_GLX_FX - set to either "fullscreen" for full-screen rendering,
  "window" to render into a window, or "disable" to disable the Glide driver.
81
<li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
Brian Paul's avatar
Brian Paul committed
82
<li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
Brian Paul's avatar
Brian Paul committed
83
<li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
84
85
86
</ul>


87
88
<h2>i945/i965 driver environment variables (non-Gallium)</h2>

89
90
91
92
93
94
95
96
<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>


97
98
<h2>Radeon R300 driver environment variables (non-Gallium)</h2>

99
100
101
102
<ul>
<li>R300_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
</ul>

103
104
105

<h2>EGL environment variables</h2>

106
107
108
109
<p>
Mesa EGL supports different sets of environment variables.  See the
<a href="egl.html">Mesa EGL</a> page for the details.
</p>
110

111
112
113
114
115
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162

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


163
164
</BODY>
</HTML>