Timo Aaltonen pushed to branch upstream-unstable at X Strike Force / lib / libglvnd
Commits: 8489d7f2 by Kyle Brenneman at 2020-11-19T12:31:17-07:00 tests: Don't allocate memory in glXMakeCurrentTestResults. Change the glXMakeCurrentTestResults function so that it returns the function counts in a caller-allocated struct instead of calling malloc internally. Also removed the GLmakeCurrentTestRequest enum, since there's only one request anymore. Aside from simplifying things, this also fixes a memory leak in testglxmakecurrent, which wasn't freeing the buffer that glXMakeCurrentTestResults allocated. Now, it can just use a stack-allocated GLContextCounts struct. - - - - - 6432f0dd by Kyle Brenneman at 2020-11-19T12:38:01-07:00 tests: Close the display in testglxmakecurrent. In testglxmakecurrent, close the display after we're done with it. - - - - - b5f0eac1 by Kyle Brenneman at 2020-11-19T12:39:30-07:00 tests: Fix a memory leak in testglxmakecurrent. In testglxmakecurrent, free the thread array. - - - - - 266f8e0d by Kyle Brenneman at 2020-11-19T12:46:13-07:00 tests: Close the display in testglxgetprocaddress. Add a missing XCloseDisplay call to testglxgetprocaddress. - - - - - a550e498 by Kyle Brenneman at 2020-11-19T13:57:42-07:00 tests: Add a mutex for the display list in EGL_dummy. Add a mutex to serialize access to the list of DummyEGLDisplay structs in EGL_dummy. - - - - - 16d3e9d1 by Kyle Brenneman at 2020-11-19T13:57:47-07:00 tests: Free the EGLDisplay list in EGL_dummy Added a destructor function to the EGL dummy vendor library, which frees the list of EGLDisplays. - - - - - 6e049b06 by Kyle Brenneman at 2020-11-19T13:57:47-07:00 tests: Free the thread state in EGL_dummy. In the destructor function for EGL_dummy, free all of the DummyThreadState objects, and delete the TSD key for them. - - - - - 1bb30a62 by Kyle Brenneman at 2021-05-18T17:07:18-06:00 tests/meson: Add dependencies for the dummy vendor libraries. Added a depends parameter to the GLX and EGL unit tests to ensure that meson builds the dummy vendor libraries before trying to run the tests. - - - - - 2b31e3b7 by Kyle Brenneman at 2021-05-26T12:52:25-06:00 tests: Work around a bug in Meson 0.58. Meson 0.58 doesn't accept an array within an array for the environment parameter to test(). See: https://github.com/mesonbuild/meson/issues/8727 Work around that by using "+" to join environment lists instead. Fixes https://gitlab.freedesktop.org/glvnd/libglvnd/-/issues/218 - - - - - 01ef19ca by Adrian Bunk at 2021-09-13T21:01:48+03:00 Update bin/symbols-check.py from mesa/mesa@6f854145 - - - - - 0dfeb77d by Kyle Brenneman at 2021-09-13T18:16:37+00:00 Merge branch 'master' into 'master' Update bin/symbols-check.py from mesa main See merge request glvnd/libglvnd!250 - - - - - e87d51f0 by Alex Xu (Hello71) at 2021-09-13T17:24:13-04:00 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. - - - - - 280843d7 by Alex Xu (Hello71) at 2021-09-13T17:24:13-04:00 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. - - - - - f3ef4d4a by Kyle Brenneman at 2021-09-13T22:38:34+00:00 Merge branch 'tls-portability' into 'master' Use initial-exec TLS for glibc and FreeBSD only, auto-enable TLSDESC See merge request glvnd/libglvnd!249 - - - - - 94ea1327 by Kyle Brenneman at 2021-09-13T17:11:55-06:00 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. - - - - - 79b012c6 by Kyle Brenneman at 2021-09-13T17:11:59-06:00 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. - - - - - 4de6e673 by Kyle Brenneman at 2021-09-13T17:14:57-06:00 CI: Test builds with TSD stubs and TLS variables Add builds to the CI script that use the TSD dispatch stubs, but use the TLS variable in u_current_tls.c for the dispatch table. That's the combination you'd get with musl or other non-glibc systems. - - - - - e579f218 by Felix Yan at 2021-09-16T22:04:51+00:00 Correct a typo in entry_pure_c.c - - - - - 34a07551 by Kyle Brenneman at 2021-09-17T14:01:47+00:00 Merge branch 'felixonmars-master-patch-49368' into 'master' Correct a typo in entry_pure_c.c See merge request glvnd/libglvnd!252 - - - - - 97db5662 by Charlotte Delenk at 2021-09-20T18:48:28+02:00 Mark entrypointFunctions as used for clang+lto LLVM currently ignores inline assembly references to symbols during dead code and data elimination while linking with link-time optimizations enabled. This manifests in a very large amount of unresolved references to entrypointFunctions when building libglvnd using clang with LTO enabled. This issue fixes #220 by marking the entrypointFunctions array as used, using a compiler attribute. Signed-off-by: Charlotte Delenk <[email protected]> - - - - - 62322a41 by Kyle Brenneman at 2021-09-20T17:42:33+00:00 Merge branch 'master' into 'master' Mark entrypointFunctions as used for clang+lto Closes #220 See merge request glvnd/libglvnd!253 - - - - - a7bb6f4d by Kyle Brenneman at 2021-09-30T09:21:34-06:00 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 - - - - - ef718bb1 by Kyle Brenneman at 2021-09-30T23:33:10+00:00 Merge branch 'fix-license-text' into 'master' Remove extra paragraph from license text Closes #221 See merge request glvnd/libglvnd!254 - - - - - 396c10bd by Alex Richardson at 2021-10-04T10:58:08+01:00 Add x11_headers dependency to all targets that use it This fixes the build for me since I have libX11 installed to a custom prefix, so the default include path does not include libX11. This fixes lots of instances of the following error: ../../libglvnd/include/EGL/eglplatform.h:109:10: fatal error: 'X11/Xlib.h' file not found Signed-off-by: Alex Richardson <[email protected]> - - - - - a1a2b323 by Kyle Brenneman at 2021-10-04T15:11:46+00:00 Merge branch 'add-missing-x11-includes-path' into 'master' Add x11_headers dependency to all targets that use it See merge request glvnd/libglvnd!255 - - - - - 0f5c40db by Alex Richardson at 2021-10-04T16:42:16+01:00 Add one more missing dep_x11_headers I missed this in 396c10bdd704e065ba6dd4d76d25dfbc0253e339 since I was building with -Dglx=disabled. This fixes the build with glx if the X11 libraries are installed into a custom prefix. Signed-off-by: Alex Richardson <[email protected]> - - - - - 7996207b by Kyle Brenneman at 2021-10-04T17:48:02+00:00 Merge branch 'one-more-x11-dep' into 'master' Add one more missing dep_x11_headers See merge request glvnd/libglvnd!257 - - - - - b3a958fe by Alex Richardson at 2021-10-05T09:34:36+01:00 Update uthash to v2.3.0 Also delete files and folders that are only useful in the original repository. Updating uthash to this version allows compiling with CHERI LLVM where the current version of uthash (1.9.8) triggers a warning that our build infrastructure includes in -Werror by default: ``` ../../libglvnd/src/util/winsys_dispatch.c:154:9: error: cast from provenance-free integer type to pointer type will give pointer that can not be dereferenced [-Werror,-Wcheri-capability-misuse] ../../libglvnd/include/lkdhash.h:86:5: note: expanded from macro 'LKDHASH_TEARDOWN' LKDHASH_TEARDOWN_2(_lh, _param, cur ## _ht, \ ^ ../../libglvnd/include/lkdhash.h:55:9: note: expanded from macro 'LKDHASH_TEARDOWN_2' HASH_DEL(_LH(_lockedhash), _cur); \ ^ ../../libglvnd/src/util/uthash/src/uthash.h:271:5: note: expanded from macro 'HASH_DEL' HASH_DELETE(hh,head,delptr) ^ ../../libglvnd/src/util/uthash/src/uthash.h:239:14: note: expanded from macro 'HASH_DELETE' ((UT_hash_handle*)((ptrdiff_t)_hd_hh_del->next + \ ^ ``` Signed-off-by: Alex Richardson <[email protected]> - - - - - 185ca4b3 by Kyle Brenneman at 2021-10-05T14:08:29+00:00 Merge branch 'update-uthash' into 'master' Update uthash to v2.3.0 See merge request glvnd/libglvnd!256 - - - - - 32aeccf6 by Kyle Brenneman at 2021-10-11T16:09:03+00:00 Merge branch 'tests-fix-leaks' into 'master' Fix memory leaks in unit tests See merge request glvnd/libglvnd!237 - - - - - 52747d70 by Kyle Brenneman at 2021-10-27T12:25:33-06:00 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. - - - - - fa9ef397 by Kyle Brenneman at 2021-10-27T12:27:47-06:00 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. - - - - - 27eb562a by Kyle Brenneman at 2021-10-27T12:27:47-06:00 tests: Remove the X11 dependency from the EGL tests. The EGL tests don't use X11, and only included the Xlib headers by way of eglplatform.h. Now that we don't set the USE_X11 macro anymore, eglplatform.h won't try to include anything from Xlib, and so the EGL tests don't need X11 as a dependency. - - - - - f73ae479 by Kyle Brenneman at 2021-10-27T18:29:35+00:00 Merge branch 'tls-config-options' into 'master' Add test coverage for TLS/TSD combinations See merge request glvnd/libglvnd!251 - - - - - 6816db80 by Kyle Brenneman at 2021-10-27T18:32:48+00:00 Merge branch 'meson-test-add-dummy-depends' into 'master' tests/meson: Add dependencies for the dummy vendor libraries. See merge request glvnd/libglvnd!242 - - - - - 922b85a9 by Kyle Brenneman at 2021-10-28T15:28:42+00:00 Merge branch 'fix-x11-config-option' into 'master' Fix the option to disable X11 in meson See merge request glvnd/libglvnd!258 - - - - - 2d69d472 by Kyle Brenneman at 2021-10-28T15:30:02+00:00 Merge branch 'meson-test-environment-workaround' into 'master' tests: Work around a bug in Meson 0.58. Closes #218 See merge request glvnd/libglvnd!243 - - - - - 2747fcd3 by Kyle Brenneman at 2021-11-25T09:51:20-07:00 EGL: Allow adding EGLDeviceEXT handles It's possible for new devices to become available while a program is running, so eglQueryDevicesEXT might need to return a different list. Change the EGLDeviceEXT hashtable so that each entry is allocated and added separately, rathat than allocating every entry in a single malloc. Added a new __eglAddDevice function, which adds an entry to the device hashtable. When the application calls eglQueryDevicesEXT, always call through to each vendor library, and add (or update) each EGLDeviceEXT to the hashtable. There's still no provision for removing an entry from the device hashtable. The semantics of hot-unplugging a device aren't defined yet, and there's no way to ensure that libglvnd's mapping will get updated if a device disappears asynchonously, so it's up to the vendor library to deal with the old handle. - - - - - 26d15a9f by Kyle Brenneman at 2021-11-25T09:51:20-07:00 EGL: Allow vendor's dispatch stubs to update the EGL device map. Export a new __EGLapiExports::setVendorForDevice function, which allows dispatch stubs to update the device hashtable when something returns an EGLDeviceEXT handle. Bumped the ABI version number to 1.2. - - - - - eaffa7bc by Kyle Brenneman at 2021-11-25T09:51:20-07:00 EGL: Add a dispatch stub for eglQueryDisplayAttribEXT. Add a dispatch stub for eglQueryDisplayAttribEXT, which updates the device hashtable if the application queries EGL_DEVICE_EXT. It's possible that eglQueryDisplayAttribEXT could return an EGLDeviceEXT handle that wasn't returned by eglQueryDevicesEXT, so the dispatch stub needs to add the handle to the device hashtable. - - - - - 6d43e9ba by Kyle Brenneman at 2021-11-25T09:51:20-07:00 tests: Add initial support for adding new devices to EGL_dummy. Added a new function to the EGL dummy vendor called DummySetDeviceCount, which will change the number of devices that it hands back for eglQueryDevicesEXT. Also added a new dummy extension function, eglTestReturnDevice, which will dispatch based on an EGLDisplay and return an EGLDeviceEXT handle. This is used to test the new __EGLapiExports::setVendorForDevice function. - - - - - 01316ea9 by Kyle Brenneman at 2021-11-25T09:54:56-07:00 tests: Update EGL test helpers to match the new EGL dummy vendor functions. Updated egl_test_utils.c/h to include the new eglTestReturnDevice function. Added functions to egl_test_utils.c/h to load each vendor's DummySetDeviceCount function using dlopen+dlsym. - - - - - af3f7e9c by Kyle Brenneman at 2021-11-25T09:54:56-07:00 tests: Added unit tests for adding new EGLDisplayEXT handles. Added a new test program, testegldeviceadd, which tests a vendor library adding a new EGLDeviceEXT handle after the application calls eglQueryDevicesEXT. It's got two subtests right now. "querydevices" will test returning the new device through a second eglQueryDevicesEXT call. "returndevice" tests returning the new device through a vendor-provided dispatch stub. - - - - - a5688ef2 by Kyle Brenneman at 2021-11-25T09:58:09-07:00 tests: Implement EGL_EXT_device_query in the dummy vendor. Added implementations for eglQueryDisplayAttribEXT, eglQueryDeviceAttribEXT, and eglQueryDeviceStringEXT. Defined a new EGL_DEVICE_INDEX attribute for eglGetPlatformDisplay that uses a device based on its index. This will allow us to test the case where eglQueryDisplayAttribEXT returns an EGLDeviceEXT handle that libglvnd hasn't seen before. - - - - - 288eb48c by Kyle Brenneman at 2021-11-25T09:58:10-07:00 tests: Add unit test for eglQueryDisplayAttribEXT. Extended testegldeviceadd to be able to test calling eglQueryDisplayAttribEXT to return a new EGLDeviceEXT handle. - - - - - 055a4bab by Kyle Brenneman at 2021-11-26T13:25:23+00:00 Merge branch 'egl-allow-adding-devices' into 'master' EGL: Allow adding EGLDeviceEXT handles See merge request glvnd/libglvnd!239 - - - - - db5ca337 by Kyle Brenneman at 2021-11-29T07:26:39-07:00 EGL: Add support for eglQueryDisplayAttribKHR and NV. There are KHR, EXT, and NV versions of eglQueryDisplayAttrib, so add support for all of them. Define separate eglQueryDisplayAttribEXT, eglQueryDisplayAttribKHR, and eglQueryDisplayAttribNV functions. They all call into the same common function, with the only difference being the name passed to an error callback. When loading a vendor library, check for the vendor's eglQueryDisplayAttrib using all three suffixes, and use whichever one is available. - - - - - 9d09a1a2 by Dylan Baker at 2021-12-06T09:59:26-08:00 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). - - - - - b56a13f3 by Kyle Brenneman at 2021-12-07T23:34:39+00:00 Merge branch 'submit/fix-get-option-x11' into 'master' meson: use required : feature option correclty See merge request glvnd/libglvnd!261 - - - - - 862dec3d by Kyle Brenneman at 2021-12-17T15:42:20+00:00 Merge branch 'add-eglQueryDisplayAttribKHR' into 'master' EGL: Add support for eglQueryDisplayAttribKHR and NV. See merge request glvnd/libglvnd!259 - - - - - 8f3c5b17 by Kyle Brenneman at 2021-12-17T08:49:38-07:00 Increment version number to 1.4.0. Increment the minor version this time, since we've extended the EGL vendor library interface. - - - - - 30 changed files: - .gitlab-ci.yml - README.md - bin/symbols-check.py - configure.ac - include/glvnd/GLdispatchABI.h - include/glvnd/libeglabi.h - include/glvnd/libglxabi.h - include/meson.build - meson.build - meson_options.txt - src/EGL/Makefile.am - src/EGL/libegl.c - src/EGL/libeglabipriv.h - src/EGL/libeglcurrent.h - src/EGL/libeglerror.c - src/EGL/libeglerror.h - src/EGL/libeglmapping.c - src/EGL/libeglmapping.h - src/EGL/libeglvendor.c - src/EGL/meson.build - src/GL/Makefile.am - src/GL/libgl.c - src/GL/meson.build - src/GLESv1/Makefile.am - src/GLESv1/meson.build - src/GLESv2/Makefile.am - src/GLESv2/meson.build - src/GLX/Makefile.am - src/GLX/glvnd_genentry.c - src/GLX/glvnd_genentry.h The diff was not included because it is too large. View it on GitLab: https://salsa.debian.org/xorg-team/lib/libglvnd/-/compare/dc084876b411366c3785b7584c216356169bb45e...8f3c5b17a21e2222ab3e5fd38870b915815aca49 -- View it on GitLab: https://salsa.debian.org/xorg-team/lib/libglvnd/-/compare/dc084876b411366c3785b7584c216356169bb45e...8f3c5b17a21e2222ab3e5fd38870b915815aca49 You're receiving this email because of your account on salsa.debian.org.

