Change the package version to 0.1.999 to distinguish the master branch from
any release versions.
Release versions will get their own branches and tags with a specific version
number.
This is likely a temporary arrangement. For the near future, any releases will
likely be taken from specific commits in master that have gotten adequate
testing. This provides an easy way to tag those releases.
Using a large revision number for master ensures that other autoconf (or at
least pkg-config based) builds that expect a minimum version number will also
work with the latest master branch.
eglGetDisplay will now check for EGL_PLATFORM_DEVICE_EXT and
EGL_PLATFORM_WAYLAND_KHR.
For EGL_PLATFORM_DEVICE_EXT, it will just check if the native display is a
valid EGLDeviceEXT handle.
For EGL_PLATFORM_WAYLAND_KHR, it will check the actual pointer, using similar
logic to Mesa.
The implementation is mostly based off of libGLX.
Unlike GLX, libEGL will load all vendor libraries up front. This is necessary
for dealing with eglGetPlatformDisplay, as well as many client extensions.
Dispatching EGL functions is generally simpler than GLX. All display extension
functions by definition can be dispatched based on an EGLDisplay handle, so
it doesn't need to provide lookup functions for contexts or surfaces, and
vendor libraries don't have to add any EGL objects to tracking.
Only OpenGL and OpenGL ES and a handful of client extensions are supported so
far.
Fix the warnings that autogen.sh spits out.
Added libtool convenience libraries for the source files in src/util instead of
including them directly in other makefiles. This avoids a bunch of
subdir-objects warnings.
Added libtool convenience libraries for each of the glapi builds.
Flattened the vnd-glapi directory. In theory, just setting the subdir-objects
flag should be enough, but that causes failures where "make distcheck" doesn't
build all of the source files.
Removed the header file and the script to generate the __glXDispatchNoopPtr
table.
Also removed the dependency on Perl from configure.ac, since the rest of the
scripts are in Python.
Reviewed-by: aplattner@nvidia.com
Fixed a few order and variable name warnings.
Defined convenience libraries for the source files under src/util, to avoid the
subdir-objects warning from them.
Delete the x11glvnd directory.
Commented out the two tests that depend on it, testx11glvndproto and
testglxnscreens. Eventually, they should be rewritten to use the
GLX_EXT_libglvnd extension instead.
The code was disabled due to a glibc bug 16272. which as of this point
remains open.
As n alternative solution is already in place and fix for the mentioned
issue is unlikely to land in order distributions, it does not make it a
viable solution that we can use (in the near future).
Drop the code for now, to prevent anyone building a completely broken
library.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
All the functionality that this macro sets is either available or
superseded by the PKG_CHECK_MODULES(..., xorg-server) call.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Similar to previous commit - all of these have been part of the POSIX
and/or ISO C89/C99 standard for a decade or more. Additionally none of
the respective HAVE_ macros are checked.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Pretty much all of those are required by either POSIX 2001 or C99. Some
are even deprecated (gettimeofday). Furthermore neither one's HAVE_
macro is checked in existing code.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
The code does not rely on the GNUC specific behaviour (return valid
pointer if requested size is zero) nor does it check the relevant HAVE_
macros.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
... as opposed to hardcoding it. While we're here tweak the whole
command to use the standard - AM_V_at and @D, as opposed to @ and dir $@
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Some of the BSD platforms (OpenBSD and DragonFly come to mind) do not
have a python2 symlink.
Inspired by an identical patch for mesa by Jonathan Gray.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Since the code is no longer around we should not be lying to the user
that such a thing exists.
v2: tweak commit message (Arthur Huillet)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
The file in question does not exist (any more) in tree. Thus the only
reason behind this workaround/quirk is now gone :-)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Moved glvnd_pthread.h and glvnd_pthread.c into src/utils, and removed the
separate makefile for them. The other makefiles now just grab the source file
directly instead.
Reviewed-by: Andy Ritger <aritger@nvidia.com>
Two header files (libglxabi.h and GLdispatchABI.h) are public -- intended to be
used by vendor libraries, while the other headers are all internal to libglvnd.
Move the public header files to a new directory, include/glvnd.
Add a makefile so that the public headers are installed by make install.
Added a Makefile to build libGLESv1_CM.so. It's copied and adapted from the one
for libOpenGL.so.
The GLESv1 library currently exports all of the core functions in gl.xml for
GLES version 1.0.
Added a Makefile to build libGLESv2.so. It's copied and adapted from the one
for libOpenGL.so.
The GLESv2 library currently exports all of the core functions in gl.xml for
GLES versions 2.0 through 3.2, inclusive.
Fixed a couple lines in the libOpenGL makefile where it was using the wrong
variable name.
Added an explicit -version-info flag for libGLdispatch and libGLX.
Added the --no-undefined linker flag for libOpenGL, libGL, libGLdispatch, and
libGLX on systems where it's available.
This commit adds static and dynamic TSD stubs generation support for ARMv7.
Testing coverage includes all ARM / Thumb mode combinations between
libglvnd and a vendor implementation.
Use the AX_CHECK_ENABLE_DEBUG macro to add an --enable-debug option to the
configure script.
Silence an unused variable warning in libglx.c. A variable in CommonMakeCurrent
is only used in asserts, so setting NDEBUG means it's set but never used.
Remove the dbg_configure.sh script.
Added a new file entry_x86-64_tsd.h. It's just a copy of entry_x86_tsd.h for
now, since that's the interface that it has to match.
Updated entry.c to use the new file depending on the GLX_USE_TLS macro, just
like it does for x86.
Added a __GLDISPATCH_STUB_X86_64_TSD enum to GLdispatchABI.h, and a
matching ENTRY_X86_64_TSD enum to entry.h.
Added a "--disable-tls" flag to the configure script to tell it not to use a
TLS version.
Added #ifdefs for the assembler implementations for the __sync intrinsics.
Check the return value of malloc in glvnd_asprintf.
Change x11glvndclient.c back to using a (const char *) for the extension name.
- Add a config check for ((constructor)) and ((destructor)) funciton
attributes.
- Add missing GL/glxmd.h header.
- For sufficiently old gcc versions, revert to inline asm
implementations of Atomic{Increment,Swap,CompareAndSwap}()
- Add a local implementation of asprintf.
- entry_x86_tsd.h: Add missing cast to (char *) in entry_get_public
- glvnd_pthread.[ch]: Only use pthread_rwlock_t if it's available, and fall
back to pthread_mutex_t otherwise.
- trace.c: Add missing _GNU_SOURCE define
- uthash.h: Fix a -Wcast-qual warning
- x11glvndclient.c: Fix a -Wcast-qual warning by using a writable
array for storing the XGLV_EXTENSION_NAME
Based on a patch by Brian Nguyen.
Unfortunately, glibc has a bug where dlopening a shared library with
DT_FILTER or DT_AUXILIARY ELF headers can cause the application to
segfault (see https://sourceware.org/bugzilla/show_bug.cgi?id=16272).
Hence, for now, we can't rely on ELF symbol filtering to implement the
libGL compatibility library for libGLdispatch and libGLX. This change
re-implements libGL such that this is no longer necessary, by building
in the glapi static dispatch stubs and implementing thin wrapper
functions around GLX entrypoints.
- Rename getCachedProcAddress() to __glXGetCachedProcAddress() and give
this public visibility. This is used by the libGL wrapper library to
retrieve GLX entrypoints at load time.
- Link libGLX with the -Bsymbolic flag so __glXGetCachedProcAddress()
avoids referencing functions in the libGL wrapper library when libGL
and libGLX are both loaded.
- Replace the hand-coded no-op definitions in libglxnoopdefs.h with
a spec file, glx_funcs.spec, and a simple Perl script, gen_stubs.pl,
which parses the file and generates no-op functions as well as
pass-through functions that are used by libGL.
- Restructure GLdispatch/vnd-glapi/mapi/entry.c such that the pure C
fallback code is in its own header, entry_pure_c.h. In each of the
entry_*.h headers, separate code not related to implementing the
static dispatch stubs into an "#if !defined(STATIC_DISPATCH_ONLY)"
block.
- Give u_current (which is #defined as _glapi_Current or
_glapi_tls_Current depending on the thread storage model used) public
visibility so it can be referenced from outside of libGLdispatch.so.
- When building libGL, include GLdispatch/vnd-glapi/mapi/entry.c in the
sources, and define STATIC_DISPATCH_ONLY so that only the static
entrypoints are compiled. Remove the -Wl,--auxiliary flags from
Makefile.am.
Bonus: fix "make distcheck" by adding GLdispatchABI.h to noinst_HEADERS.
Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
This requires adding ACLOCAL_AMFLAGS variable to the toplevel
Makefile.am which includes the m4 subdirectory since Autotools won't
necessarily check the contents of AC_CONFIG_MACRO_DIR() (see [1] for
more info).
[1] http://www.gnu.org/software/libtool/manual/html_node/Invoking-libtoolize.html
Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
Currently, the GLdispatch makefile recurses into the mapi/vnd-glapi
subdirectory, which then uses files out of its parent directory. This makes it
difficult to include the mapi directory in the dist tarball because just
including it in EXTRA_DIST makes it pick up the generated Makefile in addition
to the checked-in source files.
Instead, exchange the two directories so that mapi is a subdirectory of
vnd-glapi and the former is included wholesale with EXTRA_DIST.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
The build doesn't recurse into these directories, so their Makefile.in files
aren't propagated to the dist tarball. That makes configure fail because it
tries to read those files to generate Makefiles in those directories.
Since these directories aren't built, don't try to create Makefiles in them.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
Automake still defaults to verbose output unless you explicitly request that the
silent rules be enabled by default. It's possible to only enable the silent
rules on versions of automake that actually support it, but automake 1.11 has
been around for long enough that it seems easier to just bump the minimum
required version.
Add the boilerplate required to turn on the silent rules by default. They can
still be disabled by passing --disable-silent-rules to configure or by passing
V=0 on the make command line.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
Currently, both GLX and GLdispatch recurse into src/util/trace. This causes
problems for parallel make, and breaks distclean because the first recursion
into src/util/trace deletes the Makefile, causing the second recursion to fail.
Instead, recurse directly into util from src/Makefile.am, putting it ahead of
both GLX and GLdispatch in SUBDIRS. This means that you can't just go into
src/GLX and type make, but it fixes parallel builds and distclean.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
This vendor library will be loaded by the API library in various
subtests in the test suite, and will implement the bare minimum
needed to verify features and code paths in the API library. This
includes creating a fake GL "context", making current to the
"context", and calling some GL functions.
This adds build infrastructure for unit testing the API library
using the serial test harness. TODO: this should be replaced with
the parallel test harness, as the automake documentation says the
serial harness is deprecated.
The first and last tests to be run are scripts to initialize the test
environment (an X session with a special -modulepath argument and
xorg.conf file to pick up x11glvnd) and tear it down after all unit
tests are run.
This also adds a placeholder directory for a fake vendor library
called "GLX_dummy", to be implemented later.
libOpenGL is a filter library on libGLdispatch which only exports the
core GL 1.x-4.x entrypoints.
libGL is a filter library on libGLX and libGLdispatch which only exports
the core GL 1.x-4.x entrypoints and GLX 1.4 entrypoints. This is a
backwards compatibility layer for legacy apps which link against the old
libGL.so ABI.
- Replace hard-coded mapi and mesa paths in mapi makefiles with the
autoconf variables MAPI_PREFIX and MAPI_MESA_PREFIX
- In mapi_abi.py, create a new vnd-glapi printer which provides a
statically-linked glapi (implemented using mapi) with public symbols
for consumption by libGLdispatch.
- Create a vnd-glapi subfolder and makefile for building glapi in this
mode, copied from shared-glapi. The Makefile.am (not SConscript) has
been modified to build glapi_mapi_tmp.h using the vnd-glapi printer.
- Fix top-level makefile to call into the mapi/vnd-glapi subdirectory,
and configure.ac to generate the makefile at bootstrap time.
This will be used to handle the corner case when a drawable XID is
passed into the API library which belongs to an X window or otherwise
has never been seen before by the process, by providing a way to lookup
which screen the corresponding drawable belongs. This still is racey
since we can't guarantee a different process won't free the XID and
cause it to be recycled as a handle for a different resource after the
lookup, but better than not being able to figure out the mapping at all.
This extension also solves the less-difficult problem of mapping a
screen to a vendor name (though it may make more sense to at some point
directly map drawables to a vendor to better support render-offload
scenarios).
Move the GLdispatch header file to its own directory in src/GLdispatch,
and build a real DSO that GLX will depend on. In GLdispatch.c, add stub
functions which will later be fleshed out.
This is a wrapper library around libpthread which implements
single-threaded fallbacks in case the API library is loaded in an
application which does not link against pthreads.