Commit Graph

853 Commits

Author SHA1 Message Date
Kyle Brenneman 793a772d3f tests/meson: Use shared_library instead of shared_module.
Use shared_library() instead of shared_module() when building the dummy
libraries. This causes Meson to add --no-undefined to the linker instead of
--allow-shlib-undefined.
2019-12-09 07:20:52 -07:00
Kyle Brenneman 4852538bdb Merge branch 'master' into 'master'
Fix linking #199

See merge request glvnd/libglvnd!210
2019-12-09 14:16:21 +00:00
Tomasz Paweł Gajc 3e03924a53 Fix linking #199 2019-12-09 11:31:13 +00:00
Matt Turner f45587842f Merge branch 'fix-meson-arch' into 'master'
Fix Meson build for ARM and PPC

See merge request glvnd/libglvnd!209
2019-12-06 17:11:17 +00:00
Matt Turner 01c0eb4ec1 meson: s/arm_tsd/armv7_tsd/
This matches configure.ac and also allows Meson to configure on ARMv7.
Otherwise it would fail with

    ERROR: Problem encountered: No matching ASM file for armv7_tsd
2019-12-06 12:06:52 -05: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
Kyle Brenneman 9ccdb05cdd meson: Fix the armv7 build.
Fix the GLdispatch meson file so that it checks for the value "armv7_tsd" for
gl_dispatch_type instead of "arm_tsd".
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
Eric Engestrom a1350eef8a Merge branch 'meson' into 'master'
New meson build system

See merge request glvnd/libglvnd!199
2019-12-05 20:26:41 +00:00
Dylan Baker cdf63cfcd5 gitlab-ci: Also run meson from the dist tarball 2019-12-05 12:01:36 -08:00
Dylan Baker bc908ed8dd gitlab-ci: Add meson build support 2019-12-05 12:01:36 -08:00
Dylan Baker e10e423c3c gitlab-ci: Install meson dependencies for meson building 2019-12-05 12:01:36 -08:00
Dylan Baker 61ed0176c9 gitlab-ci: Split some parts that are autotools specific 2019-12-05 12:01:36 -08:00
Dylan Baker 416e73a89b README: add content about using meson 2019-12-05 12:01:36 -08:00
Dylan Baker b308a876d3 autotools: Include meson.build and meson_options.txt in dist 2019-12-05 12:01:36 -08: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
Dylan Baker 24fddd6eaa tests/dummy/glx: Remove config.h
autotools force includes this with `-include config.h`, so it's
unnecessary to make compilation work. Meson doesn't generate a config.h
so this will break meson compilation.
2019-12-05 11:50:56 -08:00
Kyle Brenneman a9060bb67d tests: Add tests for the end of the dispatch table.
Add a '-l' flag to testgldispatch, which tells it to test a generated stub
at the very end of the dispatch table.

On PPC, looking up a function past index 4096 requires more than just a simple
register+immediate load, so this makes sure that it's correct.
2019-12-05 11:50:56 -08:00
Matt Turner cbd5f13fe8 Merge branch 'tests-gldispatch-check-last' into 'master'
Add unit tests for the end of GLdispatch's dispatch table.

See merge request glvnd/libglvnd!203
2019-12-05 18:22:38 +00:00
Kyle Brenneman fbcce35d97 Merge branch 'cleanup-assembly' into 'master'
Remove runtime assembly generation

See merge request glvnd/libglvnd!202
2019-12-05 18:13:17 +00:00
Kyle Brenneman 3f6730ca08 tests: Add tests for the end of the dispatch table.
Add a '-l' flag to testgldispatch, which tells it to test a generated stub
at the very end of the dispatch table.

On PPC, looking up a function past index 4096 requires more than just a simple
register+immediate load, so this makes sure that it's correct.
2019-12-04 12:28:03 -07:00
Kyle Brenneman db89fc7462 Merge branch 'meson-test-fixes' into 'master'
Test changes from the meson MR

See merge request glvnd/libglvnd!206
2019-12-04 18:52:39 +00:00
Dylan Baker 3a7aed009c tests: Add symbol check tests
These use the symbol-check.py script from mesa, and should help to
ensure that glvnd doesn't start exposing/hiding new symbols. It's also
useful to double check that meson and autotools are doing the same
thing.
2019-12-04 10:02:00 -08:00
Eric Engestrom 12caca778a Merge branch 'editorconfig' into 'master'
Add .editorconfig file

See merge request glvnd/libglvnd!205
2019-12-04 17:33:53 +00:00
Dylan Baker ad2c870ad8 tests: Add -t to testgldispatch patched thr test
Since right now it tests the same thing as the patch test
2019-12-04 08:53:00 -08:00
Dylan Baker 000a0f2b71 Add .editorconfig file
Many project in the freedesktop graphics space use editorconfig files as
a way to standardize style in an editor agnostic way. This one
configures all of the files current in libglvnd (I looked at the .c and
.h files and they seem to all use 4 spaces for indent). Because it
seemed everything used 4 spaces I just set that to the default and
overrode as necessary.
2019-12-04 08:51:22 -08:00
Kyle Brenneman 7b9e9ad684 Merge branch 'egl-fix-ext-export' into 'master'
EGL: Fix two exported extension functions

Closes #196

See merge request glvnd/libglvnd!204
2019-12-04 15:10:29 +00:00
Kyle Brenneman fc32d56862 EGL: Fix two exported extension functions
Fix a bug in gen_egl_dispatch.py which caused libEGL.so to export two extension
functions, eglCreatePlatformWindowSurfaceEXT and
eglCreatePlatformPixmapSurfaceEXT.

