Commit Graph

42 Commits

Author SHA1 Message Date
Adam Jackson
67c303fff3 miinitext: Load GLX on the mi path
Add a stub for Xnest so it continues to link, but otherwise we support
GLX on every server so there's no need to make every DDX add it.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-14 17:04:48 -05:00
Adam Jackson
d8ec33fe05 glx: Use vnd layer for dispatch (v4)
The big change here is MakeCurrent and context tag tracking. We now
delegate context tags entirely to the vnd layer, and simply store a
pointer to the context state as the tag data. If a context is deleted
while it's current, we allocate a fake ID for the context and move the
context state there, so the tag data still points to a real context. As
a result we can stop trying so hard to detach the client from contexts
at disconnect time and just let resource destruction handle it.

Since vnd handles all the MakeCurrent protocol now, our request handlers
for it can just be return BadImplementation. We also remove a bunch of
LEGAL_NEW_RESOURCE, because now by the time we're called vnd has already
allocated its tracking resource on that XID.

v2: Update to match v2 of the vnd import, and remove more redundant work
like request length checks.

v3: Add/remove the XID map from the vendor private thunk, not the
backend. (Kyle Brenneman)

v4: Fix deletion of ghost contexts (Kyle Brenneman)

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-14 17:04:44 -05:00
Emil Velikov
7ec350ddd4 xfree86: remove aiglx cmd/xorg.conf option
The option is misleading and using it leads to disabling both direct and
accelerated indirect GLX. In such cases the xserver GLX attempts to
match DRISW (IGLX) configs with the DRI2/3 ones (direct GLX) leading to
all sorts of fun experience.

Remove the option until we get a clear split and control over direct vs
indirect GLX.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2016-10-05 14:15:52 -04:00
Emil Velikov
e46820fb89 miinitext: introduce LoadExtensionList() to replace over LoadExtension()
Looping around LoadExtension() meant that ExtensionModuleList was reallocated
on every extension. Using LoadExtensionList() we pass an array thus the
function can do the reallocation in one go, and then loop and setup the
ExtensionModuleList.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>

v2: Update ephyr [Keith Packard]
v3: Eliminate const warnings in LoadExtensionList [Keith Packard]

Signed-off-by: Keith Packard <keithp@keithp.com>
2014-03-25 16:00:17 -07:00
Keith Packard
60014a4a98 Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-12 10:24:11 -08: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
Daniel Stone
3556d43010 Constify extensions in LoadExtension users
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-11-21 11:13:55 +11:00
Dave Airlie
aad428b8e2 glx: drop GLX_LIBS from X server and workaround sdksyms.
We've had reports of two copies of the GLX bits, one in the server
and one in libglx.so causing problems, I didn't understand why the
X server needed a copy so drop it, however then we have to fix a missing
GlxExtensionInit that comes from sdksyms, so work around it by moving
that one declaration into a header that sdksyms doesn't scan.

Thanks to Jon Turney for debugging the actual problem.
(copyright header from extinit.h that seems most appropriate put on top).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52402
Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-25 23:30:53 -07:00
Daniel Stone
a15dac5509 Remove unused setupFunc from extensions
setupFunc was used as an early callback for half-modular extensions such
as Xv, XvMC and DGA to set up hooks between the core server and the
modular component.  Now we've rid ourselves of that, we can also bin
setupFunc.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10 00:31:02 -07:00
Daniel Stone
8171108602 Loader: Remove extension initialisation sorting
Extensions could previously declare initialisation dependencies on other
extensions, which would then get nicely sorted by the loader.  We only
had one user for this, GLX, which had one pointless (Composite) and one
possibly useful dependency (DBE).  As DBE is now a built-in, it will
always be sorted by GLX, so we no longer have any users for it.

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>
2012-07-10 00:31:02 -07:00
Daniel Stone
d52ab85c7e GLX: Remove extension init dependencies
GLX was the only user of extension init order dependencies, using them
to depend on Composite, which has always been built-in anyway, and DBE,
which is now built-in.

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>
2012-07-10 00:31:02 -07:00
Daniel Stone
a1d41e311c Move extension initialisation prototypes into extinit.h
Create extinit.h (and xf86Extensions.h, for Xorg-specific extensions) to
hold all our extension initialisation prototypes, rather than
duplicating them everywhere.

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>
2012-07-09 23:06:41 -07:00
Daniel Stone
b86aa74caf GLX: Insert swrast provider from GlxExtensionInit
Rather than making poor old miinitext.c do it, including making DMX
have fake symbols just to keep it happy.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Stéphane Marchesin <stephane.marchesin@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09 23:06:41 -07:00
Keith Packard
9838b7032e Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:

	-bap
	-psl
	-T PrivatePtr
	-T pmWait
	-T _XFUNCPROTOBEGIN
	-T _XFUNCPROTOEND
	-T _X_EXPORT

The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.

The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.

The comparison was done with this script:

dir1=$1
dir2=$2

for dir in $dir1 $dir2; do
	(cd $dir && find . -name '*.o' | while read file; do
		dir=`dirname $file`
		base=`basename $file .o`
		dump=$dir/$base.dump
		objdump -d $file > $dump
	done)
done

find $dir1 -name '*.dump' | while read dump; do
	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
	diff -u $dump $otherdump
done

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-21 13:54:42 -07:00
Eric Anholt
619c4d60eb glx: Replace broken GLX visual setup with a fixed "all" mode.
With trying to match depths so that you didn't end up with a depth 24
fbconfig for the 32-bit composite visual, I broke the alpha bits on the depth
24 X visual, which angered other applications.  But in fixing that, the
pickFBconfigs code for "minimal" also could end up breaking GLX visuals if
the same FBconfig was chosen for more than one X visual.
We have no reason to not expose as many visuals as possible, but the old
"all" mode didn't match any existing X visuals to GLX visuals, so normal
GL apps didn't work at all.

