Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
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>
|
|
This replaces AX_TLS (GPL3) with XORG_TLS (MIT)
In file included from glapi.c:46:
In file included from ./glapi.h:51:
./glthread.h:237:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
__attribute__((tls_model("initial-exec")));
^
In file included from glapi.c:46:
./glapi.h:92:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
__attribute__((tls_model("initial-exec")));
^
glapi.c:82:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
__attribute__((tls_model("initial-exec"))) = NULL;
^
glapi.c:85:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes]
__attribute__((tls_model("initial-exec")));
^
4 errors generated.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jamey Sharp <jamey@minilop.net>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
|
|
The interface to RegionInit():
RegionInit (RegionPtr pReg, BoxPtr rect, int size);
is very confusing because it doesn't take a list of boxes, it takes
*one* box, but if that box is NULL, it initializes an empty region
with 'size' rectangles preallocated.
Most callers of this function were correctly passing either NULL or
just one box, but there were three confused cases, where the code
seems to expect a region to be created from a list of boxes.
This patch adds a new function RegionInitBoxes() and fixes those
instances to call that instead.
And yes, the pixman function to initialize a region from a list of
boxes is called init_rects() because pixman is also awesome.
V2: Make RegionInitBoxes() return a Bool indicating whether the call
succeeded, and fix the callers to check this return value.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Søren Sandmann <ssp@redhat.com>
|
|
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>
|
|
Otherwise the garbage you return could well be numerically identical to
one of the swap type tokens, and apps which rely on us to tell the truth
would be in trouble.
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
GLX pixmaps take a reference on the underlying pixmap; X and GLX pixmap
IDs can be destroyed in either order with no error. Only windows need
to be tracked under both XIDs.
Fixes piglit/glx-pixmap-life.
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
All the implementations of makeCurrent and forceCurrent are identical,
so just use makeCurrent everywhere.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
This would let you do a constant-time context lookup, but if that's your
performance problem you have two problems. Just use the context's XID
as the tag value instead.
In order to do this, we have to defer destroying a context until it
actually goes unreferenced, as you're allowed to mention a context tag
after you've (ostensibly) destroyed the context, as long as it's still
your current context. Thus, change DestroyContext to merely mark the
context as dead if it's a current context, and call down to actual
resource destruction (and XID reclamation) in StopUsingContext.
Also, stop trying to delete context state from DrawableGone. This was
always broken, as GLX does not say that contexts are destroyed when
their drawables are destroyed. But with the above change to defer
context destruction, this would trigger a server crash on client exit as
we'd free the context state twice.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
We never need to generate stubs, because those conditions can't happen
in the server. Yank that code out, but keep the bookkeeping for which
extension functions are registered so the DRI driver doesn't get
confused.
As a pleasant bonus, we're now friendlier for environments like selinux
that make runtime code generation difficult, and we're portable to more
arches since we don't have to port the assembly stubs.
Fixes the following clutter conformance tests (indirect rendering,
llvmpipe driver):
test-cogl-backface-culling
test-cogl-materials
test-cogl-readpixels
test-cogl-texture-mipmaps
test-cogl-texture-get-set-data
test-cogl-viewport
test-cogl-offscreen
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
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>
|
|
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
This isn't a meaningful thing in the indirect glx loader, so just warn
if it ever happens and move on.
But also, mark it PUBLIC, so if the driver does ever call it we merely
warn instead of aborting because ld.so can't find the symbol.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
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>
|
|
AX_TLS detects when toolchains support __thread or __declspec(thread),
but existing code assumed __thread.
This also adds a check to configure.ac to error out if TLS is requested
but unsupported.
Found-by: Tinderbox
http://tinderbox.x.org/builds/2011-03-22-0007
Regression-from: 82b1eaa6cad20f39dbf15573bdb3d62acbcd91f9
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Tom Fogal <tfogal@alumni.unh.edu>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
|
|
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
|
|
DRI, DRI2 and swrast all had near-identical driver probing logic.
Pull it into glxdricommon.
[ajax: warning fix]
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
|
|
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
We can guarantee that the X server does not call DRI driver services
from multiple threads, so _glapi_check_multithread need never do
anything special. As a result, ThreadSafe is always false, so remove it
and simplify expressions where it appeared to match.
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
We don't support BeOS, so, no.
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
xthreads is an ancient wrapper around a half dozen or so common thread
APIs, including pthreads. Just use pthreads directly if you have it; if
you don't, get with the times.
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Solaris 7 and older are not supported; Solaris 8 and later have (and
use) pthreads.
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
|
|
mesa used to send too long requests for GLXDestroyPixmap,
GLXDestroyWindow, GLXChangeDrawableAttributes, GLXGetDrawableAttributes
and GLXGetFBConfigsSGIX.
Fixes a regression introduced in ec9c97c6bf70b523bc500bd3adf62176f1bb33a4
X.Org bug#33324 <https://bugs.freedesktop.org/show_bug.cgi?id=33324>
Reported-by: xunx.fang@intel.com
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
The request is followed by a list of attributes.
X.Org bug#33449
Reported-and-tested-by: meng <mengmeng.meng@intel.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
The request is followed by an attribute list.
Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
|
|
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
|
|
Various glx requests include a list of pairs of attributes. We were
only swapping the first half.
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
|
|
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
|
|
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
|
|
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
|
|
render2.c: In function ‘__glXDisp_Map2d’:
render2.c:127: warning: ‘u1’ may be used uninitialized in this function
render2.c: In function ‘__glXDisp_Map1d’:
render2.c:90: warning: ‘u1’ may be used uninitialized in this function
Remove unnecessary test, and change memcpy to memmove as all users were
doing overlapping copies.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
|
|
All the DRI extension types have a base extension type as their first
member to avoid exactly these types of warning.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
|
|
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>
|
|
|
|
In all these cases, any rendering implied by this damage has already
occurred, and we want to get the damage out to the client. Some of
the DamageRegionAppend calls were explicitly telling damage to flush
the reportAfter damage out, but not all.
Bug #30260. Fixes the compiz wallpaper plugin with client damage
changed to reportAfter.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
This patch has been generated by the following Coccinelle semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- free(E);
- }
+ free(E);
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This patch has been generated by the following Coccinelle semantic patch:
@@
expression E;
@@
- if (E != NULL)
- free(E);
+ free(E);
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
(note that nearly identical patches were proposed by Kristian and Chris)
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Since this code was using CreateScratchGC and not GetScratchGC,
FreeScratchGC would always call FreeGC, so just call it directly.
As long as the drawable provided to CreateGC has the same screen and
depth as were passed to CreateScratchGC, these functions are basically
identical. There are two differences:
- CreateGC gives you a non-null stipple. You probably don't care.
- CreateGC passes the gcid and client to XACE. There are several
internal GCs allocated in the server, and they all pass 0 and
serverClient. I expect XACE will never reject that combination.
The callers of createDrawable all verify that pDraw has the same screen
that driScreen does. In short, this should have no behavioral change.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
During a SwapBuffers request, we may end up querying an unknown drawable
outside of an active context, and so need to report this error prior to
attempting to dereference the NULL context.
Also fixes:
[Bug 29184] glXSwapBuffers with no GLX context crashes X.
https://bugs.freedesktop.org/show_bug.cgi?id=29184
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Because some EnterVT code needs to remove it self from the
call chain, we need to fix all of the wrappers to correctly
unwrap/rewrap during the call chain. This is a follow-on to the fix
for bug 27114 in commit 68a9ee8370e6f9b38218376ac92d5130a5b0ef1e.
Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Jesse Barnes <jesse.barnes@intel.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
|
|
I built latest server and copied over a mesa 7.8 dri2 driver to use with it,
and it crashed in here starting compiz. Looks like we need to validate the
flush extension is registered before calling invalidate.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Replace xstrdup with strdup when either constant string is
being duplicated or argument is guarded by conditionals and
obviously can't be NULL
Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
I got this wrong in e2929db7b737413cf93fbebdf4d15abdfebff05c.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|