radeonsi: remove AMD_DEBUG=sisched option
[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 <code>GL_ARB_compatibility</code>
137 enabled per the driver default.</dd>
138 <dt><code>3.1FC</code></dt>
139 <dd>select GL version 3.1 with forward compatibility and
140 <code>GL_ARB_compatibility</code> disabled.</dd>
141 <dt><code>3.1COMPAT</code></dt>
142 <dd>select GL version 3.1 with <code>GL_ARB_compatibility</code>
143 enabled.</dd>
144 <dt><code>X.Y</code></dt>
145 <dd>override GL version to X.Y without changing the profile.</dd>
146 <dt><code>X.YFC</code></dt>
147 <dd>select a Core+Forward Compatible profile with GL version X.Y.</dd>
148 <dt><code>X.YCOMPAT</code></dt>
149 <dd>select a Compatibility profile with GL version X.Y.</dd>
150 </dl>
151 <li>Mesa may not really implement all the features of the given
152 version. (for developers only)
153 </ul>
154 </dd>
155 <dt><code>MESA_GLES_VERSION_OVERRIDE</code></dt>
156 <dd>changes the value returned by <code>glGetString(GL_VERSION)</code>
157 for OpenGL ES.
158 <ul>
159 <li> The format should be <code>MAJOR.MINOR</code>
160 <li> Examples: <code>2.0</code>, <code>3.0</code>, <code>3.1</code>
161 <li> Mesa may not really implement all the features of the given version.
162 (for developers only)
163 </ul>
164 </dd>
165 <dt><code>MESA_GLSL_VERSION_OVERRIDE</code></dt>
166 <dd>changes the value returned by
167 <code>glGetString(GL_SHADING_LANGUAGE_VERSION)</code>.
168 Valid values are integers, such as <code>130</code>. Mesa will not
169 really implement all the features of the given language version if
170 it's higher than what's normally reported. (for developers only)
171 </dd>
172 <dt><code>MESA_GLSL_CACHE_DISABLE</code></dt>
173 <dd>if set to <code>true</code>, disables the GLSL shader cache</dd>
174 <dt><code>MESA_GLSL_CACHE_MAX_SIZE</code></dt>
175 <dd>if set, determines the maximum size of the on-disk cache of compiled GLSL
176 programs. Should be set to a number optionally followed by <code>K</code>,
177 <code>M</code>, or <code>G</code> to specify a size in kilobytes,
178 megabytes, or gigabytes. By default, gigabytes will be assumed. And if
179 unset, a maximum size of 1GB will be used. Note: A separate cache might
180 be created for each architecture that Mesa is installed for on your
181 system. For example under the default settings you may end up with a 1GB
182 cache for x86_64 and another 1GB cache for i386.</dd>
183 <dt><code>MESA_GLSL_CACHE_DIR</code></dt>
184 <dd>if set, determines the directory to be used for the on-disk cache of
185 compiled GLSL programs. If this variable is not set, then the cache will
186 be stored in <code>$XDG_CACHE_HOME/mesa_shader_cache</code> (if that
187 variable is set), or else within <code>.cache/mesa_shader_cache</code>
188 within the user's home directory.
189 </dd>
190 <dt><code>MESA_GLSL</code></dt>
191 <dd><a href="shading.html#envvars">shading language compiler options</a></dd>
192 <dt><code>MESA_NO_MINMAX_CACHE</code></dt>
193 <dd>when set, the minmax index cache is globally disabled.</dd>
194 <dt><code>MESA_SHADER_CAPTURE_PATH</code></dt>
195 <dd>see <a href="shading.html#capture">Capturing Shaders</a></dd>
196 <dt><code>MESA_SHADER_DUMP_PATH</code> and <code>MESA_SHADER_READ_PATH</code></dt>
197 <dd>see <a href="shading.html#replacement">Experimenting with Shader Replacements</a></dd>
198 <dt><code>MESA_VK_VERSION_OVERRIDE</code></dt>
199 <dd>changes the Vulkan physical device version
200 as returned in <code>VkPhysicalDeviceProperties::apiVersion</code>.
201 <ul>
202 <li>The format should be <code>MAJOR.MINOR[.PATCH]</code></li>
203 <li>This will not let you force a version higher than the driver's
204 instance version as advertised by
205 <code>vkEnumerateInstanceVersion</code></li>
206 <li>This can be very useful for debugging but some features may not be
207 implemented correctly. (For developers only)</li>
208 </ul>
209 </dd>
210 </dl>
211
212
213 <h2>NIR passes enviroment variables</h2>
214 <p>
215 The following are only applicable for drivers that uses NIR, as they
216 modify the behaviour for the common NIR_PASS and NIR_PASS_V macros,
217 that wrap calls to NIR lowering/optimizations.
218 </p>
219
220 <dl>
221 <dt><code>NIR_PRINT</code></dt>
222 <dd>If defined, the resulting NIR shader will be printed out at each succesful NIR lowering/optimization call.</dd>
223 <dt><code>NIR_TEST_CLONE</code></dt>
224 <dd>If defined, cloning a NIR shader would be tested at each succesful NIR lowering/optimization call.</dd>
225 <dt><code>NIR_TEST_SERIALIZE</code></dt>
226 <dd>If defined, serialize and deserialize a NIR shader would be tested at each succesful NIR lowering/optimization call.</dd>
227 </dl>
228
229
230 <h2>Mesa Xlib driver environment variables</h2>
231
232 <p>
233 The following are only applicable to the Mesa Xlib software driver.
234 See the <a href="xlibdriver.html">Xlib software driver page</a> for details.
235 </p>
236 <dl>
237 <dt><code>MESA_RGB_VISUAL</code></dt>
238 <dd>specifies the X visual and depth for RGB mode</dd>
239 <dt><code>MESA_CI_VISUAL</code></dt>
240 <dd>specifies the X visual and depth for CI mode</dd>
241 <dt><code>MESA_BACK_BUFFER</code></dt>
242 <dd>specifies how to implement the back color buffer, either
243 <code>pixmap</code> or <code>ximage</code></dd>
244 <dt><code>MESA_GAMMA</code></dt>
245 <dd>gamma correction coefficients for red, green, blue channels</dd>
246 <dt><code>MESA_XSYNC</code></dt>
247 <dd>enable synchronous X behavior (for debugging only)</dd>
248 <dt><code>MESA_GLX_FORCE_CI</code></dt>
249 <dd>if set, force GLX to treat 8bpp visuals as CI visuals</dd>
250 <dt><code>MESA_GLX_FORCE_ALPHA</code></dt>
251 <dd>if set, forces RGB windows to have an alpha channel.</dd>
252 <dt><code>MESA_GLX_DEPTH_BITS</code></dt>
253 <dd>specifies default number of bits for depth buffer.</dd>
254 <dt><code>MESA_GLX_ALPHA_BITS</code></dt>
255 <dd>specifies default number of bits for alpha channel.</dd>
256 </dl>
257
258
259 <h2>i945/i965 driver environment variables (non-Gallium)</h2>
260
261 <dl>
262 <dt><code>INTEL_NO_HW</code></dt>
263 <dd>if set to 1, prevents batches from being submitted to the hardware.
264 This is useful for debugging hangs, etc.</dd>
265 <dt><code>INTEL_DEBUG</code></dt>
266 <dd>a comma-separated list of named flags, which do various things:
267 <dl>
268 <dt><code>ann</code></dt>
269 <dd>annotate IR in assembly dumps</dd>
270 <dt><code>aub</code></dt>
271 <dd>dump batches into an AUB trace for use with simulation tools</dd>
272 <dt><code>bat</code></dt>
273 <dd>emit batch information</dd>
274 <dt><code>blit</code></dt>
275 <dd>emit messages about blit operations</dd>
276 <dt><code>blorp</code></dt>
277 <dd>emit messages about the blorp operations (blits &amp; clears)</dd>
278 <dt><code>buf</code></dt>
279 <dd>emit messages about buffer objects</dd>
280 <dt><code>clip</code></dt>
281 <dd>emit messages about the clip unit (for old gens, includes the CLIP program)</dd>
282 <dt><code>color</code></dt>
283 <dd>use color in output</dd>
284 <dt><code>cs</code></dt>
285 <dd>dump shader assembly for compute shaders</dd>
286 <dt><code>do32</code></dt>
287 <dd>generate compute shader SIMD32 programs even if workgroup size doesn't exceed the SIMD16 limit</dd>
288 <dt><code>dri</code></dt>
289 <dd>emit messages about the DRI interface</dd>
290 <dt><code>fbo</code></dt>
291 <dd>emit messages about framebuffers</dd>
292 <dt><code>fs</code></dt>
293 <dd>dump shader assembly for fragment shaders</dd>
294 <dt><code>gs</code></dt>
295 <dd>dump shader assembly for geometry shaders</dd>
296 <dt><code>hex</code></dt>
297 <dd>print instruction hex dump with the disassembly</dd>
298 <dt><code>l3</code></dt>
299 <dd>emit messages about the new L3 state during transitions</dd>
300 <dt><code>miptree</code></dt>
301 <dd>emit messages about miptrees</dd>
302 <dt><code>no8</code></dt>
303 <dd>don't generate SIMD8 fragment shader</dd>
304 <dt><code>no16</code></dt>
305 <dd>suppress generation of 16-wide fragment shaders. useful for debugging broken shaders</dd>
306 <dt><code>nocompact</code></dt>
307 <dd>disable instruction compaction</dd>
308 <dt><code>nodualobj</code></dt>
309 <dd>suppress generation of dual-object geometry shader code</dd>
310 <dt><code>nofc</code></dt>
311 <dd>disable fast clears</dd>
312 <dt><code>norbc</code></dt>
313 <dd>disable single sampled render buffer compression</dd>
314 <dt><code>optimizer</code></dt>
315 <dd>dump shader assembly to files at each optimization pass and iteration that make progress</dd>
316 <dt><code>perf</code></dt>
317 <dd>emit messages about performance issues</dd>
318 <dt><code>perfmon</code></dt>
319 <dd>emit messages about <code>AMD_performance_monitor</code></dd>
320 <dt><code>pix</code></dt>
321 <dd>emit messages about pixel operations</dd>
322 <dt><code>prim</code></dt>
323 <dd>emit messages about drawing primitives</dd>
324 <dt><code>reemit</code></dt>
325 <dd>mark all state dirty on each draw call</dd>
326 <dt><code>sf</code></dt>
327 <dd>emit messages about the strips &amp; fans unit (for old gens, includes the SF program)</dd>
328 <dt><code>shader_time</code></dt>
329 <dd>record how much GPU time is spent in each shader</dd>
330 <dt><code>spill_fs</code></dt>
331 <dd>force spilling of all registers in the scalar backend (useful to debug spilling code)</dd>
332 <dt><code>spill_vec4</code></dt>
333 <dd>force spilling of all registers in the vec4 backend (useful to debug spilling code)</dd>
334 <dt><code>state</code></dt>
335 <dd>emit messages about state flag tracking</dd>
336 <dt><code>submit</code></dt>
337 <dd>emit batchbuffer usage statistics</dd>
338 <dt><code>sync</code></dt>
339 <dd>after sending each batch, emit a message and wait for that batch to finish rendering</dd>
340 <dt><code>tcs</code></dt>
341 <dd>dump shader assembly for tessellation control shaders</dd>
342 <dt><code>tes</code></dt>
343 <dd>dump shader assembly for tessellation evaluation shaders</dd>
344 <dt><code>tex</code></dt>
345 <dd>emit messages about textures.</dd>
346 <dt><code>urb</code></dt>
347 <dd>emit messages about URB setup</dd>
348 <dt><code>vert</code></dt>
349 <dd>emit messages about vertex assembly</dd>
350 <dt><code>vs</code></dt>
351 <dd>dump shader assembly for vertex shaders</dd>
352 </dl>
353 </dd>
354 <dt><code>INTEL_SCALAR_VS</code> (or <code>TCS</code>, <code>TES</code>,
355 <code>GS</code>)</dt>
356 <dd>force scalar/vec4 mode for a shader stage (Gen8-9 only)</dd>
357 <dt><code>INTEL_PRECISE_TRIG</code></dt>
358 <dd>if set to 1, true or yes, then the driver prefers accuracy over
359 performance in trig functions.</dd>
360 </dl>
361
362
363 <h2>Radeon driver environment variables (radeon, r200, and r300g)</h2>
364
365 <dl>
366 <dt><code>RADEON_NO_TCL</code></dt>
367 <dd>if set, disable hardware-accelerated Transform/Clip/Lighting.</dd>
368 </dl>
369
370
371 <h2>EGL environment variables</h2>
372
373 <p>
374 Mesa EGL supports different sets of environment variables. See the
375 <a href="egl.html">Mesa EGL</a> page for the details.
376 </p>
377
378
379 <h2>Gallium environment variables</h2>
380
381 <dl>
382 <dt><code>GALLIUM_HUD</code></dt>
383 <dd>draws various information on the screen, like framerate,
384 cpu load, driver statistics, performance counters, etc.
385 Set <code>GALLIUM_HUD=help</code> and run e.g.
386 <code>glxgears</code> for more info.</dd>
387 <dt><code>GALLIUM_HUD_PERIOD</code></dt>
388 <dd>sets the hud update rate in seconds (float). Use zero
389 to update every frame. The default period is 1/2 second.</dd>
390 <dt><code>GALLIUM_HUD_VISIBLE</code></dt>
391 <dd>control default visibility, defaults to true.</dd>
392 <dt><code>GALLIUM_HUD_TOGGLE_SIGNAL</code></dt>
393 <dd>toggle visibility via user specified signal.
394 Especially useful to toggle hud at specific points of application and
395 disable for unencumbered viewing the rest of the time. For example, set
396 <code>GALLIUM_HUD_VISIBLE</code> to <code>false</code> and
397 <code>GALLIUM_HUD_TOGGLE_SIGNAL</code> to <code>10</code>
398 (<code>SIGUSR1</code>).
399 Use <code>kill -10 &lt;pid&gt;</code> to toggle the hud as desired.</dd>
400 <dt><code>GALLIUM_HUD_SCALE</code></dt>
401 <dd>Scale hud by an integer factor, for high DPI displays. Default is 1.</dd>
402 <dt><code>GALLIUM_HUD_DUMP_DIR</code></dt>
403 <dd>specifies a directory for writing the displayed hud values into files.</dd>
404 <dt><code>GALLIUM_DRIVER</code></dt>
405 <dd>useful in combination with <code>LIBGL_ALWAYS_SOFTWARE=true</code> for
406 choosing one of the software renderers <code>softpipe</code>,
407 <code>llvmpipe</code> or <code>swr</code>.</dd>
408 <dt><code>GALLIUM_LOG_FILE</code></dt>
409 <dd>specifies a file for logging all errors, warnings, etc.
410 rather than stderr.</dd>
411 <dt><code>GALLIUM_PRINT_OPTIONS</code></dt>
412 <dd>if non-zero, print all the Gallium environment variables which are
413 used, and their current values.</dd>
414 <dt><code>GALLIUM_DUMP_CPU</code></dt>
415 <dd>if non-zero, print information about the CPU on start-up</dd>
416 <dt><code>TGSI_PRINT_SANITY</code></dt>
417 <dd>if set, do extra sanity checking on TGSI shaders and
418 print any errors to stderr.</dd>
419 <dt><code>DRAW_FSE</code></dt>
420 <dd>???</dd>
421 <dt><code>DRAW_NO_FSE</code></dt>
422 <dd>???</dd>
423 <dt><code>DRAW_USE_LLVM</code></dt>
424 <dd>if set to zero, the draw module will not use LLVM to execute
425 shaders, vertex fetch, etc.</dd>
426 <dt><code>ST_DEBUG</code></dt>
427 <dd>controls debug output from the Mesa/Gallium state tracker.
428 Setting to <code>tgsi</code>, for example, will print all the TGSI
429 shaders. See <code>src/mesa/state_tracker/st_debug.c</code> for other
430 options.</dd>
431 </dl>
432
433 <h3>Clover state tracker environment variables</h3>
434
435 <dl>
436 <dt><code>CLOVER_EXTRA_BUILD_OPTIONS</code></dt>
437 <dd>allows specifying additional compiler and linker
438 options. Specified options are appended after the options set by the OpenCL
439 program in <code>clBuildProgram</code>.</dd>
440 <dt><code>CLOVER_EXTRA_COMPILE_OPTIONS</code></dt>
441 <dd>allows specifying additional compiler
442 options. Specified options are appended after the options set by the OpenCL
443 program in <code>clCompileProgram</code>.</dd>
444 <dt><code>CLOVER_EXTRA_LINK_OPTIONS</code></dt>
445 <dd>allows specifying additional linker
446 options. Specified options are appended after the options set by the OpenCL
447 program in <code>clLinkProgram</code>.</dd>
448 </dl>
449
450
451 <h3>Softpipe driver environment variables</h3>
452 <dl>
453 <dt><code>SOFTPIPE_DUMP_FS</code></dt>
454 <dd>if set, the softpipe driver will print fragment shaders to stderr</dd>
455 <dt><code>SOFTPIPE_DUMP_GS</code></dt>
456 <dd>if set, the softpipe driver will print geometry shaders to stderr</dd>
457 <dt><code>SOFTPIPE_NO_RAST</code></dt>
458 <dd>if set, rasterization is no-op'd. For profiling purposes.</dd>
459 <dt><code>SOFTPIPE_USE_LLVM</code></dt>
460 <dd>if set, the softpipe driver will try to use LLVM JIT for
461 vertex shading processing.</dd>
462 </dl>
463
464
465 <h3>LLVMpipe driver environment variables</h3>
466 <dl>
467 <dt><code>LP_NO_RAST</code></dt>
468 <dd>if set LLVMpipe will no-op rasterization</dd>
469 <dt><code>LP_DEBUG</code></dt>
470 <dd>a comma-separated list of debug options is accepted. See the
471 source code for details.</dd>
472 <dt><code>LP_PERF</code></dt>
473 <dd>a comma-separated list of options to selectively no-op various
474 parts of the driver. See the source code for details.</dd>
475 <dt><code>LP_NUM_THREADS</code></dt>
476 <dd>an integer indicating how many threads to use for rendering.
477 Zero turns off threading completely. The default value is the number of CPU
478 cores present.</dd>
479 </dl>
480
481 <h3>VMware SVGA driver environment variables</h3>
482 <dl>
483 <dt><code>SVGA_FORCE_SWTNL</code></dt>
484 <dd>force use of software vertex transformation</dd>
485 <dt><code>SVGA_NO_SWTNL</code></dt>
486 <dd>don't allow software vertex transformation fallbacks (will often result
487 in incorrect rendering).</dd>
488 <dt><code>SVGA_DEBUG</code></dt>
489 <dd>for dumping shaders, constant buffers, etc. See the code for
490 details.</dd>
491 <dt><code>SVGA_EXTRA_LOGGING</code></dt>
492 <dd>if set, enables extra logging to the <code>vmware.log</code> file,
493 such as the OpenGL program's name and command line arguments.</dd>
494 <dt><code>SVGA_NO_LOGGING</code></dt>
495 <dd>if set, disables logging to the <code>vmware.log</code> file. This is
496 useful when using Valgrind because it otherwise crashes when
497 initializing the host log feature.</dd>
498 </dl>
499 <p>See the driver code for other, lesser-used variables.</p>
500
501 <h3>WGL environment variables</h3>
502 <dl>
503 <dt><code>WGL_SWAP_INTERVAL</code></dt>
504 <dd>to set a swap interval, equivalent to calling
505 <code>wglSwapIntervalEXT()</code> in an application. If this
506 environment variable is set, application calls to
507 <code>wglSwapIntervalEXT()</code> will have no effect.</dd>
508 </dl>
509
510 <h3>VA-API state tracker environment variables</h3>
511 <dl>
512 <dt><code>VAAPI_MPEG4_ENABLED</code></dt>
513 <dd>enable MPEG4 for VA-API, disabled by default.</dd>
514 </dl>
515
516
517 <h3>VC4 driver environment variables</h3>
518 <dl>
519 <dt><code>VC4_DEBUG</code></dt>
520 <dd>a comma-separated list of named flags, which do various things:
521 <dl>
522 <dt><code>cl</code></dt>
523 <dd>dump command list during creation</dd>
524 <dt><code>qpu</code></dt>
525 <dd>dump generated QPU instructions</dd>
526 <dt><code>qir</code></dt>
527 <dd>dump QPU IR during program compile</dd>
528 <dt><code>nir</code></dt>
529 <dd>dump NIR during program compile</dd>
530 <dt><code>tgsi</code></dt>
531 <dd>dump TGSI during program compile</dd>
532 <dt><code>shaderdb</code></dt>
533 <dd>dump program compile information for shader-db analysis</dd>
534 <dt><code>perf</code></dt>
535 <dd>print during performance-related events</dd>
536 <dt><code>norast</code></dt>
537 <dd>skip actual hardware execution of commands</dd>
538 <dt><code>always_flush</code></dt>
539 <dd>flush after each draw call</dd>
540 <dt><code>always_sync</code></dt>
541 <dd>wait for finish after each flush</dd>
542 <dt><code>dump</code></dt>
543 <dd>write a GPU command stream trace file (VC4 simulator only)</dd>
544 </dl>
545 </dd>
546 </dl>
547
548
549 <h3>RADV driver environment variables</h3>
550 <dl>
551 <dt><code>RADV_DEBUG</code></dt>
552 <dd>a comma-separated list of named flags, which do various things:
553 <dl>
554 <dt><code>allbos</code></dt>
555 <dd>force all allocated buffers to be referenced in submissions</dd>
556 <dt><code>allentrypoints</code></dt>
557 <dd>enable all device/instance entrypoints</dd>
558 <dt><code>checkir</code></dt>
559 <dd>validate the LLVM IR before LLVM compiles the shader</dd>
560 <dt><code>errors</code></dt>
561 <dd>display more info about errors</dd>
562 <dt><code>info</code></dt>
563 <dd>show GPU-related information</dd>
564 <dt><code>metashaders</code></dt>
565 <dd>dump internal meta shaders</dd>
566 <dt><code>nobinning</code></dt>
567 <dd>disable primitive binning</dd>
568 <dt><code>nocache</code></dt>
569 <dd>disable shaders cache</dd>
570 <dt><code>nocompute</code></dt>
571 <dd>disable compute queue</dd>
572 <dt><code>nodcc</code></dt>
573 <dd>disable Delta Color Compression (DCC) on images</dd>
574 <dt><code>nodynamicbounds</code></dt>
575 <dd>do not check OOB access for dynamic descriptors</dd>
576 <dt><code>nofastclears</code></dt>
577 <dd>disable fast color/depthstencil clears</dd>
578 <dt><code>nohiz</code></dt>
579 <dd>disable HIZ for depthstencil images</dd>
580 <dt><code>noibs</code></dt>
581 <dd>disable directly recording command buffers in GPU-visible memory</dd>
582 <dt><code>noloadstoreopt</code></dt>
583 <dd>disable LLVM SILoadStoreOptimizer pass</dd>
584 <dt><code>nomemorycache</code></dt>
585 <dd>disable memory shaders cache</dd>
586 <dt><code>nongg</code></dt>
587 <dd>disable NGG for GFX10+</dd>
588 <dt><code>nooutoforder</code></dt>
589 <dd>disable out-of-order rasterization</dd>
590 <dt><code>noshaderballot</code></dt>
591 <dd>disable shader ballot</dd>
592 <dt><code>nothreadllvm</code></dt>
593 <dd>disable LLVM threaded compilation</dd>
594 <dt><code>preoptir</code></dt>
595 <dd>dump LLVM IR before any optimizations</dd>
596 <dt><code>shaders</code></dt>
597 <dd>dump shaders</dd>
598 <dt><code>shaderstats</code></dt>
599 <dd>dump shader statistics</dd>
600 <dt><code>spirv</code></dt>
601 <dd>dump SPIR-V</dd>
602 <dt><code>startup</code></dt>
603 <dd>display info at startup</dd>
604 <dt><code>syncshaders</code></dt>
605 <dd>synchronize shaders after all draws/dispatches</dd>
606 <dt><code>vmfaults</code></dt>
607 <dd>check for VM memory faults via dmesg</dd>
608 <dt><code>zerovram</code></dt>
609 <dd>initialize all memory allocated in VRAM as zero</dd>
610 </dl>
611 </dd>
612 <dt><code>RADV_FORCE_FAMILY</code></dt>
613 <dd>force the driver to use a specific family eg. gfx900 (developers only)</dd>
614 <dt><code>RADV_PERFTEST</code></dt>
615 <dd>a comma-separated list of named flags, which do various things:
616 <dl>
617 <dt><code>aco</code></dt>
618 <dd>enable ACO experimental compiler</dd>
619 <dt><code>bolist</code></dt>
620 <dd>enable the global BO list</dd>
621 <dt><code>cswave32</code></dt>
622 <dd>enable wave32 for compute shaders (GFX10+)</dd>
623 <dt><code>dccmsaa</code></dt>
624 <dd>enable DCC for MSAA images</dd>
625 <dt><code>dfsm</code></dt>
626 <dd>enable dfsm</dd>
627 <dt><code>gewave32</code></dt>
628 <dd>enable wave32 for vertex/tess/geometry shaders (GFX10+)</dd>
629 <dt><code>localbos</code></dt>
630 <dd>enable local BOs</dd>
631 <dt><code>pswave32</code></dt>
632 <dd>enable wave32 for pixel shaders (GFX10+)</dd>
633 <dt><code>shader_ballot</code></dt>
634 <dd>enable shader ballot</dd>
635 <dt><code>tccompatcmask</code></dt>
636 <dd>enable TC-compat cmask for MSAA images</dd>
637 </dl>
638 </dd>
639 <dt><code>RADV_SECURE_COMPILE_THREADS</code></dt>
640 <dd>maximum number of secure compile threads (up to 32)</dd>
641 <dt><code>RADV_TEX_ANISO</code></dt>
642 <dd>force anisotropy filter (up to 16)</dd>
643 <dt><code>RADV_TRACE_FILE</code></dt>
644 <dd>generate cmdbuffer tracefiles when a GPU hang is detected</dd>
645 </dl>
646
647 <h3>radeonsi driver environment variables</h3>
648 <dl>
649 <dt><code>AMD_DEBUG</code></dt>
650 <dd>a comma-separated list of named flags, which do various things:</dd>
651 <dl>
652 <dd></dd>
653 <h4>Disable features / workaround flags (useful to diagnose an issue):</h4>
654 <dt><code>nodma</code></dt>
655 <dd>Disable SDMA</dd>
656 <dt><code>nodmaclear</code></dt>
657 <dd>Disable SDMA clears</dd>
658 <dt><code>nodmacopyimage</code></dt>
659 <dd>Disable SDMA image copies</dd>
660 <dt><code>zerovram</code></dt>
661 <dd>Clear VRAM allocations.</dd>
662 <dt><code>nodcc</code></dt>
663 <dd>Disable DCC.</dd>
664 <dt><code>nodccclear</code></dt>
665 <dd>Disable DCC fast clear.</dd>
666 <dt><code>nodccfb</code></dt>
667 <dd>Disable separate DCC on the main framebuffer</dd>
668 <dt><code>nodccmsaa</code></dt>
669 <dd>Disable DCC for MSAA</dd>
670 <dt><code>nodpbb</code></dt>
671 <dd>Disable DPBB.</dd>
672 <dt><code>nodfsm</code></dt>
673 <dd>Disable DFSM.</dd>
674 <dt><code>notiling</code></dt>
675 <dd>Disable tiling</dd>
676 <dt><code>nofmask</code></dt>
677 <dd>Disable MSAA compression</dd>
678 <dt><code>nohyperz</code></dt>
679 <dd>Disable Hyper-Z</dd>
680 <dt><code>norbplus</code></dt>
681 <dd>Disable RB+.</dd>
682 <dt><code>no2d</code></dt>
683 <dd>Disable 2D tiling</dd>
684 <h4>Info flags:</h4>
685 <dt><code>info</code></dt>
686 <dd>Print driver information</dd>
687 <dt><code>tex</code></dt>
688 <dd>Print texture info</dd>
689 <dt><code>compute</code></dt>
690 <dd>Print compute info</dd>
691 <dt><code>vm</code></dt>
692 <dd>Print virtual addresses when creating resources</dd>
693 <h4>Print shaders flags:</h4>
694 <dt><code>vs</code></dt>
695 <dd>Print vertex shaders</dd>
696 <dt><code>ps</code></dt>
697 <dd>Print pixel shaders</dd>
698 <dt><code>gs</code></dt>
699 <dd>Print geometry shaders</dd>
700 <dt><code>tcs</code></dt>
701 <dd>Print tessellation control shaders</dd>
702 <dt><code>tes</code></dt>
703 <dd>Print tessellation evaluation shaders</dd>
704 <dt><code>cs</code></dt>
705 <dd>Print compute shaders</dd>
706 <dt><code>noir</code></dt>
707 <dd>Don't print the LLVM IR</dd>
708 <dt><code>nonir</code></dt>
709 <dd>Don't print NIR when printing shaders</dd>
710 <dt><code>noasm</code></dt>
711 <dd>Don't print disassembled shaders</dd>
712 <dt><code>preoptir</code></dt>
713 <dd>Print the LLVM IR before initial optimizations</dd>
714 <h4>Shader compilation tuning flags:</h4>
715 <dt><code>gisel</code></dt>
716 <dd>Enable LLVM global instruction selector.</dd>
717 <dt><code>w32ge</code></dt>
718 <dd>Use Wave32 for vertex, tessellation, and geometry shaders.</dd>
719 <dt><code>w32ps</code></dt>
720 <dd>Use Wave32 for pixel shaders.</dd>
721 <dt><code>w32cs</code></dt>
722 <dd>Use Wave32 for computes shaders.</dd>
723 <dt><code>w64ge</code></dt>
724 <dd>Use Wave64 for vertex, tessellation, and geometry shaders.</dd>
725 <dt><code>w64ps</code></dt>
726 <dd>Use Wave64 for pixel shaders.</dd>
727 <dt><code>w64cs</code></dt>
728 <dd>Use Wave64 for computes shaders.</dd>
729 <dt><code>checkir</code></dt>
730 <dd>Enable additional sanity checks on shader IR</dd>
731 <dt><code>mono</code></dt>
732 <dd>Use old-style monolithic shaders compiled on demand</dd>
733 <dt><code>nooptvariant</code></dt>
734 <dd>Disable compiling optimized shader variants.</dd>
735 <h4>Advanced usage flags:</h4>
736 <dt><code>forcedma</code></dt>
737 <dd>Use SDMA for all operations when possible.</dd>
738 <dt><code>nowc</code></dt>
739 <dd>Disable GTT write combining</dd>
740 <dt><code>check_vm</code></dt>
741 <dd>Check VM faults and dump debug info.</dd>
742 <dt><code>reserve_vmid</code></dt>
743 <dd>Force VMID reservation per context.</dd>
744 <dt><code>nogfx</code></dt>
745 <dd>Disable graphics. Only multimedia compute paths can be used.</dd>
746 <dt><code>nongg</code></dt>
747 <dd>Disable NGG and use the legacy pipeline.</dd>
748 <dt><code>nggc</code></dt>
749 <dd>Always use NGG culling even when it can hurt.</dd>
750 <dt><code>nonggc</code></dt>
751 <dd>Disable NGG culling.</dd>
752 <dt><code>alwayspd</code></dt>
753 <dd>Always enable the primitive discard compute shader.</dd>
754 <dt><code>pd</code></dt>
755 <dd>Enable the primitive discard compute shader for large draw calls.</dd>
756 <dt><code>nopd</code></dt>
757 <dd>Disable the primitive discard compute shader.</dd>
758 <dt><code>switch_on_eop</code></dt>
759 <dd>Program WD/IA to switch on end-of-packet.</dd>
760 <dt><code>nooutoforder</code></dt>
761 <dd>Disable out-of-order rasterization</dd>
762 <dt><code>dpbb</code></dt>
763 <dd>Enable DPBB.</dd>
764 <dt><code>dfsm</code></dt>
765 <dd>Enable DFSM.</dd>
766 </dl>
767
768 <p>
769 Other Gallium drivers have their own environment variables. These may change
770 frequently so the source code should be consulted for details.
771 </p>
772
773 </div>
774 </body>
775 </html>