Instead, replace it with a simple combination of the two modes: Create GLX
visuals by picking unique FBconfigs with as many features as possible for
each X visual in order.  Then, for all remaining FBconfigs that are
appropriate for display, add a corresponding X and GLX visual.

This gets all applications (even ones that aren't smart enough to do FBconfigs)
get all the options to get the visual configuration they want.  The only
potential downside is that the composite ARGB visual is unique and gets a
nearly full-featured GLX visual (except that the root visual might have taken
the tastiest FBconfig), which means that a dumb compositing manager could
waste resources. Write compositing managers using FBconfigs instead, please.
2009-02-10 17:59:03 -08:00
George Sapountzis
21a8052fdc glx: fix forgotten swrast -> SWRast 2008-05-23 22:40:26 +03:00
George Sapountzis
877e6c35ff glx: missing swrast is fatal 2008-05-23 22:40:26 +03:00
Kristian Høgsberg
77ff8fd507 Drop glcore GLX provider.
Obsoleted by the DRI swrast driver.
2008-05-21 12:15:18 -04:00
George Sapountzis
6ff6465931 Add loader for the swrast dri driver. 2008-05-20 16:38:05 -04:00
George Sapountzis
567d389d47 glcore: build from mesa, dlopen from xorg
* The GLcore interface is disposable
* GLcore is installed in DRI_DRIVER_INSTALL_DIR which is overloaded for
  GLX_PROVIDER_INSTALL_DIR
2008-04-23 18:11:55 +03:00
Kristian Høgsberg
879515b139 Add GLX provider for DRI2. 2008-02-14 19:53:49 -05:00
Kristian Høgsberg
a5546a99ac Change the GLX module to initialize after COMPOSITE.
This changes the module initalization order so that the GLX module initializes
after COMPOSITE.  The reason for this change is to be able to initialize a
GLX visual config for the COMPOSITE ARGB visual.
2007-10-29 18:14:18 -04:00
Kristian Høgsberg
8e3c1dfc48 Introduce a new "GlxVisuals" option that controls which visuals are added.
Right now we default to "all" which gives us a situation much like before,
but when the "typical" option is implemented, we can change the default and
reduce the number of visuals the GLX module bloats the X server with.
2007-10-18 21:03:43 -04:00
Kristian Høgsberg
7d74690536 Simplify and clean up GLX visual initialization.
Instead of the fragile setup where we filter the modes common between the
DDX generated GLX visuals and the DRI driver generated fbconfigs, we now
just take the fbconfigs returned by the DRI driver to be our supported set.
2007-10-18 21:03:43 -04:00
Dave Airlie
d387a3ddf7 fix loading of GLcore after recent loading changes 2007-03-27 11:00:13 +10:00
Adam Jackson
52fc7c8dc7 Ensure all *ModuleData symbols are marked _X_EXPORT. Start removing
XFree86LOADER ifdefs, non-loadable hasn't been supported for a while
    now. Remove completely gratuitious REMOVE_LOADER_CHECK_MODULE_INFO
    ifdefs surrounding a call to a function added in XFree86 4.1 (!).
    Miscellaneous static markings.
2006-06-05 03:00:24 +00:00
Kristian Høgsberg
c3342c8000 Merge accel_indirect branch to HEAD. 2006-03-12 00:11:34 +00:00
Ian Romanick
0b150a05e6 Whitespace change just to make sure I created the branch correctly. 2005-11-03 17:12:53 +00:00
Kevin E Martin
a311bfa73a Fix support for enabling/disabling extensions loaded from modules. 2005-11-02 15:53:57 +00:00
Ian Romanick
940158a6f2 Replace all uses of __glEvalComputeK (and the doubly redundant
EvalComputeK) with calls to one of __glMap[12][df]_size. This was
    tested with progs/samples/eval (from Mesa).
2005-09-28 03:37:22 +00:00
Kevin E Martin
5f81eb1d89 Fix the *-config.h includes so that it is possible to build modules without
having to use -include in the Makefile.
2005-07-16 03:49:59 +00:00
Adam Jackson
799208dd44 Bug #377: Make lib{glx,GLcore,dri} work when compiled as dlloader modules. 2004-07-26 19:06:04 +00:00
Eric Anholt
e56e24af25 Merge DRI-trunk-20040613 changes in programs/Xserver/GL. 2004-06-16 09:37:59 +00:00
Eric Anholt
2e1868b560 DRI trunk-20040613 import 2004-06-16 09:25:21 +00:00
Eric Anholt
22bad9474b DRI XFree86-4_3_99_12-merge import 2004-06-16 09:22:17 +00:00
Egbert Eich
0664db19bf Merging XORG-CURRENT into trunk 2004-04-23 18:54:16 +00:00
Egbert Eich
dae90c3af9 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 2004-03-14 08:34:49 +00:00
Egbert Eich
867451f1ab Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 2004-03-03 12:12:50 +00:00
Egbert Eich
df0313d35b readding XFree86's cvs IDs 2004-02-26 13:36:15 +00:00
Egbert Eich
147aae87fd Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 2004-02-26 09:23:53 +00:00
Kaleb Keithley
adc7f9a4eb XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks 2003-11-25 19:29:01 +00:00
Kaleb Keithley
9508a382f8 Initial revision 2003-11-14 16:48:57 +00:00