summaryrefslogtreecommitdiffstats
path: root/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* meson: if dep_dl is an empty list, it's not a dependency objectJon Turney2017-11-141-1/+1
| | | | | | | | | | | It's ok to use an empty list for dependencies:, but it's not ok to try to use the found() method of it. See also https://github.com/mesonbuild/meson/issues/2324 Signed-off-by: Jon Turney <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: Move -Dvulkan-drivers handling higher in the fileJason Ekstrand2017-11-131-23/+23
| | | | | | | | | | | The window-system auto-detection code (specifically for glx) relies on with_any_vk being available. This fixes the Vulkan-only build. Also, this puts it up near the handling of -Ddri-drivers and -Dgallium-drivers which seems to make a bit more sense. Fixes: 118a7f044191d4ab15ac9 "meson: add support for xlib glx" Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: Stop requiring platforms for VulkanJason Ekstrand2017-11-131-3/+0
| | | | | | | It should be perfectly valid to build a completely headless Vulkan driver. We don't need to require a platform. Reviewed-by: Dylan Baker <[email protected]>
* meson: build gallium-xlib based glxDylan Baker2017-11-101-8/+8
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: add support for xlib glxDylan Baker2017-11-101-23/+34
| | | | | | | | | | There is a bunch of churn in the main meson.build so that we can correctly set the auto tristate of GLX. In particular, don't build xlib-based glx when dri and gallium are disabled but vulkan is enabled, in that case just turn glx off. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: implement default driver argumentsDylan Baker2017-11-091-0/+38
| | | | | | | | | | | | | | | | | | | This allows drivers to be set by OS/arch in a sane manner. v2: - set _drivers to a list of drivers instead of manually assigning each with_* v3: - Use "auto" instead of "default", which matches the value of other automatically configured options. - Set vulkan drivers as well - Add error message if no automatic drivers are known for a given arch/OS combo - use not(darwin or windows) instead of (linux or *bsd), which is probably more accurate (that way Solaris and other *nix systems aren't excluded) - rename softpipe to swrast, as swrast is the actual option name Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: Add script to use VERSION file for getting versionDylan Baker2017-11-091-1/+3
| | | | | | | | | | | | | | | | | | | Meson has up until this point set it's version in the root meson.build script, while the other build systems read the VERSION file. This is just "one more thing" to duplicate between meson and every other build system. This script is a simple "read, strip, print" sort of deal to allow meson to read the VERSION file. I chose to implement this in python since python is portable, and to keep the meson.build script clean. This is also complicated by the fact that the project() call *must* be the first non-comment,non-blank in the toplevel meson.build script. v2: - Move from scripts/ to bin/ - use python explicitly to run the scripts to support windows Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: Enable VC4's NEON assembly support.Eric Anholt2017-11-091-2/+2
| | | | | | Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Tested-by: Timothy Arceri <[email protected]>
* meson: Drop stale comment about making valgrind conditional.Eric Anholt2017-11-091-1/+0
| | | | | | | It was fixed in 5c2ff5773a707519f6a773126f201c4e1e8a42d7. Reviewed-by: Dylan Baker <[email protected]> Tested-by: Timothy Arceri <[email protected]>
* meson: Leave dep_llvm empty if !with_llvmEric Anholt2017-11-091-3/+4
| | | | | | | | | The gallium auxiliary build would link against llvm, for the gallivm code that it didn't build. This broke the build on my armhf cross, where libLLVM-3.9.so is not multiarch and thus points to x86-64 libs. Reviewed-by: Dylan Baker <[email protected]> Tested-by: Timothy Arceri <[email protected]>
* mesa: Add new fast mtx_t mutex type for basic use casesTimothy Arceri2017-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While modern pthread mutexes are very fast, they still incur a call to an external DSO and overhead of the generality and features of pthread mutexes. Most mutexes in mesa only needs lock/unlock, and the idea here is that we can inline the atomic operation and make the fast case just two intructions. Mutexes are subtle and finicky to implement, so we carefully copy the implementation from Ulrich Dreppers well-written and well-reviewed paper: "Futexes Are Tricky" http://www.akkadia.org/drepper/futex.pdf We implement "mutex3", which gives us a mutex that has no syscalls on uncontended lock or unlock. Further, the uncontended case boils down to a cmpxchg and an untaken branch and the uncontended unlock is just a locked decr and an untaken branch. We use __builtin_expect() to indicate that contention is unlikely so that gcc will put the contention code out of the main code flow. A fast mutex only supports lock/unlock, can't be recursive or used with condition variables. We keep the pthread mutex implementation around as for the few places where we use condition variables or recursive locking. For platforms or compilers where futex and atomics aren't available, simple_mtx_t falls back to the pthread mutex. The pthread mutex lock/unlock overhead shows up on benchmarks for CPU bound applications. Most CPU bound cases are helped and some of our internal bind_buffer_object heavy benchmarks gain up to 10%. Signed-off-by: Kristian Høgsberg <[email protected]> Signed-off-by: Timothy Arceri <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* meson: Allow building glvnd with EGL and non-dri based GLXDylan Baker2017-11-081-2/+6
| | | | | | | | | | | Because meson mirrors the auototools logic, it needs the same changes to allow building glvnd based egl. v2: - change if to elif (Eric) Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Emil Velikov <[email protected]>
* meson: only turn on Mesa's DEBUG for buildtype==debugEric Engestrom2017-11-071-2/+2
| | | | | | | | | | | | As discussed in this thread: https://lists.freedesktop.org/archives/mesa-dev/2017-November/175104.html Cc: Dylan Baker <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Andres Rodriguez <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Matt Turner <[email protected]> Tested-by: Chad Versace <[email protected]>
* meson: switch default build type to debugoptimizedEric Engestrom2017-11-071-1/+1
| | | | | | | | | | | | | | | | | | | As discussed in this thread: https://lists.freedesktop.org/archives/mesa-dev/2017-November/175104.html Cc: Emil Velikov <[email protected]> Cc: Ilia Mirkin <[email protected]> Cc: Michel Dänzer <[email protected]> Cc: Christian Schmidbauer <[email protected]> Cc: Eero Tamminen <[email protected]> Cc: Ernst Sjöstrand <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Andres Rodriguez <[email protected]> Acked-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Chad Versace <[email protected]> Tested-by: Chad Versace <[email protected]>
* winsys/amdgpu: Add R600_DEBUG flag to reserve VMID per ctx.Andrey Grodzovsky2017-11-031-1/+1
| | | | | | | | | | Fixes reverted patch f03b7c9 by doing VMID reservation per process and not per context. Also updates required amdgpu libdrm version since the change involved interface updates in amdgpu libdrm. Signed-off-by: Andrey Grodzovsky <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* Revert "meson: bump libdrm version required by amdgpu"Dylan Baker2017-11-021-1/+1
| | | | | | | | | | | | This reverts commit d364684711a5894fd3221191811d56713d6abdee. The commit that bumped the autotools version was reverted, so lets revert the meson version to match. fixes: 1f2640bfa940362c7550cdd065d37555f21c8ae8 "Revert "winsys/amdgpu: Add R600_DEBUG flag to reserve VMID per ctx."" Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: bump libdrm version required by amdgpuEric Engestrom2017-11-011-1/+1
| | | | | | | | Fixes: f03b7c9ad92c1656a221 "winsys/amdgpu: Add R600_DEBUG flag to reserve VMID per ctx." Cc: Andrey Grodzovsky <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: Use true and false instead of yes and no for tristate optionsDylan Baker2017-10-311-3/+3
| | | | | | | | | | | This allows a user to not care whether they're setting a tristate or a boolean option, which is a nice user facing feature, and something I've personally run into. Suggested-by: Adam Jackson <[email protected]> Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: do not search for needless depsErik Faye-Lund2017-10-311-6/+14
| | | | | | | | | If we don't want to use these deps, there's no good reason to search for them in the first place. This should shave a bit of time for the initial build. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: wire up egl/androidEric Engestrom2017-10-301-3/+12
| | | | | | | Cc: Rob Herring <[email protected]> Cc: Tomasz Figa <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: build gallium based osmesaDylan Baker2017-10-271-0/+3
| | | | | | | | | | This has been tested with the osdemo from mesa-demos v2: - Add SELinux dependency - fix typo GALLIUM_LLVM -> GALLIUM_LLVMPIPE Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: build classic osmesaDylan Baker2017-10-271-4/+18
| | | | | | | | | | | This builds the classic (non-gallium) osmesa with meson. This has been tested with the osdemo application from mesa-demos. v2: - Remove unrelated change - Add SELinux dependency to osmesa Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: rename all instances of xf86vm to xxf86vmDylan Baker2017-10-271-3/+3
| | | | | | | Because consistency Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: fix pkg-config Gl Require.PrivateDylan Baker2017-10-271-1/+1
| | | | | | | xf86vm -> xxf86vm Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: bring MESA_GIT_SHA1 in line with other build systemsEric Engestrom2017-10-271-0/+1
| | | | | | | | | | | | | | | | | | | | Meson's vcs_tag() uses the output of `git describe`, eg. 17.3-branchpoint-5-gfbf29c3cd15ae831e249+ Whereas the other build systems used a script that outputs only the sha1 of the HEAD commit, eg. fbf29c3cd1 Given that this information is used by printing it next to the version number, there's some redundancy here, and inconsistency between build systems. Bring Meson in line by making it use the same script, with the added advantage of now supporting the MESA_GIT_SHA1_OVERRIDE env var. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: wire up selinuxEric Engestrom2017-10-271-1/+4
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: build nouveau vieux driverDylan Baker2017-10-261-1/+3
| | | | | | | | | Build tested only. v2: - fix spelling error (veaux -> vieux) Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build r200 driverDylan Baker2017-10-261-1/+3
| | | | | | | | | v2: - remove TODO that is done Build tested only Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build r100 driverDylan Baker2017-10-261-1/+3
| | | | | | | build tested only Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: be explicit about the version requiredEric Engestrom2017-10-251-2/+8
| | | | | | | | | | | This way, we know what we're allowed to use (no nested include lists for instance) and users get immediate feedback when trying to use unsupported versions, rather than a cryptic crash or things being silently not built correctly. Cc: Dylan Baker <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: add opt-out of libunwindErik Faye-Lund2017-10-251-1/+2
| | | | | | | | | Libunwind has some issues on some platforms, so let's allow people who have issues to opt-out. This is similar to what we do in automake, and the implementation is modelled after our opt-out for valgrind. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: build freedrenoRob Clark2017-10-241-0/+6
| | | | | | | | Mostly copy/pasta from Dylan Baker's conversion of nouveau and i965. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: build imx driverDylan Baker2017-10-231-0/+5
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* meson: build etnaviv driver + winsysDylan Baker2017-10-231-0/+6
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* meson: build libEGLDylan Baker2017-10-201-9/+72
| | | | | | | | | | | | | | | | | | This is based heavily on Daniel Stone's work for the same, rebased on master and with a number of TODO's fixed. This does not implement glvnd (which is coming in a later patch) Meson builds egl slightly differently than autotools, namely it doesn't build an intermediate shared library. It doesn't do this because meson doesn't have problems with the name of the library being dynamically generated, so the glvnd and non-glvnd code can follow the same path. v2: - Don't reuse variable (Eric E.) Signed-off-by: Dylan Baker <[email protected]> Tested-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* meson: Don't allow glx to be built without platform_x11Dylan Baker2017-10-201-2/+6
| | | | | | | | | | Previously this failed to change with_glx to disabled from auto if platform_x11 was unset or if no opengl apis were being built. v2: - swap conditional positions Signed-off-by: Dylan Baker <[email protected]> Reviewed-and-Tested-by: Eric Engestrom <[email protected]>
* meson: bump libdrm_amdgpu requirement to 2.4.85Dylan Baker2017-10-201-1/+1
| | | | | | | fixes: b60372570323243ec73 ("configure.ac: Bump libdrm_amdgpu version to 2.4.85.") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* Fix the xf86vm meson dependencyNicholas Miell2017-10-181-1/+1
| | | | | | | | The pkg-config file is called xxf86vm. Signed-off-by: Nicholas Miell <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: turn on pl111 not vc4 when pl111 driver specificedDylan Baker2017-10-171-1/+1
| | | | | | Reviewed-by: Eric Anholt <[email protected]> fixes: 1918c9b1627d5403 ("meson: Add support for the pl111 driver.") Signed-off-by: Dylan Baker <[email protected]>
* meson: Add support for the vc5 driver.Eric Anholt2017-10-171-0/+2
| | | | | | | v2: Default vc5 to off, since it requires the simulator currently. Add missing dep on the XML generation from libbroadcom_vc5. Reviewed-by: Dylan Baker <[email protected]> (v1)
* meson: Add support for the pl111 driver.Eric Anholt2017-10-171-0/+2
| | | | Reviewed-by: Dylan Baker <[email protected]>
* meson: Add support for the vc4 driver.Eric Anholt2017-10-171-0/+2
| | | | Reviewed-by: Dylan Baker <[email protected]>
* meson: build llvmpipeDylan Baker2017-10-161-1/+3
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build softpipeDylan Baker2017-10-161-0/+5
| | | | | | | | | | This doesn't include llvmpipe. v2: - Fix inconsistent use of with_gallium_swrast and with_gallium_softpipe. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build nouveau (gallium) driverDylan Baker2017-10-161-0/+6
| | | | | | | | | | | Tested with a GK107. v2: - Add target for nouveau standalone compiler. This target is not built by default. v3: - Add nouveau to list of drivers built by default Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <eric at anholt.net>
* meson: build radeonsi gallium driverDylan Baker2017-10-161-2/+2
| | | | | | | | | | This hooks up the bits necessary to build gallium dri drivers, with radeonSI as the first example driver. This isn't tested yet. v4: - drop radeonsi generated header from sources. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <eric at anholt.net>
* meson: build gallium winsys for dri, null, and wrapperDylan Baker2017-10-161-0/+4
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <eric at anholt.net>
* meson: build radeonsiDylan Baker2017-10-161-5/+13
| | | | | | | | This builds the radeonsi (and radeon) window system bits and gallium driver bits. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <eric at anholt.net>
* meson: Build gallium dri state trackerDylan Baker2017-10-161-0/+1
| | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <eric at anholt.net>
* meson: split and simplify dependenciesDylan Baker2017-10-161-101/+95
| | | | | | | | | | | | | Rather than group dependencies in complex groups, use a flatter structure with split dependencies to avoid checking for the same dependencies twice. v2: - Fix building vulkan drivers without gallium or dri drivers v3: - Drop TODO comment that is done - Fix typo in commit message Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>