aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* meson: Use the same version for all libdrm checksDylan Baker2018-03-291-21/+45
| | | | | | | | | | | | | | | | | | | | | Currently each driver specifies it's own version, and core libdrm specifies a version. In the most common case this is fine, since there will be exactly one libdrm installed on a system, but if there are more than one it's possible that mesa will be linked against different versions of libdrm. There is also the possibility that the current approach makes the pkg-config files we generate incorrect, since there could be #defines that use newer features if they're available. This patch corrects all of that. All of the versions are still set by driver (along with a default core version). Then all of the drivers that are enabled have their versions compared and the highest version is selected, then all libdrm checks are made with that version. v2: - Reorder the list to have the name first and whether the dependency is needed second (Eric) Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: group libdrm dependenciesDylan Baker2018-03-291-15/+14
| | | | | | | The reason libdrm is after libdrm_* will be made clear in later patches. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: fix header check messageEric Engestrom2018-03-261-1/+1
| | | | | | | | before: Checking if "endian.h works" compiles: YES after: Checking if "endian.h" compiles: YES Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson/configure: detect endian.h instead of trying to guess when it's availableEric Engestrom2018-03-231-1/+1
| | | | | | | | | | | Cc: Maxin B. John <[email protected]> Cc: Khem Raj <[email protected]> Cc: Rob Herring <[email protected]> Suggested-by: Jon Turney <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Cc: <[email protected]>
* Revert "meson: merge C and C++ compiler arguments check"Dylan Baker2018-03-221-6/+11
| | | | | | | | | | This reverts commit cb2ddcefa5196fdfeff76f405175c7a6c110eae4. This causes clang to error out building C++ code. The plan is to fix the build to work with clang, but in the mean time we'll just revert this Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* meson: merge C and C++ compiler arguments checkEric Engestrom2018-03-221-11/+6
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* omx: always define ENABLE_ST_OMX_{BELLAGIO,TIZONIA}Mathias Fröhlich2018-03-221-2/+7
| | | | | | | | | | | | | | | | | We're trying to be -Wundef clean so that we can turn it on (and eventually make it an error). Note that the OMX code already used `#if ENABLE_ST_OMX_BELLAGIO` instead of #ifdef; I could've changed these, but the point of -Wundef is to catch typos, so we might as well make the change the right way. Fixes: 83d4a5d5aea5a8a05be2 "st/omx/tizonia: Add H.264 decoder" Fixes: b2f2236dc565dd1460f0 "st/omx/tizonia: Add H.264 encoder" Fixes: c62cf1f165919bc74296 "st/omx/tizonia/h264d: Add EGLImage support" Cc: Gurkirpal Singh <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: simplify omx logicMathias Fröhlich2018-03-221-16/+14
| | | | | | | | and let's make sure `with_gallium_omx` is never 'auto' and can only be one of [bellagio, tizonia, disabled]. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: Don't build svga by default on ARM/AArch64Daniel Stone2018-03-201-1/+1
| | | | | | | | VMware has no (published) support for Arm-architecture guests. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reported-by: Dylan Baker <[email protected]>
* meson: Add default DRI drivers for ARM/AArch64Daniel Stone2018-03-201-0/+2
| | | | | | | | | | | | On all Arm architectures (ARMv7 and below as 'arm', ARMv8 and above as 'aarch64'), only build swrast for DRI drivers. The only classic drivers which could be used are r200 and NV20 cards, which seems unlikely enough that it shouldn't be the default. Signed-off-by: Daniel Stone <[email protected]> Reported-by: Javier Jardón <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson+dri3: allow building against older xcb (v3)Rob Clark2018-03-161-3/+8
| | | | | | | Similar to previous patch, make xcb 1.13 optional. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* dri3: allow building against older xcb (v3)Dave Airlie2018-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | I'm not sure everyone wants to be updating their dri3 in a forced march setting, this allows a nicer approach, esp when you want to build on distro that aren't brand new. I'm sure there are plenty of ways this patch could be cleaner, and I've also not built it against an updated dri3. For meson I've just left it alone, since if you are using meson you probably don't mind xcb updates, and if you are using meson you can fix this better than me. v3: just don't put a version in for dri3/present without modifiers, should allow building with 1.11 as well (feel free to supply meson followups) Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* meson: require amdgpu >= 2.4.91Dylan Baker2018-03-151-1/+1
| | | | | | the meson equivalent of f8773edb0a0cf5ff885cd3494717323983eedeed Reviewed-by: Marek Olšák <[email protected]>
* meson: don't use compiler.has_headerDylan Baker2018-03-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Meson's compiler.has_header is completely useless, it only checks that a header exists, not whether it's usable. This creates problems if a header contains a conditional #error declaration, like so: > #if __x86_64__ > # error "Doesn't work with x86_64!" > #endif Compiler.has_header will return true in this case, even when compiling for x86_64. This is useless. Instead, we'll do a compile check so that any #error declarations will be treated as errors, and compilation will work. Fixes compilation on x32 architecture. Gentoo Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=649746 meson bug: https://github.com/mesonbuild/meson/issues/2246 Signed-off-by: Dylan Baker <[email protected]> Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: Use system_has_kms_drm in default driver selectionGreg V2018-03-091-3/+5
| | | | | Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* vulkan/wsi/x11: Return VK_SUBOPTIMAL_KHR for X11Louis-Francis Ratté-Boulianne2018-03-091-1/+1
| | | | | | | | | When it is detected that a window could have been flipped but has been copied because of suboptimal format/modifier. The Vulkan client should then re-create the swapchain. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* vulkan/wsi/x11: Add support for DRI3 v1.2Daniel Stone2018-03-091-1/+1
| | | | | | | | Adds support for multiple planes and buffer modifiers. v4: Rename "has_dri3_v1_1" to "has_dri3_modifiers" v12: Multi-planar/modifier support is now DRI3 v1.2; also update release versions
* tegra: Initial supportThierry Reding2018-03-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tegra K1 and later use a GPU that can be driven by the Nouveau driver. But the GPU is a pure render node and has no display engine, hence the scanout needs to happen on the Tegra display hardware. The GPU and the display engine each have a separate DRM device node exposed by the kernel. To make the setup appear as a single device, this driver instantiates a Nouveau screen with each instance of a Tegra screen and forwards GPU requests to the Nouveau screen. For purposes of scanout it will import buffers created on the GPU into the display driver. Handles that userspace requests are those of the display driver so that they can be used to create framebuffers. This has been tested with some GBM test programs, as well as kmscube and weston. All of those run without modifications, but I'm sure there is a lot that can be improved. Some fixes contributed by Hector Martin <[email protected]>. Changes in v2: - duplicate file descriptor in winsys to avoid potential issues - require nouveau when building the tegra driver - check for nouveau driver name on render node - remove unneeded dependency on libdrm_tegra - remove zombie references to libudev - add missing headers to C_SOURCES variable - drop unneeded tegra/ prefix for includes - open device files with O_CLOEXEC - update copyrights Changes in v3: - properly unwrap resources in ->resource_copy_region() - support vertex buffers passed by user pointer - allocate custom stream and const uploader - silence error message on pre-Tegra124 - support X without explicit PRIME Changes in v4: - ship Meson build files in distribution tarball - drop duplicate driver_tegra dependency Reviewed-by: Emil Velikov <[email protected]> Acked-by: Emil Velikov <[email protected]> Tested-by: Andre Heider <[email protected]> Reviewed-by: Dmitry Osipenko <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
* meson: Fix building gallium media libs without eglDylan Baker2018-03-081-1/+3
| | | | | | | v2: - rebase on omx fix Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (v1)
* meson: Allow building dri based EGL without GLXDylan Baker2018-03-081-10/+15
| | | | | | | | | | | It should be possible to build EGL without GLX, but the meson build currently doesn't allow that because it too tightly couples glx and dri. This patch eases dri and glx apart, so that EGL without GLX can be built. CC: Daniel Stone <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Dylan Baker <[email protected]>
* meson: Re-add auto option for omxDylan Baker2018-03-071-24/+45
| | | | | | | | | | | | | | | | | | | This re-adds the auto option for omx, without it we default to tizonia and the build fails almost immediately, this is especially obnoxious those building a driver that doesn't support the OMX state tracker to begin with. v2: - Only define OMX_FOO for auto cases if the dependencies are found. This fixes building tizonia with auto (Julien, Eric) CC: Gurkirpal Singh <[email protected]> Fixes: bb5e27fab6087a5c1528a5faf507acce700e883c ("st/omx/bellagio: Rename st and target directories") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Jon Turney <[email protected]> (v1) Reviewed-by: Eric Engestrom <[email protected]> Tested-by: Julien Isorce <[email protected]> Tested-by: Karol Herbst <[email protected]> (v1)
* freedreno: bump required libdrm versionChristian Gmeiner2018-03-061-1/+1
| | | | | | | | | Fixes: 26a9321d0a "freedreno: add global_bindings state" Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* st/omx/tizonia: Add H.264 decoderGurkirpal Singh2018-03-061-0/+2
| | | | | | | | | | v2: Refactor out screen functions to st/omx Example Gstreamer pipeline : gst-launch-1.0 filesrc location=movie.mp4 ! qtdemux ! h264parse ! omxh264dec ! videoconvert ! ximagesink Acked-by: Leo Liu <[email protected]> Reviewed-by: Julien Isorce <[email protected]>
* st/omx/tizonia: Add --enable-omx-tizonia flag and build filesGurkirpal Singh2018-03-061-0/+7
| | | | | | | | | | | | Allow only bellagio or tizonia to be used at the same time. Detect tizonia package config file Generate libomx_mesa.so and install it to libtizcore.pc::pluginsdir Only compile empty source (target.c) for now. GSoC Project link: https://summerofcode.withgoogle.com/projects/#4737166321123328 Acked-by: Leo Liu <[email protected]> Reviewed-by: Julien Isorce <[email protected]>
* st/omx/bellagio: Rename st and target directoriesGurkirpal Singh2018-03-061-10/+9
| | | | | | | | | | | | | | | | | | | v2: Refactor out screen functions to st/omx Allows to keep all the code under st/omx (st/omx/tizonia and st/omx/bellagio). Reverts targets/omx_bellagio to omx as additions to existing files is enough to compile for both bellagio and tizonia. * autotools changes: --enable-omx -> --enable-omx-bellagio * meson changes: -Dgallium-omx=false -> -Dgallium-omx=disabled -Dgallium-omx=true -> -Dgallium-omx=bellagio Acked-by: Leo Liu <[email protected]> Reviewed-by: Julien Isorce <[email protected]>
* disk cache: Link with -latomic if necessaryThierry Reding2018-03-021-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | The disk cache implementation uses 64-bit atomic operations. For some architectures, such as 32-bit ARM, GCC will not be able to translate these operations into atomic, lock-free instructions and will instead rely on the external atomics library to provide these operations. Check at configuration time whether or not linking against libatomic is necessary and if so, create a dependency that can be used while linking the mesautil library. This is the meson equivalent of 2ef7f23820a6 ("configure: check if -latomic is needed for __atomic_*"). For some background information on this, see: https://gcc.gnu.org/wiki/Atomic/GCCMM Changes in v2: - clarify meaning of lock-free in commit message - fix build if -latomic is not necessary Acked-by: Matt Turner <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
* meson: fix LLVM version detection when <= 3.4Andres Gomez2018-03-011-1/+8
| | | | | | | | | | | | | | | | | | | | | | | 3 digits versions in LLVM only started from 3.4.1 on. Hence, even if you can perfectly build with an old LLVM (< 3.4.1) in the system while not needing LLVM at all (auto), when passing through the LLVM version detection code, meson will fail when accessing "_llvm_version[2]" due to: "Index 2 out of bounds of array of size 2." v2: Properly compare LLVM version and set patch version to 0 if < 3.4.1 (Eric). v3: Improve the commit log explanation (Eric). Cc: Dylan Baker <[email protected]> Cc: Eric Engestrom <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: avoid changing types for the dri3 optionEric Engestrom2018-02-271-3/+3
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: simplify the gbm option code, and avoid changing typesEric Engestrom2018-02-271-9/+7
| | | | | | | v2: drop gallium comment (Dylan) Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* *-symbol-check: use correct `nm` path when cross-compilingEric Engestrom2018-02-261-0/+3
| | | | | | Inspired-by: a similar patch for libdrm by Heiko Becker Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* swr: bump minimum supported LLVM version to 4.0Andres Gomez2018-02-201-2/+2
| | | | | | | | | | | | | | | | | | Since radv and radeonsi removed support for LLVM 3.9 the distcheck target got broken because SWR distribution needed 3.9.x. After checking with George Kyriazis, SWR is OK with moving to LLVM 4.0 and above, which will solve this problem. Fixes: 3bf1e036e8a ("amd: remove support for LLVM 3.9") Cc: George Kyriazis <[email protected]> Cc: Tim Rowley <[email protected]> Cc: Emil Velikov <[email protected]> Cc: Dylan Baker <[email protected]> Cc: Eric Engestrom <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: George Kyriazis <[email protected]>
* ac: query high bits of 32-bit address spaceMarek Olšák2018-02-171-1/+1
|
* meson: Add Haiku platform support v4Alexander von Gluck IV2018-02-161-4/+12
| | | | Reviewed-by: Dylan Baker <[email protected]>
* meson: Actually link xvmc target with libxvmcDylan Baker2018-02-151-3/+0
| | | | | | | | | Unlike vdpau this is required. Fixes: 22a817af8a89eb3c7 ("meson: build gallium xvmc state tracker") Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: actually link with libomxil-bellagioDylan Baker2018-02-151-5/+0
| | | | | | | | | This state tracker actually needs to link, unlike vdpau. Fixes: 1d36dc674d528b93b ("meson: build gallium omx state tracker") Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: use va-api version reported by pkg-configDylan Baker2018-02-151-1/+1
| | | | | | | Fixes: 5a785d51a6d6 ("meson: build gallium va state tracker") Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: Add build option for toolsScott D Phillips2018-02-081-0/+4
| | | | | | | | | | | | | | | Add a build option to control building some of the misc tools we have. Also set the executables to install, presumably you want that if you're asking for the build. v2: set 'install:' to the with_tools value, not true (Jordan) handle 'all' in a the comma list (Dylan) Add freedreno's tools (Dylan) Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: osx ld doesn't support --build-idJon Turney2018-02-051-0/+4
| | | | | Signed-off-by: Jon Turney <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: set apple glx definesDylan Baker2018-02-051-0/+2
| | | | | Reviewed-by: Jon Turney <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: better defaults for osx, windows and cygwinJon Turney2018-02-051-6/+15
| | | | | | | | | | | set suitable defaults for 'dri-drivers', 'gallium-drivers', 'vulkan-drivers' and 'platforms' options for osx, windows and cygwin, adding cygwin where appropriate. v2: error() for unknown OS Signed-off-by: Jon Turney <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* amd: remove support for LLVM 3.9Marek Olšák2018-02-021-3/+3
| | | | | | | | | | | Only these are supported: - LLVM 4.0 - LLVM 5.0 - LLVM 6.0 - master (7.0) Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* meson: Check for actual LLVM required versionsDylan Baker2018-02-021-2/+10
| | | | | | | | | | | Currently we always check for 3.9.0, which is pretty safe since everything except radv work with >= 3.9 and 3.9 is pretty old at this point. However, radv actually requires 4.0, and there is a patch for radeonsi to do the same. Fixes: 673dda833076 ("meson: build "radv" vulkan driver for radeon hardware") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* meson: Don't confuse the install and search paths for dri driversDylan Baker2018-02-021-0/+4
| | | | | | | | | | | | | | | | | | | | | Currently there is not a separate option for setting the search path of DRI drivers in meson, like there is in scons and autotools. This is an oversight and needs to be fixed. This adds an extra option `dri-search-path`, which will default to the value of `dri-drivers-path`, like autotools does. v2: - Split input list before joining. v3: - use : instead of ; as the delimiter. The autotools help string incorrectly says ; but the code uses : v4: - Take list in pre : delimited form (Ilia) - Ensure that the dri-search-path is absolute when using dri_drivers_path Fixes: db9788420d4bc7b4 ("meson: Add support for configuring dri drivers directory.") Reported-by: Ilia Mirkin <[email protected]> Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (v2) Reviewed-by: Eric Engestrom <[email protected]> (v3)
* meson: dedup gallium-xa logicEric Engestrom2018-01-311-15/+10
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: dedup gallium-va logicEric Engestrom2018-01-311-20/+18
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: dedup gallium-omx logicEric Engestrom2018-01-311-19/+19
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: dedup gallium-xvmc logicEric Engestrom2018-01-311-20/+18
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: dedup gallium-vdpau logicEric Engestrom2018-01-311-22/+19
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: libdrm shouldn't appear in Requires.private: if it wasn't foundJon Turney2018-01-271-2/+4
| | | | | | | | | | | | | | | Otherwise, using pkg-config to retrieve flags will fail, e.g. $ pkg-config gl --cflags Package libdrm was not found in the pkg-config search path. Perhaps you should add the directory containing `libdrm.pc' to the PKG_CONFIG_PATH environment variable Package 'libdrm', required by 'gl', not found Fixes: 3218056e0eb3 ("meson: Build i965 and dri stack") Reviewed-by: Dylan Baker <[email protected]> Signed-off-by: Jon Turney <[email protected]>
* meson: simplify dri3 logicEric Engestrom2018-01-251-8/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>