Commit Graph

30 Commits

Author SHA1 Message Date
Olivier Fourdan 899cebb76a configure: Build hashtable for Xres and glvnd
With autoconf, hashtable support is built along with Xres support.

Yet, glvnd also use it, so when disabling Xres from configure, the
build will fail at link time because hashtable functions are not
available.

Untie the build of hashtable from Xres support, just like meson build
does.

Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1091
2020-11-09 09:38:46 +00:00
Adam Jackson afccb266ed glx: Add vndserver.h to the SDK
Also unbreak 'make distcheck', sigh autotools.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-28 12:56:36 -05:00
Kyle Brenneman 8753218bea glx: Import glxvnd server module (v2)
This is based on an out-of-tree module written by Kyle:

https://github.com/kbrenneman/libglvnd/tree/server-libglx

I (ajax) did a bunch of cosmetic fixes, ported it off xfree86 API,
added request length checks, and fixed a minor bug or two.

v2: Use separate functions to set/get a context tag's private data, and
call the backend's MakeCurrent when a client disconnects to unbind the
context. (Kyle Brenneman)

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-14 17:04:35 -05:00
Jon Turney 03d99ef729 glx/dri2: Don't build DRI loader if DRI2 isn't enabled
This partially reverts 501d8e2b.

Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-10-27 14:25:42 +01:00
Emil Velikov 501d8e2beb configure.ac: remove --enable-aiglx option
Presently the option guards both direct and accelerated indirect GLX. As
such when one toggles it off they end up without any acceleration.

Remove the option all together until we have the time to split/rework
things.

Cc: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-10-05 14:15:59 -04:00
Adam Jackson c1fd143f28 glx: Remove function stubs
Now that we're calling non-1.2 ABI things by function pointer this is no
longer needed.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2013-12-10 08:03:22 -08:00
Keith Packard 3dd5bfe540 present: Send GLX_BufferSwapComplete events from present extension
This allows GL to support the GLX_INTEL_swap_event extension.

v2: Return GLX_BLIT_COMPLETE_INTEL for unknown swap types

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2013-12-05 09:51:00 -08:00
Adam Jackson be6680967a glx: convert to direct GL dispatch (v2)
We now expect to be linked against something that provides the GL API,
instead of manually grubbing about in the DRI driver's dispatch table.
Since the GLX we expose calls GL functions that are meant to be looked
up dynamically, also add a way to thunk through to GetProcAddress.

This includes a refresh of the generated sources, which requires a
correspondingly new Mesa.

The GetProcAddress stubs are at the moment merely enough to make this
link against Mesa 9.2, but should really be provided for everything not
in the OpenGL 1.2 ABI.

v2: Explicitly hide the GetProcAddress stubs so we can't conflict with
libGL symbols; fix leading tab/space issues [anholt]

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-10-29 12:29:16 -04:00
Adam Jackson 8aacf47e17 glx: Remove DRI1 AIGLX (v2)
Mesa doesn't ship DRI1 drivers as of 8.0, which is about 18 months and
three releases ago.  The main reason to have wanted DRI1 AIGLX was to
get a GLX compositor working, but DRI1's (lack of) memory management API
meant that the cost of a GLX compositor was breaking direct GLX apps,
which isn't a great tradeoff.

Of the DRI1 drivers Mesa has dropped, I believe only mga stands to lose
some functionality here, since it and only it has support for
NV_texture_rectangle.  Since that's required for every extant GLX
compositor I know of, I conclude that anybody with a savage, say, would
probably not notice AIGLX going away, since they wouldn't be running a
GLX compositor in the first place.

