]> rtime.felk.cvut.cz Git - coffee/buildroot.git/blob - package/mesa3d/Config.in
package/mesa3d: add dependency on elfutils for R600 with LLVM
[coffee/buildroot.git] / package / mesa3d / Config.in
1 menuconfig BR2_PACKAGE_MESA3D
2         bool "mesa3d"
3         depends on BR2_INSTALL_LIBSTDCPP
4         depends on !BR2_STATIC_LIBS
5         depends on BR2_TOOLCHAIN_HAS_SYNC_1
6         depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
7         select BR2_PACKAGE_LIBDRM
8         select BR2_PACKAGE_EXPAT
9         select BR2_PACKAGE_HAS_LIBGL if BR2_PACKAGE_XORG7
10         select BR2_PACKAGE_WAYLAND_PROTOCOLS if BR2_PACKAGE_WAYLAND
11         select BR2_PACKAGE_XPROTO_DRI2PROTO if BR2_PACKAGE_XORG7
12         select BR2_PACKAGE_XPROTO_GLPROTO if BR2_PACKAGE_XORG7
13         select BR2_PACKAGE_XPROTO_XF86DRIPROTO if BR2_PACKAGE_XORG7
14         select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7
15         select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7
16         select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XORG7
17         select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XORG7
18         select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7
19         select BR2_PACKAGE_ZLIB
20         help
21           Mesa 3D, an open-source implementation of the OpenGL
22           specification.
23
24           http://mesa3d.org
25
26 if BR2_PACKAGE_MESA3D
27
28 config BR2_PACKAGE_MESA3D_LLVM
29         bool "llvm support"
30         depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
31         depends on BR2_HOST_GCC_AT_LEAST_4_8
32         depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
33         depends on BR2_TOOLCHAIN_HAS_THREADS
34         depends on BR2_INSTALL_LIBSTDCPP
35         depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::shared_future
36         depends on !BR2_STATIC_LIBS
37         depends on BR2_USE_WCHAR # std::wstring
38         select BR2_PACKAGE_LLVM
39
40 comment "llvm support needs a toolchain w/ wchar, threads, C++, gcc >= 4.8, host gcc >= 4.8, dynamic library"
41         depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
42         depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \
43                 !BR2_HOST_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 \
44                 || BR2_STATIC_LIBS || !BR2_USE_WCHAR
45
46 comment "llvm support needs a toolchain not affected by GCC bug 64735"
47         depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
48         depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
49
50 # inform the .mk file of gallium, dri or vulkan driver selection
51 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
52         bool
53         select BR2_PACKAGE_MESA3D_DRIVER
54
55 config BR2_PACKAGE_MESA3D_DRI_DRIVER
56         bool
57         select BR2_PACKAGE_MESA3D_DRIVER
58         # xlib-libxshmfence needs sync_4, so we cannot select it if
59         # BR2_TOOLCHAIN_HAS_SYNC_4 is false. xproto-presentproto
60         # doesn't need sync_4, but it is only needed in conjunction
61         # with xlib-libxshmfence and dri3proto to provide dri3
62         # support, so we also only select it if sync_4 is available.
63         select BR2_PACKAGE_XLIB_LIBXSHMFENCE if \
64                 (BR2_PACKAGE_XPROTO_DRI3PROTO && BR2_TOOLCHAIN_HAS_SYNC_4)
65         select BR2_PACKAGE_XPROTO_PRESENTPROTO if \
66                 (BR2_PACKAGE_XPROTO_DRI3PROTO && BR2_TOOLCHAIN_HAS_SYNC_4)
67
68 config BR2_PACKAGE_MESA3D_VULKAN_DRIVER
69         bool
70         select BR2_PACKAGE_MESA3D_DRIVER
71
72 config BR2_PACKAGE_MESA3D_DRIVER
73         bool
74
75 config BR2_PACKAGE_MESA3D_NEEDS_XA
76         bool
77
78 comment "Gallium drivers"
79
80 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV
81         bool "Gallium Etnaviv driver"
82         select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
83         select BR2_PACKAGE_LIBDRM_ETNAVIV
84         select BR2_PACKAGE_MESA3D_OPENGL_EGL
85         help
86           Mesa driver for Vivante GPUs.
87
88 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
89         bool "Gallium nouveau driver"
90         depends on BR2_i386 || BR2_x86_64
91         select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
92         select BR2_PACKAGE_LIBDRM_NOUVEAU
93         select BR2_PACKAGE_MESA3D_NEEDS_XA
94         help
95           Supports all Nvidia GPUs.
96
97 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600
98         bool "Gallium Radeon R600 driver"
99         depends on BR2_i386 || BR2_x86_64
100         depends on !BR2_PACKAGE_MESA3D_LLVM || \
101                 (BR2_PACKAGE_MESA3D_LLVM && (BR2_TOOLCHAIN_USES_UCLIBC || \
102                         BR2_TOOLCHAIN_USES_GLIBC)) # elfutils
103         select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
104         select BR2_PACKAGE_LIBDRM_RADEON
105         select BR2_PACKAGE_LLVM_AMDGPU if BR2_PACKAGE_MESA3D_LLVM
106         select BR2_PACKAGE_ELFUTILS if BR2_PACKAGE_MESA3D_LLVM
107         select BR2_PACKAGE_MESA3D_NEEDS_XA
108         help
109           Driver for ATI/AMD Radeon R600/R700/HD5000/HD6000 GPUs.
110
111 # R600 needs libelf when Mesa3D is built with LLVM support
112 # musl is not currently compatible with elfutils
113 comment "R600 driver needs a uClibc or glibc toolchain when llvm is enabled"
114         depends on BR2_PACKAGE_MESA3D_LLVM
115         depends on !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC)
116
117 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA
118         bool "Gallium vmware svga driver"
119         depends on BR2_i386 || BR2_x86_64
120         select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
121         select BR2_PACKAGE_LIBDRM_VMWGFX
122         select BR2_PACKAGE_MESA3D_NEEDS_XA
123         help
124           This is a virtual GPU driver for VMWare virtual machines.
125
126 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST
127         bool "Gallium swrast driver"
128         select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
129         help
130           This is a software opengl implementation using the Gallium3D
131           infrastructure.
132
133 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
134         bool "Gallium vc4 driver"
135         depends on BR2_ARM_CPU_HAS_NEON || BR2_aarch64
136         select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
137         select BR2_PACKAGE_LIBDRM_VC4
138         select BR2_PACKAGE_MESA3D_NEEDS_XA
139         select BR2_PACKAGE_MESA3D_OPENGL_EGL
140         help
141           Driver for Broadcom VC4 (rpi2/3) GPUs.
142           It requires a vanilla 4.5+ kernel with drm vc4 (open) support.
143
144 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL
145         bool "Gallium virgl driver"
146         select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
147         select BR2_PACKAGE_MESA3D_OPENGL_EGL
148         help
149           virgl is the 3D acceleration backend for the virtio-gpu
150           shipping with qemu.
151
152 comment "DRI drivers"
153
154 config BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST
155         bool "DRI swrast driver"
156         select BR2_PACKAGE_MESA3D_DRI_DRIVER
157         help
158           This is a software opengl implementation using the DRI
159           infrastructure.
160
161 config BR2_PACKAGE_MESA3D_DRI_DRIVER_I915
162         bool "DRI i915 driver"
163         depends on BR2_i386 || BR2_x86_64
164         select BR2_PACKAGE_MESA3D_DRI_DRIVER
165         select BR2_PACKAGE_LIBDRM_INTEL
166         help
167           Support for i915-based Intel GPUs.
168
169 config BR2_PACKAGE_MESA3D_DRI_DRIVER_I965
170         bool "DRI i965 driver"
171         depends on BR2_i386 || BR2_x86_64
172         select BR2_PACKAGE_MESA3D_DRI_DRIVER
173         select BR2_PACKAGE_LIBDRM_INTEL
174         help
175           Support for i965-based Intel GPUs.
176
177 config BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU
178         bool "DRI nouveau driver"
179         select BR2_PACKAGE_MESA3D_DRI_DRIVER
180         select BR2_PACKAGE_LIBDRM_NOUVEAU
181         help
182           Support for Nvidia-based GPUs.
183
184 config BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON
185         bool "DRI radeon driver"
186         select BR2_PACKAGE_MESA3D_DRI_DRIVER
187         select BR2_PACKAGE_LIBDRM_RADEON
188         help
189           Legacy Radeon driver for R100 series GPUs.
190
191 comment "Vulkan drivers"
192
193 config BR2_PACKAGE_MESA3D_VULKAN_DRIVER_INTEL
194         bool "Vulkan Intel driver"
195         depends on BR2_i386 || BR2_x86_64
196         depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 # memfd.h
197         depends on BR2_TOOLCHAIN_USES_GLIBC # ifunc, static_assert
198         depends on BR2_PACKAGE_XORG7 # xproto_dri3proto
199         select BR2_PACKAGE_MESA3D_VULKAN_DRIVER
200         select BR2_PACKAGE_XPROTO_DRI3PROTO
201         help
202           Vulkan driver for Intel hardware from Ivy Bridge onward.
203
204 comment "intel vulkan depends on X.org and needs a glibc toolchain w/ headers >= 3.18"
205         depends on BR2_i386 || BR2_x86_64
206         depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 || \
207                 !BR2_TOOLCHAIN_USES_GLIBC || !BR2_PACKAGE_XORG7
208
209 comment "Off-screen Rendering"
210
211 config BR2_PACKAGE_MESA3D_OSMESA
212         bool "OSMesa library"
213         help
214           The OSMesa API provides functions for making off-screen
215           renderings.
216
217 if BR2_PACKAGE_MESA3D_DRIVER
218
219 comment "Additional API Support"
220
221 config BR2_PACKAGE_MESA3D_OPENGL_EGL
222         bool "OpenGL EGL"
223         select BR2_PACKAGE_HAS_LIBEGL
224         select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
225         help
226           Use the Khronos EGL APIs. EGL is a window manager for OpenGL
227           applications similar to GLX, for X, and WGL, for Windows.
228
229 config BR2_PACKAGE_MESA3D_OPENGL_ES
230         bool "OpenGL ES"
231         select BR2_PACKAGE_HAS_LIBGLES
232         help
233           Use the Khronos OpenGL ES APIs. This is commonly used on
234           embedded systems and represents a subset of the OpenGL API.
235
236 config BR2_PACKAGE_MESA3D_OPENGL_TEXTURE_FLOAT
237         bool "OpenGL texture float (patented format)"
238         help
239           GL_ARB_texture_float is required to enable GLX core profile
240           (OpenGL3.x) otherwise the compat profile is used
241           (OpenGL2.1).
242
243           The source code to implement ARB_texture_float extension is
244           included and can be toggled on at compile time, for those
245           who purchased a license from SGI, or are in a country where
246           the patent does not apply, etc.
247
248           Please consult docs/patents.txt with your lawyer before
249           building Mesa.
250
251           Also, note that this option doesn't affect all drivers. Some
252           drivers have support for texture float enabled
253           unconditionally.
254
255           If unsure, say N.
256
257           http://www.google.com/patents/about?id=mIIOAAAAEBAJ&dq=6650327
258
259 endif # BR2_PACKAGE_MESA3D_DRIVER
260
261 config BR2_PACKAGE_PROVIDES_LIBGL
262         default "mesa3d" if BR2_PACKAGE_XORG7
263
264 config BR2_PACKAGE_PROVIDES_LIBEGL
265         default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_EGL
266
267 config BR2_PACKAGE_PROVIDES_LIBGLES
268         default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_ES
269
270 endif # BR2_PACKAGE_MESA3D
271
272 comment "mesa3d needs a toolchain w/ C++, NPTL, dynamic library"
273         depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
274                 BR2_STATIC_LIBS
275         depends on BR2_TOOLCHAIN_HAS_SYNC_1