nir: unify lower_bitfield_extract with has_bfe
[platform/upstream/mesa.git] / meson_options.txt
1 # Copyright © 2017-2019 Intel Corporation
2 # SPDX-License-Identifier: MIT
3
4 option(
5   'platforms',
6   type : 'array',
7   value : ['auto'],
8   choices : [
9     'auto', 'x11', 'wayland', 'haiku', 'android', 'windows',
10   ],
11   description : 'window systems to support. If this is set to `auto`, all ' +
12                 'platforms applicable will be enabled.'
13 )
14
15 option(
16   'egl-native-platform',
17   type : 'combo',
18   value : 'auto',
19   choices : [
20     'auto', 'x11', 'wayland', 'haiku', 'android', 'windows',
21     'surfaceless', 'drm',
22   ],
23   description : 'the window system EGL assumes for EGL_DEFAULT_DISPLAY',
24 )
25
26 option(
27   'android-stub',
28   type : 'boolean',
29   value : false,
30   description : 'Build against android-stub',
31 )
32
33 option(
34   'android-libbacktrace',
35   type : 'feature',
36   description : 'Use Android\'s libbacktrace',
37 )
38
39 option(
40   'dri3',
41   type : 'feature',
42   deprecated: {'true': 'enabled', 'false': 'disabled'},
43   description : 'enable support for dri3'
44 )
45
46 option(
47   'dri-drivers-path',
48   type : 'string',
49   value : '',
50   description : 'Location to install dri drivers. Default: $libdir/dri.'
51 )
52
53 option(
54   'dri-search-path',
55   type : 'string',
56   value : '',
57   description : 'Locations to search for dri drivers, passed as colon ' +
58                 'separated list. Default: dri-drivers-path.'
59 )
60
61 option(
62   'expat',
63   type : 'feature',
64   value : 'auto',
65   description : 'Controls the use of expat. ' +
66                 'Cannot be disabled if xmlconfig is enabled.'
67 )
68
69 option(
70   'gallium-drivers',
71   type : 'array',
72   value : ['auto'],
73   choices : [
74     'auto', 'kmsro', 'radeonsi', 'r300', 'r600', 'nouveau', 'freedreno',
75     'swrast', 'v3d', 'vc4', 'etnaviv', 'tegra', 'i915', 'svga', 'virgl',
76     'panfrost', 'iris', 'lima', 'zink', 'd3d12', 'asahi', 'crocus'
77   ],
78   description : 'List of gallium drivers to build. If this is set to auto ' +
79                 'all drivers applicable to the target OS/architecture ' +
80                 'will be built'
81 )
82
83 option(
84   'gallium-extra-hud',
85   type : 'boolean',
86   value : false,
87   description : 'Enable HUD block/NIC I/O HUD status support',
88 )
89
90 option(
91   'gallium-vdpau',
92   type : 'feature',
93   deprecated: {'true': 'enabled', 'false': 'disabled'},
94   description : 'enable gallium vdpau frontend.',
95 )
96
97 option(
98   'vdpau-libs-path',
99   type : 'string',
100   value : '',
101   description : 'path to put vdpau libraries. defaults to $libdir/vdpau.'
102 )
103
104 option(
105   'gallium-omx',
106   type : 'combo',
107   value : 'auto',
108   choices : ['auto', 'disabled', 'bellagio', 'tizonia'],
109   description : 'enable gallium omx frontend.',
110 )
111
112 option(
113   'omx-libs-path',
114   type : 'string',
115   value : '',
116   description : 'path to put omx libraries. defaults to omx-bellagio ' +
117                 'pkg-config pluginsdir.'
118 )
119
120 option(
121   'gallium-va',
122   type : 'feature',
123   deprecated: {'true': 'enabled', 'false': 'disabled'},
124   description : 'enable gallium va frontend.',
125 )
126
127 option(
128   'va-libs-path',
129   type : 'string',
130   value : '',
131   description : 'path to put va libraries. defaults to $libdir/dri.'
132 )
133
134 option(
135   'gallium-xa',
136   type : 'feature',
137   deprecated: {'true': 'enabled', 'false': 'disabled'},
138   description : 'enable gallium xa frontend.',
139 )
140
141 option(
142   'gallium-nine',
143   type : 'boolean',
144   value : false,
145   description : 'build gallium "nine" Direct3D 9.x frontend.',
146 )
147
148 option(
149   'gallium-d3d10umd',
150   type : 'boolean',
151   value : false,
152   description : 'build gallium D3D10 WDDM UMD frontend.',
153 )
154
155 option(
156   'gallium-opencl',
157   type : 'combo',
158   choices : ['icd', 'standalone', 'disabled'],
159   value : 'disabled',
160   description : 'build gallium "clover" OpenCL frontend.',
161 )
162
163 option(
164   'gallium-rusticl',
165   type : 'boolean',
166   value : false,
167   description : 'build gallium "rusticl" OpenCL frontend.',
168 )
169
170 option(
171   'gallium-windows-dll-name',
172   type : 'string',
173   value : 'libgallium_wgl',
174   description : 'name of gallium megadriver DLL built for Windows. ' +
175                 'defaults to libgallium_wgl.dll to match DRI',
176 )
177
178 option(
179   'opencl-spirv',
180   type : 'boolean',
181   value : false,
182   description : 'build gallium "clover" OpenCL frontend with SPIR-V ' +
183                 'binary support.',
184 )
185
186 option(
187   'static-libclc',
188   type : 'array',
189   value : [],
190   choices : ['spirv', 'spirv64', 'all'],
191   description : 'Link libclc SPIR-V statically.',
192 )
193
194 option(
195   'opencl-external-clang-headers',
196   type : 'feature',
197   description : 'Use system Clang headers at runtime for OpenCL kernel ' +
198                 'compilation.',
199 )
200
201 option(
202   'd3d-drivers-path',
203   type : 'string',
204   value : '',
205   description : 'Location of D3D drivers. Default: $libdir/d3d',
206 )
207
208 option(
209   'vulkan-drivers',
210   type : 'array',
211   value : ['auto'],
212   choices : ['auto', 'amd', 'broadcom', 'freedreno', 'intel', 'intel_hasvk',
213              'panfrost', 'swrast', 'virtio', 'imagination-experimental',
214              'microsoft-experimental', 'nouveau-experimental'],
215   description : 'List of vulkan drivers to build. If this is set to auto ' +
216                 'all drivers applicable to the target OS/architecture ' +
217                 'will be built'
218 )
219
220 # Note that currently turnip supports msm and kgsl, while the gallium driver
221 # support msm and virtio.  This is a temporary situation with virtio support
222 # for turnip and kgsl support for gallium planned/in-progress.
223 option(
224   'freedreno-kmds',
225   type : 'array',
226   value : ['msm'],
227   choices : ['msm', 'kgsl', 'virtio'],
228   description : 'List of kernel-mode drivers to enable for freedreno ' +
229                 'gallium and vulkan driver',
230 )
231
232 option(
233   'imagination-srv',
234   type : 'boolean',
235   value : false,
236   description : 'Enable Services backend for Imagination Technologies ' +
237                 'vulkan driver',
238 )
239
240 option(
241   'shader-cache',
242   type : 'feature',
243   deprecated: {'true': 'enabled', 'false': 'disabled'},
244   description : 'Build with on-disk shader cache support.',
245 )
246
247 option(
248   'shader-cache-default',
249   type : 'boolean',
250   value : true,
251   description : 'If set to false, the feature is only activated when ' +
252                 'environment variable MESA_SHADER_CACHE_DISABLE is set ' +
253                 'to false',
254 )
255
256 option(
257   'shader-cache-max-size',
258   type : 'string',
259   value : '',
260   description : 'Default value for MESA_SHADER_CACHE_MAX_SIZE enviroment ' +
261                 'variable. If set, determines the maximum size of the ' +
262                 'on-disk cache of compiled shader programs, can be overriden ' +
263                 'by enviroment variable if needed. Should be set to a number ' +
264                 'optionally followed by ``K``, ``M``, or ``G`` to specify ' +
265                 'a size in kilobytes, megabytes, or gigabytes. By default, ' +
266                 'gigabytes will be assumed. And if unset, a maximum size of ' +
267                 '1GB will be used.'
268 )
269
270 option(
271   'vulkan-icd-dir',
272   type : 'string',
273   value : '',
274   description : 'Location relative to prefix to put vulkan icds on install. ' +
275                 'Default: $datadir/vulkan/icd.d'
276 )
277
278 option(
279   'moltenvk-dir',
280   type : 'string',
281   value : '',
282   description : 'Location of the MoltenVk SDK. Default: '
283 )
284
285 option(
286   'vulkan-layers',
287   type : 'array',
288   value : [],
289   choices : ['device-select', 'intel-nullhw', 'overlay'],
290   description : 'List of vulkan layers to build'
291 )
292
293 option(
294   'shared-glapi',
295   type : 'feature',
296   deprecated: {'true': 'enabled', 'false': 'disabled'},
297   description : 'Whether to build a shared or static glapi. Defaults to ' +
298                 'disabled on Windows, enabled elsewhere'
299 )
300
301 option(
302   'gles1',
303   type : 'feature',
304   deprecated: {'true': 'enabled', 'false': 'disabled'},
305   description : 'Build support for OpenGL ES 1.x'
306 )
307
308 option(
309   'gles2',
310   type : 'feature',
311   deprecated: {'true': 'enabled', 'false': 'disabled'},
312   description : 'Build support for OpenGL ES 2.x and 3.x'
313 )
314
315 option(
316   'opengl',
317   type : 'boolean',
318   value : true,
319   description : 'Build support for desktop OpenGL'
320 )
321
322 option(
323   'gbm',
324   type : 'feature',
325   deprecated: {'true': 'enabled', 'false': 'disabled'},
326   description : 'Build support for gbm platform'
327 )
328
329 option(
330   'gbm-backends-path',
331   type : 'string',
332   value : '',
333   description : 'Locations to search for gbm backends, passed as colon ' +
334                 'separated list. Default: $libdir/gbm.'
335 )
336
337 option(
338   'glx',
339   type : 'combo',
340   value : 'auto',
341   choices : ['auto', 'disabled', 'dri', 'xlib'],
342   description : 'Build support for GLX platform'
343 )
344
345 option(
346   'egl',
347   type : 'feature',
348   deprecated: {'true': 'enabled', 'false': 'disabled'},
349   description : 'Build support for EGL platform'
350 )
351
352 option(
353   'glvnd',
354   type : 'boolean',
355   value : false,
356   description : 'Enable GLVND support.'
357 )
358
359 option(
360   'microsoft-clc',
361   type : 'feature',
362   value : 'auto',
363   deprecated: {'true': 'enabled', 'false': 'disabled'},
364   description : 'Build support for the Microsoft CLC to DXIL compiler'
365 )
366
367 option(
368   'spirv-to-dxil',
369   type : 'boolean',
370   value : false,
371   description : 'Build support for the SPIR-V to DXIL library'
372 )
373
374 option(
375   'glvnd-vendor-name',
376   type : 'string',
377   value : 'mesa',
378   description : 'Vendor name string to use for glvnd libraries'
379 )
380
381 option(
382    'glx-read-only-text',
383    type : 'boolean',
384    value : false,
385    description : 'Disable writable .text section on x86 (decreases performance)'
386 )
387
388 option(
389   'llvm',
390   type : 'feature',
391   deprecated: {'true': 'enabled', 'false': 'disabled'},
392   description : 'Build with LLVM support.'
393 )
394
395 option(
396   'shared-llvm',
397   type : 'feature',
398   deprecated: {'true': 'enabled', 'false': 'disabled'},
399   description : 'Whether to link LLVM shared or statically.'
400 )
401
402 option(
403   'draw-use-llvm',
404   type : 'boolean',
405   value : true,
406   description : 'Whether to use LLVM for the Gallium draw module, if LLVM ' +
407                 'is included.'
408 )
409
410 option(
411   'valgrind',
412   type : 'feature',
413   deprecated: {'true': 'enabled', 'false': 'disabled'},
414   description : 'Build with valgrind support'
415 )
416
417 option(
418   'libunwind',
419   type : 'feature',
420   deprecated: {'true': 'enabled', 'false': 'disabled'},
421   description : 'Use libunwind for stack-traces'
422 )
423
424 option(
425   'lmsensors',
426   type : 'feature',
427   deprecated: {'true': 'enabled', 'false': 'disabled'},
428   description : 'Enable HUD lmsensors support.'
429 )
430
431 option(
432   'build-tests',
433   type : 'boolean',
434   value : false,
435   description : 'Build unit tests. Currently this will build *all* unit ' +
436                 'tests except the ACO tests, which may build more than expected.'
437 )
438
439 option(
440   'enable-glcpp-tests',
441   type : 'boolean',
442   value : true,
443   description : 'Build glcpp unit tests. These are flaky on CI.'
444 )
445
446 option(
447   'build-aco-tests',
448   type : 'boolean',
449   value : false,
450   description : 'Build ACO tests. These require RADV and glslang but not ' +
451                 'an AMD GPU.'
452 )
453
454 option(
455   'install-intel-gpu-tests',
456   type : 'boolean',
457   value : false,
458   description : 'Build and install Intel unit tests which require the GPU. ' +
459                 'This option is for developers and the Intel CI system only.'
460 )
461
462 option(
463   'selinux',
464   type : 'boolean',
465   value : false,
466   description : 'Build an SELinux-aware Mesa.  This currently disables ' +
467                 'execmem support at runtime unless SELinux is configured ' +
468                 'with allow_execmem.'
469 )
470
471 option(
472   'execmem',
473   type : 'boolean',
474   deprecated : true,
475   description : 'Does nothing, left here for a while to avoid build breakages.',
476 )
477
478 option(
479   'osmesa',
480   type : 'boolean',
481   value : false,
482   description : 'Build OSmesa.'
483 )
484
485 option(
486   'tools',
487   type : 'array',
488   value : [],
489   choices : ['drm-shim', 'etnaviv', 'freedreno', 'glsl', 'intel', 'intel-ui',
490              'nir', 'nouveau', 'lima', 'panfrost', 'asahi', 'imagination',
491              'all', 'dlclose-skip'],
492   description : 'List of tools to build. (Note: `intel-ui` selects `intel`)',
493 )
494
495 option(
496   'power8',
497   type : 'feature',
498   deprecated: {'true': 'enabled', 'false': 'disabled'},
499   description : 'Enable power8 optimizations.',
500 )
501
502 option(
503   'xlib-lease',
504   type : 'feature',
505   deprecated: {'true': 'enabled', 'false': 'disabled'},
506   description : 'Enable VK_EXT_acquire_xlib_display.'
507 )
508
509 option(
510   'glx-direct',
511   type : 'boolean',
512   value : true,
513   description : 'Enable direct rendering in GLX and EGL for DRI',
514 )
515
516 option('egl-lib-suffix',
517   type : 'string',
518   value : '',
519   description : 'Suffix to append to EGL library name.  Default: none.'
520 )
521
522 option(
523   'gles-lib-suffix',
524   type : 'string',
525   value : '',
526   description : 'Suffix to append to GLES library names.  Default: none.'
527 )
528
529 option(
530   'platform-sdk-version',
531   type : 'integer',
532   min : 25,
533   max : 10000,
534   value : 25,
535   description : 'Android Platform SDK version. Default: Nougat version.'
536 )
537
538 option(
539    'allow-kcmp',
540    type : 'feature',
541   deprecated: {'true': 'enabled', 'false': 'disabled'},
542    description : 'Allow using KCMP_FILE to compare file descriptions. ' +
543                  'auto = allowed everywhere except on Android'
544 )
545
546 option(
547   'zstd',
548   type : 'feature',
549   deprecated: {'true': 'enabled', 'false': 'disabled'},
550   description : 'Use ZSTD instead of ZLIB in some cases.'
551 )
552
553 option(
554    'zlib',
555    type : 'feature',
556    deprecated: {'true': 'enabled', 'false': 'disabled'},
557    value : 'enabled',
558    description : 'Use ZLIB to build driver. Default: enabled'
559 )
560
561 option(
562   'sse2',
563   type : 'boolean',
564   value : true,
565   description : 'use msse2 flag for x86. Uses sse/sse2 instead of x87. Default: true',
566 )
567
568 option(
569   'perfetto',
570   type : 'boolean',
571   value : false,
572   description : 'Enable performance analysis with Perfetto. Default: false'
573 )
574
575 option(
576   'datasources',
577   type : 'array',
578   value : ['auto'],
579   choices : ['auto', 'panfrost', 'intel', 'freedreno'],
580   description : 'List of Perfetto datasources to build. If this is set to ' +
581                 '`auto`, datasources that can not be build are skipped. ' +
582                 'Default: [`auto`]'
583 )
584
585 option(
586   'gpuvis',
587   type : 'boolean',
588   value : false,
589   description : 'Enable tracing markers for gpuvis. Default: false'
590 )
591
592 option(
593   'custom-shader-replacement',
594   type : 'string',
595   value : '',
596   description : 'Enable a custom shader replacement mechanism. Note that ' +
597                 'enabling this option requires adding/generating a ' +
598                 'shader_replacement.h file that can be included (see ' +
599                 'shaderapi.c).'
600 )
601
602 option(
603   'vmware-mks-stats',
604   type : 'boolean',
605   value : false,
606   description : 'Build gallium VMware/svga driver with mksGuestStats ' +
607                 'instrumentation.'
608 )
609
610 option(
611   'vulkan-beta',
612   type : 'boolean',
613   value : false,
614   description : 'Build vulkan drivers with BETA extensions enabled.'
615 )
616
617 option(
618   'intel-clc',
619   type : 'feature',
620   deprecated: {'true': 'enabled', 'false': 'disabled'},
621   value : 'disabled',
622   description : 'Build the intel-clc compiler (enables Vulkan Intel ' +
623                 'Ray Tracing on supported hardware).'
624 )
625
626 option(
627   'video-codecs',
628   type : 'array',
629   value : [],
630   choices: [
631     'vc1dec', 'h264dec', 'h264enc', 'h265dec', 'h265enc'
632   ],
633   description : 'List of patent encumbered codecs to build support for. ' +
634                 'Distros might want to consult their legal department before ' +
635                 'enabling these. This is used for all video APIs (vaapi, ' +
636                 'vdpau, vulkan). Non-patent encumbered codecs will be ' +
637                 'enabled by default.'
638 )
639
640 option(
641   'gallium-d3d12-video',
642   type : 'feature',
643   value : 'auto',
644   deprecated: {'true': 'enabled', 'false': 'disabled'},
645   description : 'build gallium d3d12 with video support.',
646 )
647
648 option(
649   'radv-build-id',
650   type : 'string',
651   value : '',
652   description : 'Override build id for shader cache keys (hex string). ' +
653                 'Can be extracted with readelf -x .note.gnu.build-id'
654 )
655
656 option(
657   'min-windows-version',
658   type : 'integer',
659   min : 7,
660   max : 11,
661   value : 8,
662   description : 'Minimum Windows version to support. Defaults to Windows 8.'
663 )
664
665 option(
666   'xmlconfig',
667   type : 'feature',
668   value : 'auto',
669   deprecated: {'true': 'enabled', 'false': 'disabled'},
670   description : 'Build custom xmlconfig (driconf) support. If disabled, ' +
671                 'the default driconf file is hardcoded into Mesa. ' +
672                 'Requires expat.'
673 )
674
675 option (
676   'intel-xe-kmd',
677   type : 'feature',
678   value : 'disabled',
679   description: 'Enable Intel Xe KMD support.'
680 )
681
682 option(
683   'nvk-legacy-uapi',
684   type : 'boolean',
685   value : 'false',
686   description : 'Build support for legacy kernel uAPI.'
687 )