Commit Graph

33 Commits

Author SHA1 Message Date
Kyle Brenneman c7cdf0cc43 Increment the version number to 1.5.0.
Increment the minor version, since we added some features that other
things might depend on.
2022-08-22 07:02:53 -06:00
Dylan Baker ca2eeb5a3b meson: remove dep_glx
It's just an array holding two external dependencies, and we usually use
dep_* to mean "here's a dependency object that subprojects can use".
2022-07-06 14:15:28 -07:00
Kyle Brenneman b90f235998 meson: Use assembly stubs on ARMv6.
Change the ARM version macro check in the meson file so that it'll look
for __ARM_ARCH_6__ or an __ARM_ARCH value >= 6.
2022-06-01 07:15:35 -06:00
Kyle Brenneman 8f3c5b17a2 Increment version number to 1.4.0.
Increment the minor version this time, since we've extended the EGL
vendor library interface.
2021-12-17 08:49:38 -07:00
Dylan Baker 9d09a1a238 meson: use required : feature option correclty
The code here is a complicated way to write exactly the same thing. If
`get_option('x11')` returns `disabled`, ie `-Dx11=disabled` then
`dependency()` short circuits and returns a not found object (just like
`dependency('', required : false)`, but with the correct name for error
messages).
2021-12-06 09:59:26 -08:00
Kyle Brenneman 922b85a94a Merge branch 'fix-x11-config-option' into 'master'
Fix the option to disable X11 in meson

See merge request glvnd/libglvnd!258
2021-10-28 15:28:42 +00:00
Kyle Brenneman f73ae47989 Merge branch 'tls-config-options' into 'master'
Add test coverage for TLS/TSD combinations

See merge request glvnd/libglvnd!251
2021-10-27 18:29:35 +00:00
Kyle Brenneman fa9ef3971f Replace USE_X11 macro with ENABLE_EGL_X11.
If x11 support is enabled, then the meson and configure scripts will set
a macro named ENABLE_EGL_X11 instead of USE_X11.

USE_X11 will also select the Xlib typedef of EGLNativeDisplayType in
eglplatform.h, and libglvnd does not need or want those.

Enabling or disabling X11 support for EGL only affects platform
detection in eglGetDisplay. The rest of libEGL is supposed to treat
EGLNativeDisplayType as an opaque void* pointer.
2021-10-27 12:27:47 -06:00
Kyle Brenneman 52747d70e0 meson: Don't use x11 at all if the x11 feature is disabled.
Currently, building with -Dx11=disabled or -Dx11=auto gives identical
results.

In both cases, it only makes the x11 dependency optional: It'll still
look for libx11, and if libx11 is available, then it'll still build with
X11 support enabled.

This changes the meson build so that if you pass -Dx11=disabled, then it
will use a dummy dependency for x11, which will cause it to build as if
libx11 was not available.
2021-10-27 12:25:33 -06:00
Kyle Brenneman a7bb6f4d19 Remove extra paragraph from license text.
Remove the "If only executable code is distributed..." paragraph from
the license text. Everything now uses a normal MIT license.

The only code from Khronos that's included in libglvnd is the EGL/GL
header and XML files, which do not contain that paragraph.

Fixes https://gitlab.freedesktop.org/glvnd/libglvnd/-/issues/221
2021-09-30 09:21:34 -06:00
Kyle Brenneman 79b012c645 meson: Add an option to use the TSD dispatch stubs.
Add a 'dispatch-tls' option. Setting the option to false will force it
to use the TSD dispatch stubs for builds that would otherwise support
the TLS stubs.

This is mostly for test coverage, to make it easier to test builds that
use the __thread variable (u_current_tls.c), but still use the TSD
dispatch stubs.
2021-09-13 17:11:59 -06:00
Kyle Brenneman 94ea1327d8 meson: Change the 'tls' option to be boolean.
Change the 'tls' option to be a boolean value instead of a feature.

This still allows manually disabling TLS in builds that would otherwise
support it, but it shouldn't be affected by meson's --auto-features
option.
2021-09-13 17:11:55 -06:00
Alex Xu (Hello71) 280843d7f7 Auto-enable TLSDESC support
TLSDESC speeds up access to global-dynamic TLS. TLS asm stubs do not
support TLSDESC, but all accesses are to initial-exec symbols anyways,
so it is not necessary to handle that separately.
2021-09-13 17:24:13 -04:00
Alex Xu (Hello71) e87d51f006 Use initial-exec TLS for glibc and FreeBSD only
It is not portable to use initial-exec TLS in dlopened libraries. glibc
and FreeBSD allocate extra memory for extra initial-exec variables
specifically for libGL, but other libcs including musl do not.

Since TLS entry asm assumes IE TLS, use TSD asm in other cases. Update
autoconf to match meson logic: enable ELF TLS if it is supported,
regardless of which type of asm is being used.
2021-09-13 17:24:13 -04:00
Matt Turner dc084876b4 Bump the version number to 1.3.4. 2021-08-24 12:53:07 -07:00
Matt Turner 0f0d49f0f3 Bump the version number to 1.3.3. 2021-04-30 15:09:52 -04:00
Kyle Brenneman c1c60ac80a GLdispatch: Add a build option to disable entrypoint patching.
Added a --disable-entrypoint-tracking configure option and an
'entrypoint-patching' meson option to disable libGLdispatch's entrypoint
patching at build time.

