summaryrefslogtreecommitdiff
path: root/meson.build
AgeCommit message (Collapse)AuthorFilesLines
3 daysturnip: Add kgsl backendKristian H. Kristensen1-0/+1
Lacking a bit around fences and wsi integration, but there's enough here to actually drive the GPU. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4479>
2020-09-04meson: drop leftover PTHREAD_SETAFFINITY_IN_NP_HEADEREric Engestrom1-6/+0
55765f80 replaced this with a check for the header itself. Fixes: 55765f80b9ce7cce4ec6 ("util/u_thread: include pthread_np.h if found") Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Jonathan Gray <jsg@jsg.id.au> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6548>
2020-08-31util/u_thread: include pthread_np.h if foundJonathan Gray1-1/+1
Required for pthread_set_name_np() on OpenBSD as there is no pthread_setaffinity_np() to define PTHREAD_SETAFFINITY_IN_NP_HEADER. Fixes: dcf9d91a80e ("util: Handle differences in pthread_setname_np") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5630>
2020-08-31meson: conditionally include -ldl in gbm pkg-config fileJonathan Gray1-0/+6
Follow libGL and only include -ldl in gbm pkg-config file if libdl was actually found. Many systems have these functions in libc and don't have libdl. Fixes: 816bf7d1644 ("meson: build gbm") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5630>
2020-08-31meson: don't build with USE_ELF_TLS on OpenBSDJonathan Gray1-1/+1
OpenBSD does not have TLS Fixes: a47c525f328 ("meson: build glx") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5630>
2020-08-31meson: don't advertise TLS support if glx wasn't build with itEric Engestrom1-0/+2
Fixes: a47c525f328 ("meson: build glx") Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5630>
2020-08-31meson: build with _ISOC11_SOURCE on OpenBSDJonathan Gray1-0/+2
Mesa builds with -std=c99 but uses timespec_get() a c11 function. Build with _ISOC11_SOURCE for c11 visibility when -std is specified. On linux c11 visibility comes from defining _GNU_SOURCE. Fixes: e3a8013de8c ("util/u_queue: add util_queue_fence_wait_timeout") Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5630>
2020-08-24meson: Fix lmsensors warning message.Vinson Lee1-2/+2
Fixes: 138c003d2273 ("meson: deprecated 'true' and 'false' in combo options for 'enabled' and 'disabled'") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6397>
2020-08-21wgl: Switch to Win10 version defines to enable usage of Win10 WGL callbacksJesse Natalie1-1/+1
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6228>
2020-08-20meson: Raise minimum version for SPIR-V OpenCL deps (v4)Pierre Moreau1-14/+26
SPIRV-LLVM-Translator had API-breaking changes during version 0.2.1. Since the new API was being used, a higher version has to be requested. While at it and since SPIRV-LLVM-Translator added a new API to request a specific SPIR-V version as well as allowed SPIR-V extensions, increase the version number to the first including those new features. v2: Require an LLVM version which is compatible with the SPIRV-LLVM-Translator that was found; that requirement was previously implicit and would be ensured when that library was built. Making it explicit will help in cases where multiple versions of LLVM might be installed. v3: fix use of undefined _minimum_llvmspirvlib_version_array v4 (Karol): fix creating the minimum requested version Simplifing the code Signed-off-by: Pierre Moreau <dev@pmoreau.org> Reviewed-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Serge Martin <edb@sigluy.net> Reviewed-by: Francisco Jerez <currojerez@riseup.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5038>
2020-08-19egl/x11_dri3: enable & require xfixes 2.0Eric Engestrom1-1/+1
Cc: 20.2 <mesa-stable> Signed-off-by: Eric Engestrom <eric@engestrom.ch> Acked-by: Michel Dänzer <mdaenzer@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6132>
2020-08-18meson: Make some warnings handled as errors with MSVCGert Wollny1-0/+2
We should really pass the right number and parameter types to functions. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6227>
2020-08-18meson: Add MSVC narrowing-int-to-char warningsDaniel Stone1-0/+2
MSVC seems quite keen to warn us that we're narrowing an int into a char, even if it fits entirely within range. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6227>
2020-08-18meson: fix trivial s/dir/dri/ typoEric Engestrom1-1/+1
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6354>
2020-08-17drisw: Port the MIT-SHM check to XCBAdam Jackson1-0/+2
The old version isn't thread-safe, and xlib makes it unreasonably difficult to write thread-safely. Fixes: mesa/mesa#3398 Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6294>
2020-08-17ac/llvm: handle static/shared llvm init separatelyPierre-Eric Pelloux-Prayer1-0/+1
Having a single init function works as expected for shared llvm, but when using a static llvm only one llvm will get initialized. This commit introduces 2 separate init function: - shared llvm = single public init function - static llvm = one init function for each module using llvm Fixes: 50d20dc055d ("ac/llvm: export ac_init_llvm_once in targets") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3376 Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6253>
2020-08-17vallium: initial import of the vulkan frontendDave Airlie1-2/+6
This is the initial import of the vallium frontend for gallium. This is only good enough to run the triangle and the gears demo (wrongly) from Sascha demos. Improvements are mostly on the llvmpipe side after this. It contains an implementation of the Vulkan API which is mapped onto the gallium API, and is suitable only for SOFTWARE drivers. Command buffers are recordred into malloced memory, then later they are played back against the gallium API. The command buffers are mostly just Vulkan API marshalling but in some places the information is processed before being put into the command buffer (renderpass stuff). Execution happens on a separate "graphics" thread, againt the gallium API. There is only a single queue which wraps a single gallium context. Resources are allocated via the new resource/memory APIs. Shaders are created via the context and bound/unbound in the second thread. (No HW for reasons - memory management, sw paths for lots of paths, pointless CPU side queue) v2: drop mesa_icd, drop cpp_args, drop extra flags, change meson config (Eric) v2.1: use meson-gallium job meson pieces: Reviewed-by: Eric Engestrom <eric@engestrom.ch> overall: Acked-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6082>
2020-08-08meson: bump required glvnd versionEric Engestrom1-1/+1
https://github.com/KhronosGroup/EGL-Registry/pull/95 has moved a couple of extensions defines and functions to the upstream `eglext.h`, but when 9a74746bd1f3bd28d4c4 sync'ed these files we broke compilation of apps that require these symbols on systems that don't have the updated Khronos headers. On non-GLVND builds, we still provide these headers, so everything's fine, but on GLVND builds the Khronos headers are external so we need to make sure we have a libglvnd version that's recent enough. Fixes: 9a74746bd1f3bd28d4c4 ("EGL: sync headers with Khronos") Signed-off-by: Eric Engestrom <eric@engestrom.ch> Acked-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6069>
2020-08-05meson: Define ANDROID and ANDROID_API_LEVEL when compiling for AndroidKristian H. Kristensen1-1/+5
Set ANDROID_API_LEVEL based on the value we already have and define ANDROID to make sure we build code paths that are guarded by that. Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6112>
2020-08-05ci: Include enough Android headers to let us compile test EGLKristian H. Kristensen1-8/+16
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6112>
2020-08-05util: Move stack debug functions to src/utilKristian H. Kristensen1-3/+1
Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6112>
2020-08-02meson: fix `-D xlib-lease=auto` detectionEric Engestrom1-1/+1
This is used by Vulkan, not EGL, and depends on having DRM/KMS, not GBM. Reported-by: Oschowa <oschowa@web.de> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3346 Fixes: e00adef34a5ce485e2c9 ("egl: automatically compile the `drm` platform when available") Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6150>
2020-07-30aco: add framework for testing isel and integration testsRhys Perry1-0/+4
And add some simple tests to demonstrate/test the pipeline builder and glsl_scraper.py. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Acked-by: Daniel Schürmann <daniel@schuermann.dev> Acked-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3521>
2020-07-30aco: add framework for unit testingRhys Perry1-0/+4
And add some "tests" to test and document currently unused features of the framework. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Acked-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Acked-by: Daniel Schürmann <daniel@schuermann.dev> Acked-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3521>
2020-07-17meson: Enable GCing of functions and data from compilation units by default.Eric Anholt1-0/+13
Normally, the linker will pull in any compilation unit (aka .c file) from a static lib (such as our shared util code) that is depended on by the code linking against it. Since that code is already compiled, the .text section is allowed to jump anywhere in .text, and the compiler can't garbage collect unused functions inside of a compile unit. Teasing callgraphs apart so that normal compilation-unit-level GCing can reduce driver size hurts the logical organization of the code and is difficult. As an example, once I'd split the format pack/unpack tables, I had to split out util_format_read/write() from util_format.c to avoid pulling in pack/unpack. But even then it didn't help, because it turns out turnip's pack calls pull in util_format_bptc.c for bptc packing, but that file also includes the unpack impls, and those internally call util_format_unpack, and thus we pulled in all of unpack. Splitting all of this to separate files makes code harder to find and maintain, and is a waste of dev time. By setting these compiler flags, the compiler puts each function and data symbol in a separate ELF section and the linker can then safely GC unused text and data sections from a compile unit that gets pulled in. There's a bit of a space cost due to having those separate sections, but it ends up being a huge win in disk space on my personal release driver builds: - i965_dri.so -213k - x86 gallium dri.so -430k - libvulkan_intel.so -272k - aarch64 gallium dri.so -330k - libvulkan_freedreno.so -783k No difference on iris drawoverhead -compat -test 1 on my skylake (n=60) Effect on debugoptimized build times (n=5) touch nir_lower_io.c build time (bfd) +15.999% +/- 3.80377% touch freedreno fd6_gmem.c build time (bfd) +13.5294% +/- 4.86363% touch nir_lower_io.c build time (lld) no change touch freedreno fd6_gmem.c build time (lld) +2.45375% +/- 2.2383% Reviewed-by: Eric Engestrom <eric@engestrom.ch> Acked-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5739>
2020-07-14nouveau: enable HMMKarol Herbst1-1/+1
v2: move declarations into libdrm v3: fix typos rework handling of how much memory to reserve v4: remove unused parameter unmap cutout on error and when the screen is destroyed v5: move into screen_create enable HMM only if CL gets enabled Signed-off-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5906>
2020-07-14Revert https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580Michel Dänzer1-1/+1
It broke the CI pipeline on master: https://gitlab.freedesktop.org/mesa/mesa/-/jobs/3604314 https://gitlab.freedesktop.org/mesa/mesa/-/jobs/3604315 Revert for now, to allow other MRs to be merged. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5905>
2020-07-14nouveau: enable HMMKarol Herbst1-1/+1
v2: move declarations into libdrm v3: fix typos rework handling of how much memory to reserve v4: remove unused parameter unmap cutout on error and when the screen is destroyed v5: move into screen_create enable HMM only if CL gets enabled Signed-off-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580>
2020-07-10egl: automatically compile the `drm` platform when availableEric Engestrom1-7/+10
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3161>
2020-07-10meson: move xlib-lease block further downEric Engestrom1-14/+14
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3161>
2020-07-10egl: always compile surfacelessEric Engestrom1-19/+11
It has no dependencies and costs virtually nothing to build. There is no downside to enabling it unconditionally, so let's do just that. Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3161>
2020-07-02meson: turn on Wimplicit-fallthrough project wideTimothy Arceri1-0/+1
This will help avoid coding errors and allows for less warnings from some static analysis tools. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5705>
2020-07-01meson: Do not enable USE_ELF_TLS for FreeBSDEmmanuel1-1/+1
Compiling with this option result in too much TLS usage and FreeBSD cannot handle that. Reviewed-by: Eric Engestrom <eric@engestrom.ch> Signed-off-by: Emmanuel <manu@FreeBSD.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3559>
2020-06-30meson: Revert commit overriding C++ standard with gnu++11 on ppc64elFrédéric Bonnard1-9/+0
Since a few versions, mesa now needs c++14 and compiling with gnu++11 on ppc64el fails. Let's use the default standard and fix the collision of types between c++ and altivec in a another patch. Cc: mesa-stable Signed-off-by: Frédéric Bonnard <frediz@debian.org> Reviewed-by: Francisco Jerez <currojerez@riseup.net> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4948>
2020-06-28meson: Do not require shader cache for radv.Bas Nieuwenhuizen1-3/+0
We fixed the compile error a while ago. Fixes: cc10b34e9ed "util/disk_cache: Fix disk_cache_get_function_timestamp with disabled cache." Reviewed-by: Drew Davenport <ddavenport@chromium.org> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5649>
2020-06-16meson: unbreak sysctl.h detection on BSDsJan Beich1-1/+8
Code: #include <sys/sysctl.h> Compiler stdout: Compiler stderr: In file included from testfile.c:1: /usr/include/sys/sysctl.h:1184:40: error: unknown type name 'size_t' int sysctl(const int *, u_int, void *, size_t *, const void *, size_t); ^ /usr/include/sys/sysctl.h:1185:40: error: unknown type name 'size_t' int sysctlbyname(const char *, void *, size_t *, const void *, size_t); ^ /usr/include/sys/sysctl.h:1186:42: error: unknown type name 'size_t' int sysctlnametomib(const char *, int *, size_t *); ^ 3 errors generated. Checking if "sys/sysctl.h" compiles: NO <https://gitlab.freedesktop.org/mesa/drm/-/commit/1f8ada802391> <https://gitlab.freedesktop.org/mesa/drm/-/commit/4083e8f2c659> Reviewed-by: Niclas Zeising <zeising@daemonic.se> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5462>
2020-06-02meson: remove "empty array"/"array of an empty string" confusionEric Engestrom1-13/+7
Until Meson 0.47, setting `-D arrayoption=` was not the same as setting `-D arrayoption=[]`; the latter cleared the array, while the former filled it with an empty string option. Since Meson 0.47 [1], the former maps to the latter, so empty items can only be set by explicitly giving an array containing an empty string, ie. `-D arrayoption="['']"`; however note that this is *not* what we want in any of the current Mesa code anyway. This makes the code handling array options a bit more complicated, and a lot more error-prone, so let's get rid of the confusion by removing the empty-string option. [1] https://github.com/mesonbuild/meson/commit/f3a8f9c34d95d862fb4d12869a7b31cea592561f Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/386>
2020-06-01meson: deprecated 'true' and 'false' in combo options for 'enabled' and ↵Dylan Baker1-64/+197
'disabled' To prepare to use meson's builtin feature options in the future, which are more powerful and provide useful feature for packagers, like the ability to turn all "automagic" features off, and then explicitly turn on the ones they want. This is designed to make the transition softer, since the 'true' and 'false' are still accepted, just with a warning. Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
2020-06-01meson: use gnu_symbol_visibility argumentDylan Baker1-11/+0
This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
2020-06-01meson: Use builtins for checking gnu __attributes__Dylan Baker1-31/+7
This requires less code, and will fast skip on compilers that are known to not have these, like MSVC. Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
2020-06-01meson: Use the check_header functionDylan Baker1-1/+1
Instead of open coding it. This was new in 0.47 Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
2020-06-01meson: Bump required version to 0.52.0Dylan Baker1-16/+6
This matches what other graphics space projects require now, and allows us to simplify a number of cases, as well as make use of new features in meson. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2737 Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
2020-05-23tree-wide: fix deprecated GitLab URLsEric Engestrom1-2/+2
They will stop working in the next GitLab release, so let's update them ASAP to make sure things are propagated to everyone by then. See: https://about.gitlab.com/releases/2020/05/06/gitlab-com-13-0-breaking-changes/#removal-of-deprecated-project-paths Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Eric Engestrom <eric@engestrom.ch> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5111>
2020-05-21meson: Disable GCC's dead store elimination for memory zeroing custom newDanylo Piliaiev1-0/+5
Some classes use custom new operator which zeroes memory, however gcc does aggressive dead-store elimination which threats all writes to the memory before the constructor as "dead stores". For now we disable this optimization. The new operators in question are declared via: DECLARE_RZALLOC_CXX_OPERATORS DECLARE_LINEAR_ZALLOC_CXX_OPERATORS The issue was found with lto builds, however there is no guarantee that it didn't happen with ordinary ones. CC: <mesa-stable@lists.freedesktop.org> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2977 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1358 Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5104>
2020-05-15util/rand_xor: use getrandom() when availableEmmanuel Gil Peyrot1-1/+1
This function has been added in glibc 2.25, and the related syscall in Linux 3.17, in order to avoid requiring the /dev/urandom to exist, and doing the open()/read()/close() dance on it. We pass GRND_NONBLOCK so that it doesn’t block if not enough entropy has been gathered to initialise the /dev/urandom source, and fallback to the next source in any error case. Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2026>
2020-04-24meson: Use dependency.partial_dependency()Quentin Glidic1-10/+3
It avoids calling pkg-config which was searched for in a wrong way, thus breaking setup where unprefixed pkg-config was banned (e.g. on Exherbo). Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net> Fixes: 53f9131205a63fa8b282ab2a7e96c48209447da0 ("meson: fix getting cflags from pkg-config") Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4701>
2020-04-23meson: correct windows-version defineErik Faye-Lund1-1/+1
The macro "_WINVER" does nothing, the macro definitions that matter for windows API version selection are "_WIN32_WINNT" and "WINVER". The header "sdkddkver.h" (which is included from thousands of different windows-headers) defines "WINVER" to the same value as "_WIN32_WINNT" of only the latter is defined, which explains why this works right now. But we shouldn't depend on that kind of luck, and instead define the right maco. Fixes: 3aee462781a ("meson: add windows compiler checks and libraries") Acked-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4681>
2020-04-21meson: update llvm dependency logic for meson 0.54.0Dylan Baker1-6/+8
In meson 0.54.0 I fixed the llvm cmake dependency to return "not found" if shared linking is requested. This means that for 0.54.0 and later we don't need to do anything, and for earlier versions we only need to change the logic to force the config-tool method if shared linking is required. Fixes: 821cf6942a390f5f64d8a2cff9933b24c84f7dc1 ("meson: Use cmake to find LLVM when building for window") Acked-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4556>
2020-04-20meson: do not disable incremental linking for debug-buildsErik Faye-Lund1-1/+6
Meson specifies /EDITANDCONTINUE for MSVC projects when using the debug build-type. This collides with our across-the-board disabling of incremental linking. It's clear that we don't want to do incremental linking for release-builds; it increase the code-size, and adds some needless jumps to be able to patch in new code. But for debug-builds this seems like a good thing; we can now debug and on-the-fly recompile changes if we want to. This flag seems to have been simply forwarded from the SCons build system, where it makes a bit more sense; SCons doesn't really integrate with visual studio, so you can't properly debug with it. But Meson does, so let's keep some bells-and-whistles here. So let's avoid disabling incremental linking for debug-builds. For other builds we still want to do this, because Meson only disables it automatically for minsize-builds. This avoids a boat-loads of warnings on the form: warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification Acked-by: Jose Fonseca <jfonseca@vmware.com> Acked-by: Dylan Baker <dylan@pnwbakers.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4572>
2020-04-16meson: tell flex that we support c99Erik Faye-Lund1-1/+1
flexint.h uses stdint.h if the compiler claims to support C99. MSVC doesn't support enough of C99 to enable this flag, but it supports enough to keep flex happy. Without this, we end up with *both* some flex-specific definitions as well as our own definitions from mesa-headers, producing a slew of compiler warnings. Reviewed-by: Brian Paul <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4577>