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