If entrypoint patching is disabled, then it #ifdef's out the mprotect call, and
acts as if mprotect had failed, which causes libGLdispatch to skip trying to
perform any patching.

Fixes https://gitlab.freedesktop.org/glvnd/libglvnd/-/issues/217
2021-04-21 16:22:39 -06:00
Philippe Coval aced60b04d build: Support meson-0.49.2
Ternary operator inside method call crashes the parser,
so it's relocated outside.

This change will help to build project under latest debian:10

Forwarded: https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests
Bug: https://github.com/NVIDIA/libglvnd/issues/198
Relate-to: https://github.com/mesonbuild/meson/issues/5003
Signed-off-by: Philippe Coval <rzr@users.sf.net>
Change-Id: I18b6e8eca7564a6a252fff1ec6299311a3a92669
2020-07-01 17:42:11 +02:00
Matt Turner da0edd9728 Bump the version number to 1.3.2. 2020-06-25 15:17:25 -07:00
Matt Turner 55a9dd3160 Remove -Werror from default CFLAGS
The set of warnings emitted are dependent on compiler version,
optimization level, CPU architecture, dependency versions, etc. It's not
tractable for a code base to be warning free under all circumstances,
and it's widely agreed that -Werror should not be enabled by default.

Given that it's trivial for developers to enable -Werror for autotools
by settings CFLAGS=-Werror and for meson with -Dwerror=true we should
not enable -Werror by default and require builders to disable it.

See https://devmanual.gentoo.org/ebuild-writing/common-mistakes/index.html#-werror-compiler-flag-not-removed

Reviewed-by: Eric Anholt <eric@anholt.net>
2020-06-25 11:59:51 -07:00
Kyle Brenneman 3e8684a739 Merge branch 'meson-werror' into 'master'
meson: Treat warnings as errors.

See merge request glvnd/libglvnd!226
2020-05-20 20:38:51 +00:00
Kyle Brenneman 4f9e991246 meson: Treat warnings as errors.
In the Meson build, treat warnings as errors like we do in the autotools build.
2020-05-20 13:52:39 -06:00
Matt Turner 1c32de0707 Bump the version number to 1.3.1. 2020-02-21 13:28:47 -08:00
Kyle Brenneman 45e2a061e8 Meson: Add datadir and datarootdir variables to libglvnd.pc.
Add the missing datadir and datarootdir variables to the libglvnd.pc file that
Meson generates.
2020-01-10 12:11:01 -07:00
Kyle Brenneman 6103052046 meson: Try to detect older ARM builds.
When building for armel, Meson's cpu() and cpu_family() strings aren't always
sufficient.

Instead, try to check for some predefined macros to determine if it's building
for ARMv7 or something older.
2019-12-13 09:21:00 -07:00
Kyle Brenneman 444035fd46 meson: Print the CPU and CPU family. 2019-12-13 09:20:57 -07:00
q66 c31a7c06eb vnd-glapi: allow asm to be used on ELFv2 ppc64 big endian
These entry points are actually not little endian specific,
but they are specific to ELFv2 ABI. ELFv2 ABI can be used
on either little or big endian, and there are distributions
doing so (e.g. Void Linux, Adélie Linux) as well as other
OSes transitioning (FreeBSD).

These have been confirmed to work on a Power Mac G5 running
Void Linux.
2019-12-09 18:49:41 +01:00
Kyle Brenneman fb6c3e4211 meson: Print the dispatch stub type.
Print the value of gl_dispatch_type so that you can easily tell from the output
what it's going to be using.
2019-12-06 08:01:37 -07:00
Kyle Brenneman ca979ad02e meson: Remove the GLDISPATCH_TYPE_* macro.
The GLDISPATCH_TYPE_* macro is not needed anywhere, so don't set it.
2019-12-06 07:55:00 -07:00
Kyle Brenneman 5ffb8df0ae meson: Fix the PPC64 build.
Check for a cpu_family value of 'ppc64', not 'ppc'. 'ppc' is for 32-bit power.

In GLdispatch, fix the file list for the PPC64 entrypoints.
2019-12-06 07:29:11 -07:00
Matt Turner 05e762ba74 Bump the version number to 1.3.0. 2019-12-05 16:44:43 -05:00
Matt Turner 0f39337dad Drop unnecessary assembly macros
These were presumably copied from Mesa where they enable assembly code
that is not part of the dispatch layer. They are unused in libglvnd.
2019-12-05 16:16:00 -05:00
Dylan Baker 16dc32352d Add meson build system
Theres a couple of things that this meson build system does differently
than autotools. It doesn't use a config.h file, it just puts #defines on
the command line with -D. It also does all of the code generation in the
generated folder, simply because it's simpler to do that.

On my 2 core / 4 thread KBL system:

autotools (no ccache):
sh -c "./autogen.sh&& ./configure && make -j6 check"  44.74s user 6.70s system 145% cpu 35.269 total

autotools (warm ccache):
sh -c "./autogen.sh&& ./configure && make -j6 check"  32.86s user 4.22s system 129% cpu 28.580 total

meson (no ccache):
sh -c "meson build; ninja -C build test"  23.48s user 3.71s system 236% cpu 11.487 total

meson (warm ccache)
sh -c "meson build; ninja -C build test"  16.06s user 2.31s system 210% cpu 8.727 total
2019-12-05 12:01:36 -08:00