meson: Add build option to specify default shader disk cache max-size
[platform/upstream/mesa.git] / meson_options.txt
1 # Copyright © 2017-2019 Intel Corporation
2
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to deal
5 # in the Software without restriction, including without limitation the rights
6 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 # copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
9
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
12
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 # SOFTWARE.
20
21 option(
22   'platforms',
23   type : 'array',
24   value : ['auto'],
25   choices : [
26     'auto', 'x11', 'wayland', 'haiku', 'android', 'windows',
27   ],
28   description : 'window systems to support. If this is set to `auto`, all platforms applicable will be enabled.'
29 )
30 option(
31   'android-stub',
32   type : 'boolean',
33   value : false,
34   description : 'Build against android-stub',
35 )
36
37 option(
38   'dri3',
39   type : 'combo',
40   value : 'auto',
41   choices : ['auto', 'true', 'false', 'disabled', 'enabled'],
42   description : 'enable support for dri3'
43 )
44 option(
45   'dri-drivers',
46   type : 'array',
47   value : ['auto'],
48   choices : ['auto', 'i915', 'i965', 'r100', 'r200', 'nouveau', 'swrast'],
49   description : 'List of dri drivers to build. If this is set to auto all drivers applicable to the target OS/architecture will be built'
50 )
51 option(
52   'dri-drivers-path',
53   type : 'string',
54   value : '',
55   description : 'Location to install dri drivers. Default: $libdir/dri.'
56 )
57 option(
58   'dri-search-path',
59   type : 'string',
60   value : '',
61   description : 'Locations to search for dri drivers, passed as colon separated list. Default: dri-drivers-path.'
62 )
63 option(
64   'gallium-drivers',
65   type : 'array',
66   value : ['auto'],
67   choices : [
68     'auto', 'kmsro', 'radeonsi', 'r300', 'r600', 'nouveau', 'freedreno',
69     'swrast', 'v3d', 'vc4', 'etnaviv', 'tegra', 'i915', 'svga', 'virgl',
70     'swr', 'panfrost', 'iris', 'lima', 'zink', 'd3d12'
71   ],
72   description : 'List of gallium drivers to build. If this is set to auto all drivers applicable to the target OS/architecture will be built'
73 )
74 option(
75   'gallium-extra-hud',
76   type : 'boolean',
77   value : false,
78   description : 'Enable HUD block/NIC I/O HUD status support',
79 )
80 option(
81   'gallium-vdpau',
82   type : 'combo',
83   value : 'auto',
84   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
85   description : 'enable gallium vdpau frontend.',
86 )
87 option(
88   'vdpau-libs-path',
89   type : 'string',
90   value : '',
91   description : 'path to put vdpau libraries. defaults to $libdir/vdpau.'
92 )
93 option(
94   'gallium-xvmc',
95   type : 'combo',
96   value : 'auto',
97   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
98   description : 'enable gallium xvmc frontend.',
99 )
100 option(
101   'xvmc-libs-path',
102   type : 'string',
103   value : '',
104   description : 'path to put xvmc libraries. defaults to $libdir.'
105 )
106 option(
107   'gallium-omx',
108   type : 'combo',
109   value : 'auto',
110   choices : ['auto', 'disabled', 'bellagio', 'tizonia'],
111   description : 'enable gallium omx frontend.',
112 )
113 option(
114   'omx-libs-path',
115   type : 'string',
116   value : '',
117   description : 'path to put omx libraries. defaults to omx-bellagio pkg-config pluginsdir.'
118 )
119 option(
120   'gallium-va',
121   type : 'combo',
122   value : 'auto',
123   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
124   description : 'enable gallium va frontend.',
125 )
126 option(
127   'va-libs-path',
128   type : 'string',
129   value : '',
130   description : 'path to put va libraries. defaults to $libdir/dri.'
131 )
132 option(
133   'gallium-xa',
134   type : 'combo',
135   value : 'auto',
136   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
137   description : 'enable gallium xa frontend.',
138 )
139 option(
140   'gallium-nine',
141   type : 'boolean',
142   value : false,
143   description : 'build gallium "nine" Direct3D 9.x frontend.',
144 )
145 option(
146   'gallium-opencl',
147   type : 'combo',
148   choices : ['icd', 'standalone', 'disabled'],
149   value : 'disabled',
150   description : 'build gallium "clover" OpenCL frontend.',
151 )
152 option(
153   'opencl-spirv',
154   type : 'boolean',
155   value : false,
156   description : 'build gallium "clover" OpenCL frontend with SPIR-V binary support.',
157 )
158 option(
159   'static-libclc',
160   type : 'array',
161   value : [],
162   choices : ['spirv', 'spirv64', 'all'],
163   description : 'Link libclc SPIR-V statically.',
164 )
165 option(
166   'd3d-drivers-path',
167   type : 'string',
168   value : '',
169   description : 'Location of D3D drivers. Default: $libdir/d3d',
170 )
171 option(
172   'vulkan-drivers',
173   type : 'array',
174   value : ['auto'],
175   choices : ['auto', 'amd', 'broadcom', 'freedreno', 'intel', 'swrast'],
176   description : 'List of vulkan drivers to build. If this is set to auto all drivers applicable to the target OS/architecture will be built'
177 )
178 option(
179   'freedreno-kgsl',
180   type : 'boolean',
181   value : false,
182   description : 'use kgsl backend for freedreno vulkan driver',
183 )
184 option(
185   'shader-cache',
186   type : 'combo',
187   value : 'auto',
188   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
189   description : 'Build with on-disk shader cache support.',
190 )
191 option(
192   'shader-cache-default',
193   type : 'boolean',
194   value : true,
195   description : 'If set to false, the feature is only activated when environment variable MESA_GLSL_CACHE_DISABLE is set to false',
196 )
197 option(
198   'shader-cache-max-size',
199   type : 'string',
200   value : '',
201   description : 'Default value for MESA_GLSL_CACHE_MAX_SIZE enviroment variable. 
202    If set, determines the maximum size of the on-disk cache of compiled
203    GLSL programs, can be overriden by enviroment variable if needed. Should be set to a number optionally followed by
204    ``K``, ``M``, or ``G`` to specify a size in kilobytes, megabytes, or
205    gigabytes. By default, gigabytes will be assumed. And if unset, a
206    maximum size of 1GB will be used.'
207 )
208 option(
209   'vulkan-icd-dir',
210   type : 'string',
211   value : '',
212   description : 'Location relative to prefix to put vulkan icds on install. Default: $datadir/vulkan/icd.d'
213 )
214 option(
215   'vulkan-overlay-layer',
216   type : 'boolean',
217   value : false,
218   description : 'Whether to build the vulkan overlay layer'
219 )
220 option(
221   'vulkan-device-select-layer',
222   type : 'boolean',
223   value : false,
224   description : 'Whether to build the vulkan device select layer'
225 )
226 option(
227   'shared-glapi',
228   type : 'combo',
229   value : 'auto',
230   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
231   description : 'Whether to build a shared or static glapi. Defaults to false on Windows, true elsewhere'
232 )
233 option(
234   'gles1',
235   type : 'combo',
236   value : 'auto',
237   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
238   description : 'Build support for OpenGL ES 1.x'
239 )
240 option(
241   'gles2',
242   type : 'combo',
243   value : 'auto',
244   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
245   description : 'Build support for OpenGL ES 2.x and 3.x'
246 )
247 option(
248   'opengl',
249   type : 'boolean',
250   value : true,
251   description : 'Build support for OpenGL (all versions)'
252 )
253 option(
254   'gbm',
255   type : 'combo',
256   value : 'auto',
257   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
258   description : 'Build support for gbm platform'
259 )
260 option(
261   'glx',
262   type : 'combo',
263   value : 'auto',
264   choices : ['auto', 'disabled', 'dri', 'xlib', 'gallium-xlib'],
265   description : 'Build support for GLX platform'
266 )
267 option(
268   'egl',
269   type : 'combo',
270   value : 'auto',
271   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
272   description : 'Build support for EGL platform'
273 )
274 option(
275   'glvnd',
276   type : 'boolean',
277   value : false,
278   description : 'Enable GLVND support.'
279 )
280 option(
281   'microsoft-clc',
282   type : 'feature',
283   value : 'auto',
284   description : 'Build support for the Microsoft CLC to DXIL compiler'
285 )
286 option(
287    'glx-read-only-text',
288    type : 'boolean',
289    value : false,
290    description : 'Disable writable .text section on x86 (decreases performance)'
291 )
292 option(
293   'llvm',
294   type : 'combo',
295   value : 'auto',
296   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
297   description : 'Build with LLVM support.'
298 )
299 option(
300   'shared-llvm',
301   type : 'combo',
302   value : 'auto',
303   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
304   description : 'Whether to link LLVM shared or statically.'
305 )
306 option(
307   'valgrind',
308   type : 'combo',
309   value : 'auto',
310   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
311   description : 'Build with valgrind support'
312 )
313 option(
314   'libunwind',
315   type : 'combo',
316   value : 'auto',
317   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
318   description : 'Use libunwind for stack-traces'
319 )
320 option(
321   'lmsensors',
322   type : 'combo',
323   value : 'auto',
324   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
325   description : 'Enable HUD lmsensors support.'
326 )
327 option(
328   'build-tests',
329   type : 'boolean',
330   value : false,
331   description : 'Build unit tests. Currently this will build *all* unit tests except the ACO tests, which may build more than expected.'
332 )
333 option(
334   'build-aco-tests',
335   type : 'boolean',
336   value : false,
337   description : 'Build ACO tests. These require RADV and glslang but not an AMD GPU.'
338 )
339 option(
340   'install-intel-gpu-tests',
341   type : 'boolean',
342   value : false,
343   description : 'Build and install Intel unit tests which require the GPU.  This option is for developers and the Intel CI system only.'
344 )
345 option(
346   'selinux',
347   type : 'boolean',
348   value : false,
349   description : 'Build an SELinux-aware Mesa'
350 )
351 option(
352   'osmesa',
353   type : 'combo',
354   value : 'none',
355   choices : ['none', 'classic', 'gallium'],
356   description : 'Build OSmesa.'
357 )
358 option(
359   'osmesa-bits',
360   type : 'combo',
361   value : '8',
362   choices : ['8', '16', '32'],
363   description : 'Number of channel bits for OSMesa.'
364 )
365 option(
366   'swr-arches',
367   type : 'array',
368   value : ['avx', 'avx2'],
369   choices : ['avx', 'avx2', 'knl', 'skx'],
370   description : 'Architectures to build SWR support for.',
371 )
372 option(
373   'shared-swr',
374   type : 'boolean',
375   value : true,
376   description : 'Whether to link SWR shared or statically.',
377 )
378
379 option(
380   'tools',
381   type : 'array',
382   value : [],
383   choices : ['drm-shim', 'etnaviv', 'freedreno', 'glsl', 'intel', 'intel-ui', 'nir', 'nouveau', 'xvmc', 'lima', 'panfrost', 'all'],
384   description : 'List of tools to build. (Note: `intel-ui` selects `intel`)',
385 )
386 option(
387   'power8',
388   type : 'combo',
389   value : 'auto',
390   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
391   description : 'Enable power8 optimizations.',
392 )
393 option(
394   'xlib-lease',
395   type : 'combo',
396   value : 'auto',
397   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
398   description : 'Enable VK_EXT_acquire_xlib_display.'
399 )
400 option(
401   'glx-direct',
402   type : 'boolean',
403   value : true,
404   description : 'Enable direct rendering in GLX and EGL for DRI',
405 )
406 option(
407   'prefer-iris',
408   type : 'boolean',
409   value : true,
410   description : 'Prefer new Intel iris driver over older i965 driver'
411 )
412 option('egl-lib-suffix',
413   type : 'string',
414   value : '',
415   description : 'Suffix to append to EGL library name.  Default: none.'
416 )
417 option(
418   'gles-lib-suffix',
419   type : 'string',
420   value : '',
421   description : 'Suffix to append to GLES library names.  Default: none.'
422 )
423 option(
424   'platform-sdk-version',
425   type : 'integer',
426   min : 25,
427   max : 28,
428   value : 25,
429   description : 'Android Platform SDK version. Default: Nougat version.'
430 )
431 option(
432   'zstd',
433   type : 'combo',
434   choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
435   value : 'auto',
436   description : 'Use ZSTD instead of ZLIB in some cases.'
437 )