Fixes https://gitlab.freedesktop.org/glvnd/libglvnd/issues/196
2019-12-04 08:06:08 -07:00
Eric Engestrom eade458a67 Merge branch 'gitlab-ci-fixes' into 'master'
gitlab-ci: Update the wayland-template version

See merge request glvnd/libglvnd!207
2019-12-04 00:09:20 +00:00
Dylan Baker 3aec7f0903 gitlab-ci: Update the wayland-template version
This resolves issues with creating a docker image.
2019-12-03 15:51:34 -08:00
Aaron Plattner 2d5d9d6c3a Merge branch 'tests-fix-missing-libs' into 'master'
tests: Fix some missing libraries

See merge request glvnd/libglvnd!201
2019-12-03 21:39:43 +00:00
Kyle Brenneman e9b5e559a1 Merge branch 'egl-no-x11-macro' into 'master'
EGL: Set EGL_NO_X11 macro if --disable-x11 is used.

See merge request glvnd/libglvnd!193
2019-11-22 23:56:40 +00:00
Kyle Brenneman 9ba775ea21 configure: Define EGL_NO_X11 unconditionally.
Change the configure script to define the EGL_NO_X11 macro unconditionally, so
that the EGL headers don't try to include the Xlib headers.

Regardless of whether --disable-x11 is used, libglvnd doesn't need X11-specific
typedefs for EGLNativeDisplayType et. al.
2019-11-22 16:39:46 -07:00
Kyle Brenneman 3465c7c203 GLdispatch: Remove entry_init_public().
entry_init_public() is empty on all platforms, so just remove it.
2019-11-22 15:58:11 -07:00
Kyle Brenneman 3c27c9811e GLdispatch: Remove runtime assembly code generation.
Removed the rest of the assembly code generation from libGLdispatch. Since we
don't need to generate dispatch stubs at runtime for extension functions
anymore, the code generation is now only used to restore the dispatch stubs
after a vendor library patches them.

Now, instead of reconstructing each dispatch stub, libGLdispatch will just
allocate a copy of all of the entrypoints before patching them, and then it
uses memcpy to restore them.
2019-11-22 15:58:11 -07:00
Kyle Brenneman aeb905d8a7 util: Remove the executable allocation functions.
Remove all of the functions related to allocating executable memory, since
they're no longer needed.
2019-11-22 15:58:11 -07:00
Kyle Brenneman 77c4c27e0b tests: Fix some missing libraries.
Fixed some missing static libraries for the EGL dummy vendor library.

Added Xlib to the GLX dummy library.

Added the --no-undefined flag for both of the dummy vendor libraries.
2019-11-22 15:03:30 -07:00
Kyle Brenneman 005d2568ee Merge branch 'fasm2' into 'master'
GLdispatch: Improve the x86 tsd stubs performance.

See merge request glvnd/libglvnd!197
2019-11-22 21:49:07 +00:00
Kyle Brenneman 79b1b8933d Merge branch 'tls' into 'master'
GLdispatch: Improve the x86 TLS stubs performance.

See merge request glvnd/libglvnd!196
2019-11-22 21:48:56 +00:00
Kyle Brenneman 02b8b9332b Merge branch 'github/fork/kbrenneman/compile-time-stubs-gldispatch-v2' into 'master'
GLdispatch: Define all dispatch stubs at compile time (v2)

See merge request glvnd/libglvnd!145
2019-11-22 20:40:27 +00:00
Kyle Brenneman 67aa9ac505 Merge branch 'github/fork/kbrenneman/compile-time-stubs-glx-v2' into 'master'
GLX: Define the GLX dispatch stubs at compile time (v2)

See merge request glvnd/libglvnd!146
2019-11-22 20:39:13 +00:00
Kyle Brenneman 6811a4bcc9 GLX: Add labels to the GLX entrypoint stubs. 2019-11-22 13:16:48 -07:00
Kyle Brenneman 50a0db2457 GLX: Define the GLX dispatch stubs at compile time.
Rewrote the generated dispatch stubs for GLX so that they're all defined at
compile time, instead of generating them at runtime.

Insted of patching the address of the vendor-provided functions into the
assembly stubs, it will now keep a separate array of function pointers. The
assembly stubs will look up the approprite entry in that array and jump to it.

As a result, the assembly code is entirely static, so we don't need to deal
with generating or modifying executable code at runtime.
2019-11-22 13:16:44 -07:00
Kyle Brenneman 0c08a09276 GLdispatch: Use all 4096 dynamic dispatch stubs.
In stub_add_dynamic, use all 4096 dynamic dispatch stubs. There's no longer any
need to leave the last one empty.
2019-11-22 10:18:55 -07:00
Kyle Brenneman 13df532963 GLdispatch: Change entry_generate_default_code to take an index.
For better consistency with the rest of GLdispatch, entry_generate_default_code
now takes the index of the stub instead of a function pointer.
2019-11-22 10:18:55 -07:00
Kyle Brenneman 44ea7c355b GLdispatch: Change entry_get_patch_address to return a single address.
entry_get_patch_address now returns a single address, since it doesn't have
separate writable and executable mappings anymore.
2019-11-22 10:18:55 -07:00
Kyle Brenneman 5222e64d82 GLdispatch: Move entry_get_patch_addresses into entry_common.c.
Move the function entry_get_patch_addresses into entry_common.c for all
architectures.

Now that it takes an index instead of a pointer, ther's no longer a difference
between ARMv7 and everything else.
2019-11-22 10:18:55 -07:00