docs: use more code-tags in envvars.html
[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 <div class="header">
11 The Mesa 3D Graphics Library
12 </div>
13
14 <iframe src="contents.html"></iframe>
15 <div class="content">
16
17 <h1>Environment Variables</h1>
18
19 <p>
20 Normally, no environment variables need to be set. Most of the environment
21 variables used by Mesa/Gallium are for debugging purposes, but they can
22 sometimes be useful for debugging end-user issues.
23 </p>
24
25
26 <h2>LibGL environment variables</h2>
27
28 <dl>
29 <dt><code>LIBGL_DEBUG</code></dt>
30 <dd>If defined debug information will be printed to stderr.
31 If set to <code>verbose</code> additional information will be
32 printed.</dd>
33 <dt><code>LIBGL_DRIVERS_PATH</code></dt>
34 <dd>colon-separated list of paths to search for DRI drivers</dd>
35 <dt><code>LIBGL_ALWAYS_INDIRECT</code></dt>
36 <dd>if set to <code>true</code>, forces an indirect rendering
37 context/connection.</dd>
38 <dt><code>LIBGL_ALWAYS_SOFTWARE</code></dt>
39 <dd>if set to <code>true</code>, always use software rendering</dd>
40 <dt><code>LIBGL_NO_DRAWARRAYS</code></dt>
41 <dd>if set to <code>true</code>, do not use DrawArrays GLX protocol
42 (for debugging)</dd>
43 <dt><code>LIBGL_SHOW_FPS</code></dt>
44 <dd>print framerate to stdout based on the number of
45 <code>glXSwapBuffers</code> calls per second.</dd>
46 <dt><code>LIBGL_DRI3_DISABLE</code></dt>
47 <dd>disable DRI3 if set to <code>true</code>.</dd>
48 </dl>
49
50 <h2>Core Mesa environment variables</h2>
51
52 <dl>
53 <dt><code>MESA_NO_ASM</code></dt>
54 <dd>if set, disables all assembly language optimizations</dd>
55 <dt><code>MESA_NO_MMX</code></dt>
56 <dd>if set, disables Intel MMX optimizations</dd>
57 <dt><code>MESA_NO_3DNOW</code></dt>
58 <dd>if set, disables AMD 3DNow! optimizations</dd>
59 <dt><code>MESA_NO_SSE</code></dt>
60 <dd>if set, disables Intel SSE optimizations</dd>
61 <dt><code>MESA_NO_ERROR</code></dt>
62 <dd>if set to 1, error checking is disabled as per <code>KHR_no_error</code>.
63 This will result in undefined behaviour for invalid use of the api, but
64 can reduce CPU use for apps that are known to be error free.</dd>
65 <dt><code>MESA_DEBUG</code></dt>
66 <dd>if set, error messages are printed to stderr. For example,
67 if the application generates a <code>GL_INVALID_ENUM</code> error, a
68 corresponding error message indicating where the error occurred, and
69 possibly why, will be printed to stderr. For release builds,
70 <code>MESA_DEBUG</code> defaults to off (no debug output).
71 <code>MESA_DEBUG</code> accepts the following comma-separated list of
72 named flags, which adds extra behaviour to just set
73 <code>MESA_DEBUG=1</code>:
74 <dl>
75 <dt><code>silent</code></dt>
76 <dd>turn off debug messages. Only useful for debug builds.</dd>
77 <dt><code>flush</code></dt>
78 <dd>flush after each drawing command</dd>
79 <dt><code>incomplete_tex</code></dt>
80 <dd>extra debug messages when a texture is incomplete</dd>
81 <dt><code>incomplete_fbo</code></dt>
82 <dd>extra debug messages when a fbo is incomplete</dd>
83 <dt><code>context</code></dt>
84 <dd>create a debug context (see <code>GLX_CONTEXT_DEBUG_BIT_ARB</code>)
85 and print error and performance messages to stderr (or
86 <code>MESA_LOG_FILE</code>).</dd>
87 </dl>
88 </dd>
89 <dt><code>MESA_LOG_FILE</code></dt>
90 <dd>specifies a file name for logging all errors, warnings,
91 etc., rather than stderr</dd>
92 <dt><code>MESA_TEX_PROG</code></dt>
93 <dd>if set, implement conventional texture env modes with
94 fragment programs (intended for developers only)</dd>
95 <dt><code>MESA_TNL_PROG</code></dt>
96 <dd>if set, implement conventional vertex transformation operations with
97 vertex programs (intended for developers only). Setting this variable
98 automatically sets the <code>MESA_TEX_PROG</code> variable as well.</dd>
99 <dt><code>MESA_EXTENSION_OVERRIDE</code></dt>
100 <dd>can be used to enable/disable extensions. A value such as
101 <code>GL_EXT_foo -GL_EXT_bar</code> will enable the
102 <code>GL_EXT_foo</code> extension and disable the
103 <code>GL_EXT_bar</code> extension.</dd>
104 <dt><code>MESA_EXTENSION_MAX_YEAR</code></dt>
105 <dd>The <code>GL_EXTENSIONS</code> string returned by Mesa is sorted by
106 extension year. If this variable is set to year X, only extensions
107 defined on or before year X will be reported. This is to work-around a
108 bug in some games where the extension string is copied into a fixed-size
109 buffer without truncating. If the extension string is too long, the
110 buffer overrun can cause the game to crash. This is a work-around for
111 that.</dd>
112 <dt><code>MESA_GL_VERSION_OVERRIDE</code></dt>
113 <dd>changes the value returned by
114 <code>glGetString(GL_VERSION)</code> and possibly the GL API type.
115 <ul>
116 <li>The format should be <code>MAJOR.MINOR[FC|COMPAT]</code>
117 <li><code>FC</code> is an optional suffix that indicates a forward
118 compatible context. This is only valid for versions &gt;= 3.0.
119 <li><code>COMPAT</code> is an optional suffix that indicates a
120 compatibility context or <code>GL_ARB_compatibility</code> support.
121 This is only valid for versions &gt;= 3.1.
122 <li>GL versions &lt;= 3.0 are set to a compatibility (non-Core)
123 profile
124 <li>GL versions = 3.1, depending on the driver, it may or may not
125 have the <code>ARB_compatibility</code> extension enabled.
126 <li>GL versions &gt;= 3.2 are set to a Core profile
127 <li>Examples:
128 <dl>
129 <dt><code>2.1</code></dt>
130 <dd>select a compatibility (non-Core) profile with GL version 2.1.</dd>
131 <dt><code>3.0</code></dt>
132 <dd>select a compatibility (non-Core) profile with GL version 3.0.</dd>
133 <dt><code>3.0FC</code></dt>
134 <dd>select a Core+Forward Compatible profile with GL version 3.0.</dd>
135 <dt><code>3.1</code></dt>
136 <dd>select GL version 3.1 with GL_ARB_compatibility enabled per the
137 driver default.</dd>
138 <dt><code>3.1FC</code></dt>
139 <dd>select GL version 3.1 with forward compatibility and
140 GL_ARB_compatibility disabled.</dd>
141 <dt><code>3.1COMPAT</code></dt>
142 <dd>select GL version 3.1 with GL_ARB_compatibility enabled.</dd>
143 <dt><code>X.Y</code></dt>
144 <dd>override GL version to X.Y without changing the profile.</dd>
145 <dt><code>X.YFC</code></dt>
146 <dd>select a Core+Forward Compatible profile with GL version X.Y.</dd>
147 <dt><code>X.YCOMPAT</code></dt>
148 <dd>select a Compatibility profile with GL version X.Y.</dd>
149 </dl>
150 <li>Mesa may not really implement all the features of the given
151 version. (for developers only)
152 </ul>
153 </dd>
154 <dt><code>MESA_GLES_VERSION_OVERRIDE</code></dt>
155 <dd>changes the value returned by <code>glGetString(GL_VERSION)</code>
156 for OpenGL ES.
157 <ul>
158 <li> The format should be <code>MAJOR.MINOR</code>
159 <li> Examples: <code>2.0</code>, <code>3.0</code>, <code>3.1</code>
160 <li> Mesa may not really implement all the features of the given version.
161 (for developers only)
162 </ul>
163 </dd>
164 <dt><code>MESA_GLSL_VERSION_OVERRIDE</code></dt>
165 <dd>changes the value returned by
166 <code>glGetString(GL_SHADING_LANGUAGE_VERSION)</code>.
167 Valid values are integers, such as "130". Mesa will not really implement
168 all the features of the given language version if it's higher than what's
169 normally reported. (for developers only)
170 </dd>
171 <dt><code>MESA_GLSL_CACHE_DISABLE</code></dt>
172 <dd>if set to <code>true</code>, disables the GLSL shader cache</dd>
173 <dt><code>MESA_GLSL_CACHE_MAX_SIZE</code></dt>
174 <dd>if set, determines the maximum size of the on-disk cache of compiled GLSL
175 programs. Should be set to a number optionally followed by <code>K</code>,
176 <code>M</code>, or <code>G</code> to specify a size in kilobytes,
177 megabytes, or gigabytes. By default, gigabytes will be assumed. And if
178 unset, a maximum size of 1GB will be used. Note: A separate cache might
179 be created for each architecture that Mesa is installed for on your
180 system. For example under the default settings you may end up with a 1GB
181 cache for x86_64 and another 1GB cache for i386.</dd>
182 <dt><code>MESA_GLSL_CACHE_DIR</code></dt>
183 <dd>if set, determines the directory to be used for the on-disk cache of
184 compiled GLSL programs. If this variable is not set, then the cache will
185 be stored in <code>$XDG_CACHE_HOME/mesa_shader_cache</code> (if that
186 variable is set), or else within <code>.cache/mesa_shader_cache</code>
187 within the user's home directory.
188 </dd>
189 <dt><code>MESA_GLSL</code></dt>
190 <dd><a href="shading.html#envvars">shading language compiler options</a></dd>
191 <dt><code>MESA_NO_MINMAX_CACHE</code></dt>
192 <dd>when set, the minmax index cache is globally disabled.</dd>
193 <dt><code>MESA_SHADER_CAPTURE_PATH</code></dt>
194 <dd>see <a href="shading.html#capture">Capturing Shaders</a></dd>
195 <dt><code>MESA_SHADER_DUMP_PATH</code> and <code>MESA_SHADER_READ_PATH</code></dt>
196 <dd>see <a href="shading.html#replacement">Experimenting with Shader Replacements</a></dd>
197 <dt><code>MESA_VK_VERSION_OVERRIDE</code></dt>
198 <dd>changes the Vulkan physical device version
199 as returned in <code>VkPhysicalDeviceProperties::apiVersion</code>.
200 <ul>
201 <li>The format should be <code>MAJOR.MINOR[.PATCH]</code></li>
202 <li>This will not let you force a version higher than the driver's
203 instance versionas advertised by
204 <code>vkEnumerateInstanceVersion</code></li>
205 <li>This can be very useful for debugging but some features may not be
206 implemented correctly. (For developers only)</li>
207 </ul>
208 </dd>
209 </dl>
210
211
212 <h2>Mesa Xlib driver environment variables</h2>
213
214 <p>
215 The following are only applicable to the Mesa Xlib software driver.
216 See the <a href="xlibdriver.html">Xlib software driver page</a> for details.
217 </p>
218 <dl>
219 <dt><code>MESA_RGB_VISUAL</code></dt>
220 <dd>specifies the X visual and depth for RGB mode</dd>
221 <dt><code>MESA_CI_VISUAL</code></dt>
222 <dd>specifies the X visual and depth for CI mode</dd>
223 <dt><code>MESA_BACK_BUFFER</code></dt>
224 <dd>specifies how to implement the back color buffer, either
225 <code>pixmap</code> or <code>ximage</code></dd>
226 <dt><code>MESA_GAMMA</code></dt>
227 <dd>gamma correction coefficients for red, green, blue channels</dd>
228 <dt><code>MESA_XSYNC</code></dt>
229 <dd>enable synchronous X behavior (for debugging only)</dd>
230 <dt><code>MESA_GLX_FORCE_CI</code></dt>
231 <dd>if set, force GLX to treat 8bpp visuals as CI visuals</dd>
232 <dt><code>MESA_GLX_FORCE_ALPHA</code></dt>
233 <dd>if set, forces RGB windows to have an alpha channel.</dd>
234 <dt><code>MESA_GLX_DEPTH_BITS</code></dt>
235 <dd>specifies default number of bits for depth buffer.</dd>
236 <dt><code>MESA_GLX_ALPHA_BITS</code></dt>
237 <dd>specifies default number of bits for alpha channel.</dd>
238 </dl>
239
240
241 <h2>i945/i965 driver environment variables (non-Gallium)</h2>
242
243 <dl>
244 <dt><code>INTEL_NO_HW</code></dt>
245 <dd>if set to 1, prevents batches from being submitted to the hardware.
246 This is useful for debugging hangs, etc.</dd>
247 <dt><code>INTEL_DEBUG</code></dt>
248 <dd>a comma-separated list of named flags, which do various things:
249 <dl>
250 <dt><code>ann</code></dt>
251 <dd>annotate IR in assembly dumps</dd>
252 <dt><code>aub</code></dt>
253 <dd>dump batches into an AUB trace for use with simulation tools</dd>
254 <dt><code>bat</code></dt>
255 <dd>emit batch information</dd>
256 <dt><code>blit</code></dt>
257 <dd>emit messages about blit operations</dd>
258 <dt><code>blorp</code></dt>
259 <dd>emit messages about the blorp operations (blits &amp; clears)</dd>
260 <dt><code>buf</code></dt>
261 <dd>emit messages about buffer objects</dd>
262 <dt><code>clip</code></dt>
263 <dd>emit messages about the clip unit (for old gens, includes the CLIP program)</dd>
264 <dt><code>color</code></dt>
265 <dd>use color in output</dd>
266 <dt><code>cs</code></dt>
267 <dd>dump shader assembly for compute shaders</dd>
268 <dt><code>do32</code></dt>
269 <dd>generate compute shader SIMD32 programs even if workgroup size doesn't exceed the SIMD16 limit</dd>
270 <dt><code>dri</code></dt>
271 <dd>emit messages about the DRI interface</dd>
272 <dt><code>fbo</code></dt>
273 <dd>emit messages about framebuffers</dd>
274 <dt><code>fs</code></dt>
275 <dd>dump shader assembly for fragment shaders</dd>
276 <dt><code>gs</code></dt>
277 <dd>dump shader assembly for geometry shaders</dd>
278 <dt><code>hex</code></dt>
279 <dd>print instruction hex dump with the disassembly</dd>
280 <dt><code>l3</code></dt>
281 <dd>emit messages about the new L3 state during transitions</dd>
282 <dt><code>miptree</code></dt>
283 <dd>emit messages about miptrees</dd>
284 <dt><code>no8</code></dt>
285 <dd>don't generate SIMD8 fragment shader</dd>
286 <dt><code>no16</code></dt>
287 <dd>suppress generation of 16-wide fragment shaders. useful for debugging broken shaders</dd>
288 <dt><code>nocompact</code></dt>
289 <dd>disable instruction compaction</dd>
290 <dt><code>nodualobj</code></dt>
291 <dd>suppress generation of dual-object geometry shader code</dd>
292 <dt><code>norbc</code></dt>
293 <dd>disable single sampled render buffer compression</dd>
294 <dt><code>optimizer</code></dt>
295 <dd>dump shader assembly to files at each optimization pass and iteration that make progress</dd>
296 <dt><code>perf</code></dt>
297 <dd>emit messages about performance issues</dd>
298 <dt><code>perfmon</code></dt>
299 <dd>emit messages about <code>AMD_performance_monitor</code></dd>
300 <dt><code>pix</code></dt>
301 <dd>emit messages about pixel operations</dd>
302 <dt><code>prim</code></dt>
303 <dd>emit messages about drawing primitives</dd>
304 <dt><code>reemit</code></dt>
305 <dd>mark all state dirty on each draw call</dd>
306 <dt><code>sf</code></dt>
307 <dd>emit messages about the strips &amp; fans unit (for old gens, includes the SF program)</dd>
308 <dt><code>shader_time</code></dt>
309 <dd>record how much GPU time is spent in each shader</dd>
310 <dt><code>spill_fs</code></dt>
311 <dd>force spilling of all registers in the scalar backend (useful to debug spilling code)</dd>
312 <dt><code>spill_vec4</code></dt>
313 <dd>force spilling of all registers in the vec4 backend (useful to debug spilling code)</dd>
314 <dt><code>state</code></dt>
315 <dd>emit messages about state flag tracking</dd>
316 <dt><code>submit</code></dt>
317 <dd>emit batchbuffer usage statistics</dd>
318 <dt><code>sync</code></dt>
319 <dd>after sending each batch, emit a message and wait for that batch to finish rendering</dd>
320 <dt><code>tcs</code></dt>
321 <dd>dump shader assembly for tessellation control shaders</dd>
322 <dt><code>tes</code></dt>
323 <dd>dump shader assembly for tessellation evaluation shaders</dd>
324 <dt><code>tex</code></dt>
325 <dd>emit messages about textures.</dd>
326 <dt><code>urb</code></dt>
327 <dd>emit messages about URB setup</dd>
328 <dt><code>vert</code></dt>
329 <dd>emit messages about vertex assembly</dd>
330 <dt><code>vs</code></dt>
331 <dd>dump shader assembly for vertex shaders</dd>
332 </dl>
333 </dd>
334 <dt><code>INTEL_SCALAR_VS</code> (or <code>TCS</code>, <code>TES</code>,
335 <code>GS</code>)</dt>
336 <dd>force scalar/vec4 mode for a shader stage (Gen8-9 only)</dd>
337 <dt><code>INTEL_PRECISE_TRIG</code></dt>
338 <dd>if set to 1, true or yes, then the driver prefers accuracy over
339 performance in trig functions.</dd>
340 </dl>
341
342
343 <h2>Radeon driver environment variables (radeon, r200, and r300g)</h2>
344
345 <dl>
346 <dt><code>RADEON_NO_TCL</code></dt>
347 <dd>if set, disable hardware-accelerated Transform/Clip/Lighting.</dd>
348 </dl>
349
350
351 <h2>EGL environment variables</h2>
352
353 <p>
354 Mesa EGL supports different sets of environment variables. See the
355 <a href="egl.html">Mesa EGL</a> page for the details.
356 </p>
357
358
359 <h2>Gallium environment variables</h2>
360
361 <dl>
362 <dt><code>GALLIUM_HUD</code></dt>
363 <dd>draws various information on the screen, like framerate,
364 cpu load, driver statistics, performance counters, etc.
365 Set <code>GALLIUM_HUD=help</code> and run e.g. glxgears for more
366 info.</dd>
367 <dt><code>GALLIUM_HUD_PERIOD</code></dt>
368 <dd>sets the hud update rate in seconds (float). Use zero
369 to update every frame. The default period is 1/2 second.</dd>
370 <dt><code>GALLIUM_HUD_VISIBLE</code></dt>
371 <dd>control default visibility, defaults to true.</dd>
372 <dt><code>GALLIUM_HUD_TOGGLE_SIGNAL</code></dt>
373 <dd>toggle visibility via user specified signal.
374 Especially useful to toggle hud at specific points of application and
375 disable for unencumbered viewing the rest of the time. For example, set
376 <code>GALLIUM_HUD_VISIBLE</code> to <code>false</code> and
377 <code>GALLIUM_HUD_TOGGLE_SIGNAL</code> to <code>10</code>
378 (<code>SIGUSR1</code>).
379 Use <code>kill -10 &lt;pid&gt;</code> to toggle the hud as desired.</dd>
380 <dt><code>GALLIUM_HUD_DUMP_DIR</code></dt>
381 <dd>specifies a directory for writing the displayed hud values into files.</dd>
382 <dt><code>GALLIUM_DRIVER</code></dt>
383 <dd>useful in combination with <code>LIBGL_ALWAYS_SOFTWARE=true</code> for
384 choosing one of the software renderers <code>softpipe</code>,
385 <code>llvmpipe</code> or <code>swr</code>.</dd>
386 <dt><code>GALLIUM_LOG_FILE</code></dt>
387 <dd>specifies a file for logging all errors, warnings, etc.
388 rather than stderr.</dd>
389 <dt><code>GALLIUM_PRINT_OPTIONS</code></dt>
390 <dd>if non-zero, print all the Gallium environment variables which are
391 used, and their current values.</dd>
392 <dt><code>GALLIUM_DUMP_CPU</code></dt>
393 <dd>if non-zero, print information about the CPU on start-up</dd>
394 <dt><code>TGSI_PRINT_SANITY</code></dt>
395 <dd>if set, do extra sanity checking on TGSI shaders and
396 print any errors to stderr.</dd>
397 <dt><code>DRAW_FSE</code></dt>
398 <dd>???</dd>
399 <dt><code>DRAW_NO_FSE</code></dt>
400 <dd>???</dd>
401 <dt><code>DRAW_USE_LLVM</code></dt>
402 <dd>if set to zero, the draw module will not use LLVM to execute
403 shaders, vertex fetch, etc.</dd>
404 <dt><code>ST_DEBUG</code></dt>
405 <dd>controls debug output from the Mesa/Gallium state tracker.
406 Setting to <code>tgsi</code>, for example, will print all the TGSI
407 shaders. See <code>src/mesa/state_tracker/st_debug.c</code> for other
408 options.</dd>
409 </dl>
410
411 <h3>Clover state tracker environment variables</h3>
412
413 <dl>
414 <dt><code>CLOVER_EXTRA_BUILD_OPTIONS</code></dt>
415 <dd>allows specifying additional compiler and linker
416 options. Specified options are appended after the options set by the OpenCL
417 program in <code>clBuildProgram</code>.</dd>
418 <dt><code>CLOVER_EXTRA_COMPILE_OPTIONS</code></dt>
419 <dd>allows specifying additional compiler
420 options. Specified options are appended after the options set by the OpenCL
421 program in <code>clCompileProgram</code>.</dd>
422 <dt><code>CLOVER_EXTRA_LINK_OPTIONS</code></dt>
423 <dd>allows specifying additional linker
424 options. Specified options are appended after the options set by the OpenCL
425 program in <code>clLinkProgram</code>.</dd>
426 </dl>
427
428
429 <h3>Softpipe driver environment variables</h3>
430 <dl>
431 <dt><code>SOFTPIPE_DUMP_FS</code></dt>
432 <dd>if set, the softpipe driver will print fragment shaders to stderr</dd>
433 <dt><code>SOFTPIPE_DUMP_GS</code></dt>
434 <dd>if set, the softpipe driver will print geometry shaders to stderr</dd>
435 <dt><code>SOFTPIPE_NO_RAST</code></dt>
436 <dd>if set, rasterization is no-op'd. For profiling purposes.</dd>
437 <dt><code>SOFTPIPE_USE_LLVM</code></dt>
438 <dd>if set, the softpipe driver will try to use LLVM JIT for
439 vertex shading processing.</dd>
440 </dl>
441
442
443 <h3>LLVMpipe driver environment variables</h3>
444 <dl>
445 <dt><code>LP_NO_RAST</code></dt>
446 <dd>if set LLVMpipe will no-op rasterization</dd>
447 <dt><code>LP_DEBUG</code></dt>
448 <dd>a comma-separated list of debug options is accepted. See the
449 source code for details.</dd>
450 <dt><code>LP_PERF</code></dt>
451 <dd>a comma-separated list of options to selectively no-op various
452 parts of the driver. See the source code for details.</dd>
453 <dt><code>LP_NUM_THREADS</code></dt>
454 <dd>an integer indicating how many threads to use for rendering.
455 Zero turns off threading completely. The default value is the number of CPU
456 cores present.</dd>
457 </dl>
458
459 <h3>VMware SVGA driver environment variables</h3>
460 <dl>
461 <dt><code>SVGA_FORCE_SWTNL</code></dt>
462 <dd>force use of software vertex transformation</dd>
463 <dt><code>SVGA_NO_SWTNL</code></dt>
464 <dd>don't allow software vertex transformation fallbacks (will often result
465 in incorrect rendering).</dd>
466 <dt><code>SVGA_DEBUG</code></dt>
467 <dd>for dumping shaders, constant buffers, etc. See the code for
468 details.</dd>
469 <dt><code>SVGA_EXTRA_LOGGING</code></dt>
470 <dd>if set, enables extra logging to the vmware.log file, such as the
471 OpenGL program's name and command line arguments.</dd>
472 <dt><code>SVGA_NO_LOGGING</code></dt>
473 <dd>if set, disables logging to the vmware.log file. This is useful when
474 using Valgrind because it otherwise crashes when initializing the host
475 log feature.</dd>
476 </dl>
477 <p>See the driver code for other, lesser-used variables.</p>
478
479 <h3>WGL environment variables</h3>
480 <dl>
481 <dt><code>WGL_SWAP_INTERVAL</code></dt>
482 <dd>to set a swap interval, equivalent to calling
483 <code>wglSwapIntervalEXT()</code> in an application. If this
484 environment variable is set, application calls to
485 <code>wglSwapIntervalEXT()</code> will have no effect.</dd>
486 </dl>
487
488 <h3>VA-API state tracker environment variables</h3>
489 <dl>
490 <dt><code>VAAPI_MPEG4_ENABLED</code></dt>
491 <dd>enable MPEG4 for VA-API, disabled by default.</dd>
492 </dl>
493
494
495 <h3>VC4 driver environment variables</h3>
496 <dl>
497 <dt><code>VC4_DEBUG</code></dt>
498 <dd>a comma-separated list of named flags, which do various things:
499 <dl>
500 <dt><code>cl</code></dt>
501 <dd>dump command list during creation</dd>
502 <dt><code>qpu</code></dt>
503 <dd>dump generated QPU instructions</dd>
504 <dt><code>qir</code></dt>
505 <dd>dump QPU IR during program compile</dd>
506 <dt><code>nir</code></dt>
507 <dd>dump NIR during program compile</dd>
508 <dt><code>tgsi</code></dt>
509 <dd>dump TGSI during program compile</dd>
510 <dt><code>shaderdb</code></dt>
511 <dd>dump program compile information for shader-db analysis</dd>
512 <dt><code>perf</code></dt>
513 <dd>print during performance-related events</dd>
514 <dt><code>norast</code></dt>
515 <dd>skip actual hardware execution of commands</dd>
516 <dt><code>always_flush</code></dt>
517 <dd>flush after each draw call</dd>
518 <dt><code>always_sync</code></dt>
519 <dd>wait for finish after each flush</dd>
520 <dt><code>dump</code></dt>
521 <dd>write a GPU command stream trace file (VC4 simulator only)</dd>
522 </dl>
523 </dd>
524 </dl>
525
526
527 <p>
528 Other Gallium drivers have their own environment variables. These may change
529 frequently so the source code should be consulted for details.
530 </p>
531
532 </div>
533 </body>
534 </html>