In the future we'd like to use GL in the server in a more natural way,
as just another EGL client, including in the GLX implementation itself.
Since there's no EGL implemented for DRI1 drivers, this would already
doom AIGLX on DRI1 (short of entirely forking the GLX implementation,
which I'm not enthusiastic about).

v2: Remove DRI1 from AIGLX conditionals in configure.ac [anholt]

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-10-29 10:30:43 -04:00
Peter Hutterer bbef8e46f2 Replace INCLUDES with AM_CPPFLAGS
newer automake gets quite noisy about this.
hw/xfree86/ddc/Makefile.am:7: warning:
'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
and many more of these.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-06 13:08:13 +10:00
Daniel Stone 459c6da0f9 Move DRI1 from external module to built-in
Rather than building the tiny amount of code required for XFree86-DRI as
an external module, build it in if it's enabled at configure time.

v2: Fix test/Makefile.am to only link libdri.la if DRI is set

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>

fixup for DRI1 move

Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10 00:30:40 -07:00
Keith Packard 5037c9af78 glx/glapioffsets.h is no longer part of the build, remove it
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-12-27 14:02:39 -08:00
Ian Romanick e8485768c1 glx: Add stub implementations of next GLX extension functions
Generated code from Mesa contains dispatch for GLX_ARB_create_context
and GLX_ARB_create_context_profile.  Provide stub implementations of
these functions so that the GLX extension will link.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-12-19 13:38:49 -08:00
Jon TURNEY 1d7f3a0031 glx: Move GLX extension string utility functions
Move GLX extension string utility functions from the DRI1 convenience library
into the GLX extension convenience library, so other DDX which don't have DRI
can use them.

This is probably also needed if anyone actually tries to build an Xorg DDX
with only DRI2 support...

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2011-06-29 19:09:23 +01:00
Jeremy Huddleston ecec578e35 glx: Add _glapi_create_table_from_handle
_glapi_create_table_from_handle was recently added to mesa to ease creation of
a _glapi_table.  This commit brings this API over to xserver for use in
XQuartz (next commit).

The API was generated with scripts from current mesa followed by various
script-foo to remove entries that are not in the server and add those which
are still in the server but not in mesa (CullParameterdvEXT and
CullParameterfvEXT)

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2011-06-15 14:00:35 -07:00
Jon TURNEY c5a612fc18 configure: Let configure --enable/disable-aiglx control building of AIGLX for all DDXs
Let configure --enable/disable-aiglx control building of AIGLX for all DDXs. Currently
we can't use --enable/disable-aiglx to control if Xwin DDX is built with AIGLX enabled,
as at the moment it's forced off if we aren't building the X.Org DDX DRI or DRI2 loader

Rearrange things a bit, introducing a new automake conditional, AIGLX_DRI_LOADER to
specifically indicate if the X.Org DDX DRI/DRI2 loader convenience library should be
built, and replace the previous X.Org DDX-specific uses of the AIGLX conditional with that

As before, AIGLX_DRI_LOADER is only enabled if --enable-glx, --enable-aiglx and at least one
of --enable-dri or --enable-dri2 are enabled

This allows the general conditional AIGLX to control if AIGLX is built for the XWin DDX as
well

The C #define AIGLX set by AC_DEFINE(AIGLX) seems to be obsolete, I can't find anything
which checks it

Updated for ajax's "glx: Make --disable-dri not disable AIGLX" patch, which allows DRI2
to be enabled independently of DRI1

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2011-04-26 10:40:56 +01:00
Adam Jackson 001b6b8b70 glx: Make --disable-dri not disable AIGLX
Either the DRI1 or DRI2 loaders are sufficient.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-04-15 17:47:20 -04:00
Adam Jackson 0cb44cec7b glx: Flatten -DXFree86Server
Always defined by the makefile, so, just get rid of it.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-28 12:46:38 -04:00
Adam Jackson b0c665ac0f glx: Remove noop dispatch table
We can never hit this, because the indirect GLX dispatch code always
forces a current context and checks that it's non-NULL before calling
into the dispatch table.  If it's _not_ null, then _glapi_set_context
will call into the driver, which is responsible for calling
_glapi_set_dispatch to make sure the dispatch table is non-NULL.

Also remove _glapi_set_warning_func and friends, since we can no longer
call them even from dead code.

Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-03-28 12:46:38 -04:00
Adam Jackson a80780a763 glx: Remove swap barrier and hyperpipe support
Never implemented in any open source driver.  The implementation
assumed explicit DDX driver knowledge of how the client-side driver
worked, since at the time the server's GL renderer was not a DRI driver.
But now, it is, so any implementation of these should be done with
additional DRI driver API, like the swap control extension.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-11-30 12:54:47 -05:00
Mikhail Gusarov d306373399 Supply all code using dl*() with DLOPEN_LIBS
Previously DLOPEN_LIBS was managed in top-level configure.ac.
Instead bundle it with the code using dl*() functions to
avoid breakages in uncommon configurations.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-10-29 14:15:02 -07:00
Kristian Høgsberg 7b6400a1b8 glx: Fix drawable private leak on destroy
When a drawable goes away, we don't destroy the GLX drawable in full,
since it may be current for a context.  This means that when the drawable
is destroyed in full later, the backend doesn't get a chance to
destroy resources associated with the drawable (the DRI2Drawable).

With this patch, we destroy the GLX drawable in full when it goes away
and then track down all contexts that reference it and NULL their
pointers.
2009-04-13 13:17:53 -04:00
Dan Nicholson e1c8ee2157 Don't reuse PKG_CHECK_MODULES identifiers
Using GL for the PKG_CHECK_MODULES identifier multiple times means only
the first call will actually be used. Later calls will be skipped due to
GL_CFLAGS and GL_LIBS already being set. This changes DRI to using a
different identifier and DMX to just reusing GL_CFLAGS.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2009-01-18 09:49:06 -08:00
Kristian Høgsberg 110a71d11a Test for DRI2 extension in dri_internal.h and only enable AIGLX DRI2 if found. 2008-12-03 11:22:38 -05:00
Luc Verhaegen 0195d31846 GLX: fix build when dri2 _is_ available.
Caught by Julien Cristau.
2008-10-15 21:46:27 +02:00
Luc Verhaegen 398cdf959a GLX: fix build when dri2 is not available. 2008-10-15 18:24:10 +02:00
Jeremy Huddleston 45def7f0a3 Removed dead glcontextmodes
(cherry picked from commit c6d0ac7471)
2008-08-30 14:20:49 -07:00
Jeremy Huddleston bf084a0769 glcontextmodes.[hc] were not added with the removal of the meas symlinks patch. Copied from mesa head 2008.08.06.
(cherry picked from commit 409e1dd1e9)
2008-08-06 13:37:28 -07:00
Julien Cristau 43c6d5a6f8 distcheck fixes
Still seems to fail because hw/xquartz has too long filenames
2008-07-20 16:30:24 +02:00
Kristian Høgsberg c3eb5b80d8 Move GL/glx on level up now that it's the only thing left under GL. 2008-05-21 13:33:36 -04:00