aboutsummaryrefslogtreecommitdiff
path: root/mesalib/docs/envvars.html
blob: 8c5c6abf74c4371736cb54460ec7b0b0ed58cba7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
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
163
164
165
166
167
168
169
170
171
172
<HTML>

<TITLE>Environment Variables</TITLE>

<link rel="stylesheet" type="text/css" href="mesa.css"></head>

<BODY>

<H1>Environment Variables</H1>

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


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

<ul>
<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
<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.
<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.
<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.
<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.
<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.
<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)
<li>MESA_GLSL - <a href="shading.html#envvars">shading language compiler options</a>
</ul>


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

<p>
The following are only applicable to the Mesa Xlib software driver.
See the <A HREF="xlibdriver.html">Xlib software driver page</A> for details.
</p>
<ul>
<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
<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.
<li>MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
<li>MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
<li>MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
</ul>


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

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


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

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


<h2>EGL environment variables</h2>

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


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


</BODY>
</HTML>