summaryrefslogtreecommitdiffstats
path: root/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* meson: Add panfrost to the --auto listAlyssa Rosenzweig2019-08-051-1/+1
| | | | | | | | | Look ma, we're a real driver now! I was waiting until Panfrost stabilises a bit for this, but now that 19.2 is almost here, let's make us official :) Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* mesa: Rename GLX_USE_TLS to USE_ELF_TLS.Bas Nieuwenhuizen2019-08-031-2/+2
| | | | | | | These days it is not GLX only and it does not work with all TLS implementations. Reviewed-by: Eric Engestrom <[email protected]>
* meson: Do not use GLX_USE_TLS on Android.Bas Nieuwenhuizen2019-08-031-1/+5
| | | | | | | | | | | | The asm code expects a specific kind of implementation, but Android uses something different (emutls). Turns out mesa has a fallback with pthread_getspecific, with an optimizaiton if only a single thread is used. emutls also uses getspecific, so lets just use the optimized mesa implementation. Fixes: 20294dceebc "mesa: Enable asm unconditionally, now that gen_matypes is gone." Reviewed-by: Eric Engestrom <[email protected]>
* scons+meson: suppress spammy build warning on MacOSEric Engestrom2019-07-301-0/+1
| | | | | | | | | | | | Originally introduced in c7f36574506838274460 ("darwin: Suppress type conversion warnings for GLhandleARB") to fix Bugzilla #66346 [1], this workaround was never ported to Scons or Meson. [1] https://bugs.freedesktop.org/66346 Cc: [email protected] Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* meson: Test for program_invocation_nameMatt Turner2019-07-301-0/+7
| | | | | | | | program_invocation_name and program_invocation_short_name are both GNU extensions. I don't believe one can exist without the other, so only check for program_invocation_name. Reviewed-by: Eric Engestrom <[email protected]>
* meson: Test for random_r()Matt Turner2019-07-301-1/+1
| | | | | | | It's better to test for needed functions instead of using external knowledge about presence in this or that C library. Reviewed-by: Eric Engestrom <[email protected]>
* meson: bump required version to 0.46Eric Engestrom2019-07-291-1/+1
| | | | | | | | | | | 0.45 has a few annoying bugs (like the one in !358 [1]), and 0.46 is well over a year old by now, so let's move to it. [1] https://gitlab.freedesktop.org/mesa/mesa/merge_requests/358 Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* v3d: Introduce a DRM shim for calling out to the simulator.Eric Anholt2019-07-251-1/+10
| | | | | | | | | | | | The goal is to enable testing of parts of drivers without depending on any particular kernel version or hardware being present. Simply set LD_PRELOAD=$PREFIX/lib/libv3d_drm_shim.so in your environment, and we'll fake a /dev/dri/renderD128 (or whatever the next available node is) using v3dv3. That node can then be used with the surfaceless or gbm EGL platforms. Acked-by: Iago Toral Quiroga <[email protected]>
* meson: allow building all glx without any driversDylan Baker2019-07-231-4/+2
| | | | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111016 Fixes: a47c525f3281a2753180e076c7e9b7772aff8f06 ("meson: build glx") Acked-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: remove unused env_testEric Engestrom2019-07-101-4/+0
| | | | | | | | No longer used as of last commit :) Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: require libdrm_amdgpu 2.4.99 for NaviMarek Olšák2019-07-031-1/+1
| | | | Acked-by: Bas Nieuwenhuizen <[email protected]>
* mesa: Enable asm unconditionally, now that gen_matypes is gone.Eric Anholt2019-07-011-61/+33
| | | | | Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* Revert "meson: Add support for using cmake for finding LLVM"Dylan Baker2019-06-281-11/+2
| | | | | | | | This reverts commit 5157a4276500c77e2210e853b262be1d1b30aedf. There is a meson bug that causes llvm to always be statically linked, which is obviously not what we want. I haven't had time to look into it yet, but for now let's just revert it.
* meson: Improve detection of Python when using Meson >=0.50.Arfrever Frehtes Taifersar Arahesis2019-06-281-1/+5
| | | | | | | | | | | | | | | Previously, on systems where multiple versions of Python 3 (e.g. 3.6 and 3.7) are installed, wrong version of Python 3 could have been used. The proper fix requires availability of path() method in Meson's python module, which has been added in Meson 0.50: https://github.com/mesonbuild/meson/pull/4616 Distro Bug: https://bugs.gentoo.org/671308 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <[email protected]> Reviewed-by: Dylan Baker <[email protected]> v2: - Add missing `endif` keyword (Dylan)
* meson: GNU/kFreeBSD has DRM/KMS and requires -D_GNU_SOURCEJames Clarke2019-06-281-2/+2
| | | | | | | This is a regression from the old autotools build system. Acked-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* meson: only add empty lines betwen active summary sectionsEric Engestrom2019-06-281-3/+3
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: bump required libdrm version to 2.4.81Eric Engestrom2019-06-281-1/+1
| | | | | | | | | | | | | | | | | dbb4457d9858fa977246 started using drmDevicesEqual(), which was introduced in libdrm 2.4.81 We could either copy the function locally, or bump the required version. Since the function is non-trivial and 2.4.81 is old enough already, I suggesting the latter. Fixes: dbb4457d9858fa977246 ("egl: add EGL_EXT_device_drm support") Cc: Emil Velikov <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: Add support for using cmake for finding LLVMDylan Baker2019-06-271-2/+11
| | | | | | | | | | | | | | | | Meson has support for using cmake as a finder for some dependencies, including LLVM. Using cmake has a lot of advantages: it needs less meson maintenance to keep working (even for llvm updates); it works more sanely for cross compiles (as llvm-config is a compiled binary not a shell script). Meson 0.51.0 also has a new generic variable getter that can be used to get information from either cmake, pkg-config, or config-tools dependencies, which is needed for cmake. We continue to support using llvm-config if you don't have cmake installed, or if cmake cannot find a suitable version. Fixes: 0d59459432cf077d768164091318af8fb1612500 ("meson: Force the use of config-tool for llvm") Reviewed-by: Eric Engestrom <[email protected]>
* meson: error out if platforms contains empty stringTapani Pälli2019-06-241-0/+4
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110939 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* drisw: move build logic to build systemsEric Engestrom2019-06-211-1/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: Allow building radeonsi with just the android platform.Bas Nieuwenhuizen2019-06-191-3/+3
| | | | | | | Just as was allowed by autotools. Fixes: 108d257a168 "meson: build libEGL" Reviewed-by: Eric Engestrom <[email protected]>
* meson: Search for execinfo.hJory Pratt2019-06-191-1/+1
| | | | | | | | | | Rather than checking __GLIBC__/__UCLIBC__ macros as a proxy for execinfo.h presence, just check directly. This allows the build to work on musl. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vl: Always enable drm winsys.Bas Nieuwenhuizen2019-06-131-12/+0
| | | | | | | | | | | | | | | | | | | | The dri2 winsys also uses libdrm (and you can only enable dri3 if you enable dri2), and the drm winsys only requires libdrm. So if any winsys is enabled you can also enable the drm winsys, and since we always want at least one winsys we can always enable it. I removed the check for the drm platform for VA and OMX since they do not care anymore. Since we still check for one of r600g, nouveau or radeonsi, we are guarantueed to still only enable it by default in a configuration that requires libdrm anyway. So for people using va=auto, we don't suddenly start requiring libdrm were we did not before. This supersedes "vl: Enable DRM by default.", which I pushed, but rolled back because it used dep_libdrm before its definition. Reviewed-by: Emil Velikov <[email protected]>
* build: Build etnaviv drmGuido Günther2019-06-051-3/+5
| | | | | Signed-off-by: Guido Günther <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* Revert "vl: Enable DRM by default."Bas Nieuwenhuizen2019-06-041-2/+2
| | | | | | | | | | Reason: meson.build:586:7: ERROR: Unknown variable "dep_libdrm". if building without x11 platform. This reverts commit 392c60928a5debbe6782ed1aa136597504bfbc5b.
* mesa: prevent common string formatting security issuesMark Janes2019-06-041-0/+4
| | | | | | | | | | | | | | | | Adds a compile-time error for obvious security issues like: printf(string_var); The proposed flag is more tolerant than -Wformat-nonliteral. Specifically, it tolerates common mesa formatting like: static const char *shader_template = "really long string %d"; printf(shader_template, uniform_number); Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110833 Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* vl: Enable DRM by default.Bas Nieuwenhuizen2019-06-041-2/+2
| | | | | | | | | | | | | | | If libdrm is found the pipe loader enables drm anyway, and that is pretty much the only extra dependency this code has. This enables creating libva display using a drm fd without having to enable the DRM (GBM really) backend of EGL, which is completely unrelated. Leaving the X11 platforms alone as they would still result in the additional inclusion of extra deps. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* util: Add a helper for faster remaindersConnor Abbott2019-05-311-0/+4
| | | | | | | | | | This should be at least as fast as using fast_idiv_by_const, and has the advantage that the precomputation is simple enough to be evaluated at Mesa-compile time for hash tables and sets which have a fixed table of possible divisors. Acked-by: Eric Anholt <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* meson: fix a couple typos in commentsEric Engestrom2019-05-091-3/+3
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* meson: Force the use of config-tool for llvmDylan Baker2019-05-081-0/+1
| | | | | | | | | meson git now has a cmake find method for llvm, but it lacks a couple of features that we use from the config tool version. Until that reaches parity we need to use the config-tool version. CC: 19.0 19.1 <<[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: make nm binary optionalDylan Baker2019-05-031-1/+4
| | | | | | | | | | | This makes nm not required, but used if found. In general I imagine that this means that on windows nm wont be found, and on other platforms it will. v2: - fix gbm and egl symbols check tests to only be run if nm is found - reword commit message to reflect the code change Reviewed-by: Eric Anholt <[email protected]>
* meson: Make shader-cache a trillean instead of booleanDylan Baker2019-05-031-4/+14
| | | | | | | | | | | | So that it can be implicitly disabled on windows, where it doesn't compile. v2: - Use an auto-option rather than automagic. - fix shader_cache check (== -> !=) v4: - Use new with_shader_cache instead of get_option('shader-cache') elsewhere in the meson build Reviewed-by: Eric Anholt <[email protected]>
* meson: switch gles1 and gles2 to auto optionsDylan Baker2019-05-031-8/+26
| | | | | | | | | | This allows them to default to false on windows, but default to true elsewhere. As a side effect turning off shared-glapi now automatically turns off gles. Shared glapi remains a boolean defaulting to true. v5: - new in this version Reviewed-by: Eric Anholt <[email protected]>
* meson: Fix missing glproto dependency for gallium-glxChuck Atkins2019-05-031-2/+4
| | | | | | Signed-off-by: Chuck Atkins <[email protected]> Cc: mesa-stable <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: add build-summaryErik Faye-Lund2019-05-021-0/+127
| | | | | | | | | | | | | | | | | | | | | This roughly mirrors what we get from autotools. There's a few differences, though: 1. The "exec_prefix" output has been dropped. Meson doesn't support this, so it makes no sense here. 2. The "llvm-config" output has been dropped. Meson abstracts dependency discovery a bit more than our autotools build-system does, so it's not easy to get this information as-is. 3. HUD extra stats, SWR archs, Shared/Static libs and CFLAGS / CXXFLAGS / LDFLAGS has been dropped. These can be inspected by "meson configure". 4. How we set defines works quite differently in our Meson build-system, and the result isn't quite the same. In particular, the DEFINES output has been dropped, to avoid having to refactor the code too much. Signed-off-by: Erik Faye-Lund <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109326 Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* meson: give dri- and gallium-drivers separate varsErik Faye-Lund2019-05-021-36/+36
| | | | | | | | | | | | | Variables are cheap, and there's little reason for the dri and gallium drivers to work on the same variable for the driver list. So let's split these in two separate lists instead. This makes it easier to inspect these after-the fact, for instance for generating a summary of build-settings. Signed-off-by: Erik Faye-Lund <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Dylan Baker <[email protected]>
* kmsro: Add support for V3D.Eric Anholt2019-04-261-1/+1
| | | | | | | | | Like vc4, we expect to have SOCs with various displays that have a single V3D instance for rendering. v2: Add v3d to the list of drivers that make enabling kmsro valid. Acked-by: Rob Clark <[email protected]>
* kmsro: Add lima renderonly supportRob Herring2019-04-111-2/+2
| | | | | | | | | Enable using lima for KMS renderonly. This still needs KMS driver name mapping to kmsro to be used automatically. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Qiang Yu <[email protected]>
* gallium: add lima driverQiang Yu2019-04-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | v2: - use renamed util_dynarray_grow_cap - use DEBUG_GET_ONCE_FLAGS_OPTION for debug flags - remove DRM_FORMAT_MOD_ARM_AGTB_MODE0 usage - compute min/max index in driver v3: - fix plbu framebuffer state calculation - fix color_16pc assemble - use nir_lower_all_source_mods for lowering neg/abs/sat - use float arrary for static GPU data - add disassemble comment for static shader code - use drm_find_modifier v4: - use lima_nir_lower_uniform_to_scalar v5: - remove nir_opt_global_to_local when rebase Cc: Rob Clark <[email protected]> Cc: Alyssa Rosenzweig <[email protected]> Acked-by: Eric Anholt <[email protected]> Signed-off-by: Andreas Baierl <[email protected]> Signed-off-by: Arno Messiaen <[email protected]> Signed-off-by: Connor Abbott <[email protected]> Signed-off-by: Erico Nunes <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Signed-off-by: Koen Kooi <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: marmeladema <[email protected]> Signed-off-by: Paweł Chmiel <[email protected]> Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Rohan Garg <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]>
* simplify LLVM version string printingEric Engestrom2019-04-041-9/+1
| | | | | | | Figure it out once in the build system, then just use that all over the place. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* meson: Error if LLVM is turned off but clover it turned onDylan Baker2019-04-031-0/+2
| | | | | | | | Since clover has a hard requirement on LLVM v2: - make error message more specific Reviewed-by: Eric Engestrom <[email protected]>
* meson: Error if LLVM doesn't have rtti when building cloverDylan Baker2019-04-031-0/+2
| | | | We already do this for nouveau, but it's required for clover too.
* configure.ac / meson: depend on libnativewindow when appropriateGurchetan Singh2019-03-211-0/+3
| | | | | | | libnativewindow is only available on O or greater, and it's required for some features. Reviewed-by: Tapani Pälli <[email protected]>
* configure.ac/meson.build: Add options for library suffixesBenjamin Gordon2019-03-211-0/+3
| | | | | | | | | | | | | | | | | When building the Chrome OS Android container, we need to build copies of mesa that don't conflict with the Android system-supplied libraries. This adds options to create suffixed versions of EGL and GLES libraries: libEGL.so -> libEGL${egl-lib-suffix}.so libGLESv1_CM.so -> libGLESv1_CM${gles-lib-suffix}.so libGLESv2.so -> libGLES${gles-lib-suffix}.so This is similar to what happens when --enable-libglvnd is specified, but without the side effects of linking against libglvnd. To avoid unexpected clashes with the suffixed appended by libglvnd, make it an error to specify both --enable-libglvnd and --with-egl-lib-suffix. Reviewed-by: Eric Engestrom <[email protected]>
* turnip: guard -Dvulkan-driver=freedrenoChia-I Wu2019-03-111-0/+4
| | | | | Require -DI-love-half-baked-turnips=true as well to enable freedreno vulkan driver.
* turnip: Add driver skeleton (v2)Bas Nieuwenhuizen2019-03-111-0/+1
| | | | | | | | | | | | | | | | | meson files have been updated, autotools and android still need updating. Only build tested. v2 (chadv): - Rebase onto master. - Fix build breakage in Python scripts. - Drop the WSI code. The internal WSI apis have changed recently, and will likely change again before the driver goes upstream. To avoid unnecessary rebase work, let's drop the WSI code and re-add it when we're ready to really use WSI. (olv, after rebase) do not enable freedreno by default on ARM
* build: make passing an incorrect pointer type a hard errorEric Engestrom2019-03-081-0/+1
| | | | | | | | | | | | | | | | | | More or less any of this issue pointed out by the compiler is a coding error. Make sure we flag it and bail loudly. v2: - apply the change to autotools and scons as well (Emil) - C++ doesn't need this, it's already an error and the flag doesn't exist (Gert) v3: - drop scons, flags are not checked so until someone adds that functionality we can't have this. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> # v1 Reviewed-by: Emil Velikov <[email protected]> # v1 [Emil: apply the same change to autotools and scons] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: fix with_dri2 definition for GNU HurdEric Engestrom2019-03-061-1/+2
| | | | | | | | Suggested-by: Dylan Baker <[email protected]> Cc: Timo Aaltonen <[email protected]> Cc: James Clarke <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: avoid going back up the tree with include_directories()Eric Engestrom2019-03-051-2/+0
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* d3d: meson: do not prefix user provided d3d-drivers-pathSergii Romantsov2019-02-251-1/+1
| | | | | | | | | | | | | | | | | The user can select the location where there d3d drivers are installed by the d3d-drivers-path meson option. By default path will be $prefix/$libdir/d3d. Currently we add $prefix to the user provided path. Resulting in an incorrect or even missing path. Based on logic of Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109698 CC: Kenneth Graunke <[email protected]> CC: Emil Velikov <[email protected]> Signed-off-by: Sergii Romantsov <[email protected]> Reviewed-by: Emil Velikov <[email protected]>